@btc-vision/bitcoin 7.0.0-alpha.1 → 7.0.0-alpha.10

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 (290) hide show
  1. package/README.md +455 -155
  2. package/browser/address.d.ts +5 -1
  3. package/browser/address.d.ts.map +1 -1
  4. package/browser/branded.d.ts +3 -14
  5. package/browser/branded.d.ts.map +1 -1
  6. package/browser/chunks/psbt-parallel-BBFlkmiv.js +10717 -0
  7. package/browser/ecc/context.d.ts +22 -21
  8. package/browser/ecc/context.d.ts.map +1 -1
  9. package/browser/ecc/index.d.ts +1 -1
  10. package/browser/ecc/index.d.ts.map +1 -1
  11. package/browser/ecc/types.d.ts +10 -123
  12. package/browser/ecc/types.d.ts.map +1 -1
  13. package/browser/env.d.ts +13 -0
  14. package/browser/env.d.ts.map +1 -0
  15. package/browser/index.d.ts +6 -6
  16. package/browser/index.d.ts.map +1 -1
  17. package/browser/index.js +2602 -11786
  18. package/browser/io/hex.d.ts.map +1 -1
  19. package/browser/io/index.d.ts +0 -1
  20. package/browser/io/index.d.ts.map +1 -1
  21. package/browser/opcodes.d.ts +11 -0
  22. package/browser/opcodes.d.ts.map +1 -1
  23. package/browser/payments/p2tr.d.ts.map +1 -1
  24. package/browser/psbt/PsbtCache.d.ts +54 -0
  25. package/browser/psbt/PsbtCache.d.ts.map +1 -0
  26. package/browser/psbt/PsbtFinalizer.d.ts +21 -0
  27. package/browser/psbt/PsbtFinalizer.d.ts.map +1 -0
  28. package/browser/psbt/PsbtSigner.d.ts +32 -0
  29. package/browser/psbt/PsbtSigner.d.ts.map +1 -0
  30. package/browser/psbt/PsbtTransaction.d.ts +25 -0
  31. package/browser/psbt/PsbtTransaction.d.ts.map +1 -0
  32. package/browser/psbt/types.d.ts +4 -70
  33. package/browser/psbt/types.d.ts.map +1 -1
  34. package/browser/psbt/validation.d.ts +1 -1
  35. package/browser/psbt/validation.d.ts.map +1 -1
  36. package/browser/psbt.d.ts +26 -40
  37. package/browser/psbt.d.ts.map +1 -1
  38. package/browser/script.d.ts.map +1 -1
  39. package/browser/transaction.d.ts +4 -4
  40. package/browser/transaction.d.ts.map +1 -1
  41. package/browser/types.d.ts +5 -3
  42. package/browser/types.d.ts.map +1 -1
  43. package/browser/workers/WorkerSigningPool.d.ts +7 -0
  44. package/browser/workers/WorkerSigningPool.d.ts.map +1 -1
  45. package/browser/workers/WorkerSigningPool.node.d.ts +7 -0
  46. package/browser/workers/WorkerSigningPool.node.d.ts.map +1 -1
  47. package/browser/workers/WorkerSigningPool.sequential.d.ts +67 -0
  48. package/browser/workers/WorkerSigningPool.sequential.d.ts.map +1 -0
  49. package/browser/workers/WorkerSigningPool.worklet.d.ts +64 -0
  50. package/browser/workers/WorkerSigningPool.worklet.d.ts.map +1 -0
  51. package/browser/workers/index.browser.d.ts +16 -0
  52. package/browser/workers/index.browser.d.ts.map +1 -0
  53. package/browser/workers/index.d.ts +4 -64
  54. package/browser/workers/index.d.ts.map +1 -1
  55. package/browser/workers/index.js +28 -0
  56. package/browser/workers/index.node.d.ts +17 -0
  57. package/browser/workers/index.node.d.ts.map +1 -0
  58. package/browser/workers/index.react-native.d.ts +28 -0
  59. package/browser/workers/index.react-native.d.ts.map +1 -0
  60. package/browser/workers/index.shared.d.ts +15 -0
  61. package/browser/workers/index.shared.d.ts.map +1 -0
  62. package/browser/workers/psbt-parallel.d.ts +2 -3
  63. package/browser/workers/psbt-parallel.d.ts.map +1 -1
  64. package/browser/workers/types.d.ts +17 -0
  65. package/browser/workers/types.d.ts.map +1 -1
  66. package/build/address.d.ts +5 -1
  67. package/build/address.d.ts.map +1 -1
  68. package/build/address.js +29 -17
  69. package/build/address.js.map +1 -1
  70. package/build/bech32utils.js.map +1 -1
  71. package/build/block.js.map +1 -1
  72. package/build/branded.d.ts +3 -14
  73. package/build/branded.d.ts.map +1 -1
  74. package/build/branded.js +0 -5
  75. package/build/branded.js.map +1 -1
  76. package/build/ecc/context.d.ts +22 -21
  77. package/build/ecc/context.d.ts.map +1 -1
  78. package/build/ecc/context.js +23 -95
  79. package/build/ecc/context.js.map +1 -1
  80. package/build/ecc/index.d.ts +1 -1
  81. package/build/ecc/index.d.ts.map +1 -1
  82. package/build/ecc/types.d.ts +7 -126
  83. package/build/ecc/types.d.ts.map +1 -1
  84. package/build/ecc/types.js +4 -1
  85. package/build/ecc/types.js.map +1 -1
  86. package/build/env.d.ts +13 -0
  87. package/build/env.d.ts.map +1 -0
  88. package/build/env.js +198 -0
  89. package/build/env.js.map +1 -0
  90. package/build/index.d.ts +7 -6
  91. package/build/index.d.ts.map +1 -1
  92. package/build/index.js +7 -5
  93. package/build/index.js.map +1 -1
  94. package/build/io/hex.d.ts.map +1 -1
  95. package/build/io/hex.js +2 -1
  96. package/build/io/hex.js.map +1 -1
  97. package/build/io/index.d.ts +0 -1
  98. package/build/io/index.d.ts.map +1 -1
  99. package/build/io/index.js +0 -2
  100. package/build/io/index.js.map +1 -1
  101. package/build/opcodes.d.ts +11 -0
  102. package/build/opcodes.d.ts.map +1 -1
  103. package/build/opcodes.js +19 -4
  104. package/build/opcodes.js.map +1 -1
  105. package/build/payments/bip341.js.map +1 -1
  106. package/build/payments/embed.js.map +1 -1
  107. package/build/payments/p2ms.js.map +1 -1
  108. package/build/payments/p2pk.js.map +1 -1
  109. package/build/payments/p2pkh.js.map +1 -1
  110. package/build/payments/p2sh.js.map +1 -1
  111. package/build/payments/p2tr.d.ts.map +1 -1
  112. package/build/payments/p2tr.js +2 -3
  113. package/build/payments/p2tr.js.map +1 -1
  114. package/build/payments/p2wpkh.js.map +1 -1
  115. package/build/payments/p2wsh.js.map +1 -1
  116. package/build/psbt/PsbtCache.d.ts +54 -0
  117. package/build/psbt/PsbtCache.d.ts.map +1 -0
  118. package/build/psbt/PsbtCache.js +249 -0
  119. package/build/psbt/PsbtCache.js.map +1 -0
  120. package/build/psbt/PsbtFinalizer.d.ts +21 -0
  121. package/build/psbt/PsbtFinalizer.d.ts.map +1 -0
  122. package/build/psbt/PsbtFinalizer.js +157 -0
  123. package/build/psbt/PsbtFinalizer.js.map +1 -0
  124. package/build/psbt/PsbtSigner.d.ts +32 -0
  125. package/build/psbt/PsbtSigner.d.ts.map +1 -0
  126. package/build/psbt/PsbtSigner.js +192 -0
  127. package/build/psbt/PsbtSigner.js.map +1 -0
  128. package/build/psbt/PsbtTransaction.d.ts +25 -0
  129. package/build/psbt/PsbtTransaction.d.ts.map +1 -0
  130. package/build/psbt/PsbtTransaction.js +61 -0
  131. package/build/psbt/PsbtTransaction.js.map +1 -0
  132. package/build/psbt/types.d.ts +4 -70
  133. package/build/psbt/types.d.ts.map +1 -1
  134. package/build/psbt/validation.d.ts +1 -1
  135. package/build/psbt/validation.d.ts.map +1 -1
  136. package/build/psbt.d.ts +26 -40
  137. package/build/psbt.d.ts.map +1 -1
  138. package/build/psbt.js +177 -799
  139. package/build/psbt.js.map +1 -1
  140. package/build/script.d.ts.map +1 -1
  141. package/build/script.js +2 -2
  142. package/build/script.js.map +1 -1
  143. package/build/transaction.d.ts +4 -4
  144. package/build/transaction.d.ts.map +1 -1
  145. package/build/transaction.js +5 -4
  146. package/build/transaction.js.map +1 -1
  147. package/build/tsconfig.build.tsbuildinfo +1 -1
  148. package/build/types.d.ts +5 -3
  149. package/build/types.d.ts.map +1 -1
  150. package/build/types.js +11 -16
  151. package/build/types.js.map +1 -1
  152. package/build/workers/WorkerSigningPool.d.ts +7 -0
  153. package/build/workers/WorkerSigningPool.d.ts.map +1 -1
  154. package/build/workers/WorkerSigningPool.js +12 -1
  155. package/build/workers/WorkerSigningPool.js.map +1 -1
  156. package/build/workers/WorkerSigningPool.node.d.ts +7 -0
  157. package/build/workers/WorkerSigningPool.node.d.ts.map +1 -1
  158. package/build/workers/WorkerSigningPool.node.js +37 -5
  159. package/build/workers/WorkerSigningPool.node.js.map +1 -1
  160. package/build/workers/WorkerSigningPool.sequential.d.ts +76 -0
  161. package/build/workers/WorkerSigningPool.sequential.d.ts.map +1 -0
  162. package/build/workers/WorkerSigningPool.sequential.js +160 -0
  163. package/build/workers/WorkerSigningPool.sequential.js.map +1 -0
  164. package/build/workers/WorkerSigningPool.worklet.d.ts +79 -0
  165. package/build/workers/WorkerSigningPool.worklet.d.ts.map +1 -0
  166. package/build/workers/WorkerSigningPool.worklet.js +390 -0
  167. package/build/workers/WorkerSigningPool.worklet.js.map +1 -0
  168. package/build/workers/index.browser.d.ts +24 -0
  169. package/build/workers/index.browser.d.ts.map +1 -0
  170. package/build/workers/index.browser.js +30 -0
  171. package/build/workers/index.browser.js.map +1 -0
  172. package/build/workers/index.d.ts +6 -18
  173. package/build/workers/index.d.ts.map +1 -1
  174. package/build/workers/index.js +12 -14
  175. package/build/workers/index.js.map +1 -1
  176. package/build/workers/index.node.d.ts +38 -0
  177. package/build/workers/index.node.d.ts.map +1 -0
  178. package/build/workers/index.node.js +45 -0
  179. package/build/workers/index.node.js.map +1 -0
  180. package/build/workers/index.react-native.d.ts +28 -0
  181. package/build/workers/index.react-native.d.ts.map +1 -0
  182. package/build/workers/index.react-native.js +67 -0
  183. package/build/workers/index.react-native.js.map +1 -0
  184. package/build/workers/index.shared.d.ts +15 -0
  185. package/build/workers/index.shared.d.ts.map +1 -0
  186. package/build/workers/index.shared.js +20 -0
  187. package/build/workers/index.shared.js.map +1 -0
  188. package/build/workers/psbt-parallel.d.ts +2 -3
  189. package/build/workers/psbt-parallel.d.ts.map +1 -1
  190. package/build/workers/psbt-parallel.js +4 -4
  191. package/build/workers/psbt-parallel.js.map +1 -1
  192. package/build/workers/types.d.ts +17 -0
  193. package/build/workers/types.d.ts.map +1 -1
  194. package/package.json +46 -8
  195. package/src/address.ts +41 -18
  196. package/src/bech32utils.ts +3 -3
  197. package/src/block.ts +2 -2
  198. package/src/branded.ts +15 -13
  199. package/src/ecc/context.ts +30 -133
  200. package/src/ecc/index.ts +2 -2
  201. package/src/ecc/types.ts +7 -138
  202. package/src/env.ts +239 -0
  203. package/src/index.ts +45 -9
  204. package/src/io/hex.ts +2 -1
  205. package/src/io/index.ts +0 -3
  206. package/src/opcodes.ts +21 -4
  207. package/src/payments/bip341.ts +3 -3
  208. package/src/payments/embed.ts +1 -1
  209. package/src/payments/p2ms.ts +2 -2
  210. package/src/payments/p2pk.ts +2 -2
  211. package/src/payments/p2pkh.ts +3 -3
  212. package/src/payments/p2sh.ts +4 -4
  213. package/src/payments/p2tr.ts +9 -9
  214. package/src/payments/p2wpkh.ts +5 -5
  215. package/src/payments/p2wsh.ts +2 -2
  216. package/src/psbt/PsbtCache.ts +325 -0
  217. package/src/psbt/PsbtFinalizer.ts +213 -0
  218. package/src/psbt/PsbtSigner.ts +302 -0
  219. package/src/psbt/PsbtTransaction.ts +82 -0
  220. package/src/psbt/types.ts +4 -86
  221. package/src/psbt/validation.ts +1 -1
  222. package/src/psbt.ts +349 -1198
  223. package/src/script.ts +2 -2
  224. package/src/transaction.ts +10 -9
  225. package/src/types.ts +18 -28
  226. package/src/workers/WorkerSigningPool.node.ts +41 -5
  227. package/src/workers/WorkerSigningPool.sequential.ts +191 -0
  228. package/src/workers/WorkerSigningPool.ts +14 -1
  229. package/src/workers/WorkerSigningPool.worklet.ts +522 -0
  230. package/src/workers/index.browser.ts +34 -0
  231. package/src/workers/index.node.ts +50 -0
  232. package/src/workers/index.react-native.ts +110 -0
  233. package/src/workers/index.shared.ts +58 -0
  234. package/src/workers/index.ts +14 -65
  235. package/src/workers/psbt-parallel.ts +7 -7
  236. package/src/workers/types.ts +21 -0
  237. package/test/address.spec.ts +2 -2
  238. package/test/bitcoin.core.spec.ts +5 -2
  239. package/test/browser/payments.spec.ts +151 -0
  240. package/test/browser/psbt.spec.ts +1510 -0
  241. package/test/browser/script.spec.ts +223 -0
  242. package/test/browser/setup.ts +13 -0
  243. package/test/browser/workers-signing.spec.ts +537 -0
  244. package/test/crypto.spec.ts +2 -2
  245. package/test/env.spec.ts +418 -0
  246. package/test/fixtures/core/base58_encode_decode.json +12 -48
  247. package/test/fixtures/core/base58_keys_invalid.json +50 -150
  248. package/test/fixtures/core/sighash.json +1 -3
  249. package/test/fixtures/core/tx_valid.json +133 -501
  250. package/test/fixtures/embed.json +3 -11
  251. package/test/fixtures/p2ms.json +21 -91
  252. package/test/fixtures/p2pk.json +5 -24
  253. package/test/fixtures/p2pkh.json +7 -36
  254. package/test/fixtures/p2sh.json +8 -54
  255. package/test/fixtures/p2tr.json +2 -6
  256. package/test/fixtures/p2wpkh.json +7 -36
  257. package/test/fixtures/p2wsh.json +14 -59
  258. package/test/fixtures/psbt.json +2 -6
  259. package/test/fixtures/script.json +12 -48
  260. package/test/integration/addresses.spec.ts +11 -5
  261. package/test/integration/bip32.spec.ts +1 -1
  262. package/test/integration/cltv.spec.ts +10 -6
  263. package/test/integration/csv.spec.ts +10 -9
  264. package/test/integration/payments.spec.ts +8 -4
  265. package/test/integration/taproot.spec.ts +26 -6
  266. package/test/integration/transactions.spec.ts +22 -8
  267. package/test/payments.spec.ts +1 -1
  268. package/test/payments.utils.ts +1 -1
  269. package/test/psbt.spec.ts +250 -64
  270. package/test/script_signature.spec.ts +1 -1
  271. package/test/transaction.spec.ts +18 -5
  272. package/test/tsconfig.json +6 -20
  273. package/test/workers-pool.spec.ts +65 -23
  274. package/test/workers-sequential.spec.ts +669 -0
  275. package/test/workers-signing.spec.ts +7 -3
  276. package/test/workers-worklet.spec.ts +500 -0
  277. package/test/workers.spec.ts +6 -7
  278. package/typedoc.json +11 -1
  279. package/vite.config.browser.ts +31 -6
  280. package/vitest.config.browser.ts +68 -0
  281. package/browser/ecpair.d.ts +0 -99
  282. package/browser/io/MemoryPool.d.ts +0 -220
  283. package/browser/io/MemoryPool.d.ts.map +0 -1
  284. package/build/io/MemoryPool.d.ts +0 -220
  285. package/build/io/MemoryPool.d.ts.map +0 -1
  286. package/build/io/MemoryPool.js +0 -309
  287. package/build/io/MemoryPool.js.map +0 -1
  288. package/src/ecpair.d.ts +0 -99
  289. package/src/io/MemoryPool.ts +0 -343
  290. package/test/taproot-cache.spec.ts +0 -694
