@bitgo/wasm-utxo 4.34.0 → 4.36.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.
Files changed (27) hide show
  1. package/dist/cjs/js/address.d.ts +9 -1
  2. package/dist/cjs/js/address.js +10 -2
  3. package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +10 -0
  4. package/dist/cjs/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.d.ts +14 -0
  5. package/dist/cjs/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.js +16 -0
  6. package/dist/cjs/js/fixedScriptWallet/ZcashUnifiedAddress.d.ts +13 -0
  7. package/dist/cjs/js/fixedScriptWallet/ZcashUnifiedAddress.js +15 -0
  8. package/dist/cjs/js/fixedScriptWallet/ZcashV6Transaction.d.ts +9 -0
  9. package/dist/cjs/js/fixedScriptWallet/ZcashV6Transaction.js +11 -0
  10. package/dist/cjs/js/wasm/wasm_utxo.d.ts +44 -1
  11. package/dist/cjs/js/wasm/wasm_utxo.js +130 -2
  12. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
  13. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +166 -163
  14. package/dist/esm/js/address.d.ts +9 -1
  15. package/dist/esm/js/address.js +10 -2
  16. package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +10 -0
  17. package/dist/esm/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.d.ts +14 -0
  18. package/dist/esm/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.js +16 -0
  19. package/dist/esm/js/fixedScriptWallet/ZcashUnifiedAddress.d.ts +13 -0
  20. package/dist/esm/js/fixedScriptWallet/ZcashUnifiedAddress.js +15 -0
  21. package/dist/esm/js/fixedScriptWallet/ZcashV6Transaction.d.ts +9 -0
  22. package/dist/esm/js/fixedScriptWallet/ZcashV6Transaction.js +11 -0
  23. package/dist/esm/js/wasm/wasm_utxo.d.ts +44 -1
  24. package/dist/esm/js/wasm/wasm_utxo_bg.js +130 -2
  25. package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
  26. package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +166 -163
  27. package/package.json +1 -1
@@ -46,18 +46,23 @@ export class AddressNamespace {
46
46
  }
47
47
  }
48
48
  /**
49
+ * `can_be_shielded_output`: when set and `address` is a ZIP-316 unified address carrying an
50
+ * Orchard/Ironwood receiver, returns that raw 43-byte receiver instead of a transparent
51
+ * scriptPubKey. See [`to_output_script_or_shielded_receiver_with_coin`] for the exact
52
+ * fallback/error rules.
49
53
  * @param {string} address
50
54
  * @param {string} coin
55
+ * @param {boolean | null} [can_be_shielded_output]
51
56
  * @returns {Uint8Array}
52
57
  */
