tx-engine 0.6.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. tx_engine-0.6.6/.github/workflows/CI.yml +142 -0
  2. tx_engine-0.6.6/.gitignore +87 -0
  3. tx_engine-0.6.6/Cargo.lock +1811 -0
  4. tx_engine-0.6.6/Cargo.toml +61 -0
  5. tx_engine-0.6.6/LICENSE +21 -0
  6. tx_engine-0.6.6/LICENSE-rust-sv +21 -0
  7. tx_engine-0.6.6/PKG-INFO +164 -0
  8. tx_engine-0.6.6/README.md +145 -0
  9. tx_engine-0.6.6/docs/Development.md +139 -0
  10. tx_engine-0.6.6/docs/PythonClasses.md +220 -0
  11. tx_engine-0.6.6/docs/README-chain-gang.md +66 -0
  12. tx_engine-0.6.6/docs/Releases.md +37 -0
  13. tx_engine-0.6.6/docs/Requirements +18 -0
  14. tx_engine-0.6.6/docs/diagrams/debugger.png +0 -0
  15. tx_engine-0.6.6/docs/diagrams/debugger.puml +103 -0
  16. tx_engine-0.6.6/docs/diagrams/keys.png +0 -0
  17. tx_engine-0.6.6/docs/diagrams/keys.puml +20 -0
  18. tx_engine-0.6.6/docs/diagrams/overview.png +0 -0
  19. tx_engine-0.6.6/docs/diagrams/overview.puml +16 -0
  20. tx_engine-0.6.6/pyproject.toml +25 -0
  21. tx_engine-0.6.6/python/examples/README.md +8 -0
  22. tx_engine-0.6.6/python/examples/add.bs +2 -0
  23. tx_engine-0.6.6/python/examples/swap.bs +1 -0
  24. tx_engine-0.6.6/python/lint.sh +5 -0
  25. tx_engine-0.6.6/python/src/debugger/__init__.py +0 -0
  26. tx_engine-0.6.6/python/src/debugger/breakpoints.py +56 -0
  27. tx_engine-0.6.6/python/src/debugger/debug_context.py +129 -0
  28. tx_engine-0.6.6/python/src/debugger/debug_interface.py +249 -0
  29. tx_engine-0.6.6/python/src/debugger/decode_op.py +60 -0
  30. tx_engine-0.6.6/python/src/debugger/script_state.py +71 -0
  31. tx_engine-0.6.6/python/src/debugger/stack_frame.py +59 -0
  32. tx_engine-0.6.6/python/src/debugger/util.py +14 -0
  33. tx_engine-0.6.6/python/src/requirements.txt +2 -0
  34. tx_engine-0.6.6/python/src/tests/README.md +32 -0
  35. tx_engine-0.6.6/python/src/tests/test_bit_twiddling.py +198 -0
  36. tx_engine-0.6.6/python/src/tests/test_bsv.py +407 -0
  37. tx_engine-0.6.6/python/src/tests/test_debug.py +39 -0
  38. tx_engine-0.6.6/python/src/tests/test_debugger.py +134 -0
  39. tx_engine-0.6.6/python/src/tests/test_ec.py +200 -0
  40. tx_engine-0.6.6/python/src/tests/test_fed.py +87 -0
  41. tx_engine-0.6.6/python/src/tests/test_if.py +72 -0
  42. tx_engine-0.6.6/python/src/tests/test_interface.py +27 -0
  43. tx_engine-0.6.6/python/src/tests/test_op.py +220 -0
  44. tx_engine-0.6.6/python/src/tests/test_parse.py +73 -0
  45. tx_engine-0.6.6/python/src/tests/test_script.py +142 -0
  46. tx_engine-0.6.6/python/src/tests/test_sign.py +44 -0
  47. tx_engine-0.6.6/python/src/tests/test_tx.py +177 -0
  48. tx_engine-0.6.6/python/src/tests/test_wallet.py +94 -0
  49. tx_engine-0.6.6/python/src/tx_engine/__init__.py +13 -0
  50. tx_engine-0.6.6/python/src/tx_engine/engine/__init__.py +0 -0
  51. tx_engine-0.6.6/python/src/tx_engine/engine/context.py +116 -0
  52. tx_engine-0.6.6/python/src/tx_engine/engine/decode_op.py +38 -0
  53. tx_engine-0.6.6/python/src/tx_engine/engine/engine_types.py +7 -0
  54. tx_engine-0.6.6/python/src/tx_engine/engine/op_code_names.py +108 -0
  55. tx_engine-0.6.6/python/src/tx_engine/engine/op_codes.py +122 -0
  56. tx_engine-0.6.6/python/src/tx_engine/engine/util.py +109 -0
  57. tx_engine-0.6.6/python/src/tx_engine/interface/__init__.py +0 -0
  58. tx_engine-0.6.6/python/src/tx_engine/interface/blockchain_interface.py +79 -0
  59. tx_engine-0.6.6/python/src/tx_engine/interface/interface_factory.py +24 -0
  60. tx_engine-0.6.6/python/src/tx_engine/interface/mock_interface.py +108 -0
  61. tx_engine-0.6.6/python/src/tx_engine/interface/rpc_interface.py +272 -0
  62. tx_engine-0.6.6/python/src/tx_engine/interface/verify_script.py +129 -0
  63. tx_engine-0.6.6/python/src/tx_engine/interface/woc.py +125 -0
  64. tx_engine-0.6.6/python/src/tx_engine/interface/woc_interface.py +92 -0
  65. tx_engine-0.6.6/python/src/tx_engine/tx/__init__.py +0 -0
  66. tx_engine-0.6.6/python/src/tx_engine/tx/sighash.py +19 -0
  67. tx_engine-0.6.6/python/tests.sh +4 -0
  68. tx_engine-0.6.6/src/address/mod.rs +125 -0
  69. tx_engine-0.6.6/src/interface/blockchain_interface.rs +47 -0
  70. tx_engine-0.6.6/src/interface/mod.rs +13 -0
  71. tx_engine-0.6.6/src/interface/test_interface.rs +132 -0
  72. tx_engine-0.6.6/src/interface/woc_interface.rs +181 -0
  73. tx_engine-0.6.6/src/lib.rs +36 -0
  74. tx_engine-0.6.6/src/messages/addr.rs +411 -0
  75. tx_engine-0.6.6/src/messages/authch.rs +66 -0
  76. tx_engine-0.6.6/src/messages/block.rs +284 -0
  77. tx_engine-0.6.6/src/messages/block_header.rs +198 -0
  78. tx_engine-0.6.6/src/messages/block_locator.rs +92 -0
  79. tx_engine-0.6.6/src/messages/blocktxn.rs +101 -0
  80. tx_engine-0.6.6/src/messages/cmpctblock.rs +177 -0
  81. tx_engine-0.6.6/src/messages/createstrm.rs +142 -0
  82. tx_engine-0.6.6/src/messages/fee_filter.rs +57 -0
  83. tx_engine-0.6.6/src/messages/filter_add.rs +91 -0
  84. tx_engine-0.6.6/src/messages/filter_load.rs +95 -0
  85. tx_engine-0.6.6/src/messages/getblocktxn.rs +75 -0
  86. tx_engine-0.6.6/src/messages/headers.rs +146 -0
  87. tx_engine-0.6.6/src/messages/inv.rs +104 -0
  88. tx_engine-0.6.6/src/messages/inv_vect.rs +69 -0
  89. tx_engine-0.6.6/src/messages/merkle_block.rs +325 -0
  90. tx_engine-0.6.6/src/messages/message.rs +982 -0
  91. tx_engine-0.6.6/src/messages/message_header.rs +194 -0
  92. tx_engine-0.6.6/src/messages/mod.rs +131 -0
  93. tx_engine-0.6.6/src/messages/node_addr.rs +98 -0
  94. tx_engine-0.6.6/src/messages/node_addr_ex.rs +62 -0
  95. tx_engine-0.6.6/src/messages/out_point.rs +63 -0
  96. tx_engine-0.6.6/src/messages/ping.rs +57 -0
  97. tx_engine-0.6.6/src/messages/protoconf.rs +90 -0
  98. tx_engine-0.6.6/src/messages/reject.rs +153 -0
  99. tx_engine-0.6.6/src/messages/send_cmpct.rs +70 -0
  100. tx_engine-0.6.6/src/messages/streamack.rs +116 -0
  101. tx_engine-0.6.6/src/messages/tx.rs +448 -0
  102. tx_engine-0.6.6/src/messages/tx_in.rs +73 -0
  103. tx_engine-0.6.6/src/messages/tx_out.rs +59 -0
  104. tx_engine-0.6.6/src/messages/version.rs +216 -0
  105. tx_engine-0.6.6/src/network/mod.rs +22 -0
  106. tx_engine-0.6.6/src/network/network.rs +255 -0
  107. tx_engine-0.6.6/src/network/seed_iter.rs +63 -0
  108. tx_engine-0.6.6/src/peer/atomic_reader.rs +139 -0
  109. tx_engine-0.6.6/src/peer/mod.rs +91 -0
  110. tx_engine-0.6.6/src/peer/peer.rs +453 -0
  111. tx_engine-0.6.6/src/python/base58_checksum.rs +33 -0
  112. tx_engine-0.6.6/src/python/hashes.rs +22 -0
  113. tx_engine-0.6.6/src/python/mod.rs +177 -0
  114. tx_engine-0.6.6/src/python/op_code_names.rs +147 -0
  115. tx_engine-0.6.6/src/python/py_script.rs +336 -0
  116. tx_engine-0.6.6/src/python/py_tx.rs +363 -0
  117. tx_engine-0.6.6/src/python/py_wallet.rs +407 -0
  118. tx_engine-0.6.6/src/script/checker.rs +734 -0
  119. tx_engine-0.6.6/src/script/interpreter.rs +1617 -0
  120. tx_engine-0.6.6/src/script/mod.rs +520 -0
  121. tx_engine-0.6.6/src/script/op_codes.rs +297 -0
  122. tx_engine-0.6.6/src/script/stack.rs +216 -0
  123. tx_engine-0.6.6/src/transaction/mod.rs +57 -0
  124. tx_engine-0.6.6/src/transaction/p2pkh.rs +144 -0
  125. tx_engine-0.6.6/src/transaction/sighash.rs +407 -0
  126. tx_engine-0.6.6/src/util/bits.rs +211 -0
  127. tx_engine-0.6.6/src/util/bloom_filter.rs +183 -0
  128. tx_engine-0.6.6/src/util/future.rs +106 -0
  129. tx_engine-0.6.6/src/util/hash160.rs +44 -0
  130. tx_engine-0.6.6/src/util/hash256.rs +171 -0
  131. tx_engine-0.6.6/src/util/latch.rs +108 -0
  132. tx_engine-0.6.6/src/util/mod.rs +48 -0
  133. tx_engine-0.6.6/src/util/result.rs +152 -0
  134. tx_engine-0.6.6/src/util/rx.rs +241 -0
  135. tx_engine-0.6.6/src/util/serdes.rs +40 -0
  136. tx_engine-0.6.6/src/util/sha1.rs +5 -0
  137. tx_engine-0.6.6/src/util/sha256.rs +5 -0
  138. tx_engine-0.6.6/src/util/var_int.rs +75 -0
  139. tx_engine-0.6.6/src/wallet/extended_key.rs +719 -0
  140. tx_engine-0.6.6/src/wallet/mnemonic.rs +245 -0
  141. tx_engine-0.6.6/src/wallet/mod.rs +10 -0
  142. tx_engine-0.6.6/src/wallet/wordlists/chinese_simplified.txt +2048 -0
  143. tx_engine-0.6.6/src/wallet/wordlists/chinese_traditional.txt +2048 -0
  144. tx_engine-0.6.6/src/wallet/wordlists/english.txt +2048 -0
  145. tx_engine-0.6.6/src/wallet/wordlists/french.txt +2048 -0
  146. tx_engine-0.6.6/src/wallet/wordlists/italian.txt +2048 -0
  147. tx_engine-0.6.6/src/wallet/wordlists/japanese.txt +2048 -0
  148. tx_engine-0.6.6/src/wallet/wordlists/korean.txt +2048 -0
  149. tx_engine-0.6.6/src/wallet/wordlists/spanish.txt +2048 -0
  150. tx_engine-0.6.6/tools/README.md +66 -0
  151. tx_engine-0.6.6/tools/dbg.py +27 -0
  152. tx_engine-0.6.6/tools/generate_key.py +13 -0
