@bitgo/wasm-utxo 5.2.0 → 5.3.0

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.
package/README.md CHANGED
@@ -7,6 +7,7 @@ that help verify and co-sign transactions built by the BitGo Wallet Platform API
7
7
 
8
8
  ## Documentation
9
9
 
10
+ - **[`../../CONVENTIONS.md`](../../CONVENTIONS.md)** - Repository-wide API and structured-error conventions
10
11
  - **[`src/wasm-bindgen.md`](src/wasm-bindgen.md)** - Guide for creating WASM bindings using the namespace pattern
11
12
  - **[`js/README.md`](js/README.md)** - TypeScript wrapper layer architecture and best practices
12
13
  - **[`cli/README.md`](cli/README.md)** - Command-line interface for address and PSBT operations
@@ -249,6 +249,31 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
249
249
  * {@link sign} (all matching inputs) instead.
250
250
  */
251
251
  sign(inputIndex: number, key: BIP32Arg | ECPairArg): void;
252
+ /**
253
+ * Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
254
+ * ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
255
+ * {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
256
+ * (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
257
+ * to the v6 sighash path instead.
258
+ *
259
+ * Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
260
+ * `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
261
+ *
262
+ * @param inputIndex - 0-based transparent input index
263
+ * @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
264
+ * or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
265
+ * @returns true if a valid signature by the key's public key exists for the input's
266
+ * ZIP-244 transparent sighash
267
+ * @throws Error if the input index is out of range, the key cannot be parsed, or the v6
268
+ * sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
269
+ *
270
+ * @example
271
+ * ```typescript
272
+ * // Verify the user's signature over the v6 transparent sighash
273
+ * const hasUserSig = psbt.verifySignature(0, userXpub);
274
+ * ```
275
+ */
276
+ verifySignature(inputIndex: number, key: BIP32Arg | ECPairArg): boolean;
252
277
  /**
253
278
  * Transaction Extractor role: given the external prover's `proof` bytes, finalize the
254
279
  * transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
@@ -4,6 +4,7 @@ exports.ZcashIronwoodBitGoPsbt = void 0;
4
4
  exports.zip302NoMemo = zip302NoMemo;
5
5
  const wasm_utxo_js_1 = require("../wasm/wasm_utxo.js");
6
6
  const bip32_js_1 = require("../bip32.js");
7
+ const ecpair_js_1 = require("../ecpair.js");
7
8
  const RootWalletKeys_js_1 = require("./RootWalletKeys.js");
8
9
  const ZcashBitGoPsbt_js_1 = require("./ZcashBitGoPsbt.js");
9
10
  /**
@@ -242,6 +243,38 @@ class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt_js_1.ZcashBitGoPsbt {
242
243
  const keys = RootWalletKeys_js_1.RootWalletKeys.from(keyOrRootWalletKeys);
243
244
  return Array.from(this.wasm.sign_ironwood_v6(wasmKey, keys.wasm), Number);
244
245
  }
246
+ /**
247
+ * Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
248
+ * ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
249
+ * {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
250
+ * (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
251
+ * to the v6 sighash path instead.
252
+ *
253
+ * Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
254
+ * `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
255
+ *
256
+ * @param inputIndex - 0-based transparent input index
257
+ * @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
258
+ * or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
259
+ * @returns true if a valid signature by the key's public key exists for the input's
260
+ * ZIP-244 transparent sighash
261
+ * @throws Error if the input index is out of range, the key cannot be parsed, or the v6
262
+ * sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
263
+ *
264
+ * @example
265
+ * ```typescript
266
+ * // Verify the user's signature over the v6 transparent sighash
267
+ * const hasUserSig = psbt.verifySignature(0, userXpub);
268
+ * ```
269
+ */
270
+ verifySignature(inputIndex, key) {
271
+ if ((0, bip32_js_1.isBIP32Arg)(key)) {
272
+ return this.wasm.verify_ironwood_v6_signature_with_xpub(inputIndex, bip32_js_1.BIP32.from(key).wasm);
273
+ }
274
+ // Otherwise it's an ECPairArg (Uint8Array, ECPair, or WasmECPair)
275
+ const wasmECPair = ecpair_js_1.ECPair.from(key).wasm;
276
+ return this.wasm.verify_ironwood_v6_signature_with_pub(inputIndex, wasmECPair);
277
+ }
245
278
  /**
246
279
  * Transaction Extractor role: given the external prover's `proof` bytes, finalize the
247
280
  * transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
@@ -813,6 +813,22 @@ export class BitGoPsbt {
813
813
  */