@@ -62,9 +62,7 @@
62
62
  "options": {},
63
63
  "arguments": {
64
64
  "output": "OP_RETURN a3b1 47db",
65
- "data": [
66
- "a3b1"
67
- ]
65
+ "data": ["a3b1"]
68
66
  }
69
67
  },
70
68
  {
@@ -78,14 +76,8 @@
78
76
  ],
79
77
  "dynamic": {
80
78
  "depends": {
81
- "data": [
82
- "data",
83
- "output"
84
- ],
85
- "output": [
86
- "output",
87
- "data"
88
- ]
79
+ "data": ["data", "output"],
80
+ "output": ["output", "data"]
89
81
  },
90
82
  "details": [
91
83
  {
@@ -52,10 +52,7 @@
52
52
  "030000000000000000000000000000000000000000000000000000000000000002",
53
53
  "030000000000000000000000000000000000000000000000000000000000000003"
54
54
  ],
55
- "signatures": [
56
- "300602010002010001",
57
- "300602010102010001"
58
- ]
55
+ "signatures": ["300602010002010001", "300602010102010001"]
59
56
  },
60
57
  "expected": {
61
58
  "m": 2,
@@ -67,10 +64,7 @@
67
64
  "030000000000000000000000000000000000000000000000000000000000000002",
68
65
  "030000000000000000000000000000000000000000000000000000000000000003"
69
66
  ],
70
- "signatures": [
71
- "300602010002010001",
72
- "300602010102010001"
73
- ],
67
+ "signatures": ["300602010002010001", "300602010102010001"],
74
68
  "input": "OP_0 300602010002010001 300602010102010001",
75
69
  "witness": []
76
70
  }