53
- static to_output_script_with_coin(address, coin) {
58
+ static to_output_script_with_coin(address, coin, can_be_shielded_output) {
54
59
  try {
55
60
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
56
61
  const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export, wasm.__wbindgen_export2);
57
62
  const len0 = WASM_VECTOR_LEN;
58
63
  const ptr1 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
59
64
  const len1 = WASM_VECTOR_LEN;
60
- wasm.addressnamespace_to_output_script_with_coin(retptr, ptr0, len0, ptr1, len1);
65
+ wasm.addressnamespace_to_output_script_with_coin(retptr, ptr0, len0, ptr1, len1, isLikeNone(can_be_shielded_output) ? 0xFFFFFF : can_be_shielded_output ? 1 : 0);
61
66
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
62
67
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
63
68
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1788,6 +1793,37 @@ export class BitGoPsbt {
1788
1793
  const ret = wasm.bitgopsbt_input_count(this.__wbg_ptr);
1789
1794
  return ret >>> 0;
1790
1795
  }
1796
+ /**
1797
+ * The raw serialized orchard PCZT (Partially Created Zcash Transaction) bundle stored in
1798
+ * this v6 (Ironwood) PSBT's proprietary key-value map, or `undefined` if none is present.
1799
+ *
1800
+ * A PCZT is the shielded-bundle counterpart to a PSBT: it accumulates the orchard action
1801
+ * (spend + output), the ZIP-244-committed `out_ciphertext`, and — once
1802
+ * [`Self::combine_ironwood_proof`] has run — the Halo2 `zkproof` and binding signature,
1803
+ * bridging this PSBT to the external proof service and back (see
1804
+ * [`crate::zcash::ironwood_pczt`] / [`crate::zcash::ironwood_build`]).
1805
+ *
1806
+ * Present only after [`Self::add_ironwood_output`] has been called on a v6 PSBT; `undefined`
1807
+ * beforehand, and `undefined` again after [`Self::combine_ironwood_proof`] succeeds, since
1808
+ * that call drops the stored PCZT to make extraction terminal (see its doc comment).
1809
+ * @returns {Uint8Array | undefined}
1810
+ */
1811
+ ironwood_pczt_bytes() {
1812
+ try {
1813
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1814
+ wasm.bitgopsbt_ironwood_pczt_bytes(retptr, this.__wbg_ptr);
1815
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1816
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1817
+ let v1;
1818
+ if (r0 !== 0) {
1819
+ v1 = getArrayU8FromWasm0(r0, r1).slice();
1820
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1821
+ }
1822
+ return v1;
1823
+ } finally {
1824
+ wasm.__wbindgen_add_to_stack_pointer(16);
1825
+ }
1826
+ }
1791
1827
  /**
1792
1828
  * The ZIP-244 per-input transparent sighash (32 bytes) that the key controlling transparent
1793
1829
  * input `index` must sign.
@@ -6524,6 +6560,46 @@ export class ZcashUnifiedAddress {
6524
6560
  wasm.__wbindgen_add_to_stack_pointer(16);
6525
6561
  }
6526
6562
  }
6563
+ /**
6564
+ * Encode a raw 43-byte Orchard/Ironwood receiver as a single-receiver Unified Address for
6565
+ * `network` ("zcash"/"zec" or "zcashTest"/"tzec").
6566
+ *
6567
+ * Deliberately narrower than a general UA encoder: this always produces exactly one
6568
+ * receiver, so it can't reproduce a multi-receiver UA (transparent + Sapling + Orchard) a
6569
+ * sender might have originally pasted in — only give back *a* valid, usable address for the
6570
+ * Orchard/Ironwood receiver itself.
6571
+ * @param {Uint8Array} receiver
6572
+ * @param {string} network
6573
+ * @returns {string}
6574
+ */
6575
+ static encodeOrchardReceiver(receiver, network) {
6576
+ let deferred4_0;
6577
+ let deferred4_1;
6578
+ try {
6579
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6580
+ const ptr0 = passArray8ToWasm0(receiver, wasm.__wbindgen_export);
6581
+ const len0 = WASM_VECTOR_LEN;
6582
+ const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
6583
+ const len1 = WASM_VECTOR_LEN;
6584
+ wasm.zcashunifiedaddress_encodeOrchardReceiver(retptr, ptr0, len0, ptr1, len1);
6585
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6586
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6587
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6588
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
6589
+ var ptr3 = r0;
6590
+ var len3 = r1;
6591
+ if (r3) {
6592
+ ptr3 = 0; len3 = 0;
6593
+ throw takeObject(r2);
6594
+ }
6595
+ deferred4_0 = ptr3;
6596
+ deferred4_1 = len3;
6597
+ return getStringFromWasm0(ptr3, len3);
6598
+ } finally {
6599
+ wasm.__wbindgen_add_to_stack_pointer(16);
6600
+ wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
6601
+ }
6602
+ }
6527
6603
  /**
6528
6604
  * The Orchard/Ironwood receiver's raw 43 bytes (diversifier + pk_d), or `undefined`.
6529
6605
  * @returns {Uint8Array | undefined}
@@ -6769,6 +6845,43 @@ export class ZcashV6Transaction {
6769
6845
  wasm.__wbindgen_add_to_stack_pointer(16);
6770
6846
  }
6771
6847
  }
6848
+ /**
6849
+ * The ZIP-244 per-input transparent sighash (32 bytes) for transparent input `index` of
6850
+ * this transaction — the free-standing counterpart to
6851
+ * `ZcashIronwoodBitGoPsbt.transparentSighash`, for a transaction inspected directly from
6852
+ * its raw bytes rather than one built via this codebase's PSBT flow (e.g. independently
6853
+ * verifying an already-broadcast transaction's signatures).
6854
+ *
6855
+ * `input_amounts`/`input_script_pubkeys` are the spent outputs' values (zatoshi) and
6856
+ * scriptPubKeys for *every* transparent input of this transaction, in input order — the
6857
+ * same data `add-input`/`addWalletInput` would have carried in a PSBT's `witness_utxo`.
6858
+ * @param {number} index
6859
+ * @param {BigInt64Array} input_amounts
6860
+ * @param {Uint8Array[]} input_script_pubkeys
6861
+ * @returns {Uint8Array}
6862
+ */
6863
+ transparentSighash(index, input_amounts, input_script_pubkeys) {
6864
+ try {
6865
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6866
+ const ptr0 = passArray64ToWasm0(input_amounts, wasm.__wbindgen_export);
6867
+ const len0 = WASM_VECTOR_LEN;
6868
+ const ptr1 = passArrayJsValueToWasm0(input_script_pubkeys, wasm.__wbindgen_export);
6869
+ const len1 = WASM_VECTOR_LEN;
6870
+ wasm.zcashv6transaction_transparentSighash(retptr, this.__wbg_ptr, index, ptr0, len0, ptr1, len1);
6871
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6872
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6873
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6874
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
6875
+ if (r3) {
6876
+ throw takeObject(r2);
6877
+ }
6878
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
6879
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6880
+ return v3;
6881
+ } finally {
6882
+ wasm.__wbindgen_add_to_stack_pointer(16);
6883
+ }
6884
+ }
6772
6885
  /**
6773
6886
  * The ZIP-244 txid in internal (non-reversed) byte order.
6774
6887
  * @returns {Uint8Array}
@@ -7405,6 +7518,14 @@ function getArrayU8FromWasm0(ptr, len) {
7405
7518
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
7406
7519
  }
7407
7520
 
7521
+ let cachedBigUint64ArrayMemory0 = null;
7522
+ function getBigUint64ArrayMemory0() {
7523
+ if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) {
7524
+ cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer);
7525
+ }
7526
+ return cachedBigUint64ArrayMemory0;
7527
+ }
7528
+
7408
7529
  let cachedDataViewMemory0 = null;
7409
7530
  function getDataViewMemory0() {
7410
7531
  if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
@@ -7453,6 +7574,13 @@ function isLikeNone(x) {
7453
7574
  return x === undefined || x === null;
7454
7575
  }
7455
7576
 
7577
+ function passArray64ToWasm0(arg, malloc) {
7578
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
7579
+ getBigUint64ArrayMemory0().set(arg, ptr / 8);
7580
+ WASM_VECTOR_LEN = arg.length;
7581
+ return ptr;
7582
+ }
7583
+
7456
7584
  function passArray8ToWasm0(arg, malloc) {
7457
7585
  const ptr = malloc(arg.length * 1, 1) >>> 0;
7458
7586
  getUint8ArrayMemory0().set(arg, ptr / 1);
Binary file
@@ -1,33 +1,147 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
5
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
6
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
7
- export const wrapdescriptor_descType: (a: number, b: number) => void;
8
- export const wrapdescriptor_encode: (a: number, b: number) => void;
9
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
10
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
11
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
12
- export const wrapdescriptor_hasWildcard: (a: number) => number;
13
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
14
- export const wrapdescriptor_node: (a: number, b: number) => void;
15
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
16
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
17
- export const wrapdescriptor_toString: (a: number, b: number) => void;
18
- export const wrapminiscript_encode: (a: number, b: number) => void;
19
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
20
- export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
21
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
22
- export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
23
- export const wrapminiscript_node: (a: number, b: number) => void;
24
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
25
- export const wrapminiscript_toString: (a: number, b: number) => void;
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_messagenamespace_free: (a: number, b: number) => void;
7
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
8
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
9
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
10
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
11
+ export const __wbg_wasmutxonamespace_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, f: 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 messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
25
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
26
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
27
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
28
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
29
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
30
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
31
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
32
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
33
+ export const wasmdashtransaction_input_count: (a: number) => number;
34
+ export const wasmdashtransaction_lock_time: (a: number) => number;
35
+ export const wasmdashtransaction_output_count: (a: number) => number;
36
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
37
+ export const wasmdashtransaction_version: (a: number) => number;
38
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
39
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
40
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
41
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
42
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
43
+ export const wasmecpair_private_key: (a: number) => number;
44
+ export const wasmecpair_public_key: (a: number) => number;
45
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
46
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
47
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
48
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
49
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
50
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
51
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
52
+ export const wasmtransaction_create: () => number;
53
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
54
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
55
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
56
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
57
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
58
+ export const wasmtransaction_get_vsize: (a: number) => number;
59
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
60
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
61
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
62
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
63
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
64
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
65
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
66
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
67
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
68
+ 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;
69
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
70
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
71
+ export const wrappsbt_clone: (a: number) => number;
72
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
73
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
74
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
75
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
76
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
77
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
78
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
79
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
80
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
81
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
82
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
83
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
84
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
85
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
86
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
87
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
88
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
89
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
90
+ export const wrappsbt_input_count: (a: number) => number;
91
+ export const wrappsbt_new: (a: number, b: number) => number;
92
+ export const wrappsbt_output_count: (a: number) => number;
93
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
94
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
95
+ export const wrappsbt_serialize: (a: number, b: number) => void;
96
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
97
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
98
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
99
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
100
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
101
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
102
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
103
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
104
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
105
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
106
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
107
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
108
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
109
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
110
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
111
+ export const zcash_ironwood_version_group_id: () => number;
112
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
113
+ export const zcashunifiedaddress_encodeOrchardReceiver: (a: number, b: number, c: number, d: number, e: number) => void;
114
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
115
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
116
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
117
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
118
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
119
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
120
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
121
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
122
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
123
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
124
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
125
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
126
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
127
+ export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
128
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
129
+ export const wasmtransaction_input_count: (a: number) => number;
130
+ export const wasmtransaction_output_count: (a: number) => number;
131
+ export const wasmzcashtransaction_input_count: (a: number) => number;
132
+ export const wasmzcashtransaction_output_count: (a: number) => number;
133
+ export const wasmtransaction_lock_time: (a: number) => number;
134
+ export const wasmtransaction_version: (a: number) => number;
135
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
136
+ export const wasmzcashtransaction_version: (a: number) => number;
137
+ export const wrappsbt_lock_time: (a: number) => number;
138
+ export const wrappsbt_version: (a: number) => number;
26
139
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
27
140
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
28
141
  export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
29
142
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
30
143
  export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
144
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
31
145
  export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
32
146
  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;
33
147
  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;
@@ -81,6 +195,7 @@ export const bitgopsbt_get_outputs: (a: number, b: number) => void;
81
195
  export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
82
196
  export const bitgopsbt_get_unsigned_tx: (a: number, b: number) => void;
83
197
  export const bitgopsbt_input_count: (a: number) => number;
198
+ export const bitgopsbt_ironwood_pczt_bytes: (a: number, b: number) => void;
84
199
  export const bitgopsbt_ironwood_v6_transparent_sighash: (a: number, b: number, c: number) => void;
85
200
  export const bitgopsbt_ironwood_v6_txid: (a: number, b: number) => void;
86
201
  export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
@@ -123,6 +238,7 @@ export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: num
123
238
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
124
239
  export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
125
240
  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;
241
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
126
242
  export const wasmbip32_chain_code: (a: number) => number;
127
243
  export const wasmbip32_depth: (a: number) => number;
128
244
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -160,156 +276,43 @@ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => num
160
276
  export const wasmdimensions_has_segwit: (a: number) => number;
161
277
  export const wasmdimensions_plus: (a: number, b: number) => number;
162
278
  export const wasmdimensions_times: (a: number, b: number) => number;
279
+ export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
280
+ export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
281
+ export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
163
282
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
164
283
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
165
284
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
166
285
  export const wasmrootwalletkeys_user_key: (a: number) => number;
167
286
  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;
168
287
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
169
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
170
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
171
- export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
172
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
173
- export const __wbg_bip322namespace_free: (a: number, b: number) => void;
174
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
175
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
176
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
177
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
178
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
179
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
180
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
181
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
182
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
183
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
184
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
185
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
186
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
187
- 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;
188
- export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
189
- 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;
190
- 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;
191
- 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;
192
- 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;
193
288
  export const isInspectEnabled: () => number;
194
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
195
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
196
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
197
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
198
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
199
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
200
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
201
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
202
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
203
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
204
- export const wasmdashtransaction_input_count: (a: number) => number;
205
- export const wasmdashtransaction_lock_time: (a: number) => number;
206
- export const wasmdashtransaction_output_count: (a: number) => number;
207
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
208
- export const wasmdashtransaction_version: (a: number) => number;
209
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
210
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
211
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
212
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
213
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
214
- export const wasmecpair_private_key: (a: number) => number;
215
- export const wasmecpair_public_key: (a: number) => number;
216
- export const wasmecpair_to_wif: (a: number, b: number) => void;
217
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
218
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
219
- export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
220
- export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
221
- export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
222
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
223
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
224
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
225
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
226
- export const wasmtransaction_create: () => number;
227
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
228
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
229
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
230
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
231
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
232
- export const wasmtransaction_get_vsize: (a: number) => number;
233
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
234
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
235
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
236
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
237
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
238
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
239
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
240
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
241
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
242
- 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;
243
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
244
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
245
- export const wrappsbt_clone: (a: number) => number;
246
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
247
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
248
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
249
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
250
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
251
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
252
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
253
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
254
- export const wrappsbt_get_global_xpubs: (a: number) => number;
255
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
256
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
257
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
258
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
259
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
260
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
261
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
262
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
263
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
264
- export const wrappsbt_input_count: (a: number) => number;
265
- export const wrappsbt_new: (a: number, b: number) => number;
266
- export const wrappsbt_output_count: (a: number) => number;
267
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
268
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
269
- export const wrappsbt_serialize: (a: number, b: number) => void;
270
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
271
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
272
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
273
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
274
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
275
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
276
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
277
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
278
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
279
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
280
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
281
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
282
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
283
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
284
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
285
- export const zcash_ironwood_version_group_id: () => number;
286
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
287
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
288
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
289
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
290
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
291
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
292
- export const zcashv6transaction_expiryHeight: (a: number) => number;
293
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
294
- export const zcashv6transaction_getId: (a: number, b: number) => void;
295
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
296
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
297
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
298
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
299
- export const zcashv6transaction_toBytes: (a: number, b: 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
289
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
306
290
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
307
- export const wasmtransaction_lock_time: (a: number) => number;
308
- export const wasmtransaction_version: (a: number) => number;
309
- export const wasmzcashtransaction_lock_time: (a: number) => number;
310
- export const wasmzcashtransaction_version: (a: number) => number;
311
- export const wrappsbt_lock_time: (a: number) => number;
312
- export const wrappsbt_version: (a: number) => number;
291
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
292
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
293
+ export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
294
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
295
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
296
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
297
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
298
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
299
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
300
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
301
+ export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
302
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
303
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
304
+ export const wrapdescriptor_node: (a: number, b: number) => void;
305
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
306
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
307
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
308
+ export const wrapminiscript_encode: (a: number, b: number) => void;
309
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
310
+ export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
311
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
312
+ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
313
+ export const wrapminiscript_node: (a: number, b: number) => void;
314
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
315
+ export const wrapminiscript_toString: (a: number, b: number) => void;
313
316
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
314
317
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
315
318
  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.34.0",
4
+ "version": "4.36.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",