814
814
  transparent_output_unified_address(index: number): string | undefined;
815
815
  unsigned_tx_id(): string;
816
+ /**
817
+ * Verify if a valid signature exists for a given ECPair key at the specified input index,
818
+ * computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
819
+ * counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
820
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
821
+ * supported.
822
+ */
823
+ verify_ironwood_v6_signature_with_pub(input_index: number, ecpair: WasmECPair): boolean;
824
+ /**
825
+ * Verify if a valid signature exists for an extended public key at the specified input
826
+ * index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
827
+ * counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
828
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
829
+ * supported.
830
+ */
831
+ verify_ironwood_v6_signature_with_xpub(input_index: number, xpub: WasmBIP32): boolean;
816
832
  /**
817
833
  * Verify if a replay protection input has a valid signature
818
834
  *
@@ -2681,6 +2681,58 @@ class BitGoPsbt {
2681
2681
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2682
2682
  }
2683
2683
  }
2684
+ /**
2685
+ * Verify if a valid signature exists for a given ECPair key at the specified input index,
2686
+ * computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
2687
+ * counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
2688
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
2689
+ * supported.
2690
+ * @param {number} input_index
2691
+ * @param {WasmECPair} ecpair
2692
+ * @returns {boolean}
2693
+ */
2694
+ verify_ironwood_v6_signature_with_pub(input_index, ecpair) {
2695
+ try {
2696
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2697
+ _assertClass(ecpair, WasmECPair);
2698
+ wasm.bitgopsbt_verify_ironwood_v6_signature_with_pub(retptr, this.__wbg_ptr, input_index, ecpair.__wbg_ptr);
2699
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2700
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2701
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2702
+ if (r2) {
2703
+ throw takeObject(r1);
2704
+ }
2705
+ return r0 !== 0;
2706
+ } finally {
2707
+ wasm.__wbindgen_add_to_stack_pointer(16);
2708
+ }
2709
+ }
2710
+ /**
2711
+ * Verify if a valid signature exists for an extended public key at the specified input
2712
+ * index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
2713
+ * counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
2714
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
2715
+ * supported.
2716
+ * @param {number} input_index
2717
+ * @param {WasmBIP32} xpub
2718
+ * @returns {boolean}
2719
+ */
2720
+ verify_ironwood_v6_signature_with_xpub(input_index, xpub) {
2721
+ try {
2722
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2723
+ _assertClass(xpub, WasmBIP32);
2724
+ wasm.bitgopsbt_verify_ironwood_v6_signature_with_xpub(retptr, this.__wbg_ptr, input_index, xpub.__wbg_ptr);
2725
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2726
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2727
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2728
+ if (r2) {
2729
+ throw takeObject(r1);
2730
+ }
2731
+ return r0 !== 0;
2732
+ } finally {
2733
+ wasm.__wbindgen_add_to_stack_pointer(16);
2734
+ }
2735
+ }
2684
2736
  /**
2685
2737
  * Verify if a replay protection input has a valid signature
2686
2738
  *
Binary file
@@ -1,8 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
4
5
  export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
5
6
  export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
7
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
8
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
9
+ export const isInspectEnabled: () => number;
10
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
6
11
  export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
7
12
  export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
8
13
  export const wasmdimensions_empty: () => number;
@@ -20,10 +25,180 @@ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => num
20
25
  export const wasmdimensions_has_segwit: (a: number) => number;
21
26
  export const wasmdimensions_plus: (a: number, b: number) => number;
22
27
  export const wasmdimensions_times: (a: number, b: number) => number;
28
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
29
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
30
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
31
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
32
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
33
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
34
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
35
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
36
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
37
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
38
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
39
+ export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
40
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
41
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
42
+ export const wrapdescriptor_node: (a: number, b: number) => void;
43
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
44
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
45
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
46
+ export const wrapminiscript_encode: (a: number, b: number) => void;
47
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
48
+ export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
49
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
50
+ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
51
+ export const wrapminiscript_node: (a: number, b: number) => void;
52
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
53
+ export const wrapminiscript_toString: (a: number, b: number) => void;
54
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
55
+ export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
56
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
57
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
58
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
59
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
60
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
61
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
62
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
63
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
64
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
65
+ export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
66
+ export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
67
+ export const ironwoodwitness_auth_path: (a: number, b: number) => void;
68
+ export const ironwoodwitness_position: (a: number) => number;
69
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
70
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
71
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
72
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
73
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
74
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
75
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
76
+ export const wasmdashtransaction_input_count: (a: number) => number;
77
+ export const wasmdashtransaction_lock_time: (a: number) => number;
78
+ export const wasmdashtransaction_output_count: (a: number) => number;
79
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
80
+ export const wasmdashtransaction_version: (a: number) => number;
81
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
82
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
83
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
84
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
85
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
86
+ export const wasmecpair_private_key: (a: number) => number;
87
+ export const wasmecpair_public_key: (a: number) => number;
88
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
89
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
90
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
91
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
92
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
93
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
94
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
95
+ export const wasmtransaction_create: () => number;
96
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
97
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
98
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
99
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
100
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
101
+ export const wasmtransaction_get_vsize: (a: number) => number;
102
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
103
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
104
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
105
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
106
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
107
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
108
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
109
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
110
+ export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
111
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
112
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
113
+ export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
114
+ export const wrappsbt_clone: (a: number) => number;
115
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
116
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
117
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
118
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
119
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
120
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
121
+ export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
122
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
123
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
124
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
125
+ export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
126
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
127
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
128
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
129
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
130
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
131
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
132
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
133
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
134
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
135
+ export const wrappsbt_input_count: (a: number) => number;
136
+ export const wrappsbt_new: (a: number, b: number) => number;
137
+ export const wrappsbt_output_count: (a: number) => number;
138
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
139
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
140
+ export const wrappsbt_serialize: (a: number, b: number) => void;
141
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
142
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
143
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
144
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
145
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
146
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
147
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
148
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
149
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
150
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
151
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
152
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
153
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
154
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
155
+ export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
156
+ export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
157
+ export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
158
+ export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
159
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
160
+ export const zcash_ironwood_version_group_id: () => number;
161
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
162
+ export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
163
+ export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
164
+ export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
165
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
166
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
167
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
168
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
169
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
170
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
171
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
172
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
173
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
174
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
175
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
176
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
177
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
178
+ export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
179
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
180
+ export const wasmtransaction_input_count: (a: number) => number;
181
+ export const wasmtransaction_output_count: (a: number) => number;
182
+ export const wasmzcashtransaction_input_count: (a: number) => number;
183
+ export const wasmzcashtransaction_output_count: (a: number) => number;
184
+ export const wasmtransaction_lock_time: (a: number) => number;
185
+ export const wasmtransaction_version: (a: number) => number;
186
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
187
+ export const wasmzcashtransaction_version: (a: number) => number;
188
+ export const wrappsbt_lock_time: (a: number) => number;
189
+ export const wrappsbt_version: (a: number) => number;
190
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
23
191
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
24
192
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
25
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
26
193
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
194
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
195
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
196
+ export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
197
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
198
+ export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
199
+ export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
200
+ export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
201
+ export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
27
202
  export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
28
203
  export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
29
204
  export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
@@ -106,6 +281,8 @@ export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: n
106
281
  export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
107
282
  export const bitgopsbt_transparent_output_unified_address: (a: number, b: number, c: number) => void;
108
283
  export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
284
+ export const bitgopsbt_verify_ironwood_v6_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
285
+ export const bitgopsbt_verify_ironwood_v6_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
109
286
  export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
110
287
  export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
111
288
  export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
@@ -121,8 +298,6 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
121
298
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
122
299
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
123
300
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
124
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
125
- export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
126
301
  export const wasmbip32_chain_code: (a: number) => number;
127
302
  export const wasmbip32_depth: (a: number) => number;
128
303
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -145,191 +320,18 @@ export const wasmbip32_private_key: (a: number) => number;
145
320
  export const wasmbip32_public_key: (a: number) => number;
146
321
  export const wasmbip32_to_base58: (a: number, b: number) => void;
147
322
  export const wasmbip32_to_wif: (a: number, b: number) => void;
148
- export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
149
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
150
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
151
- export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
152
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
153
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
154
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
155
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
156
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
157
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
158
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
159
- export const isInspectEnabled: () => number;
160
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
161
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
162
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
163
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
164
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
165
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
166
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
167
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
168
- export const wasmecpair_private_key: (a: number) => number;
169
- export const wasmecpair_public_key: (a: number) => number;
170
- export const wasmecpair_to_wif: (a: number, b: number) => void;
171
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
172
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
173
323
  export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
174
324
  export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
175
325
  export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
176
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
177
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
178
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
179
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
180
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
181
- export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
182
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
183
- export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
184
- export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
185
- export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
186
- export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
187
326
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
188
327
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
189
328
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
190
329
  export const wasmrootwalletkeys_user_key: (a: number) => number;
191
330
  export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
192
- export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
193
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
194
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
195
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
196
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
197
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
198
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
199
- export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
200
- export const ironwoodwitness_auth_path: (a: number, b: number) => void;
201
- export const ironwoodwitness_position: (a: number) => number;
202
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
203
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
204
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
205
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
206
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
207
- export const wasmdashtransaction_input_count: (a: number) => number;
208
- export const wasmdashtransaction_lock_time: (a: number) => number;
209
- export const wasmdashtransaction_output_count: (a: number) => number;
210
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
211
- export const wasmdashtransaction_version: (a: number) => number;
212
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
213
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
214
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
215
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
216
- export const wasmtransaction_create: () => number;
217
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
218
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
219
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
220
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
221
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
222
- export const wasmtransaction_get_vsize: (a: number) => number;
223
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
224
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
225
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
226
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
227
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
228
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
229
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
230
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
231
- export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
232
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
233
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
234
- export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
235
- export const wrappsbt_clone: (a: number) => number;
236
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
237
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
238
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
239
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
240
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
241
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
242
- export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
243
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
244
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
245
- export const wrappsbt_get_global_xpubs: (a: number) => number;
246
- export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
247
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
248
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
249
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
250
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
251
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
252
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
253
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
254
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
255
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
256
- export const wrappsbt_input_count: (a: number) => number;
257
- export const wrappsbt_new: (a: number, b: number) => number;
258
- export const wrappsbt_output_count: (a: number) => number;
259
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
260
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
261
- export const wrappsbt_serialize: (a: number, b: number) => void;
262
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
263
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
264
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
265
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
266
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
267
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
268
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
269
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
270
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
271
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
272
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
273
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
274
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
275
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
276
- export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
277
- export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
278
- export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
279
- export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
280
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
281
- export const zcash_ironwood_version_group_id: () => number;
282
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
283
- export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
284
- export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
285
- export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
286
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
287
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
288
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
289
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
290
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
291
- export const zcashv6transaction_expiryHeight: (a: number) => number;
292
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
293
- export const zcashv6transaction_getId: (a: number, b: number) => void;
294
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
295
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
296
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
297
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
298
- export const zcashv6transaction_toBytes: (a: number, b: number) => void;
299
- export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
300
- export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
301
- export const wasmtransaction_input_count: (a: number) => number;
302
- export const wasmtransaction_output_count: (a: number) => number;
303
- export const wasmzcashtransaction_input_count: (a: number) => number;
304
- export const wasmzcashtransaction_output_count: (a: number) => number;
305
- export const wasmtransaction_lock_time: (a: number) => number;
306
- export const wasmtransaction_version: (a: number) => number;
307
- export const wasmzcashtransaction_lock_time: (a: number) => number;
308
- export const wasmzcashtransaction_version: (a: number) => number;
309
- export const wrappsbt_lock_time: (a: number) => number;
310
- export const wrappsbt_version: (a: number) => number;
311
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
312
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
313
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
314
- export const wrapdescriptor_descType: (a: number, b: number) => void;
315
- export const wrapdescriptor_encode: (a: number, b: number) => void;
316
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
317
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
318
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
319
- export const wrapdescriptor_hasWildcard: (a: number) => number;
320
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
321
- export const wrapdescriptor_node: (a: number, b: number) => void;
322
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
323
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
324
- export const wrapdescriptor_toString: (a: number, b: number) => void;
325
- export const wrapminiscript_encode: (a: number, b: number) => void;
326
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
327
- export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
328
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
329
- export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
330
- export const wrapminiscript_node: (a: number, b: number) => void;
331
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
332
- export const wrapminiscript_toString: (a: number, b: number) => void;
331
+ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
332
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
333
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
334
+ export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
333
335
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
334
336
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
335
337
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -249,6 +249,31 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
249
249
  * {@link sign} (all matching inputs) instead.
250
250
  */