@@ -79,10 +73,7 @@
79
73
  "description": "input/output from output/signatures",
80
74
  "arguments": {
81
75
  "output": "OP_2 030000000000000000000000000000000000000000000000000000000000000001 030000000000000000000000000000000000000000000000000000000000000002 030000000000000000000000000000000000000000000000000000000000000003 OP_3 OP_CHECKMULTISIG",
82
- "signatures": [
83
- "300602010002010001",
84
- "300602010102010001"
85
- ]
76
+ "signatures": ["300602010002010001", "300602010102010001"]
86
77
  },
87
78
  "expected": {
88
79
  "m": 2,
@@ -94,10 +85,7 @@
94
85
  "030000000000000000000000000000000000000000000000000000000000000002",
95
86
  "030000000000000000000000000000000000000000000000000000000000000003"
96
87
  ],
97
- "signatures": [
98
- "300602010002010001",
99
- "300602010102010001"
100
- ],
88
+ "signatures": ["300602010002010001", "300602010102010001"],
101
89
  "input": "OP_0 300602010002010001 300602010102010001",
102
90
  "witness": []
103
91
  }
@@ -118,10 +106,7 @@
118
106
  "030000000000000000000000000000000000000000000000000000000000000002",
119
107
  "030000000000000000000000000000000000000000000000000000000000000003"
