@bitgo/wasm-utxo 5.4.0 → 5.5.1

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.
@@ -135,7 +135,9 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
135
135
  * @param amount - note value in zatoshi
136
136
  * @param options.anchor - 32-byte Ironwood note-commitment-tree root
137
137
  * @param options.memo - optional 512-byte memo (defaults to the ZIP-302 "no memo" encoding)
138
- * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build)
138
+ * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build). Has no
139
+ * effect in the normal flow: {@link sign}'s first round re-encrypts every action's
140
+ * `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
139
141
  * @param options.unifiedAddress - optional full Unified Address string this output was addressed
140
142
  * to. Its Orchard receiver must equal `recipient`. The PCZT itself only carries the raw 43-byte
141
143
  * receiver — a lossy encoding for a multi-receiver UA, since any transparent/Sapling receiver
@@ -156,12 +158,14 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
156
158
  * {@link addShieldedOutput}).
157
159
  *
158
160
  * @param outputs - one entry per recipient; `memo` defaults per-entry to the ZIP-302 "no memo"
159
- * encoding, exactly as {@link addShieldedOutput}'s does
161
+ * encoding, exactly as {@link addShieldedOutput}'s does, and `ovk` is likewise replaced by
162
+ * {@link sign}'s first round
160
163
  * @param anchor - 32-byte Ironwood note-commitment-tree root, shared by every output
161
164
  * @returns the action index assigned to each output, in the same order as `outputs` — the
162
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
163
- * indices (not the position in `outputs`) when later calling
164
- * `setIronwoodOutCiphertext`/`setIronwoodOutCiphertextForUser` for a specific recipient.
165
+ * orchard builder pads/reorders actions, so any caller correlating per-action data (a stored
166
+ * unified address, an explicit `setShieldedOutCiphertext` call) must use these indices, not the
167
+ * position in `outputs` — though note {@link sign}'s first round already patches every action's
168
+ * `out_ciphertext` with the wallet `ovk` on its own.
165
169
  */
166
170
  addShieldedOutputs(outputs: Array<{
167
171
  recipient: Uint8Array;
@@ -181,14 +185,16 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
181
185
  * `ovk` derived from those is one neither the user nor the server can reproduce, and the resulting
182
186
  * transaction would broadcast fine while leaving the shielded output permanently unrecoverable.
183
187
  *
184
- * Normally you do not call this directly: {@link sign} performs it on the first signing round.
188
+ * Normally you do not call this directly: {@link sign} performs it for **every** action on the
189
+ * first signing round (idempotently — same `ovk`, same bytes).
185
190
  *
186
191
  * Must be called **before** signing: `out_ciphertext` is committed by the ZIP-244 sighash, so
187
192
  * calling this after any transparent signature has been added (via
188
193
  * {@link addTransparentSignature}) throws rather than silently invalidating that signature.
189
194
  *
190
- * @param actionIndex - index of the Ironwood action whose output to re-encrypt (always `0`: only
191
- * one shielded output per transaction is supported, see {@link addShieldedOutput})
195
+ * @param actionIndex - index of the Ironwood action whose output to re-encrypt; use an index
196
+ * returned by {@link addShieldedOutputs} (the orchard builder may reorder actions, so it is not
197
+ * necessarily the output's position in the call)
192
198
  * @param userKey - the wallet's user root key (an xpriv)
193
199
  * @param rootWalletKeys - the wallet's root keys, supplying the BitGo cosigner pubkey
194
200
  */
@@ -220,7 +226,8 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
220
226
  *
221
227
  * If no transparent signature has been added to this PSBT yet, this is the first signing round and
222
228
  * `key` must be the wallet's user root key: it is used with `rootWalletKeys.bitgoKey()` to derive
223
- * this wallet's `ovk` and finalize `out_ciphertext` — the client-managed-`ovk` flow — before any
229
+ * this wallet's `ovk` and finalize **every** action's `out_ciphertext` — the client-managed-`ovk`
230
+ * flow, multi-recipient builds included — before any
224
231
  * sighash is computed. Once a signature exists, that step is a no-op, so a caller passes
225
232
  * `rootWalletKeys` on every signing round unconditionally: `psbt.sign(userXpriv, rootWalletKeys)`
226
233
  * and later `psbt.sign(bitgoXpriv, rootWalletKeys)` — only the first call actually uses it.
@@ -136,7 +136,9 @@ class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt_js_1.ZcashBitGoPsbt {
136
136
  * @param amount - note value in zatoshi
137
137
  * @param options.anchor - 32-byte Ironwood note-commitment-tree root
138
138
  * @param options.memo - optional 512-byte memo (defaults to the ZIP-302 "no memo" encoding)
139
- * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build)
139
+ * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build). Has no
140
+ * effect in the normal flow: {@link sign}'s first round re-encrypts every action's
141
+ * `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
140
142
  * @param options.unifiedAddress - optional full Unified Address string this output was addressed
141
143
  * to. Its Orchard receiver must equal `recipient`. The PCZT itself only carries the raw 43-byte
142
144
  * receiver — a lossy encoding for a multi-receiver UA, since any transparent/Sapling receiver
@@ -155,12 +157,14 @@ class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt_js_1.ZcashBitGoPsbt {
155
157
  * {@link addShieldedOutput}).
156
158
  *
157
159
  * @param outputs - one entry per recipient; `memo` defaults per-entry to the ZIP-302 "no memo"
158
- * encoding, exactly as {@link addShieldedOutput}'s does
160
+ * encoding, exactly as {@link addShieldedOutput}'s does, and `ovk` is likewise replaced by
161
+ * {@link sign}'s first round
159
162
  * @param anchor - 32-byte Ironwood note-commitment-tree root, shared by every output
160
163
  * @returns the action index assigned to each output, in the same order as `outputs` — the