251
251
  sign(inputIndex: number, key: BIP32Arg | ECPairArg): void;
252
+ /**
253
+ * Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
254
+ * ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
255
+ * {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
256
+ * (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
257
+ * to the v6 sighash path instead.
258
+ *
259
+ * Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
260
+ * `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
261
+ *
262
+ * @param inputIndex - 0-based transparent input index
263
+ * @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
264
+ * or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
265
+ * @returns true if a valid signature by the key's public key exists for the input's
266
+ * ZIP-244 transparent sighash
267
+ * @throws Error if the input index is out of range, the key cannot be parsed, or the v6
268
+ * sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
269
+ *
270
+ * @example
271
+ * ```typescript
272
+ * // Verify the user's signature over the v6 transparent sighash
273
+ * const hasUserSig = psbt.verifySignature(0, userXpub);
274
+ * ```
275
+ */
276
+ verifySignature(inputIndex: number, key: BIP32Arg | ECPairArg): boolean;
252
277
  /**
253
278
  * Transaction Extractor role: given the external prover's `proof` bytes, finalize the
254
279
  * transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
@@ -1,5 +1,6 @@
1
1
  import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
2
2
  import { BIP32, isBIP32Arg } from "../bip32.js";
3
+ import { ECPair } from "../ecpair.js";
3
4
  import { RootWalletKeys } from "./RootWalletKeys.js";
4
5
  import { IRONWOOD_VERSION_GROUP_ID, ZcashBitGoPsbt, } from "./ZcashBitGoPsbt.js";
5
6
  /**
@@ -238,6 +239,38 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
238
239
  const keys = RootWalletKeys.from(keyOrRootWalletKeys);
239
240
  return Array.from(this.wasm.sign_ironwood_v6(wasmKey, keys.wasm), Number);
240
241
  }
242
+ /**
243
+ * Check whether transparent input `inputIndex` carries a valid signature by `key`, over the
244
+ * ZIP-244 transparent sighash — the digest v6 (Ironwood) keys actually sign (see
245
+ * {@link transparentSighash}). The inherited `BitGoPsbt.verifySignature` digests ZIP-243
246
+ * (Sapling) instead, so it would report `false` for a valid v6 signature; this override routes
247
+ * to the v6 sighash path instead.
248
+ *
249
+ * Mirrors the inherited signature: an xpub (BIP32Arg) resolves to a public key via the input's
250
+ * `bip32_derivation`; a raw key (ECPairArg) verifies with its public key directly.
251
+ *
252
+ * @param inputIndex - 0-based transparent input index
253
+ * @param key - the signing key: an xpub (BIP32Arg: base58 string, BIP32 instance, or WasmBIP32)
254
+ * or an ECPairArg (Uint8Array, ECPair instance, or WasmECPair)
255
+ * @returns true if a valid signature by the key's public key exists for the input's
256
+ * ZIP-244 transparent sighash
257
+ * @throws Error if the input index is out of range, the key cannot be parsed, or the v6
258
+ * sighash cannot be computed (e.g. the Ironwood PCZT has not been added yet)
259
+ *
260
+ * @example
261
+ * ```typescript
262
+ * // Verify the user's signature over the v6 transparent sighash
263
+ * const hasUserSig = psbt.verifySignature(0, userXpub);
264
+ * ```
265
+ */
266
+ verifySignature(inputIndex, key) {
267
+ if (isBIP32Arg(key)) {
268
+ return this.wasm.verify_ironwood_v6_signature_with_xpub(inputIndex, BIP32.from(key).wasm);
269
+ }
270
+ // Otherwise it's an ECPairArg (Uint8Array, ECPair, or WasmECPair)
271
+ const wasmECPair = ECPair.from(key).wasm;
272
+ return this.wasm.verify_ironwood_v6_signature_with_pub(inputIndex, wasmECPair);
273
+ }
241
274
  /**
242
275
  * Transaction Extractor role: given the external prover's `proof` bytes, finalize the
243
276
  * transparent inputs, apply the shielded binding signature, and return the broadcast-ready v6
@@ -813,6 +813,22 @@ export class BitGoPsbt {
813
813
  */