120
108
  ],
121
- "signatures": [
122
- "300602010002010001",
123
- "300602010102010001"
124
- ],
109
+ "signatures": ["300602010002010001", "300602010102010001"],
125
110
  "input": "OP_0 300602010002010001 300602010102010001",
126
111
  "witness": []
127
112
  }
@@ -144,10 +129,7 @@
144
129
  "030000000000000000000000000000000000000000000000000000000000000001",
145
130
  "030000000000000000000000000000000000000000000000000000000000000002"
146
131
  ],
147
- "signatures": [
148
- 0,
149
- "300602010102010001"
150
- ],
132
+ "signatures": [0, "300602010102010001"],
151
133
  "input": "OP_0 OP_0 300602010102010001",
152
134
  "witness": []
153
135
  }
@@ -156,10 +138,7 @@
156
138
  "description": "input/output from output/signatures, even if incomplete",
157
139
  "arguments": {
158
140
  "output": "OP_2 030000000000000000000000000000000000000000000000000000000000000001 030000000000000000000000000000000000000000000000000000000000000002 OP_2 OP_CHECKMULTISIG",
159
- "signatures": [
160
- 0,
161
- "300602010102010001"
162
- ]
141
+ "signatures": [0, "300602010102010001"]
163
142
  },
164
143
  "options": {
165
144
  "allowIncomplete": true
@@ -173,10 +152,7 @@
173
152
  "030000000000000000000000000000000000000000000000000000000000000001",
174
153
  "030000000000000000000000000000000000000000000000000000000000000002"
175
154
  ],
