@bitgo/wasm-utxo 4.40.0 → 4.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ import { IronwoodWitness as WasmIronwoodWitness } from "../wasm/wasm_utxo.js";
2
+ /**
3
+ * A validated Merkle witness for an Ironwood/Orchard note commitment.
4
+ *
5
+ * Build with {@link ZcashIronwoodWitness.build}: `cmx` is the note commitment being
6
+ * witnessed, `authPath` must be exactly 32 sibling hashes (32 bytes each, leaf-to-root
7
+ * order), and `anchor` is the expected note-commitment-tree root. Throws if any input
8
+ * isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
9
+ *
10
+ * wasm-utxo has no chain state, so the raw sibling-hash path must be supplied by the
11
+ * caller (typically BitGo's backend, querying a Zcash-aware service).
12
+ */
13
+ export declare class ZcashIronwoodWitness {
14
+ private _wasm;
15
+ private constructor();
16
+ /**
17
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
18
+ * @throws If any input isn't a canonical field element, or the witness doesn't
19
+ * recompute to `anchor`
20
+ */
21
+ static build(cmx: Uint8Array, position: number, authPath: Uint8Array[], anchor: Uint8Array): ZcashIronwoodWitness;
22
+ /** The leaf's position in the note commitment tree. */
23
+ get position(): number;
24
+ /**
25
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
26
+ * (32 hashes × 32 bytes each).
27
+ */
28
+ get authPath(): Uint8Array;
29
+ /** @internal */
30
+ get wasm(): WasmIronwoodWitness;
31
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZcashIronwoodWitness = void 0;
4
+ const wasm_utxo_js_1 = require("../wasm/wasm_utxo.js");
5
+ /**
6
+ * A validated Merkle witness for an Ironwood/Orchard note commitment.
7
+ *
8
+ * Build with {@link ZcashIronwoodWitness.build}: `cmx` is the note commitment being
9
+ * witnessed, `authPath` must be exactly 32 sibling hashes (32 bytes each, leaf-to-root
10
+ * order), and `anchor` is the expected note-commitment-tree root. Throws if any input
11
+ * isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
12
+ *
13
+ * wasm-utxo has no chain state, so the raw sibling-hash path must be supplied by the
14
+ * caller (typically BitGo's backend, querying a Zcash-aware service).
15
+ */
16
+ class ZcashIronwoodWitness {
17
+ _wasm;
18
+ constructor(_wasm) {
19
+ this._wasm = _wasm;
20
+ }
21
+ /**
22
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
23
+ * @throws If any input isn't a canonical field element, or the witness doesn't
24
+ * recompute to `anchor`
25
+ */
26
+ static build(cmx, position, authPath, anchor) {
27
+ return new ZcashIronwoodWitness((0, wasm_utxo_js_1.ironwood_build_witness)(cmx, position, authPath, anchor));
28
+ }
29
+ /** The leaf's position in the note commitment tree. */
30
+ get position() {
31
+ return this._wasm.position;
32
+ }
33
+ /**
34
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
35
+ * (32 hashes × 32 bytes each).
36
+ */
37
+ get authPath() {
38
+ return this._wasm.auth_path;
39
+ }
40
+ /** @internal */
41
+ get wasm() {
42
+ return this._wasm;
43
+ }
44
+ }
45
+ exports.ZcashIronwoodWitness = ZcashIronwoodWitness;
@@ -12,6 +12,7 @@ export { ZcashBitGoPsbt, type ZcashNetworkName, type ZcashParsedOutput, type Cre
12
12
  export { ZcashIronwoodBitGoPsbt, zip302NoMemo, type CreateEmptyIronwoodOptions, type CreateEmptyIronwoodWithConsensusBranchIdOptions, } from "./ZcashIronwoodBitGoPsbt.js";
13
13
  export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
14
14
  export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
15
+ export { ZcashIronwoodWitness } from "./ZcashIronwoodWitness.js";
15
16
  import type { ScriptType } from "./scriptType.js";
16
17
  /**
17
18
  * Check if a network supports a given fixed-script wallet script type
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZcashV6Transaction = exports.ZcashUnifiedAddress = exports.zip302NoMemo = exports.ZcashIronwoodBitGoPsbt = exports.IRONWOOD_VERSION_GROUP_ID = exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.requiresPrevTxForP2sh = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
3
+ exports.ZcashIronwoodWitness = exports.ZcashV6Transaction = exports.ZcashUnifiedAddress = exports.zip302NoMemo = exports.ZcashIronwoodBitGoPsbt = exports.IRONWOOD_VERSION_GROUP_ID = exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.requiresPrevTxForP2sh = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
4
4
  exports.supportsScriptType = supportsScriptType;
5
5
  exports.createOpReturnScript = createOpReturnScript;
6
6
  exports.p2shP2pkOutputScript = p2shP2pkOutputScript;
@@ -44,6 +44,9 @@ Object.defineProperty(exports, "ZcashUnifiedAddress", { enumerable: true, get: f
44
44
  // Zcash v6 (Ironwood / NU6.3) transaction
45
45
  var ZcashV6Transaction_js_1 = require("./ZcashV6Transaction.js");
46
46
  Object.defineProperty(exports, "ZcashV6Transaction", { enumerable: true, get: function () { return ZcashV6Transaction_js_1.ZcashV6Transaction; } });
47
+ // Zcash v6 (Ironwood / NU6.3) Merkle witness
48
+ var ZcashIronwoodWitness_js_1 = require("./ZcashIronwoodWitness.js");
49
+ Object.defineProperty(exports, "ZcashIronwoodWitness", { enumerable: true, get: function () { return ZcashIronwoodWitness_js_1.ZcashIronwoodWitness; } });
47
50
  /**
48
51
  * Check if a network supports a given fixed-script wallet script type
49
52
  *
@@ -984,6 +984,27 @@ export class InscriptionsNamespace {
984
984
  static sign_reveal_transaction(private_key: Uint8Array, tap_leaf_script: any, commit_tx: WasmTransaction, commit_output_script: Uint8Array, recipient_output_script: Uint8Array, output_value_sats: bigint): Uint8Array;
985
985
  }
986
986
 
987
+ /**
988
+ * A validated Merkle witness for an Ironwood/Orchard note commitment, from
989
+ * [`ironwood_build_witness`].
990
+ *
991
+ * Not yet installed anywhere — see [`ironwood_build_witness`]'s docs.
992
+ */
993
+ export class IronwoodWitness {
994
+ private constructor();
995
+ free(): void;
996
+ [Symbol.dispose](): void;
997
+ /**
998
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
999
+ * (32 hashes × 32 bytes each).
1000
+ */
1001
+ readonly auth_path: Uint8Array;
1002
+ /**
1003
+ * The leaf's position in the note commitment tree.
1004
+ */
1005
+ readonly position: number;
1006
+ }
1007
+
987
1008
  export class MessageNamespace {
988
1009
  private constructor();
989
1010
  free(): void;
@@ -1861,6 +1882,19 @@ export class ZcashV6Transaction {
1861
1882
  readonly ironwoodValueBalance: bigint;
1862
1883
  }
1863
1884
 
1885
+ /**
1886
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
1887
+ *
1888
+ * `cmx` is the note commitment being witnessed; `auth_path` must be exactly 32 sibling hashes (32
1889
+ * bytes each), leaf-to-root order; `anchor` is the expected note-commitment-tree root. Throws if
1890
+ * any input isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
1891
+ *
1892
+ * This crate has no chain state, so the raw sibling-hash path must be supplied by the caller
1893
+ * (typically BitGo's backend, querying a Zcash-aware service). The returned witness is not yet
1894
+ * installed anywhere — hook it into a spend once real-spend construction exists.
1895
+ */
1896
+ export function ironwood_build_witness(cmx: Uint8Array, position: number, auth_path: Uint8Array[], anchor: Uint8Array): IronwoodWitness;
1897
+
1864
1898
  /**
1865
1899
  * Check if the inspect feature is enabled.
1866
1900
  *
@@ -3190,6 +3190,60 @@ class InscriptionsNamespace {
3190
3190
  if (Symbol.dispose) InscriptionsNamespace.prototype[Symbol.dispose] = InscriptionsNamespace.prototype.free;
3191
3191
  exports.InscriptionsNamespace = InscriptionsNamespace;
3192
3192
 
3193
+ /**
3194
+ * A validated Merkle witness for an Ironwood/Orchard note commitment, from
3195
+ * [`ironwood_build_witness`].
3196
+ *
3197
+ * Not yet installed anywhere — see [`ironwood_build_witness`]'s docs.
3198
+ */
3199
+ class IronwoodWitness {
3200
+ static __wrap(ptr) {
3201
+ ptr = ptr >>> 0;
3202
+ const obj = Object.create(IronwoodWitness.prototype);
3203
+ obj.__wbg_ptr = ptr;
3204
+ IronwoodWitnessFinalization.register(obj, obj.__wbg_ptr, obj);
3205
+ return obj;
3206
+ }
3207
+ __destroy_into_raw() {
3208
+ const ptr = this.__wbg_ptr;
3209
+ this.__wbg_ptr = 0;
3210
+ IronwoodWitnessFinalization.unregister(this);
3211
+ return ptr;
3212
+ }
3213
+ free() {
3214
+ const ptr = this.__destroy_into_raw();
3215
+ wasm.__wbg_ironwoodwitness_free(ptr, 0);
3216
+ }
3217
+ /**
3218
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
3219
+ * (32 hashes × 32 bytes each).
3220
+ * @returns {Uint8Array}
3221
+ */
3222
+ get auth_path() {
3223
+ try {
3224
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3225
+ wasm.ironwoodwitness_auth_path(retptr, this.__wbg_ptr);
3226
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3227
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3228
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
3229
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3230
+ return v1;
3231
+ } finally {
3232
+ wasm.__wbindgen_add_to_stack_pointer(16);
3233
+ }
3234
+ }
3235
+ /**
3236
+ * The leaf's position in the note commitment tree.
3237
+ * @returns {number}
3238
+ */
3239
+ get position() {
3240
+ const ret = wasm.ironwoodwitness_position(this.__wbg_ptr);
3241
+ return ret >>> 0;
3242
+ }
3243
+ }
3244
+ if (Symbol.dispose) IronwoodWitness.prototype[Symbol.dispose] = IronwoodWitness.prototype.free;
3245
+ exports.IronwoodWitness = IronwoodWitness;
3246
+
3193
3247
  class MessageNamespace {
3194
3248
  __destroy_into_raw() {
3195
3249
  const ptr = this.__wbg_ptr;
@@ -7068,6 +7122,45 @@ class ZcashV6Transaction {
7068
7122
  if (Symbol.dispose) ZcashV6Transaction.prototype[Symbol.dispose] = ZcashV6Transaction.prototype.free;
7069
7123
  exports.ZcashV6Transaction = ZcashV6Transaction;
7070
7124
 
7125
+ /**
7126
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
7127
+ *
7128
+ * `cmx` is the note commitment being witnessed; `auth_path` must be exactly 32 sibling hashes (32
7129
+ * bytes each), leaf-to-root order; `anchor` is the expected note-commitment-tree root. Throws if
7130
+ * any input isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
7131
+ *
7132
+ * This crate has no chain state, so the raw sibling-hash path must be supplied by the caller
7133
+ * (typically BitGo's backend, querying a Zcash-aware service). The returned witness is not yet
7134
+ * installed anywhere — hook it into a spend once real-spend construction exists.
7135
+ * @param {Uint8Array} cmx
7136
+ * @param {number} position
7137
+ * @param {Uint8Array[]} auth_path
7138
+ * @param {Uint8Array} anchor
7139
+ * @returns {IronwoodWitness}
7140
+ */
7141
+ function ironwood_build_witness(cmx, position, auth_path, anchor) {
7142
+ try {
7143
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7144
+ const ptr0 = passArray8ToWasm0(cmx, wasm.__wbindgen_export);
7145
+ const len0 = WASM_VECTOR_LEN;
7146
+ const ptr1 = passArrayJsValueToWasm0(auth_path, wasm.__wbindgen_export);
7147
+ const len1 = WASM_VECTOR_LEN;
7148
+ const ptr2 = passArray8ToWasm0(anchor, wasm.__wbindgen_export);
7149
+ const len2 = WASM_VECTOR_LEN;
7150
+ wasm.ironwood_build_witness(retptr, ptr0, len0, position, ptr1, len1, ptr2, len2);
7151
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7152
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7153
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7154
+ if (r2) {
7155
+ throw takeObject(r1);
7156
+ }
7157
+ return IronwoodWitness.__wrap(r0);
7158
+ } finally {
7159
+ wasm.__wbindgen_add_to_stack_pointer(16);
7160
+ }
7161
+ }
7162
+ exports.ironwood_build_witness = ironwood_build_witness;
7163
+
7071
7164
  /**
7072
7165
  * Check if the inspect feature is enabled.
7073
7166
  *
@@ -7544,6 +7637,9 @@ const FixedScriptWalletNamespaceFinalization = (typeof FinalizationRegistry ===
7544
7637
  const InscriptionsNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
7545
7638
  ? { register: () => {}, unregister: () => {} }
7546
7639
  : new FinalizationRegistry(ptr => wasm.__wbg_inscriptionsnamespace_free(ptr >>> 0, 1));
7640
+ const IronwoodWitnessFinalization = (typeof FinalizationRegistry === 'undefined')
7641
+ ? { register: () => {}, unregister: () => {} }
7642
+ : new FinalizationRegistry(ptr => wasm.__wbg_ironwoodwitness_free(ptr >>> 0, 1));
7547
7643
  const MessageNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
7548
7644
  ? { register: () => {}, unregister: () => {} }
7549
7645
  : new FinalizationRegistry(ptr => wasm.__wbg_messagenamespace_free(ptr >>> 0, 1));
Binary file
@@ -1,28 +1,14 @@
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_utxolibcompatnamespace_free: (a: number, b: number) => void;
6
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
7
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
8
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
9
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
10
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
11
- export const wasmdimensions_empty: () => number;
12
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
13
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
14
- export const wasmdimensions_from_output_script_length: (a: number) => number;
15
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
16
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
17
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
18
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
19
- export const wasmdimensions_get_output_vsize: (a: number) => number;
20
- export const wasmdimensions_get_output_weight: (a: number) => number;
21
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
22
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
23
- export const wasmdimensions_has_segwit: (a: number) => number;
24
- export const wasmdimensions_plus: (a: number, b: number) => number;
25
- export const wasmdimensions_times: (a: number, b: number) => number;
4
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
5
+ 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;
6
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
7
+ 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;
8
+ 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;
9
+ 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;
10
+ 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;
11
+ export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
26
12
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
27
13
  export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
28
14
  export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
@@ -31,6 +17,9 @@ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
31
17
  export const __wbg_wrappsbt_free: (a: number, b: number) => void;
32
18
  export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
33
19
  export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
20
+ export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
21
+ export const ironwoodwitness_auth_path: (a: number, b: number) => void;
22
+ export const ironwoodwitness_position: (a: number) => number;
34
23
  export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
35
24
  export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
36
25
  export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
@@ -163,19 +152,11 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
163
152
  export const wrapminiscript_node: (a: number, b: number) => void;
164
153
  export const wrapminiscript_toAsmString: (a: number, b: number) => void;
165
154
  export const wrapminiscript_toString: (a: number, b: number) => void;
166
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
167
- 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;
168
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
169
- 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;
170
- 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;
171
- 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;
172
- 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;
173
155
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
174
156
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
175
157
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
176
158
  export const __wbg_wasmecpair_free: (a: number, b: number) => void;
177
159
  export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
178
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
179
160
  export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
180
161
  export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
181
162
  export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
@@ -272,8 +253,6 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
272
253
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
273
254
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
274
255
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
275
- export const isInspectEnabled: () => number;
276
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
277
256
  export const wasmbip32_chain_code: (a: number) => number;
278
257
  export const wasmbip32_depth: (a: number) => number;
279
258
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -311,13 +290,38 @@ export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
311
290
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
312
291
  export const wasmrootwalletkeys_user_key: (a: number) => number;
313
292
  export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
314
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
315
293
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
316
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
317
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
318
294
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
319
295
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
320
296
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
297
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
298
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
299
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
300
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
301
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
302
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
303
+ export const isInspectEnabled: () => number;
304
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
305
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
306
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
307
+ export const wasmdimensions_empty: () => number;
308
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
309
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
310
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
311
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
312
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
313
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
314
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
315
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
316
+ export const wasmdimensions_get_output_weight: (a: number) => number;
317
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
318
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
319
+ export const wasmdimensions_has_segwit: (a: number) => number;
320
+ export const wasmdimensions_plus: (a: number, b: number) => number;
321
+ export const wasmdimensions_times: (a: number, b: number) => number;
322
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
323
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
324
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
321
325
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
322
326
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
323
327
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -0,0 +1,31 @@
1
+ import { IronwoodWitness as WasmIronwoodWitness } from "../wasm/wasm_utxo.js";
2
+ /**
3
+ * A validated Merkle witness for an Ironwood/Orchard note commitment.
4
+ *
5
+ * Build with {@link ZcashIronwoodWitness.build}: `cmx` is the note commitment being
6
+ * witnessed, `authPath` must be exactly 32 sibling hashes (32 bytes each, leaf-to-root
7
+ * order), and `anchor` is the expected note-commitment-tree root. Throws if any input
8
+ * isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
9
+ *
10
+ * wasm-utxo has no chain state, so the raw sibling-hash path must be supplied by the
11
+ * caller (typically BitGo's backend, querying a Zcash-aware service).
12
+ */
13
+ export declare class ZcashIronwoodWitness {
14
+ private _wasm;
15
+ private constructor();
16
+ /**
17
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
18
+ * @throws If any input isn't a canonical field element, or the witness doesn't
19
+ * recompute to `anchor`
20
+ */
21
+ static build(cmx: Uint8Array, position: number, authPath: Uint8Array[], anchor: Uint8Array): ZcashIronwoodWitness;
22
+ /** The leaf's position in the note commitment tree. */
23
+ get position(): number;
24
+ /**
25
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
26
+ * (32 hashes × 32 bytes each).
27
+ */
28
+ get authPath(): Uint8Array;
29
+ /** @internal */
30
+ get wasm(): WasmIronwoodWitness;
31
+ }
@@ -0,0 +1,41 @@
1
+ import { ironwood_build_witness, } from "../wasm/wasm_utxo.js";
2
+ /**
3
+ * A validated Merkle witness for an Ironwood/Orchard note commitment.
4
+ *
5
+ * Build with {@link ZcashIronwoodWitness.build}: `cmx` is the note commitment being
6
+ * witnessed, `authPath` must be exactly 32 sibling hashes (32 bytes each, leaf-to-root
7
+ * order), and `anchor` is the expected note-commitment-tree root. Throws if any input
8
+ * isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
9
+ *
10
+ * wasm-utxo has no chain state, so the raw sibling-hash path must be supplied by the
11
+ * caller (typically BitGo's backend, querying a Zcash-aware service).
12
+ */
13
+ export class ZcashIronwoodWitness {
14
+ _wasm;
15
+ constructor(_wasm) {
16
+ this._wasm = _wasm;
17
+ }
18
+ /**
19
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
20
+ * @throws If any input isn't a canonical field element, or the witness doesn't
21
+ * recompute to `anchor`
22
+ */
23
+ static build(cmx, position, authPath, anchor) {
24
+ return new ZcashIronwoodWitness(ironwood_build_witness(cmx, position, authPath, anchor));
25
+ }
26
+ /** The leaf's position in the note commitment tree. */
27
+ get position() {
28
+ return this._wasm.position;
29
+ }
30
+ /**
31
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
32
+ * (32 hashes × 32 bytes each).
33
+ */
34
+ get authPath() {
35
+ return this._wasm.auth_path;
36
+ }
37
+ /** @internal */
38
+ get wasm() {
39
+ return this._wasm;
40
+ }
41
+ }
@@ -12,6 +12,7 @@ export { ZcashBitGoPsbt, type ZcashNetworkName, type ZcashParsedOutput, type Cre
12
12
  export { ZcashIronwoodBitGoPsbt, zip302NoMemo, type CreateEmptyIronwoodOptions, type CreateEmptyIronwoodWithConsensusBranchIdOptions, } from "./ZcashIronwoodBitGoPsbt.js";
13
13
  export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
14
14
  export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
15
+ export { ZcashIronwoodWitness } from "./ZcashIronwoodWitness.js";
15
16
  import type { ScriptType } from "./scriptType.js";
16
17
  /**
17
18
  * Check if a network supports a given fixed-script wallet script type
@@ -18,6 +18,8 @@ export { ZcashIronwoodBitGoPsbt, zip302NoMemo, } from "./ZcashIronwoodBitGoPsbt.
18
18
  export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
19
19
  // Zcash v6 (Ironwood / NU6.3) transaction
20
20
  export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
21
+ // Zcash v6 (Ironwood / NU6.3) Merkle witness
22
+ export { ZcashIronwoodWitness } from "./ZcashIronwoodWitness.js";
21
23
  /**
22
24
  * Check if a network supports a given fixed-script wallet script type
23
25
  *
@@ -984,6 +984,27 @@ export class InscriptionsNamespace {
984
984
  static sign_reveal_transaction(private_key: Uint8Array, tap_leaf_script: any, commit_tx: WasmTransaction, commit_output_script: Uint8Array, recipient_output_script: Uint8Array, output_value_sats: bigint): Uint8Array;
985
985
  }
986
986
 
987
+ /**
988
+ * A validated Merkle witness for an Ironwood/Orchard note commitment, from
989
+ * [`ironwood_build_witness`].
990
+ *
991
+ * Not yet installed anywhere — see [`ironwood_build_witness`]'s docs.
992
+ */
993
+ export class IronwoodWitness {
994
+ private constructor();
995
+ free(): void;
996
+ [Symbol.dispose](): void;
997
+ /**
998
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
999
+ * (32 hashes × 32 bytes each).
1000
+ */
1001
+ readonly auth_path: Uint8Array;
1002
+ /**
1003
+ * The leaf's position in the note commitment tree.
1004
+ */
1005
+ readonly position: number;
1006
+ }
1007
+
987
1008
  export class MessageNamespace {
988
1009
  private constructor();
989
1010
  free(): void;
@@ -1861,6 +1882,19 @@ export class ZcashV6Transaction {
1861
1882
  readonly ironwoodValueBalance: bigint;
1862
1883
  }
1863
1884
 
1885
+ /**
1886
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
1887
+ *
1888
+ * `cmx` is the note commitment being witnessed; `auth_path` must be exactly 32 sibling hashes (32
1889
+ * bytes each), leaf-to-root order; `anchor` is the expected note-commitment-tree root. Throws if
1890
+ * any input isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
1891
+ *
1892
+ * This crate has no chain state, so the raw sibling-hash path must be supplied by the caller
1893
+ * (typically BitGo's backend, querying a Zcash-aware service). The returned witness is not yet
1894
+ * installed anywhere — hook it into a spend once real-spend construction exists.
1895
+ */
1896
+ export function ironwood_build_witness(cmx: Uint8Array, position: number, auth_path: Uint8Array[], anchor: Uint8Array): IronwoodWitness;
1897
+
1864
1898
  /**
1865
1899
  * Check if the inspect feature is enabled.
1866
1900
  *
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./wasm_utxo_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
 
7
7
  export {
8
- AddressNamespace, Bip322Namespace, BitGoPsbt, FixedScriptWalletNamespace, InscriptionsNamespace, MessageNamespace, UtxolibCompatNamespace, WasmBIP32, WasmDashTransaction, WasmDimensions, WasmECPair, WasmReplayProtection, WasmRootWalletKeys, WasmTransaction, WasmUtxoNamespace, WasmZcashTransaction, WrapDescriptor, WrapMiniscript, WrapPsbt, ZcashUnifiedAddress, ZcashV6Transaction, isInspectEnabled, parsePsbtRawToJson, parsePsbtToJson, parseTxToJson, zcash_branch_id_for_height, zcash_ironwood_version_group_id
8
+ AddressNamespace, Bip322Namespace, BitGoPsbt, FixedScriptWalletNamespace, InscriptionsNamespace, IronwoodWitness, MessageNamespace, UtxolibCompatNamespace, WasmBIP32, WasmDashTransaction, WasmDimensions, WasmECPair, WasmReplayProtection, WasmRootWalletKeys, WasmTransaction, WasmUtxoNamespace, WasmZcashTransaction, WrapDescriptor, WrapMiniscript, WrapPsbt, ZcashUnifiedAddress, ZcashV6Transaction, ironwood_build_witness, isInspectEnabled, parsePsbtRawToJson, parsePsbtToJson, parseTxToJson, zcash_branch_id_for_height, zcash_ironwood_version_group_id
9
9
  } from "./wasm_utxo_bg.js";
@@ -3183,6 +3183,59 @@ export class InscriptionsNamespace {
3183
3183
  }
3184
3184
  if (Symbol.dispose) InscriptionsNamespace.prototype[Symbol.dispose] = InscriptionsNamespace.prototype.free;
3185
3185
 
3186
+ /**
3187
+ * A validated Merkle witness for an Ironwood/Orchard note commitment, from
3188
+ * [`ironwood_build_witness`].
3189
+ *
3190
+ * Not yet installed anywhere — see [`ironwood_build_witness`]'s docs.
3191
+ */
3192
+ export class IronwoodWitness {
3193
+ static __wrap(ptr) {
3194
+ ptr = ptr >>> 0;
3195
+ const obj = Object.create(IronwoodWitness.prototype);
3196
+ obj.__wbg_ptr = ptr;
3197
+ IronwoodWitnessFinalization.register(obj, obj.__wbg_ptr, obj);
3198
+ return obj;
3199
+ }
3200
+ __destroy_into_raw() {
3201
+ const ptr = this.__wbg_ptr;
3202
+ this.__wbg_ptr = 0;
3203
+ IronwoodWitnessFinalization.unregister(this);
3204
+ return ptr;
3205
+ }
3206
+ free() {
3207
+ const ptr = this.__destroy_into_raw();
3208
+ wasm.__wbg_ironwoodwitness_free(ptr, 0);
3209
+ }
3210
+ /**
3211
+ * The 32 sibling hashes (leaf-to-root order), flattened into a single 1024-byte array
3212
+ * (32 hashes × 32 bytes each).
3213
+ * @returns {Uint8Array}
3214
+ */
3215
+ get auth_path() {
3216
+ try {
3217
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3218
+ wasm.ironwoodwitness_auth_path(retptr, this.__wbg_ptr);
3219
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3220
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3221
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
3222
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3223
+ return v1;
3224
+ } finally {
3225
+ wasm.__wbindgen_add_to_stack_pointer(16);
3226
+ }
3227
+ }
3228
+ /**
3229
+ * The leaf's position in the note commitment tree.
3230
+ * @returns {number}
3231
+ */
3232
+ get position() {
3233
+ const ret = wasm.ironwoodwitness_position(this.__wbg_ptr);
3234
+ return ret >>> 0;
3235
+ }
3236
+ }
3237
+ if (Symbol.dispose) IronwoodWitness.prototype[Symbol.dispose] = IronwoodWitness.prototype.free;
3238
+
3186
3239
  export class MessageNamespace {
3187
3240
  __destroy_into_raw() {
3188
3241
  const ptr = this.__wbg_ptr;
@@ -7045,6 +7098,44 @@ export class ZcashV6Transaction {
7045
7098
  }
7046
7099
  if (Symbol.dispose) ZcashV6Transaction.prototype[Symbol.dispose] = ZcashV6Transaction.prototype.free;
7047
7100
 
7101
+ /**
7102
+ * Build and validate a Merkle witness for an Ironwood/Orchard note commitment.
7103
+ *
7104
+ * `cmx` is the note commitment being witnessed; `auth_path` must be exactly 32 sibling hashes (32
7105
+ * bytes each), leaf-to-root order; `anchor` is the expected note-commitment-tree root. Throws if
7106
+ * any input isn't a canonical field element, or if the witness doesn't recompute to `anchor`.
7107
+ *
7108
+ * This crate has no chain state, so the raw sibling-hash path must be supplied by the caller
7109
+ * (typically BitGo's backend, querying a Zcash-aware service). The returned witness is not yet
7110
+ * installed anywhere — hook it into a spend once real-spend construction exists.
7111
+ * @param {Uint8Array} cmx
7112
+ * @param {number} position
7113
+ * @param {Uint8Array[]} auth_path
7114
+ * @param {Uint8Array} anchor
7115
+ * @returns {IronwoodWitness}
7116
+ */
7117
+ export function ironwood_build_witness(cmx, position, auth_path, anchor) {
7118
+ try {
7119
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7120
+ const ptr0 = passArray8ToWasm0(cmx, wasm.__wbindgen_export);
7121
+ const len0 = WASM_VECTOR_LEN;
7122
+ const ptr1 = passArrayJsValueToWasm0(auth_path, wasm.__wbindgen_export);
7123
+ const len1 = WASM_VECTOR_LEN;
7124
+ const ptr2 = passArray8ToWasm0(anchor, wasm.__wbindgen_export);
7125
+ const len2 = WASM_VECTOR_LEN;
7126
+ wasm.ironwood_build_witness(retptr, ptr0, len0, position, ptr1, len1, ptr2, len2);
7127
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7128
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7129
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7130
+ if (r2) {
7131
+ throw takeObject(r1);
7132
+ }
7133
+ return IronwoodWitness.__wrap(r0);
7134
+ } finally {
7135
+ wasm.__wbindgen_add_to_stack_pointer(16);
7136
+ }
7137
+ }
7138
+
7048
7139
  /**
7049
7140
  * Check if the inspect feature is enabled.
7050
7141
  *
@@ -7504,6 +7595,9 @@ const FixedScriptWalletNamespaceFinalization = (typeof FinalizationRegistry ===
7504
7595
  const InscriptionsNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
7505
7596
  ? { register: () => {}, unregister: () => {} }
7506
7597
  : new FinalizationRegistry(ptr => wasm.__wbg_inscriptionsnamespace_free(ptr >>> 0, 1));
7598
+ const IronwoodWitnessFinalization = (typeof FinalizationRegistry === 'undefined')
7599
+ ? { register: () => {}, unregister: () => {} }
7600
+ : new FinalizationRegistry(ptr => wasm.__wbg_ironwoodwitness_free(ptr >>> 0, 1));
7507
7601
  const MessageNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
7508
7602
  ? { register: () => {}, unregister: () => {} }
7509
7603
  : new FinalizationRegistry(ptr => wasm.__wbg_messagenamespace_free(ptr >>> 0, 1));
Binary file
@@ -1,28 +1,14 @@
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_utxolibcompatnamespace_free: (a: number, b: number) => void;
6
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
7
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
8
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
9
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
10
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
11
- export const wasmdimensions_empty: () => number;
12
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
13
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
14
- export const wasmdimensions_from_output_script_length: (a: number) => number;
15
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
16
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
17
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
18
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
19
- export const wasmdimensions_get_output_vsize: (a: number) => number;
20
- export const wasmdimensions_get_output_weight: (a: number) => number;
21
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
22
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
23
- export const wasmdimensions_has_segwit: (a: number) => number;
24
- export const wasmdimensions_plus: (a: number, b: number) => number;
25
- export const wasmdimensions_times: (a: number, b: number) => number;
4
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
5
+ 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;
6
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
7
+ 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;
8
+ 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;
9
+ 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;
10
+ 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;
11
+ export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
26
12
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
27
13
  export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
28
14
  export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
@@ -31,6 +17,9 @@ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
31
17
  export const __wbg_wrappsbt_free: (a: number, b: number) => void;
32
18
  export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
33
19
  export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
20
+ export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
21
+ export const ironwoodwitness_auth_path: (a: number, b: number) => void;
22
+ export const ironwoodwitness_position: (a: number) => number;
34
23
  export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
35
24
  export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
36
25
  export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
@@ -163,19 +152,11 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
163
152
  export const wrapminiscript_node: (a: number, b: number) => void;
164
153
  export const wrapminiscript_toAsmString: (a: number, b: number) => void;
165
154
  export const wrapminiscript_toString: (a: number, b: number) => void;
166
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
167
- 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;
168
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
169
- 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;
170
- 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;
171
- 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;
172
- 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;
173
155
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
174
156
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
175
157
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
176
158
  export const __wbg_wasmecpair_free: (a: number, b: number) => void;
177
159
  export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
178
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
179
160
  export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
180
161
  export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
181
162
  export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
@@ -272,8 +253,6 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
272
253
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
273
254
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
274
255
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
275
- export const isInspectEnabled: () => number;
276
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
277
256
  export const wasmbip32_chain_code: (a: number) => number;
278
257
  export const wasmbip32_depth: (a: number) => number;
279
258
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -311,13 +290,38 @@ export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
311
290
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
312
291
  export const wasmrootwalletkeys_user_key: (a: number) => number;
313
292
  export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
314
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
315
293
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
316
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
317
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
318
294
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
319
295
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
320
296
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
297
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
298
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
299
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
300
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
301
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
302
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
303
+ export const isInspectEnabled: () => number;
304
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
305
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
306
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
307
+ export const wasmdimensions_empty: () => number;
308
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
309
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
310
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
311
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
312
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
313
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
314
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
315
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
316
+ export const wasmdimensions_get_output_weight: (a: number) => number;
317
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
318
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
319
+ export const wasmdimensions_has_segwit: (a: number) => number;
320
+ export const wasmdimensions_plus: (a: number, b: number) => number;
321
+ export const wasmdimensions_times: (a: number, b: number) => number;
322
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
323
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
324
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
321
325
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
322
326
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
323
327
  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": "4.40.0",
4
+ "version": "4.41.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",