814
814
  transparent_output_unified_address(index: number): string | undefined;
815
815
  unsigned_tx_id(): string;
816
+ /**
817
+ * Verify if a valid signature exists for a given ECPair key at the specified input index,
818
+ * computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
819
+ * counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
820
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
821
+ * supported.
822
+ */
823
+ verify_ironwood_v6_signature_with_pub(input_index: number, ecpair: WasmECPair): boolean;
824
+ /**
825
+ * Verify if a valid signature exists for an extended public key at the specified input
826
+ * index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
827
+ * counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
828
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
829
+ * supported.
830
+ */
831
+ verify_ironwood_v6_signature_with_xpub(input_index: number, xpub: WasmBIP32): boolean;
816
832
  /**
817
833
  * Verify if a replay protection input has a valid signature
818
834
  *
@@ -2677,6 +2677,58 @@ export class BitGoPsbt {
2677
2677
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2678
2678
  }
2679
2679
  }
2680
+ /**
2681
+ * Verify if a valid signature exists for a given ECPair key at the specified input index,
2682
+ * computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
2683
+ * counterpart to `verify_signature_with_pub`, which digests ZIP-243 (Sapling) and would
2684
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
2685
+ * supported.
2686
+ * @param {number} input_index
2687
+ * @param {WasmECPair} ecpair
2688
+ * @returns {boolean}
2689
+ */
2690
+ verify_ironwood_v6_signature_with_pub(input_index, ecpair) {
2691
+ try {
2692
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2693
+ _assertClass(ecpair, WasmECPair);
2694
+ wasm.bitgopsbt_verify_ironwood_v6_signature_with_pub(retptr, this.__wbg_ptr, input_index, ecpair.__wbg_ptr);
2695
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2696
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2697
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2698
+ if (r2) {
2699
+ throw takeObject(r1);
2700
+ }
2701
+ return r0 !== 0;
2702
+ } finally {
2703
+ wasm.__wbindgen_add_to_stack_pointer(16);
2704
+ }
2705
+ }
2706
+ /**
2707
+ * Verify if a valid signature exists for an extended public key at the specified input
2708
+ * index, computed over the ZIP-244 v6 (Ironwood) transparent sighash — the v6 (Ironwood)
2709
+ * counterpart to `verify_signature_with_xpub`, which digests ZIP-243 (Sapling) and would
2710
+ * report `Ok(false)` for a valid v6 signature. Only v6 (Ironwood) Zcash PSBTs are
2711
+ * supported.
2712
+ * @param {number} input_index
2713
+ * @param {WasmBIP32} xpub
2714
+ * @returns {boolean}
2715
+ */
2716
+ verify_ironwood_v6_signature_with_xpub(input_index, xpub) {
2717
+ try {
2718
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2719
+ _assertClass(xpub, WasmBIP32);
2720
+ wasm.bitgopsbt_verify_ironwood_v6_signature_with_xpub(retptr, this.__wbg_ptr, input_index, xpub.__wbg_ptr);
2721
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2722
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2723
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2724
+ if (r2) {
2725
+ throw takeObject(r1);
2726
+ }
2727
+ return r0 !== 0;
2728
+ } finally {
2729
+ wasm.__wbindgen_add_to_stack_pointer(16);
2730
+ }
2731
+ }
2680
2732
  /**
2681
2733
  * Verify if a replay protection input has a valid signature
2682
2734
  *
Binary file
@@ -1,8 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
4
5
  export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
5
6
  export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
7
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
8
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
9
+ export const isInspectEnabled: () => number;
10
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
6
11
  export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
7
12
  export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
8
13
  export const wasmdimensions_empty: () => number;
@@ -20,10 +25,180 @@ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => num
20
25
  export const wasmdimensions_has_segwit: (a: number) => number;
21
26
  export const wasmdimensions_plus: (a: number, b: number) => number;
22
27
  export const wasmdimensions_times: (a: number, b: number) => number;
28
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
29
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
30
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
31
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
32
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
33
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
34
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
35
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
36
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
37
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
38
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
39
+ export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
40
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
41
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
42
+ export const wrapdescriptor_node: (a: number, b: number) => void;
43
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
44
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
45
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
46
+ export const wrapminiscript_encode: (a: number, b: number) => void;
47
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
48
+ export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
49
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
50
+ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
51
+ export const wrapminiscript_node: (a: number, b: number) => void;
52
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
53
+ export const wrapminiscript_toString: (a: number, b: number) => void;
54
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
55
+ export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
56
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
57
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
58
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
59
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
60
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
61
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
62
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
63
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
64
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
65
+ export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
66
+ export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
67
+ export const ironwoodwitness_auth_path: (a: number, b: number) => void;
68
+ export const ironwoodwitness_position: (a: number) => number;
69
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
70
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
71
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
72
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
73
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
74
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
75
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
76
+ export const wasmdashtransaction_input_count: (a: number) => number;
77
+ export const wasmdashtransaction_lock_time: (a: number) => number;
78
+ export const wasmdashtransaction_output_count: (a: number) => number;
79
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
80
+ export const wasmdashtransaction_version: (a: number) => number;
81
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
82
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
83
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
84
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
85
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
86
+ export const wasmecpair_private_key: (a: number) => number;
87
+ export const wasmecpair_public_key: (a: number) => number;
88
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
89
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
90
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
91
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
92
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
93
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
94
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
95
+ export const wasmtransaction_create: () => number;
96
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
97
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
98
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
99
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
100
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
101
+ export const wasmtransaction_get_vsize: (a: number) => number;
102
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
103
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
104
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
105
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
106
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
107
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
108
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
109
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
110
+ export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
111
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
112
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
113
+ export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
114
+ export const wrappsbt_clone: (a: number) => number;
115
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
116
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
117
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
118
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
119
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
120
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
121
+ export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
122
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
123
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
124
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
125
+ export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
126
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
127
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
128
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
129
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
130
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
131
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
132
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
133
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
134
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
135
+ export const wrappsbt_input_count: (a: number) => number;
136
+ export const wrappsbt_new: (a: number, b: number) => number;
137
+ export const wrappsbt_output_count: (a: number) => number;
138
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
139
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
140
+ export const wrappsbt_serialize: (a: number, b: number) => void;
141
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
142
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
143
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
144
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
145
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
146
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
147
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
148
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
149
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
150
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
151
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
152
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
153
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
154
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
155
+ export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
156
+ export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
157
+ export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
158
+ export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
159
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
160
+ export const zcash_ironwood_version_group_id: () => number;
161
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
162
+ export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
163
+ export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
164
+ export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
165
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
166
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
167
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
168
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
169
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
170
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
171
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
172
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
173
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
174
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
175
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
176
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
177
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
178
+ export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
179
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
180
+ export const wasmtransaction_input_count: (a: number) => number;
181
+ export const wasmtransaction_output_count: (a: number) => number;
182
+ export const wasmzcashtransaction_input_count: (a: number) => number;
183
+ export const wasmzcashtransaction_output_count: (a: number) => number;
184
+ export const wasmtransaction_lock_time: (a: number) => number;
185
+ export const wasmtransaction_version: (a: number) => number;
186
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
187
+ export const wasmzcashtransaction_version: (a: number) => number;
188
+ export const wrappsbt_lock_time: (a: number) => number;
189
+ export const wrappsbt_version: (a: number) => number;
190
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
23
191
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
24
192
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
25
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
26
193
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
194
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
195
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
196
+ export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
197
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
198
+ export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
199
+ export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
200
+ export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
201
+ export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
27
202
  export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
28
203
  export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
29
204
  export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
@@ -106,6 +281,8 @@ export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: n
106
281
  export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
107
282
  export const bitgopsbt_transparent_output_unified_address: (a: number, b: number, c: number) => void;
108
283
  export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
284
+ export const bitgopsbt_verify_ironwood_v6_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
285
+ export const bitgopsbt_verify_ironwood_v6_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
109
286
  export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
110
287
  export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
111
288
  export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
@@ -121,8 +298,6 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
121
298
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
122
299
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
123
300
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
124
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
125
- export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
126
301
  export const wasmbip32_chain_code: (a: number) => number;
127
302
  export const wasmbip32_depth: (a: number) => number;
128
303
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -145,191 +320,18 @@ export const wasmbip32_private_key: (a: number) => number;
145
320
  export const wasmbip32_public_key: (a: number) => number;
146
321
  export const wasmbip32_to_base58: (a: number, b: number) => void;
147
322
  export const wasmbip32_to_wif: (a: number, b: number) => void;
148
- export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
149
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
150
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
151
- export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
152
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
153
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
154
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
155
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
156
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
157
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
158
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
159
- export const isInspectEnabled: () => number;
160
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
161
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
162
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
163
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
164
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
165
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
166
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
167
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
168
- export const wasmecpair_private_key: (a: number) => number;
169
- export const wasmecpair_public_key: (a: number) => number;
170
- export const wasmecpair_to_wif: (a: number, b: number) => void;
171
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
172
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
173
323
  export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
174
324
  export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
175
325
  export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
176
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
177
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
178
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
179
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
180
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
181
- export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
182
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
183
- export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
184
- export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
185
- export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
186
- export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
187
326
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
188
327
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
189
328
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
190
329
  export const wasmrootwalletkeys_user_key: (a: number) => number;
191
330
  export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
192
- export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
193
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
194
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
195
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
196
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
197
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
198
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
199
- export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
200
- export const ironwoodwitness_auth_path: (a: number, b: number) => void;
201
- export const ironwoodwitness_position: (a: number) => number;
202
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
203
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
204
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
205
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
206
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
207
- export const wasmdashtransaction_input_count: (a: number) => number;
208
- export const wasmdashtransaction_lock_time: (a: number) => number;
209
- export const wasmdashtransaction_output_count: (a: number) => number;
210
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
211
- export const wasmdashtransaction_version: (a: number) => number;
212
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
213
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
214
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
215
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
216
- export const wasmtransaction_create: () => number;
217
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
218
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
219
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
220
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
221
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
222
- export const wasmtransaction_get_vsize: (a: number) => number;
223
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
224
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
225
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
226
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
227
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
228
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
229
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
230
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
231
- export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
232
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
233
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
234
- export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
235
- export const wrappsbt_clone: (a: number) => number;
236
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
237
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
238
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
239
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
240
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
241
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
242
- export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
243
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
244
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
245
- export const wrappsbt_get_global_xpubs: (a: number) => number;
246
- export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
247
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
248
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
249
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
250
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
251
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
252
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
253
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
254
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
255
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
256
- export const wrappsbt_input_count: (a: number) => number;
257
- export const wrappsbt_new: (a: number, b: number) => number;
258
- export const wrappsbt_output_count: (a: number) => number;
259
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
260
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
261
- export const wrappsbt_serialize: (a: number, b: number) => void;
262
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
263
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
264
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
265
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
266
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
267
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
268
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
269
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
270
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
271
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
272
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
273
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
274
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
275
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
276
- export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
277
- export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
278
- export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
279
- export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
280
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
281
- export const zcash_ironwood_version_group_id: () => number;
282
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
283
- export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
284
- export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
285
- export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
286
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
287
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
288
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
289
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
290
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
291
- export const zcashv6transaction_expiryHeight: (a: number) => number;
292
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
293
- export const zcashv6transaction_getId: (a: number, b: number) => void;
294
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
295
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
296
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
297
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
298
- export const zcashv6transaction_toBytes: (a: number, b: number) => void;
299
- export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
300
- export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
301
- export const wasmtransaction_input_count: (a: number) => number;
302
- export const wasmtransaction_output_count: (a: number) => number;
303
- export const wasmzcashtransaction_input_count: (a: number) => number;
304
- export const wasmzcashtransaction_output_count: (a: number) => number;
305
- export const wasmtransaction_lock_time: (a: number) => number;
306
- export const wasmtransaction_version: (a: number) => number;
307
- export const wasmzcashtransaction_lock_time: (a: number) => number;
308
- export const wasmzcashtransaction_version: (a: number) => number;
309
- export const wrappsbt_lock_time: (a: number) => number;
310
- export const wrappsbt_version: (a: number) => number;
311
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
312
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
313
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
314
- export const wrapdescriptor_descType: (a: number, b: number) => void;
315
- export const wrapdescriptor_encode: (a: number, b: number) => void;
316
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
317
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
318
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
319
- export const wrapdescriptor_hasWildcard: (a: number) => number;
320
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
321
- export const wrapdescriptor_node: (a: number, b: number) => void;
322
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
323
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
324
- export const wrapdescriptor_toString: (a: number, b: number) => void;
325
- export const wrapminiscript_encode: (a: number, b: number) => void;
326
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
327
- export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
328
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
329
- export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
330
- export const wrapminiscript_node: (a: number, b: number) => void;
331
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
332
- export const wrapminiscript_toString: (a: number, b: number) => void;
331
+ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
332
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
333
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
334
+ export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
333
335
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
334
336
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
335
337
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitgo/wasm-utxo",
3
3
  "description": "WebAssembly wrapper for rust-bitcoin (beta)",
4
- "version": "5.2.0",
4
+ "version": "5.3.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",