176
- "signatures": [
177
- 0,
178
- "300602010102010001"
179
- ],
155
+ "signatures": [0, "300602010102010001"],
180
156
  "input": "OP_0 OP_0 300602010102010001",
181
157
  "witness": []
182
158
  }
@@ -277,9 +253,7 @@
277
253
  "exception": "Pubkeys mismatch",
278
254
  "options": {},
279
255
  "arguments": {
280
- "pubkeys": [
281
- "030000000000000000000000000000000000000000000000000000000000000001"
282
- ],
256
+ "pubkeys": ["030000000000000000000000000000000000000000000000000000000000000001"],
283
257
  "output": "OP_1 030000000000000000000000000000000000000000000000000000000000000002 OP_1 OP_CHECKMULTISIG"
284
258
  }
285
259
  },
@@ -312,9 +286,7 @@
312
286
  "030000000000000000000000000000000000000000000000000000000000000001",
313
287
  "030000000000000000000000000000000000000000000000000000000000000001"
314
288
  ],
315
- "signatures": [
316
- "300602010002010001"
317
- ]
289
+ "signatures": ["300602010002010001"]
318
290
  }
319
291
  },
320
292
  {
@@ -325,9 +297,7 @@
325
297
  "030000000000000000000000000000000000000000000000000000000000000001",
326
298
  "030000000000000000000000000000000000000000000000000000000000000001"
327
299
  ],
328
- "signatures": [
329
- "300602010002010001"
330
- ],
300
+ "signatures": ["300602010002010001"],
331
301
  "input": "OP_0 300602010002010101"
332
302
  }
333
303
  },
@@ -339,11 +309,7 @@
339
309
  "030000000000000000000000000000000000000000000000000000000000000001",
340
310
  "030000000000000000000000000000000000000000000000000000000000000001"
341
311
  ],
342
- "signatures": [
343
- "300602010002010001",
344
- "300602010002010001",
345
- "300602010002010001"
346
- ]
312
+ "signatures": ["300602010002010001", "300602010002010001", "300602010002010001"]
347
313
  }
