From a7e4a9c2969c6612659f990c4e3213d47e7a17f3 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 19 Nov 2025 09:12:35 -0800 Subject: [PATCH 1/3] Support UnionType --- hsms/clvm_serde/__init__.py | 5 ++++- tests/test_clvm_serde.py | 29 ++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/hsms/clvm_serde/__init__.py b/hsms/clvm_serde/__init__.py index cd4a121..093e93c 100644 --- a/hsms/clvm_serde/__init__.py +++ b/hsms/clvm_serde/__init__.py @@ -1,4 +1,5 @@ -from dataclasses import is_dataclass, fields, MISSING +from dataclasses import MISSING, fields, is_dataclass +from types import UnionType from typing import Any, Callable, Optional, Tuple, Type, Union, get_type_hints from chia_base.meta.type_tree import ArgsType, CompoundLookup, OriginArgsType, TypeTree @@ -115,6 +116,7 @@ def ser(item): tuple: serialize_for_tuple, tuple_frugal: ser_for_tuple_frugal, Union: serialize_for_optional, + UnionType: serialize_for_optional, } @@ -342,6 +344,7 @@ def deserialize_optional(p: Program): tuple: deser_for_tuple, tuple_frugal: de_for_tuple_frugal, Union: deser_for_optional, + UnionType: deser_for_optional, } diff --git a/tests/test_clvm_serde.py b/tests/test_clvm_serde.py index ea05159..6a58740 100644 --- a/tests/test_clvm_serde.py +++ b/tests/test_clvm_serde.py @@ -31,7 +31,8 @@ from .legacy.unsigned_spend import UnsignedSpend as LegacyUS -def test_ser(): +@pytest.mark.parametrize("pep604", [True, False]) +def test_ser(pep604: bool): tpb = to_program_for_type(bytes) fpb = from_program_for_type(bytes) tps = to_program_for_type(str) @@ -134,9 +135,16 @@ class Foo: f1 = fp(p) assert f1 == foo - @dataclass - class Foo: - a: Optional[int] = field(metadata=dict(key="a")) + if pep604: + + @dataclass + class Foo: + a: int | None = field(metadata=dict(key="a")) + else: + + @dataclass + class Foo: + a: Optional[int] = field(metadata=dict(key="a")) tp = to_program_for_type(Foo) fp = from_program_for_type(Foo) @@ -151,9 +159,16 @@ class Foo: p1 = tp(foo) assert p1 == p - @dataclass - class Foo: - a: Optional[List[int]] = field(metadata=dict(key="a")) + if pep604: + + @dataclass + class Foo: + a: List[int] | None = field(metadata=dict(key="a")) + else: + + @dataclass + class Foo: + a: Optional[List[int]] = field(metadata=dict(key="a")) tp = to_program_for_type(Foo) fp = from_program_for_type(Foo) From ed5c00361867b4f20f229bf307017493948263b2 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 19 Nov 2025 09:19:10 -0800 Subject: [PATCH 2/3] ??? --- .github/workflows/build-wheel-tree.yaml | 4 +- .github/workflows/build-wheels.yaml | 2 +- hsms.egg-info/PKG-INFO | 249 ++++++++++++++++++++++++ hsms.egg-info/SOURCES.txt | 68 +++++++ hsms.egg-info/dependency_links.txt | 1 + hsms.egg-info/entry_points.txt | 12 ++ hsms.egg-info/requires.txt | 8 + hsms.egg-info/top_level.txt | 1 + 8 files changed, 342 insertions(+), 3 deletions(-) create mode 100644 hsms.egg-info/PKG-INFO create mode 100644 hsms.egg-info/SOURCES.txt create mode 100644 hsms.egg-info/dependency_links.txt create mode 100644 hsms.egg-info/entry_points.txt create mode 100644 hsms.egg-info/requires.txt create mode 100644 hsms.egg-info/top_level.txt diff --git a/.github/workflows/build-wheel-tree.yaml b/.github/workflows/build-wheel-tree.yaml index 7cf93ed..e53c513 100644 --- a/.github/workflows/build-wheel-tree.yaml +++ b/.github/workflows/build-wheel-tree.yaml @@ -4,7 +4,7 @@ on: branches: - main tags: - - '**' + - "**" pull_request: concurrency: @@ -25,7 +25,7 @@ jobs: fetch-depth: 0 - name: Create venv - run: /opt/python/cp38-cp38/bin/python3 -m venv venv + run: /opt/python/cp310-cp310/bin/python3 -m venv venv - name: Create Wheels run: | diff --git a/.github/workflows/build-wheels.yaml b/.github/workflows/build-wheels.yaml index 00aca57..fbd686a 100644 --- a/.github/workflows/build-wheels.yaml +++ b/.github/workflows/build-wheels.yaml @@ -32,7 +32,7 @@ jobs: fetch-depth: 0 - name: Create venv - run: /opt/python/cp38-cp38/bin/python3 -m venv venv + run: /opt/python/cp310-cp310/bin/python3 -m venv venv - name: Create Wheel run: | diff --git a/hsms.egg-info/PKG-INFO b/hsms.egg-info/PKG-INFO new file mode 100644 index 0000000..f2f93c2 --- /dev/null +++ b/hsms.egg-info/PKG-INFO @@ -0,0 +1,249 @@ +Metadata-Version: 2.4 +Name: hsms +Version: 0.3.1.dev13 +Summary: Hardware security module simulator for chia bls12_381 signatures +Author-email: Richard Kiss +License: Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2025 Chia Network Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: segno==1.4.1 +Requires-Dist: chia_base>=0.1.5 +Requires-Dist: chialisp_puzzles>=0.1.1 +Provides-Extra: dev +Requires-Dist: flake8>=4.0.1; extra == "dev" +Requires-Dist: black>=22.6; extra == "dev" +Requires-Dist: pytest; extra == "dev" +Dynamic: license-file + +HSMS: hardware security module software/simulator + +This project is intended to run on an air-gapped computer to sign chia spends using bls12_381 keys. + + +Install +------- + +`$ pip install -e .` + +If on windows, you need one extra package: + +`$ pip install pyreadline` + + +Tools +----- + +Command-line tools installed include: + +- `hsms` - HSM sim that accepts `UnsignedSpend` objects and produces signatures, full or partial +- `hsmgen` - generate secret keys +- `hsmpk` - show public keys for secret keys +- `hsmmerge` - merge signatures for a multisig spend +- `qrint` - convert binary to/from qrint ascii + +For testing & debugging: + +- `hsm_test_spend` - create a simple test `UnsignedSpend` multisig spend +- `hsm_dump_sb` - debug utility to dump information about a `SpendBundle` +- `hsm_dump_us` - debug utility to dump information about an `UnsignedSpend` diff --git a/hsms.egg-info/SOURCES.txt b/hsms.egg-info/SOURCES.txt new file mode 100644 index 0000000..b240d8b --- /dev/null +++ b/hsms.egg-info/SOURCES.txt @@ -0,0 +1,68 @@ +.gitignore +Dockerfile +LICENSE +README.md +pyproject.toml +setup.py +.github/dependabot.yml +.github/workflows/build-wheel-tree.yaml +.github/workflows/build-wheels.yaml +.github/workflows/check-commit-signing.yml +.github/workflows/dependency-review.yml +.github/workflows/docker.yaml +hsms/__init__.py +hsms.egg-info/PKG-INFO +hsms.egg-info/SOURCES.txt +hsms.egg-info/dependency_links.txt +hsms.egg-info/entry_points.txt +hsms.egg-info/requires.txt +hsms.egg-info/top_level.txt +hsms/clvm/__init__.py +hsms/clvm/disasm.py +hsms/clvm_serde/__init__.py +hsms/cmds/__init__.py +hsms/cmds/hsm_dump_sb.py +hsms/cmds/hsm_dump_us.py +hsms/cmds/hsm_test_spend.py +hsms/cmds/hsmgen.py +hsms/cmds/hsmmerge.py +hsms/cmds/hsmpk.py +hsms/cmds/hsms.py +hsms/cmds/hsmwizard.py +hsms/cmds/poser_gen.py +hsms/cmds/poser_verify.py +hsms/cmds/qrint.py +hsms/consensus/__init__.py +hsms/consensus/conditions.py +hsms/core/__init__.py +hsms/core/signing_hints.py +hsms/core/unsigned_spend.py +hsms/debug/__init__.py +hsms/debug/debug_spend_bundle.py +hsms/process/__init__.py +hsms/process/sign.py +hsms/puzzles/conlang.py +hsms/puzzles/p2_conditions.py +hsms/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py +hsms/util/__init__.py +hsms/util/byte_chunks.py +hsms/util/qrint_encoding.py +hsms/util/type_tree.py +tests/__init__.py +tests/full_life_cycle.sh +tests/generate.py +tests/test_clvm_serde.py +tests/test_cmds.py +tests/test_coverage.py +tests/test_disasm.py +tests/test_lifecycle.py +tests/test_qrint.py +tests/cmds/hsm_dump_us_1.txt +tests/cmds/hsm_test_1.txt +tests/cmds/hsm_test_2.txt +tests/cmds/hsm_test_3.txt +tests/cmds/hsmpk-1.txt +tests/cmds/hsmpk-2.txt +tests/legacy/clvm_serialization.py +tests/legacy/signing_hints.py +tests/legacy/unsigned_spend.py \ No newline at end of file diff --git a/hsms.egg-info/dependency_links.txt b/hsms.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/hsms.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/hsms.egg-info/entry_points.txt b/hsms.egg-info/entry_points.txt new file mode 100644 index 0000000..e73e9e8 --- /dev/null +++ b/hsms.egg-info/entry_points.txt @@ -0,0 +1,12 @@ +[console_scripts] +hsm_dump_sb = hsms.cmds.hsm_dump_sb:main +hsm_dump_us = hsms.cmds.hsm_dump_us:main +hsm_test_spend = hsms.cmds.hsm_test_spend:main +hsmgen = hsms.cmds.hsmgen:main +hsmmerge = hsms.cmds.hsmmerge:main +hsmpk = hsms.cmds.hsmpk:main +hsms = hsms.cmds.hsms:main +hsmwizard = hsms.cmds.hsmwizard:main +poser_gen = hsms.cmds.poser_gen:main +poser_verify = hsms.cmds.poser_verify:main +qrint = hsms.cmds.qrint:main diff --git a/hsms.egg-info/requires.txt b/hsms.egg-info/requires.txt new file mode 100644 index 0000000..c3e9c99 --- /dev/null +++ b/hsms.egg-info/requires.txt @@ -0,0 +1,8 @@ +segno==1.4.1 +chia_base>=0.1.5 +chialisp_puzzles>=0.1.1 + +[dev] +flake8>=4.0.1 +black>=22.6 +pytest diff --git a/hsms.egg-info/top_level.txt b/hsms.egg-info/top_level.txt new file mode 100644 index 0000000..54be018 --- /dev/null +++ b/hsms.egg-info/top_level.txt @@ -0,0 +1 @@ +hsms From 89b73c9f164d7fafd17f96a3bcf28e939e4d86b7 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 19 Nov 2025 09:21:37 -0800 Subject: [PATCH 3/3] Accidental egg commit --- hsms.egg-info/PKG-INFO | 249 ----------------------------- hsms.egg-info/SOURCES.txt | 68 -------- hsms.egg-info/dependency_links.txt | 1 - hsms.egg-info/entry_points.txt | 12 -- hsms.egg-info/requires.txt | 8 - hsms.egg-info/top_level.txt | 1 - 6 files changed, 339 deletions(-) delete mode 100644 hsms.egg-info/PKG-INFO delete mode 100644 hsms.egg-info/SOURCES.txt delete mode 100644 hsms.egg-info/dependency_links.txt delete mode 100644 hsms.egg-info/entry_points.txt delete mode 100644 hsms.egg-info/requires.txt delete mode 100644 hsms.egg-info/top_level.txt diff --git a/hsms.egg-info/PKG-INFO b/hsms.egg-info/PKG-INFO deleted file mode 100644 index f2f93c2..0000000 --- a/hsms.egg-info/PKG-INFO +++ /dev/null @@ -1,249 +0,0 @@ -Metadata-Version: 2.4 -Name: hsms -Version: 0.3.1.dev13 -Summary: Hardware security module simulator for chia bls12_381 signatures -Author-email: Richard Kiss -License: Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2025 Chia Network Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Description-Content-Type: text/markdown -License-File: LICENSE -Requires-Dist: segno==1.4.1 -Requires-Dist: chia_base>=0.1.5 -Requires-Dist: chialisp_puzzles>=0.1.1 -Provides-Extra: dev -Requires-Dist: flake8>=4.0.1; extra == "dev" -Requires-Dist: black>=22.6; extra == "dev" -Requires-Dist: pytest; extra == "dev" -Dynamic: license-file - -HSMS: hardware security module software/simulator - -This project is intended to run on an air-gapped computer to sign chia spends using bls12_381 keys. - - -Install -------- - -`$ pip install -e .` - -If on windows, you need one extra package: - -`$ pip install pyreadline` - - -Tools ------ - -Command-line tools installed include: - -- `hsms` - HSM sim that accepts `UnsignedSpend` objects and produces signatures, full or partial -- `hsmgen` - generate secret keys -- `hsmpk` - show public keys for secret keys -- `hsmmerge` - merge signatures for a multisig spend -- `qrint` - convert binary to/from qrint ascii - -For testing & debugging: - -- `hsm_test_spend` - create a simple test `UnsignedSpend` multisig spend -- `hsm_dump_sb` - debug utility to dump information about a `SpendBundle` -- `hsm_dump_us` - debug utility to dump information about an `UnsignedSpend` diff --git a/hsms.egg-info/SOURCES.txt b/hsms.egg-info/SOURCES.txt deleted file mode 100644 index b240d8b..0000000 --- a/hsms.egg-info/SOURCES.txt +++ /dev/null @@ -1,68 +0,0 @@ -.gitignore -Dockerfile -LICENSE -README.md -pyproject.toml -setup.py -.github/dependabot.yml -.github/workflows/build-wheel-tree.yaml -.github/workflows/build-wheels.yaml -.github/workflows/check-commit-signing.yml -.github/workflows/dependency-review.yml -.github/workflows/docker.yaml -hsms/__init__.py -hsms.egg-info/PKG-INFO -hsms.egg-info/SOURCES.txt -hsms.egg-info/dependency_links.txt -hsms.egg-info/entry_points.txt -hsms.egg-info/requires.txt -hsms.egg-info/top_level.txt -hsms/clvm/__init__.py -hsms/clvm/disasm.py -hsms/clvm_serde/__init__.py -hsms/cmds/__init__.py -hsms/cmds/hsm_dump_sb.py -hsms/cmds/hsm_dump_us.py -hsms/cmds/hsm_test_spend.py -hsms/cmds/hsmgen.py -hsms/cmds/hsmmerge.py -hsms/cmds/hsmpk.py -hsms/cmds/hsms.py -hsms/cmds/hsmwizard.py -hsms/cmds/poser_gen.py -hsms/cmds/poser_verify.py -hsms/cmds/qrint.py -hsms/consensus/__init__.py -hsms/consensus/conditions.py -hsms/core/__init__.py -hsms/core/signing_hints.py -hsms/core/unsigned_spend.py -hsms/debug/__init__.py -hsms/debug/debug_spend_bundle.py -hsms/process/__init__.py -hsms/process/sign.py -hsms/puzzles/conlang.py -hsms/puzzles/p2_conditions.py -hsms/puzzles/p2_delegated_puzzle_or_hidden_puzzle.py -hsms/util/__init__.py -hsms/util/byte_chunks.py -hsms/util/qrint_encoding.py -hsms/util/type_tree.py -tests/__init__.py -tests/full_life_cycle.sh -tests/generate.py -tests/test_clvm_serde.py -tests/test_cmds.py -tests/test_coverage.py -tests/test_disasm.py -tests/test_lifecycle.py -tests/test_qrint.py -tests/cmds/hsm_dump_us_1.txt -tests/cmds/hsm_test_1.txt -tests/cmds/hsm_test_2.txt -tests/cmds/hsm_test_3.txt -tests/cmds/hsmpk-1.txt -tests/cmds/hsmpk-2.txt -tests/legacy/clvm_serialization.py -tests/legacy/signing_hints.py -tests/legacy/unsigned_spend.py \ No newline at end of file diff --git a/hsms.egg-info/dependency_links.txt b/hsms.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/hsms.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/hsms.egg-info/entry_points.txt b/hsms.egg-info/entry_points.txt deleted file mode 100644 index e73e9e8..0000000 --- a/hsms.egg-info/entry_points.txt +++ /dev/null @@ -1,12 +0,0 @@ -[console_scripts] -hsm_dump_sb = hsms.cmds.hsm_dump_sb:main -hsm_dump_us = hsms.cmds.hsm_dump_us:main -hsm_test_spend = hsms.cmds.hsm_test_spend:main -hsmgen = hsms.cmds.hsmgen:main -hsmmerge = hsms.cmds.hsmmerge:main -hsmpk = hsms.cmds.hsmpk:main -hsms = hsms.cmds.hsms:main -hsmwizard = hsms.cmds.hsmwizard:main -poser_gen = hsms.cmds.poser_gen:main -poser_verify = hsms.cmds.poser_verify:main -qrint = hsms.cmds.qrint:main diff --git a/hsms.egg-info/requires.txt b/hsms.egg-info/requires.txt deleted file mode 100644 index c3e9c99..0000000 --- a/hsms.egg-info/requires.txt +++ /dev/null @@ -1,8 +0,0 @@ -segno==1.4.1 -chia_base>=0.1.5 -chialisp_puzzles>=0.1.1 - -[dev] -flake8>=4.0.1 -black>=22.6 -pytest diff --git a/hsms.egg-info/top_level.txt b/hsms.egg-info/top_level.txt deleted file mode 100644 index 54be018..0000000 --- a/hsms.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -hsms