@@ -0,0 +1,142 @@
1
+ # This file is autogenerated by maturin v1.5.1
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ linux:
23
+ runs-on: ${{ matrix.platform.runner }}
24
+ if: "startsWith(github.ref, 'refs/tags/')"
25
+ strategy:
26
+ matrix:
27
+ platform:
28
+ - runner: ubuntu-latest
29
+ target: x86_64
30
+ - runner: ubuntu-latest
31
+ target: x86
32
+ - runner: ubuntu-latest
33
+ target: aarch64
34
+ - runner: ubuntu-latest
35
+ target: armv7
36
+ - runner: ubuntu-latest
37
+ target: s390x
38
+ - runner: ubuntu-latest
39
+ target: ppc64le
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - uses: actions/setup-python@v5
43
+ with:
44
+ python-version: '3.10'
45
+ - name: Build wheels
46
+ uses: PyO3/maturin-action@v1
47
+ with:
48
+ target: ${{ matrix.platform.target }}
49
+ args: --release --out dist --find-interpreter
50
+ sccache: 'true'
51
+ manylinux: auto
52
+ - name: Upload wheels
53
+ uses: actions/upload-artifact@v4
54
+ with:
55
+ name: wheels-linux-${{ matrix.platform.target }}
56
+ path: dist
57
+
58
+ windows:
59
+ runs-on: ${{ matrix.platform.runner }}
60
+ if: "startsWith(github.ref, 'refs/tags/')"
61
+ strategy:
62
+ matrix:
63
+ platform:
64
+ - runner: windows-latest
65
+ target: x64
66
+ - runner: windows-latest
67
+ target: x86
68
+ steps:
69
+ - uses: actions/checkout@v4
70
+ - uses: actions/setup-python@v5
71
+ with:
72
+ python-version: '3.10'
73
+ architecture: ${{ matrix.platform.target }}
74
+ - name: Build wheels
75
+ uses: PyO3/maturin-action@v1
76
+ with:
77
+ target: ${{ matrix.platform.target }}
78
+ args: --release --out dist --find-interpreter
79
+ sccache: 'true'
80
+ - name: Upload wheels
81
+ uses: actions/upload-artifact@v4
82
+ with:
83
+ name: wheels-windows-${{ matrix.platform.target }}
84
+ path: dist
85
+
86
+ macos:
87
+ runs-on: ${{ matrix.platform.runner }}
88
+ if: "startsWith(github.ref, 'refs/tags/')"
89
+ strategy:
90
+ matrix:
91
+ platform:
92
+ - runner: macos-latest
93
+ target: x86_64
94
+ - runner: macos-14
95
+ target: aarch64
96
+ steps:
97
+ - uses: actions/checkout@v4
98
+ - uses: actions/setup-python@v5
99
+ with:
100
+ python-version: '3.10'
101
+ - name: Build wheels
102
+ uses: PyO3/maturin-action@v1
103
+ with:
104
+ target: ${{ matrix.platform.target }}
105
+ args: --release --out dist --find-interpreter
106
+ sccache: 'true'
107
+ - name: Upload wheels
108
+ uses: actions/upload-artifact@v4
109
+ with:
110
+ name: wheels-macos-${{ matrix.platform.target }}
111
+ path: dist
112
+
113
+ sdist:
114
+ runs-on: ubuntu-latest
115
+ if: "startsWith(github.ref, 'refs/tags/')"
116
+ steps:
117
+ - uses: actions/checkout@v4
118
+ - name: Build sdist
119
+ uses: PyO3/maturin-action@v1
120
+ with:
121
+ command: sdist
122
+ args: --out dist
123
+ - name: Upload sdist
124
+ uses: actions/upload-artifact@v4
125
+ with:
126
+ name: wheels-sdist
127
+ path: dist
128
+
129
+ release:
130
+ name: Release
131
+ runs-on: ubuntu-latest
132
+ if: "startsWith(github.ref, 'refs/tags/')"
133
+ needs: [linux, windows, macos, sdist]
134
+ steps:
135
+ - uses: actions/download-artifact@v4
136
+ - name: Publish to PyPI
137
+ uses: PyO3/maturin-action@v1
138
+ env:
139
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
140
+ with:
141
+ command: upload
142
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,87 @@
1
+ # Outputs
2
+ /target/
3
+
4
+ # Backup files generated by rust-fmt
5
+ **/*.rs.bk
6
+
7
+ # Local dependencies
8
+ Cargo.lock
9
+
10
+ # OS and IDE files
11
+ .DS_STORE
12
+ .vscode
13
+
14
+ # Working file
15
+ out.txt
16
+
17
+
18
+ # Compiled Python bytecode
19
+ *.py[cod]
20
+ __pycache__
21
+ .pytest_cache/
22
+
23
+ # shared library files
24
+ *.so
25
+
26
+ # Distribution / packaging
27
+ .Python
28
+ .venv/
29
+ env/
30
+ bin/
31
+ build/
32
+ develop-eggs/
33
+ dist/
34
+ eggs/
35
+ lib/
36
+ lib64/
37
+ parts/
38
+ sdist/
39
+ var/
40
+ include/
41
+ man/
42
+ venv/
43
+ *.egg-info/
44
+ .installed.cfg
45
+ *.egg
46
+
47
+ # Installer logs
48
+ pip-log.txt
49
+ pip-delete-this-directory.txt
50
+ pip-selfcheck.json
51
+
52
+ # Unit test / coverage reports
53
+ htmlcov/
54
+ .tox/
55
+ .coverage
56
+ .cache
57
+ nosetests.xml
58
+ coverage.xml
59
+
60
+ # Translations
61
+ *.mo
62
+
63
+ # Mr Developer
64
+ .mr.developer.cfg
65
+ .project
66
+ .pydevproject
67
+
68
+ # Rope
69
+ .ropeproject
70
+
71
+ # Django stuff:
72
+ *.log
73
+ *.pot
74
+
75
+ .DS_Store
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyCharm
81
+ .idea/
82
+
83
+ # Pyenv
84
+ .python-version
85
+
86
+ # playground
87
+ python/src/playground