348
314
  },
349
315
  {
@@ -363,53 +329,20 @@
363
329
  "exception": "Input has invalid signature\\(s\\)",
364
330
  "arguments": {
365
331
  "m": 1,
366
- "pubkeys": [
367
- "030000000000000000000000000000000000000000000000000000000000000001"
368
- ],
332
+ "pubkeys": ["030000000000000000000000000000000000000000000000000000000000000001"],
369
333
  "input": "OP_0 ffffffffffffffff"
370
334
  }
371
335
  }
372
336
  ],
373
337
  "dynamic": {
374
338
  "depends": {
375
- "m": [
376
- "output"
377
- ],
378
- "n": [
379
- "output",
380
- [
381
- "m",
382
- "pubkeys"
383
- ]
384
- ],
385
- "output": [
386
- "output",
387
- [
388
- "m",
389
- "pubkeys"
390
- ]
391
- ],
392
- "pubkeys": [
393
- "output"
394
- ],
395
- "signatures": [
396
- [
397
- "input",
398
- "output"
399
- ]
400
- ],
401
- "input": [
402
- [
403
- "signatures",
404
- "output"
405
- ]
406
- ],
407
- "witness": [
408
- [
409
- "input",
410
- "output"
411
- ]
412
- ]
339
+ "m": ["output"],
340
+ "n": ["output", ["m", "pubkeys"]],
341
+ "output": ["output", ["m", "pubkeys"]],
342
+ "pubkeys": ["output"],
343
+ "signatures": [["input", "output"]],
344
+ "input": [["signatures", "output"]],
345
+ "witness": [["input", "output"]]
413
346
  },
414
347
  "details": [
415
348
  {
@@ -422,10 +355,7 @@
422
355
  "030000000000000000000000000000000000000000000000000000000000000002",
423
356
  "030000000000000000000000000000000000000000000000000000000000000003"
424
357
  ],
425
- "signatures": [
426
- "300602010002010001",
427
- "300602010102010001"
428
- ],
358
+ "signatures": ["300602010002010001", "300602010102010001"],
429
359
  "input": "OP_0 300602010002010001 300602010102010001",
430
360
  "witness": []
431
361
  }
@@ -132,30 +132,11 @@
132
132
  ],