161
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
162
- * indices (not the position in `outputs`) when later calling
163
- * `setIronwoodOutCiphertext`/`setIronwoodOutCiphertextForUser` for a specific recipient.
164
+ * orchard builder pads/reorders actions, so any caller correlating per-action data (a stored
165
+ * unified address, an explicit `setShieldedOutCiphertext` call) must use these indices, not the
166
+ * position in `outputs` — though note {@link sign}'s first round already patches every action's
167
+ * `out_ciphertext` with the wallet `ovk` on its own.
164
168
  */
165
169
  addShieldedOutputs(outputs, anchor) {
166
170
  return Array.from(this.wasm.add_ironwood_outputs(outputs.map((o) => ({
@@ -182,14 +186,16 @@ class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt_js_1.ZcashBitGoPsbt {
182
186
  * `ovk` derived from those is one neither the user nor the server can reproduce, and the resulting
183
187
  * transaction would broadcast fine while leaving the shielded output permanently unrecoverable.
184
188
  *
185
- * Normally you do not call this directly: {@link sign} performs it on the first signing round.
189
+ * Normally you do not call this directly: {@link sign} performs it for **every** action on the
190
+ * first signing round (idempotently — same `ovk`, same bytes).
186
191
  *
187
192
  * Must be called **before** signing: `out_ciphertext` is committed by the ZIP-244 sighash, so
188
193
  * calling this after any transparent signature has been added (via
189
194
  * {@link addTransparentSignature}) throws rather than silently invalidating that signature.
190
195
  *
191
- * @param actionIndex - index of the Ironwood action whose output to re-encrypt (always `0`: only
192
- * one shielded output per transaction is supported, see {@link addShieldedOutput})
196
+ * @param actionIndex - index of the Ironwood action whose output to re-encrypt; use an index
197
+ * returned by {@link addShieldedOutputs} (the orchard builder may reorder actions, so it is not
198
+ * necessarily the output's position in the call)
193
199
  * @param userKey - the wallet's user root key (an xpriv)
194
200
  * @param rootWalletKeys - the wallet's root keys, supplying the BitGo cosigner pubkey
195
201
  */
@@ -1,4 +1,5 @@
1
1
  import { ZcashV6Transaction as WasmZcashV6Transaction } from "../wasm/wasm_utxo.js";
2
+ import type { TxInputData } from "../wasm/wasm_utxo.js";
2
3
  /**
3
4
  * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
4
5
  *
@@ -49,6 +50,12 @@ export declare class ZcashV6Transaction {
49
50
  * scriptPubKeys for *every* transparent input of this transaction, in input order.
50
51
  */
51
52
  transparentSighash(index: number, inputAmounts: bigint[], inputScriptPubkeys: Uint8Array[]): Uint8Array;
53
+ /**
54
+ * The transparent inputs of this transaction, in input order — e.g. each input's
55
+ * `previousOutput` (display-order txid + vout) for looking up the spent UTXOs of a broadcast
56
+ * shielding transaction. Empty for a fully shielded transaction.
57
+ */
58
+ getInputs(): TxInputData[];
52
59
  /** @internal */
53
60
  get wasm(): WasmZcashV6Transaction;
54
61
  }
@@ -76,6 +76,14 @@ class ZcashV6Transaction {
76
76
  transparentSighash(index, inputAmounts, inputScriptPubkeys) {
77
77
  return this._wasm.transparentSighash(index, BigInt64Array.from(inputAmounts), inputScriptPubkeys);
78
78
  }
79
+ /**
80
+ * The transparent inputs of this transaction, in input order — e.g. each input's
81
+ * `previousOutput` (display-order txid + vout) for looking up the spent UTXOs of a broadcast
82
+ * shielding transaction. Empty for a fully shielded transaction.
83
+ */
84
+ getInputs() {
85
+ return this._wasm.getInputs();
86
+ }
79
87
  /** @internal */
80
88
  get wasm() {
81
89
  return this._wasm;
@@ -144,7 +144,9 @@ export class BitGoPsbt {
144
144
  *
145
145
  * * `recipient` - raw Orchard/Ironwood address ([`ORCHARD_ADDRESS_SIZE`] bytes)
146
146
  * * `amount` - note value in zatoshi
147
- * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build)
147
+ * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build).
148
+ * Has no effect in the normal flow: `sign_ironwood_v6`'s first round re-encrypts every
149
+ * action's `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
148
150
  * * `anchor` - Ironwood note-commitment-tree root ([`ANCHOR_SIZE`] bytes)
149
151
  * * `memo` - ZIP-302 memo field ([`MEMO_SIZE`] bytes)
150
152
  * * `unified_address` - optional full Unified Address the output was addressed to; if given,
@@ -168,9 +170,10 @@ export class BitGoPsbt {
168
170
  * output.
169
171
  *
170
172
  * Returns the action index assigned to each output, in the same order as `outputs` — the
171
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
172
- * indices (not the position in `outputs`) when later calling `set_ironwood_out_ciphertext`
173
- * for a specific recipient.
173
+ * orchard builder pads/reorders actions, so a caller correlating per-action data (a stored
174
+ * Unified Address, an explicit `set_ironwood_out_ciphertext` call) must use these indices, not
175
+ * the position in `outputs` — though note `sign_ironwood_v6`'s first round already patches
176
+ * every action's `out_ciphertext` with the wallet `ovk` on its own.
174
177
  */
175
178
  add_ironwood_outputs(outputs: any, anchor: Uint8Array): Uint32Array;
176
179
  /**
@@ -665,7 +668,8 @@ export class BitGoPsbt {
665
668
  *
666
669
  * If no transparent signature has been collected yet, this is the first signing round and
667
670
  * `xpriv` must be the wallet's user root key: it is used with `root_wallet_keys.bitgo_key()` to
668
- * derive this wallet's `ovk` and finalize `out_ciphertext` before computing any sighash (it is
671
+ * derive this wallet's `ovk` and finalize every action's `out_ciphertext` (multi-recipient
672
+ * builds included) before computing any sighash (it is
669
673
  * sighash-committed). Any other key signing first is rejected, rather than deriving an `ovk`
670
674
  * nobody can reproduce. Once a signature exists, the step is skipped and any key may sign — so
671
675
  * callers pass `root_wallet_keys` unconditionally on every signing round without needing to know
@@ -1865,6 +1869,12 @@ export class ZcashV6Transaction {
1865
1869
  * transaction id is printed everywhere else in the codebase.
1866
1870
  */
1867
1871
  getId(): string;
1872
+ /**
1873
+ * The transparent inputs of this transaction, in input order — each input's
1874
+ * `previousOutput` (display-order txid + vout), sequence, scriptSig, and witness, carried
1875
+ * verbatim from the wire. Empty for a fully shielded transaction.
1876
+ */
1877
+ getInputs(): TxInputData[];
1868
1878
  /**
1869
1879
  * Serialize back to raw v6 wire bytes.
1870
1880
  */
@@ -475,7 +475,9 @@ class BitGoPsbt {
475
475
  *
476
476
  * * `recipient` - raw Orchard/Ironwood address ([`ORCHARD_ADDRESS_SIZE`] bytes)
477
477
  * * `amount` - note value in zatoshi
478
- * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build)
478
+ * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build).
479
+ * Has no effect in the normal flow: `sign_ironwood_v6`'s first round re-encrypts every
480
+ * action's `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
479
481
  * * `anchor` - Ironwood note-commitment-tree root ([`ANCHOR_SIZE`] bytes)
480
482
  * * `memo` - ZIP-302 memo field ([`MEMO_SIZE`] bytes)
481
483
  * * `unified_address` - optional full Unified Address the output was addressed to; if given,
@@ -527,9 +529,10 @@ class BitGoPsbt {
527
529
  * output.
528
530
  *
529
531
  * Returns the action index assigned to each output, in the same order as `outputs` — the
530
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
531
- * indices (not the position in `outputs`) when later calling `set_ironwood_out_ciphertext`
532
- * for a specific recipient.
532
+ * orchard builder pads/reorders actions, so a caller correlating per-action data (a stored
533
+ * Unified Address, an explicit `set_ironwood_out_ciphertext` call) must use these indices, not
534
+ * the position in `outputs` — though note `sign_ironwood_v6`'s first round already patches
535
+ * every action's `out_ciphertext` with the wallet `ovk` on its own.
533
536
  * @param {any} outputs
534
537
  * @param {Uint8Array} anchor
535
538
  * @returns {Uint32Array}
@@ -2369,7 +2372,8 @@ class BitGoPsbt {
2369
2372
  *
2370
2373
  * If no transparent signature has been collected yet, this is the first signing round and
2371
2374
  * `xpriv` must be the wallet's user root key: it is used with `root_wallet_keys.bitgo_key()` to
2372
- * derive this wallet's `ovk` and finalize `out_ciphertext` before computing any sighash (it is
2375
+ * derive this wallet's `ovk` and finalize every action's `out_ciphertext` (multi-recipient
2376
+ * builds included) before computing any sighash (it is
2373
2377
  * sighash-committed). Any other key signing first is rejected, rather than deriving an `ovk`
2374
2378
  * nobody can reproduce. Once a signature exists, the step is skipped and any key may sign — so
2375
2379
  * callers pass `root_wallet_keys` unconditionally on every signing round without needing to know
@@ -7106,6 +7110,27 @@ class ZcashV6Transaction {
7106
7110
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
7107
7111
  }
7108
7112
  }
7113
+ /**
7114
+ * The transparent inputs of this transaction, in input order — each input's
7115
+ * `previousOutput` (display-order txid + vout), sequence, scriptSig, and witness, carried
7116
+ * verbatim from the wire. Empty for a fully shielded transaction.
7117
+ * @returns {TxInputData[]}
7118
+ */
7119
+ getInputs() {
7120
+ try {
7121
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7122
+ wasm.zcashv6transaction_getInputs(retptr, this.__wbg_ptr);
7123
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7124
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7125
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7126
+ if (r2) {
7127
+ throw takeObject(r1);
7128
+ }
7129
+ return takeObject(r0);
7130
+ } finally {
7131
+ wasm.__wbindgen_add_to_stack_pointer(16);
7132
+ }
7133
+ }
7109
7134
  /**
7110
7135
  * Number of Ironwood actions (0 when the Ironwood slot is empty).
7111
7136
  * @returns {number}
Binary file
@@ -1,153 +1,6 @@
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;
5
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
6
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
7
- export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
8
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
9
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
10
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
11
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
12
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
13
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
14
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
15
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
16
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
17
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
18
- 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;
19
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
20
- 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;
21
- 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;
22
- 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;
23
- 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;
24
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
25
- 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;
26
- export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
27
- export const ironwood_build_witness_from_shard: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => void;
28
- export const ironwoodwitness_auth_path: (a: number, b: number) => void;
29
- export const ironwoodwitness_position: (a: number) => number;
30
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
31
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
32
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
33
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
34
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
35
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
36
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
37
- export const wasmdashtransaction_input_count: (a: number) => number;
38
- export const wasmdashtransaction_lock_time: (a: number) => number;
39
- export const wasmdashtransaction_output_count: (a: number) => number;
40
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
41
- export const wasmdashtransaction_version: (a: number) => number;
42
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
43
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
44
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
45
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
46
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
47
- export const wasmecpair_private_key: (a: number) => number;
48
- export const wasmecpair_public_key: (a: number) => number;
49
- export const wasmecpair_to_wif: (a: number, b: number) => void;
50
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
51
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
52
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
53
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
54
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
55
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
56
- export const wasmtransaction_create: () => number;
57
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
58
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
59
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
60
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
61
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
62
- export const wasmtransaction_get_vsize: (a: number) => number;
63
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
64
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
65
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
66
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
67
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
68
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
69
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
70
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
71
- 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;
72
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
73
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
74
- export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
75
- export const wrappsbt_clone: (a: number) => number;
76
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
77
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
78
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
79
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
80
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
81
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
82
- export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
83
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
84
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
85
- export const wrappsbt_get_global_xpubs: (a: number) => number;
86
- export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
87
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
88
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
89
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
90
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
91
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
92
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
93
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
94
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
95
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
96
- export const wrappsbt_input_count: (a: number) => number;
97
- export const wrappsbt_new: (a: number, b: number) => number;
98
- export const wrappsbt_output_count: (a: number) => number;
99
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
100
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
101
- export const wrappsbt_serialize: (a: number, b: number) => void;
102
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
103
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
104
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
105
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
106
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
107
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
108
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
109
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
110
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
111
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
112
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
113
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
114
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
115
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
116
- export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
117
- export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
118
- export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
119
- export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
120
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
121
- export const zcash_ironwood_version_group_id: () => number;
122
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
123
- export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
124
- export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
125
- export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
126
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
127
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
128
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
129
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
130
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
131
- export const zcashv6transaction_expiryHeight: (a: number) => number;
132
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
133
- export const zcashv6transaction_getId: (a: number, b: number) => void;
134
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
135
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
136
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
137
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
138
- export const zcashv6transaction_toBytes: (a: number, b: number) => void;
139
- export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
140
- export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
141
- export const wasmtransaction_input_count: (a: number) => number;
142
- export const wasmtransaction_output_count: (a: number) => number;
143
- export const wasmzcashtransaction_input_count: (a: number) => number;
144
- export const wasmzcashtransaction_output_count: (a: number) => number;
145
- export const wasmtransaction_lock_time: (a: number) => number;
146
- export const wasmtransaction_version: (a: number) => number;
147
- export const wasmzcashtransaction_lock_time: (a: number) => number;
148
- export const wasmzcashtransaction_version: (a: number) => number;
149
- export const wrappsbt_lock_time: (a: number) => number;
150
- export const wrappsbt_version: (a: number) => number;
151
4
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
152
5
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
153
6
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
@@ -305,9 +158,158 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
305
158
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
306
159
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
307
160
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
161
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
162
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
163
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
164
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
165
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
166
+ export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
167
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
168
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
169
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
170
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
171
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
172
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
173
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
174
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
175
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
176
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
177
+ 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;
178
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
179
+ 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;
180
+ 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;
181
+ 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;
182
+ 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;
183
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
184
+ 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;
185
+ export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
186
+ export const ironwood_build_witness_from_shard: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => void;
187
+ export const ironwoodwitness_auth_path: (a: number, b: number) => void;
188
+ export const ironwoodwitness_position: (a: number) => number;
189
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
190
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
191
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
192
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
193
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
194
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
195
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
196
+ export const wasmdashtransaction_input_count: (a: number) => number;
197
+ export const wasmdashtransaction_lock_time: (a: number) => number;
198
+ export const wasmdashtransaction_output_count: (a: number) => number;
199
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
200
+ export const wasmdashtransaction_version: (a: number) => number;
201
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
202
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
203
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
204
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
205
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
206
+ export const wasmecpair_private_key: (a: number) => number;
207
+ export const wasmecpair_public_key: (a: number) => number;
208
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
209
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
210
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
211
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
212
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
213
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
214
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
215
+ export const wasmtransaction_create: () => number;
216
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
217
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
218
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
219
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
220
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
221
+ export const wasmtransaction_get_vsize: (a: number) => number;
222
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
223
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
224
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
225
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
226
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
227
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
228
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
229
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
230
+ 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;
231
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
232
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
233
+ export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
234
+ export const wrappsbt_clone: (a: number) => number;
235
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
236
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
237
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
238
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
239
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
240
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
241
+ export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
242
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
243
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
244
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
245
+ export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
246
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
247
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
248
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
249
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
250
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
251
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
252
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
253
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
254
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
255
+ export const wrappsbt_input_count: (a: number) => number;
256
+ export const wrappsbt_new: (a: number, b: number) => number;
257
+ export const wrappsbt_output_count: (a: number) => number;
258
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
259
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
260
+ export const wrappsbt_serialize: (a: number, b: number) => void;
261
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
262
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
263
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
264
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
265
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
266
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
267
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
268
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
269
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
270
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
271
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
272
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
273
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
274
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
275
+ export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
276
+ export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
277
+ export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
278
+ export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
279
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
280
+ export const zcash_ironwood_version_group_id: () => number;
281
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
282
+ export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
283
+ export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
284
+ export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
285
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
286
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
287
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
288
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
289
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
290
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
291
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
292
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
293
+ export const zcashv6transaction_getInputs: (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;
308
311
  export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
309
312
  export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
310
- export const isInspectEnabled: () => number;
311
313
  export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
312
314
  export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
313
315
  export const wrapdescriptor_descType: (a: number, b: number) => void;
@@ -329,10 +331,9 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
329
331
  export const wrapminiscript_node: (a: number, b: number) => void;
330
332
  export const wrapminiscript_toAsmString: (a: number, b: number) => void;
331
333
  export const wrapminiscript_toString: (a: number, b: number) => void;
334
+ export const isInspectEnabled: () => number;
332
335
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
333
336
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
334
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
335
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
336
337
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
337
338
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
338
339
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -135,7 +135,9 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
135
135
  * @param amount - note value in zatoshi
136
136
  * @param options.anchor - 32-byte Ironwood note-commitment-tree root
137
137
  * @param options.memo - optional 512-byte memo (defaults to the ZIP-302 "no memo" encoding)
138
- * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build)
138
+ * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build). Has no
139
+ * effect in the normal flow: {@link sign}'s first round re-encrypts every action's
140
+ * `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
139
141
  * @param options.unifiedAddress - optional full Unified Address string this output was addressed
140
142
  * to. Its Orchard receiver must equal `recipient`. The PCZT itself only carries the raw 43-byte
141
143
  * receiver — a lossy encoding for a multi-receiver UA, since any transparent/Sapling receiver
@@ -156,12 +158,14 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
156
158
  * {@link addShieldedOutput}).
157
159
  *
158
160
  * @param outputs - one entry per recipient; `memo` defaults per-entry to the ZIP-302 "no memo"
159
- * encoding, exactly as {@link addShieldedOutput}'s does
161
+ * encoding, exactly as {@link addShieldedOutput}'s does, and `ovk` is likewise replaced by
162
+ * {@link sign}'s first round
160
163
  * @param anchor - 32-byte Ironwood note-commitment-tree root, shared by every output
161
164
  * @returns the action index assigned to each output, in the same order as `outputs` — the
162
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
163
- * indices (not the position in `outputs`) when later calling
164
- * `setIronwoodOutCiphertext`/`setIronwoodOutCiphertextForUser` for a specific recipient.
165
+ * orchard builder pads/reorders actions, so any caller correlating per-action data (a stored
166
+ * unified address, an explicit `setShieldedOutCiphertext` call) must use these indices, not the
167
+ * position in `outputs` — though note {@link sign}'s first round already patches every action's
168
+ * `out_ciphertext` with the wallet `ovk` on its own.
165
169
  */
166
170
  addShieldedOutputs(outputs: Array<{
167
171
  recipient: Uint8Array;
@@ -181,14 +185,16 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
181
185
  * `ovk` derived from those is one neither the user nor the server can reproduce, and the resulting
182
186
  * transaction would broadcast fine while leaving the shielded output permanently unrecoverable.
183
187
  *
184
- * Normally you do not call this directly: {@link sign} performs it on the first signing round.
188
+ * Normally you do not call this directly: {@link sign} performs it for **every** action on the
189
+ * first signing round (idempotently — same `ovk`, same bytes).
185
190
  *
186
191
  * Must be called **before** signing: `out_ciphertext` is committed by the ZIP-244 sighash, so
187
192
  * calling this after any transparent signature has been added (via
188
193
  * {@link addTransparentSignature}) throws rather than silently invalidating that signature.
189
194
  *
190
- * @param actionIndex - index of the Ironwood action whose output to re-encrypt (always `0`: only
191
- * one shielded output per transaction is supported, see {@link addShieldedOutput})
195
+ * @param actionIndex - index of the Ironwood action whose output to re-encrypt; use an index
196
+ * returned by {@link addShieldedOutputs} (the orchard builder may reorder actions, so it is not
197
+ * necessarily the output's position in the call)
192
198
  * @param userKey - the wallet's user root key (an xpriv)
193
199
  * @param rootWalletKeys - the wallet's root keys, supplying the BitGo cosigner pubkey
194
200
  */
@@ -220,7 +226,8 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
220
226
  *
221
227
  * If no transparent signature has been added to this PSBT yet, this is the first signing round and
222
228
  * `key` must be the wallet's user root key: it is used with `rootWalletKeys.bitgoKey()` to derive
223
- * this wallet's `ovk` and finalize `out_ciphertext` — the client-managed-`ovk` flow — before any
229
+ * this wallet's `ovk` and finalize **every** action's `out_ciphertext` — the client-managed-`ovk`
230
+ * flow, multi-recipient builds included — before any
224
231
  * sighash is computed. Once a signature exists, that step is a no-op, so a caller passes
225
232
  * `rootWalletKeys` on every signing round unconditionally: `psbt.sign(userXpriv, rootWalletKeys)`
226
233
  * and later `psbt.sign(bitgoXpriv, rootWalletKeys)` — only the first call actually uses it.
@@ -132,7 +132,9 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
132
132
  * @param amount - note value in zatoshi
133
133
  * @param options.anchor - 32-byte Ironwood note-commitment-tree root
134
134
  * @param options.memo - optional 512-byte memo (defaults to the ZIP-302 "no memo" encoding)
135
- * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build)
135
+ * @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build). Has no
136
+ * effect in the normal flow: {@link sign}'s first round re-encrypts every action's
137
+ * `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
136
138
  * @param options.unifiedAddress - optional full Unified Address string this output was addressed
137
139
  * to. Its Orchard receiver must equal `recipient`. The PCZT itself only carries the raw 43-byte
138
140
  * receiver — a lossy encoding for a multi-receiver UA, since any transparent/Sapling receiver
@@ -151,12 +153,14 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
151
153
  * {@link addShieldedOutput}).
152
154
  *
153
155
  * @param outputs - one entry per recipient; `memo` defaults per-entry to the ZIP-302 "no memo"
154
- * encoding, exactly as {@link addShieldedOutput}'s does
156
+ * encoding, exactly as {@link addShieldedOutput}'s does, and `ovk` is likewise replaced by
157
+ * {@link sign}'s first round
155
158
  * @param anchor - 32-byte Ironwood note-commitment-tree root, shared by every output
156
159
  * @returns the action index assigned to each output, in the same order as `outputs` — the
157
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
158
- * indices (not the position in `outputs`) when later calling
159
- * `setIronwoodOutCiphertext`/`setIronwoodOutCiphertextForUser` for a specific recipient.
160
+ * orchard builder pads/reorders actions, so any caller correlating per-action data (a stored
161
+ * unified address, an explicit `setShieldedOutCiphertext` call) must use these indices, not the
162
+ * position in `outputs` — though note {@link sign}'s first round already patches every action's
163
+ * `out_ciphertext` with the wallet `ovk` on its own.
160
164
  */
161
165
  addShieldedOutputs(outputs, anchor) {
162
166
  return Array.from(this.wasm.add_ironwood_outputs(outputs.map((o) => ({
@@ -178,14 +182,16 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
178
182
  * `ovk` derived from those is one neither the user nor the server can reproduce, and the resulting
179
183
  * transaction would broadcast fine while leaving the shielded output permanently unrecoverable.
180
184
  *
181
- * Normally you do not call this directly: {@link sign} performs it on the first signing round.
185
+ * Normally you do not call this directly: {@link sign} performs it for **every** action on the
186
+ * first signing round (idempotently — same `ovk`, same bytes).
182
187
  *
183
188
  * Must be called **before** signing: `out_ciphertext` is committed by the ZIP-244 sighash, so
184
189
  * calling this after any transparent signature has been added (via
185
190
  * {@link addTransparentSignature}) throws rather than silently invalidating that signature.
186
191
  *
187
- * @param actionIndex - index of the Ironwood action whose output to re-encrypt (always `0`: only
188
- * one shielded output per transaction is supported, see {@link addShieldedOutput})
192
+ * @param actionIndex - index of the Ironwood action whose output to re-encrypt; use an index
193
+ * returned by {@link addShieldedOutputs} (the orchard builder may reorder actions, so it is not
194
+ * necessarily the output's position in the call)
189
195
  * @param userKey - the wallet's user root key (an xpriv)
190
196
  * @param rootWalletKeys - the wallet's root keys, supplying the BitGo cosigner pubkey
191
197
  */
@@ -1,4 +1,5 @@
1
1
  import { ZcashV6Transaction as WasmZcashV6Transaction } from "../wasm/wasm_utxo.js";
2
+ import type { TxInputData } from "../wasm/wasm_utxo.js";
2
3
  /**
3
4
  * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
4
5
  *
@@ -49,6 +50,12 @@ export declare class ZcashV6Transaction {
49
50
  * scriptPubKeys for *every* transparent input of this transaction, in input order.
50
51
  */
51
52
  transparentSighash(index: number, inputAmounts: bigint[], inputScriptPubkeys: Uint8Array[]): Uint8Array;
53
+ /**
54
+ * The transparent inputs of this transaction, in input order — e.g. each input's
55
+ * `previousOutput` (display-order txid + vout) for looking up the spent UTXOs of a broadcast
56
+ * shielding transaction. Empty for a fully shielded transaction.
57
+ */
58
+ getInputs(): TxInputData[];
52
59
  /** @internal */
53
60
  get wasm(): WasmZcashV6Transaction;
54
61
  }
@@ -73,6 +73,14 @@ export class ZcashV6Transaction {
73
73
  transparentSighash(index, inputAmounts, inputScriptPubkeys) {
74
74
  return this._wasm.transparentSighash(index, BigInt64Array.from(inputAmounts), inputScriptPubkeys);
75
75
  }
76
+ /**
77
+ * The transparent inputs of this transaction, in input order — e.g. each input's
78
+ * `previousOutput` (display-order txid + vout) for looking up the spent UTXOs of a broadcast
79
+ * shielding transaction. Empty for a fully shielded transaction.
80
+ */
81
+ getInputs() {
82
+ return this._wasm.getInputs();
83
+ }
76
84
  /** @internal */
77
85
  get wasm() {
78
86
  return this._wasm;
@@ -144,7 +144,9 @@ export class BitGoPsbt {
144
144
  *
145
145
  * * `recipient` - raw Orchard/Ironwood address ([`ORCHARD_ADDRESS_SIZE`] bytes)
146
146
  * * `amount` - note value in zatoshi
147
- * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build)
147
+ * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build).
148
+ * Has no effect in the normal flow: `sign_ironwood_v6`'s first round re-encrypts every
149
+ * action's `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
148
150
  * * `anchor` - Ironwood note-commitment-tree root ([`ANCHOR_SIZE`] bytes)
149
151
  * * `memo` - ZIP-302 memo field ([`MEMO_SIZE`] bytes)
150
152
  * * `unified_address` - optional full Unified Address the output was addressed to; if given,
@@ -168,9 +170,10 @@ export class BitGoPsbt {
168
170
  * output.
169
171
  *
170
172
  * Returns the action index assigned to each output, in the same order as `outputs` — the
171
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
172
- * indices (not the position in `outputs`) when later calling `set_ironwood_out_ciphertext`
173
- * for a specific recipient.
173
+ * orchard builder pads/reorders actions, so a caller correlating per-action data (a stored
174
+ * Unified Address, an explicit `set_ironwood_out_ciphertext` call) must use these indices, not
175
+ * the position in `outputs` — though note `sign_ironwood_v6`'s first round already patches
176
+ * every action's `out_ciphertext` with the wallet `ovk` on its own.
174
177
  */
175
178
  add_ironwood_outputs(outputs: any, anchor: Uint8Array): Uint32Array;
176
179
  /**
@@ -665,7 +668,8 @@ export class BitGoPsbt {
665
668
  *
666
669
  * If no transparent signature has been collected yet, this is the first signing round and
667
670
  * `xpriv` must be the wallet's user root key: it is used with `root_wallet_keys.bitgo_key()` to
668
- * derive this wallet's `ovk` and finalize `out_ciphertext` before computing any sighash (it is
671
+ * derive this wallet's `ovk` and finalize every action's `out_ciphertext` (multi-recipient
672
+ * builds included) before computing any sighash (it is
669
673
  * sighash-committed). Any other key signing first is rejected, rather than deriving an `ovk`
670
674
  * nobody can reproduce. Once a signature exists, the step is skipped and any key may sign — so
671
675
  * callers pass `root_wallet_keys` unconditionally on every signing round without needing to know
@@ -1865,6 +1869,12 @@ export class ZcashV6Transaction {
1865
1869
  * transaction id is printed everywhere else in the codebase.
1866
1870
  */
1867
1871
  getId(): string;
1872
+ /**
1873
+ * The transparent inputs of this transaction, in input order — each input's
1874
+ * `previousOutput` (display-order txid + vout), sequence, scriptSig, and witness, carried
1875
+ * verbatim from the wire. Empty for a fully shielded transaction.
1876
+ */
1877
+ getInputs(): TxInputData[];
1868
1878
  /**
1869
1879
  * Serialize back to raw v6 wire bytes.
1870
1880
  */
@@ -471,7 +471,9 @@ export class BitGoPsbt {
471
471
  *
472
472
  * * `recipient` - raw Orchard/Ironwood address ([`ORCHARD_ADDRESS_SIZE`] bytes)
473
473
  * * `amount` - note value in zatoshi
474
- * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build)
474
+ * * `ovk` - optional outgoing viewing key ([`OVK_SIZE`] bytes; `None` for a keyless build).
475
+ * Has no effect in the normal flow: `sign_ironwood_v6`'s first round re-encrypts every
476
+ * action's `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
475
477
  * * `anchor` - Ironwood note-commitment-tree root ([`ANCHOR_SIZE`] bytes)
476
478
  * * `memo` - ZIP-302 memo field ([`MEMO_SIZE`] bytes)
477
479
  * * `unified_address` - optional full Unified Address the output was addressed to; if given,
@@ -523,9 +525,10 @@ export class BitGoPsbt {
523
525
  * output.
524
526
  *
525
527
  * Returns the action index assigned to each output, in the same order as `outputs` — the
526
- * orchard builder pads/reorders actions, so a client-managed-`ovk` caller must use these
527
- * indices (not the position in `outputs`) when later calling `set_ironwood_out_ciphertext`
528
- * for a specific recipient.
528
+ * orchard builder pads/reorders actions, so a caller correlating per-action data (a stored
529
+ * Unified Address, an explicit `set_ironwood_out_ciphertext` call) must use these indices, not
530
+ * the position in `outputs` — though note `sign_ironwood_v6`'s first round already patches
531
+ * every action's `out_ciphertext` with the wallet `ovk` on its own.
529
532
  * @param {any} outputs
530
533
  * @param {Uint8Array} anchor
531
534
  * @returns {Uint32Array}
@@ -2365,7 +2368,8 @@ export class BitGoPsbt {
2365
2368
  *
2366
2369
  * If no transparent signature has been collected yet, this is the first signing round and
2367
2370
  * `xpriv` must be the wallet's user root key: it is used with `root_wallet_keys.bitgo_key()` to
2368
- * derive this wallet's `ovk` and finalize `out_ciphertext` before computing any sighash (it is
2371
+ * derive this wallet's `ovk` and finalize every action's `out_ciphertext` (multi-recipient
2372
+ * builds included) before computing any sighash (it is
2369
2373
  * sighash-committed). Any other key signing first is rejected, rather than deriving an `ovk`
2370
2374
  * nobody can reproduce. Once a signature exists, the step is skipped and any key may sign — so
2371
2375
  * callers pass `root_wallet_keys` unconditionally on every signing round without needing to know
@@ -7083,6 +7087,27 @@ export class ZcashV6Transaction {
7083
7087
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
7084
7088
  }
7085
7089
  }
7090
+ /**
7091
+ * The transparent inputs of this transaction, in input order — each input's
7092
+ * `previousOutput` (display-order txid + vout), sequence, scriptSig, and witness, carried
7093
+ * verbatim from the wire. Empty for a fully shielded transaction.
7094
+ * @returns {TxInputData[]}
7095
+ */
7096
+ getInputs() {
7097
+ try {
7098
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7099
+ wasm.zcashv6transaction_getInputs(retptr, this.__wbg_ptr);
7100
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7101
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7102
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7103
+ if (r2) {
7104
+ throw takeObject(r1);
7105
+ }
7106
+ return takeObject(r0);
7107
+ } finally {
7108
+ wasm.__wbindgen_add_to_stack_pointer(16);
7109
+ }
7110
+ }
7086
7111
  /**
7087
7112
  * Number of Ironwood actions (0 when the Ironwood slot is empty).
7088
7113
  * @returns {number}
Binary file
@@ -1,153 +1,6 @@
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;
5
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
6
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
7
- export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
8
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
9
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
10
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
11
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
12
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
13
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
14
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
15
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
16
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
17
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
18
- 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;
19
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
20
- 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;
21
- 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;
22
- 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;
23
- 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;
24
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
25
- 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;
26
- export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
27
- export const ironwood_build_witness_from_shard: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => void;
28
- export const ironwoodwitness_auth_path: (a: number, b: number) => void;
29
- export const ironwoodwitness_position: (a: number) => number;
30
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
31
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
32
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
33
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
34
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
35
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
36
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
37
- export const wasmdashtransaction_input_count: (a: number) => number;
38
- export const wasmdashtransaction_lock_time: (a: number) => number;
39
- export const wasmdashtransaction_output_count: (a: number) => number;
40
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
41
- export const wasmdashtransaction_version: (a: number) => number;
42
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
43
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
44
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
45
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
46
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
47
- export const wasmecpair_private_key: (a: number) => number;
48
- export const wasmecpair_public_key: (a: number) => number;
49
- export const wasmecpair_to_wif: (a: number, b: number) => void;
50
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
51
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
52
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
53
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
54
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
55
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
56
- export const wasmtransaction_create: () => number;
57
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
58
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
59
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
60
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
61
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
62
- export const wasmtransaction_get_vsize: (a: number) => number;
63
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
64
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
65
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
66
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
67
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
68
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
69
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
70
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
71
- 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;
72
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
73
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
74
- export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
75
- export const wrappsbt_clone: (a: number) => number;
76
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
77
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
78
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
79
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
80
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
81
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
82
- export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
83
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
84
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
85
- export const wrappsbt_get_global_xpubs: (a: number) => number;
86
- export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
87
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
88
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
89
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
90
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
91
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
92
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
93
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
94
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
95
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
96
- export const wrappsbt_input_count: (a: number) => number;
97
- export const wrappsbt_new: (a: number, b: number) => number;
98
- export const wrappsbt_output_count: (a: number) => number;
99
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
100
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
101
- export const wrappsbt_serialize: (a: number, b: number) => void;
102
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
103
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
104
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
105
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
106
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
107
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
108
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
109
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
110
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
111
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
112
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
113
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
114
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
115
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
116
- export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
117
- export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
118
- export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
119
- export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
120
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
121
- export const zcash_ironwood_version_group_id: () => number;
122
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
123
- export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
124
- export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
125
- export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
126
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
127
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
128
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
129
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
130
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
131
- export const zcashv6transaction_expiryHeight: (a: number) => number;
132
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
133
- export const zcashv6transaction_getId: (a: number, b: number) => void;
134
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
135
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
136
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
137
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
138
- export const zcashv6transaction_toBytes: (a: number, b: number) => void;
139
- export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
140
- export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
141
- export const wasmtransaction_input_count: (a: number) => number;
142
- export const wasmtransaction_output_count: (a: number) => number;
143
- export const wasmzcashtransaction_input_count: (a: number) => number;
144
- export const wasmzcashtransaction_output_count: (a: number) => number;
145
- export const wasmtransaction_lock_time: (a: number) => number;
146
- export const wasmtransaction_version: (a: number) => number;
147
- export const wasmzcashtransaction_lock_time: (a: number) => number;
148
- export const wasmzcashtransaction_version: (a: number) => number;
149
- export const wrappsbt_lock_time: (a: number) => number;
150
- export const wrappsbt_version: (a: number) => number;
151
4
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
152
5
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
153
6
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
@@ -305,9 +158,158 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
305
158
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
306
159
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
307
160
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
161
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
162
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
163
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
164
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
165
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
166
+ export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
167
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
168
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
169
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
170
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
171
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
172
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
173
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
174
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
175
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
176
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
177
+ 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;
178
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
179
+ 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;
180
+ 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;
181
+ 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;
182
+ 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;
183
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
184
+ 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;
185
+ export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
186
+ export const ironwood_build_witness_from_shard: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => void;
187
+ export const ironwoodwitness_auth_path: (a: number, b: number) => void;
188
+ export const ironwoodwitness_position: (a: number) => number;
189
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
190
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
191
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
192
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
193
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
194
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
195
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
196
+ export const wasmdashtransaction_input_count: (a: number) => number;
197
+ export const wasmdashtransaction_lock_time: (a: number) => number;
198
+ export const wasmdashtransaction_output_count: (a: number) => number;
199
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
200
+ export const wasmdashtransaction_version: (a: number) => number;
201
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
202
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
203
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
204
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
205
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
206
+ export const wasmecpair_private_key: (a: number) => number;
207
+ export const wasmecpair_public_key: (a: number) => number;
208
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
209
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
210
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
211
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
212
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
213
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
214
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
215
+ export const wasmtransaction_create: () => number;
216
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
217
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
218
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
219
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
220
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
221
+ export const wasmtransaction_get_vsize: (a: number) => number;
222
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
223
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
224
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
225
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
226
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
227
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
228
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
229
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
230
+ 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;
231
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
232
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
233
+ export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
234
+ export const wrappsbt_clone: (a: number) => number;
235
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
236
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
237
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
238
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
239
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
240
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
241
+ export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
242
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
243
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
244
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
245
+ export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
246
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
247
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
248
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
249
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
250
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
251
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
252
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
253
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
254
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
255
+ export const wrappsbt_input_count: (a: number) => number;
256
+ export const wrappsbt_new: (a: number, b: number) => number;
257
+ export const wrappsbt_output_count: (a: number) => number;
258
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
259
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
260
+ export const wrappsbt_serialize: (a: number, b: number) => void;
261
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
262
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
263
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
264
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
265
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
266
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
267
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
268
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
269
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
270
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
271
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
272
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
273
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
274
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
275
+ export const zcashHasOrchardReceiver: (a: number, b: number, c: number, d: number) => number;
276
+ export const zcashHasTransparentReceiver: (a: number, b: number, c: number, d: number) => number;
277
+ export const zcashToShieldedReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
278
+ export const zcashToTransparentReceiverWithCoin: (a: number, b: number, c: number, d: number, e: number) => void;
279
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
280
+ export const zcash_ironwood_version_group_id: () => number;
281
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
282
+ export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
283
+ export const zcashunifiedaddress_hasOrchardReceiver: (a: number) => number;
284
+ export const zcashunifiedaddress_hasTransparentReceiver: (a: number) => number;
285
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
286
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
287
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
288
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
289
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
290
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
291
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
292
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
293
+ export const zcashv6transaction_getInputs: (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;
308
311
  export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
309
312
  export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
310
- export const isInspectEnabled: () => number;
311
313
  export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
312
314
  export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
313
315
  export const wrapdescriptor_descType: (a: number, b: number) => void;
@@ -329,10 +331,9 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
329
331
  export const wrapminiscript_node: (a: number, b: number) => void;
330
332
  export const wrapminiscript_toAsmString: (a: number, b: number) => void;
331
333
  export const wrapminiscript_toString: (a: number, b: number) => void;
334
+ export const isInspectEnabled: () => number;
332
335
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
333
336
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
334
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
335
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
336
337
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
337
338
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
338
339
  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.4.0",
4
+ "version": "5.5.1",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",