133
133
  "dynamic": {
134
134
  "depends": {
135
- "output": [
136
- "pubkey"
137
- ],
138
- "pubkey": [
139
- "output"
140
- ],
141
- "signature": [
142
- [
143
- "input",
144
- "output"
145
- ]
146
- ],
147
- "input": [
148
- [
149
- "signature",
150
- "output"
151
- ]
152
- ],
153
- "witness": [
154
- [
155
- "input",
156
- "output"
157
- ]
158
- ]
135
+ "output": ["pubkey"],
136
+ "pubkey": ["output"],
137
+ "signature": [["input", "output"]],
138
+ "input": [["signature", "output"]],
139
+ "witness": [["input", "output"]]
159
140
  },
160
141
  "details": [
161
142
  {
@@ -223,42 +223,13 @@
223
223
  ],
224
224
  "dynamic": {
225
225
  "depends": {
226
- "address": [
227
- "address",
228
- "output",
229
- "hash",
230
- "pubkey",
231
- "input"
232
- ],
233
- "hash": [
234
- "address",
235
- "output",
236
- "hash",
237
- "pubkey",
238
- "input"
239
- ],
240
- "output": [
241
- "address",
242
- "output",
243
- "hash",
244
- "pubkey",
245
- "input"
246
- ],
247
- "pubkey": [
248
- "input"
249
- ],
250
- "signature": [
251
- "input"
252
- ],
253
- "input": [
254
- [
255
- "pubkey",
256
- "signature"
257
- ]
258
- ],
259
- "witness": [
260
- "input"
261
- ]
226
+ "address": ["address", "output", "hash", "pubkey", "input"],
227
+ "hash": ["address", "output", "hash", "pubkey", "input"],
228
+ "output": ["address", "output", "hash", "pubkey", "input"],
229
+ "pubkey": ["input"],
230
+ "signature": ["input"],
231
+ "input": [["pubkey", "signature"]],
232
+ "witness": ["input"]
262
233
  },
263
234
  "details": [
264
235
  {
@@ -415,60 +415,14 @@
415
415
  ],
416
416
  "dynamic": {
417
417
  "depends": {
418
- "address": [
419
- "address",
420
- "output",
421
- "hash",
422
- "redeem.output",
423
- [
424
- "input",
425
- "witness"
426
- ]
427
- ],
428
- "hash": [
429
- "address",
430
- "output",
431
- "hash",
432
- "redeem.output",
433
- [
434
- "input",
435
- "witness"
436
- ]
437
- ],
438
- "output": [
439
- "address",
440
- "output",
441
- "hash",
442
- "redeem.output",
443
- [
444
- "input",
445
- "witness"
446
- ]
447
- ],
448
- "redeem.output": [
449
- [
450
- "input",
451
- "witness"
452
- ]
453
- ],
454
- "redeem.input": [
455
- [
456
- "input",
457
- "witness"
458
- ]
459
- ],
460
- "redeem.witness": [
461
- [
462
- "input",
463
- "witness"
464
- ]
465
- ],
466
- "input": [
467
- "redeem"
468
- ],
469
- "witness": [
470
- "redeem"
471
- ]
418
+ "address": ["address", "output", "hash", "redeem.output", ["input", "witness"]],
419
+ "hash": ["address", "output", "hash", "redeem.output", ["input", "witness"]],
420
+ "output": ["address", "output", "hash", "redeem.output", ["input", "witness"]],
421
+ "redeem.output": [["input", "witness"]],
422
+ "redeem.input": [["input", "witness"]],
423
+ "redeem.witness": [["input", "witness"]],
424
+ "input": ["redeem"],
425
+ "witness": ["redeem"]
472
426
  },
473
427
  "details": [
474
428
  {
@@ -63,9 +63,7 @@
63
63
  "description": "address, output and signature from pubkey and witness",
64
64
  "arguments": {
65
65
  "pubkey": "ab610d22c801def8a1e02368d1b92018970eb52a729919705e8a1a2f60c750f5",
66
- "witness": [
67
- "300602010002010001"
68
- ]
66
+ "witness": ["300602010002010001"]
69
67
  },
70
68
  "expected": {
71
69
  "name": "p2tr",
@@ -73,9 +71,7 @@
73
71
  "output": "OP_1 ab610d22c801def8a1e02368d1b92018970eb52a729919705e8a1a2f60c750f5",
74
72
  "input": null,
75
73
  "signature": "300602010002010001",
76
- "witness": [
77
- "300602010002010001"
78
- ]
74
+ "witness": ["300602010002010001"]
79
75
  }
80
76
  },
81
77
  {
@@ -234,42 +234,13 @@
234
234
  ],
235
235
  "dynamic": {
236
236
  "depends": {
237
- "address": [
238
- "address",
239
- "output",
240
- "hash",
241
- "pubkey",
242
- "witness"
243
- ],
244
- "hash": [
245
- "address",
246
- "output",
247
- "hash",
248
- "pubkey",
249
- "witness"
250
- ],
251
- "output": [
252
- "address",
253
- "output",
254
- "hash",
255
- "pubkey",
256
- "witness"
257
- ],
258
- "pubkey": [
259
- "witness"
260
- ],
261
- "signature": [
262
- "witness"
263
- ],
264
- "input": [
265
- "witness"
266
- ],
267
- "witness": [
268
- [
269
- "pubkey",
270
- "signature"
271
- ]
272
- ]
237
+ "address": ["address", "output", "hash", "pubkey", "witness"],
238
+ "hash": ["address", "output", "hash", "pubkey", "witness"],
239
+ "output": ["address", "output", "hash", "pubkey", "witness"],
240
+ "pubkey": ["witness"],
241
+ "signature": ["witness"],
242
+ "input": ["witness"],
243
+ "witness": [["pubkey", "signature"]]
273
244
  },
274
245
  "details": [
275
246
  {
@@ -296,9 +296,7 @@
296
296
  "output": "OP_TRUE",
297
297
  "input": "OP_0"
298
298
  },
299
- "witness": [
300
- "02ffff"
301
- ]
299
+ "witness": ["02ffff"]
302
300
  }
303
301
  },
304
302
  {
@@ -306,14 +304,9 @@
306
304
  "arguments": {
307
305
  "redeem": {
308
306
  "output": "OP_TRUE",
309
- "witness": [
310
- "01"
311
- ]
307
+ "witness": ["01"]
312
308
  },
313
- "witness": [
314
- "00",
315
- "02ffff"
316
- ]
309
+ "witness": ["00", "02ffff"]
317
310
  }
318
311
  },
319
312
  {
@@ -321,13 +314,9 @@
321
314
  "arguments": {
322
315
  "redeem": {
323
316
  "output": "OP_TRUE",
324
- "witness": [
325
- "04000000ff"
326
- ]
317
+ "witness": ["04000000ff"]
327
318
  },
328
- "witness": [
329
- "04000000ee"
330
- ]
319
+ "witness": ["04000000ee"]
331
320
  }
332
321
  },
333
322
  {
@@ -336,9 +325,7 @@
336
325
  "redeem": {
337
326
  "output": "OP_TRUE",
338
327
  "input": "01",
339
- "witness": [
340
- "01"
341
- ]
328
+ "witness": ["01"]
342
329
  }
343
330
  }
344
331
  },
@@ -405,50 +392,18 @@
405
392
  ],
406
393
  "dynamic": {
407
394
  "depends": {
408
- "address": [
409
- "address",
410
- "output",
411
- "hash",
412
- "redeem.output",
413
- "witness"
414
- ],
415
- "hash": [
416
- "address",
417
- "output",
418
- "hash",
419
- "redeem.output",
420
- "witness"
421
- ],
422
- "output": [
423
- "address",
424
- "output",
425
- "hash",
426
- "redeem.output",
427
- "witness"
428
- ],
429
- "redeem.output": [
430
- "witness"
431
- ],
432
- "redeem.input": [
433
- [
434
- "input",
435
- "witness"
436
- ],
437
- "witness"
438
- ],
439
- "input": [
440
- "witness"
441
- ],
442
- "witness": [
443
- "redeem"
444
- ]
395
+ "address": ["address", "output", "hash", "redeem.output", "witness"],
396
+ "hash": ["address", "output", "hash", "redeem.output", "witness"],
397
+ "output": ["address", "output", "hash", "redeem.output", "witness"],
398
+ "redeem.output": ["witness"],
399
+ "redeem.input": [["input", "witness"], "witness"],
400
+ "input": ["witness"],
401
+ "witness": ["redeem"]
445
402
  },
446
403
  "details": [
447
404
  {
448
405
  "description": "p2wsh-p2pkh",
449
- "disabled": [
450
- "redeem.input"
451
- ],
406
+ "disabled": ["redeem.input"],
452
407
  "address": "bc1qusxlgq9quu27ucxs7a2fg8nv0pycdzvxsjk9npyupupxw3y892ss2cq5ar",
453
408
  "hash": "e40df400a0e715ee60d0f754941e6c784986898684ac59849c0f026744872aa1",
454
409
  "output": "OP_0 e40df400a0e715ee60d0f754941e6c784986898684ac59849c0f026744872aa1",
@@ -760,9 +760,7 @@
760
760
  "description": "allows signing non-whitelisted sighashtype when explicitly passed in",
761
761
  "shouldSign": {
762
762
  "psbt": "cHNidP8BADMBAAAAAYaq+PdOUY2PnV9kZKa82XlqrPByOqwH2TRg2+LQdqs2AAAAAAD/////AAAAAAAAAQEgAOH1BQAAAAAXqRSTNeWHqa9INvSnQ120SZeJc+6JSocBAwSBAAAAAQQWABQvLKRyDqYsPYImhD3eURpDGL10RwAA",
763
- "sighashTypes": [
764
- 129
765
- ],
763
+ "sighashTypes": [129],
766
764
  "inputToCheck": 0,
767
765
  "WIF": "KxnAnQh6UJBxLF8Weup77yn8tWhLHhDhnXeyJuzmmcZA5aRdMJni"
768
766
  }
@@ -772,9 +770,7 @@
772
770
  "isTaproot": true,
773
771
  "shouldSign": {
774
772
  "psbt": "cHNidP8BAF4CAAAAAf17fGksrz9eKGx1nSU3RX4vcwr7bfNdQzPZ9dSEkWBcAAAAAAD/////AZBBBgAAAAAAIlEgPLBe/d3922lmXjTIt52b9NG1HFDC9jzPCTn111AG8TQAAAAAAAEBK6BoBgAAAAAAIlEgPLBe/d3922lmXjTIt52b9NG1HFDC9jzPCTn111AG8TQBAwSDAAAAARcgWzC4qnD37J3WaDEbZPRihBXdI0gN68BGutJykDcHR6wBGCDlDrX1cnzwZvmcyLBH8M6NiS9lk7JVwM58wZZVOzmuMwAA",
775
- "sighashTypes": [
776
- 131
777
- ],
773
+ "sighashTypes": [131],
778
774
  "inputToCheck": 0,
779
775
  "WIF": "KypUz2y1jdgzM8HGDUx9DYLmyzd8EWhruvLX2J5iSL7MiAcc7dBG",
780
776
  "result": "cHNidP8BAF4CAAAAAf17fGksrz9eKGx1nSU3RX4vcwr7bfNdQzPZ9dSEkWBcAAAAAAD/////AZBBBgAAAAAAIlEgPLBe/d3922lmXjTIt52b9NG1HFDC9jzPCTn111AG8TQAAAAAAAEBK6BoBgAAAAAAIlEgPLBe/d3922lmXjTIt52b9NG1HFDC9jzPCTn111AG8TQBAwSDAAAAARNBqgjqjSQVTf41zgZ1H9Lq3CKQt0nq1APST8FpwGifNjyUHMS0MbFnIxA70SXTEOoSJePyOXTW+u59fzLpxekL2oMBFyBbMLiqcPfsndZoMRtk9GKEFd0jSA3rwEa60nKQNwdHrAEYIOUOtfVyfPBm+ZzIsEfwzo2JL2WTslXAznzBllU7Oa4zAAA="