@bitgo/wasm-utxo 4.12.0 → 4.14.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.
@@ -585,6 +585,15 @@ export declare class BitGoPsbt extends PsbtBase<WasmBitGoPsbt> implements IPsbtW
585
585
  * ```
586
586
  */
587
587
  getHalfSignedLegacyFormat(): Uint8Array;
588
+ /**
589
+ * Serialize the unsigned transaction embedded in this PSBT.
590
+ *
591
+ * Unlike {@link extractTransaction}, this does NOT require finalization or signatures.
592
+ * Equivalent to utxo-lib's `UtxoPsbt.getUnsignedTx().toBuffer()`.
593
+ *
594
+ * @returns The serialized unsigned transaction bytes (network/consensus encoding).
595
+ */
596
+ getUnsignedTransaction(): Uint8Array;
588
597
  /**
589
598
  * Get all PSBT outputs with resolved address strings
590
599
  *
@@ -597,6 +597,17 @@ class BitGoPsbt extends psbtBase_js_1.PsbtBase {
597
597
  getHalfSignedLegacyFormat() {
598
598
  return this._wasm.extract_half_signed_legacy_tx();
599
599
  }
600
+ /**
601
+ * Serialize the unsigned transaction embedded in this PSBT.
602
+ *
603
+ * Unlike {@link extractTransaction}, this does NOT require finalization or signatures.
604
+ * Equivalent to utxo-lib's `UtxoPsbt.getUnsignedTx().toBuffer()`.
605
+ *
606
+ * @returns The serialized unsigned transaction bytes (network/consensus encoding).
607
+ */
608
+ getUnsignedTransaction() {
609
+ return this._wasm.get_unsigned_tx();
610
+ }
600
611
  /**
601
612
  * Get all PSBT outputs with resolved address strings
602
613
  *
@@ -48,6 +48,8 @@ declare module "./wasm/wasm_utxo.js" {
48
48
  namespace WrapMiniscript {
49
49
  function fromString(miniscript: string, ctx: ScriptContext): WrapMiniscript;
50
50
  function fromBitcoinScript(script: Uint8Array, ctx: ScriptContext): WrapMiniscript;
51
+ function fromStringExt(miniscript: string, ctx: ScriptContext, extParams?: ExtParamsConfig): WrapMiniscript;
52
+ function fromBitcoinScriptExt(script: Uint8Array, ctx: ScriptContext, extParams?: ExtParamsConfig): WrapMiniscript;
51
53
  }
52
54
  /** BIP32 derivation data from a PSBT */
53
55
  interface PsbtBip32Derivation {
@@ -404,6 +404,12 @@ export class BitGoPsbt {
404
404
  get_output_kv(index: number, key: any): Uint8Array | undefined;
405
405
  get_outputs(): any;
406
406
  get_outputs_with_address(): any;
407
+ /**
408
+ * Serialize the unsigned transaction embedded in this PSBT.
409
+ *
410
+ * Unlike `extract_transaction()`, this does NOT require finalization or signatures.
411
+ */
412
+ get_unsigned_tx(): Uint8Array;
407
413
  input_count(): number;
408
414
  /**
409
415
  * Check if an input is a MuSig2 keypath input.
@@ -1569,6 +1569,25 @@ class BitGoPsbt {
1569
1569
  wasm.__wbindgen_add_to_stack_pointer(16);
1570
1570
  }
1571
1571
  }
1572
+ /**
1573
+ * Serialize the unsigned transaction embedded in this PSBT.
1574
+ *
1575
+ * Unlike `extract_transaction()`, this does NOT require finalization or signatures.
1576
+ * @returns {Uint8Array}
1577
+ */
1578
+ get_unsigned_tx() {
1579
+ try {
1580
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1581
+ wasm.bitgopsbt_get_unsigned_tx(retptr, this.__wbg_ptr);
1582
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1583
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1584
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1585
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1586
+ return v1;
1587
+ } finally {
1588
+ wasm.__wbindgen_add_to_stack_pointer(16);
1589
+ }
1590
+ }
1572
1591
  /**
1573
1592
  * @returns {number}
1574
1593
  */
@@ -5091,6 +5110,31 @@ class WrapMiniscript {
5091
5110
  wasm.__wbindgen_add_to_stack_pointer(16);
5092
5111
  }
5093
5112
  }
5113
+ /**
5114
+ * @param {Uint8Array} script
5115
+ * @param {string} context_type
5116
+ * @param {any} ext_params_config
5117
+ * @returns {WrapMiniscript}
5118
+ */
5119
+ static fromBitcoinScriptExt(script, context_type, ext_params_config) {
5120
+ try {
5121
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5122
+ const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
5123
+ const len0 = WASM_VECTOR_LEN;
5124
+ const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5125
+ const len1 = WASM_VECTOR_LEN;
5126
+ wasm.wrapminiscript_fromBitcoinScriptExt(retptr, ptr0, len0, ptr1, len1, addHeapObject(ext_params_config));
5127
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5128
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5129
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5130
+ if (r2) {
5131
+ throw takeObject(r1);
5132
+ }
5133
+ return WrapMiniscript.__wrap(r0);
5134
+ } finally {
5135
+ wasm.__wbindgen_add_to_stack_pointer(16);
5136
+ }
5137
+ }
5094
5138
  /**
5095
5139
  * @param {string} script
5096
5140
  * @param {string} context_type
@@ -5115,6 +5159,31 @@ class WrapMiniscript {
5115
5159
  wasm.__wbindgen_add_to_stack_pointer(16);
5116
5160
  }
5117
5161
  }
5162
+ /**
5163
+ * @param {string} script
5164
+ * @param {string} context_type
5165
+ * @param {any} ext_params_config
5166
+ * @returns {WrapMiniscript}
5167
+ */
5168
+ static fromStringExt(script, context_type, ext_params_config) {
5169
+ try {
5170
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5171
+ const ptr0 = passStringToWasm0(script, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5172
+ const len0 = WASM_VECTOR_LEN;
5173
+ const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5174
+ const len1 = WASM_VECTOR_LEN;
5175
+ wasm.wrapminiscript_fromStringExt(retptr, ptr0, len0, ptr1, len1, addHeapObject(ext_params_config));
5176
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5177
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5178
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5179
+ if (r2) {
5180
+ throw takeObject(r1);
5181
+ }
5182
+ return WrapMiniscript.__wrap(r0);
5183
+ } finally {
5184
+ wasm.__wbindgen_add_to_stack_pointer(16);
5185
+ }
5186
+ }
5118
5187
  /**
5119
5188
  * @returns {any}
5120
5189
  */
Binary file
@@ -1,6 +1,139 @@
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;
26
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
27
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
28
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
29
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
30
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
31
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
32
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
33
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
34
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
35
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
36
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
37
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
38
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
39
+ 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;
40
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
41
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
42
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
43
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
44
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
45
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
46
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
47
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
48
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
49
+ export const wasmdashtransaction_input_count: (a: number) => number;
50
+ export const wasmdashtransaction_lock_time: (a: number) => number;
51
+ export const wasmdashtransaction_output_count: (a: number) => number;
52
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
53
+ export const wasmdashtransaction_version: (a: number) => number;
54
+ export const wasmdimensions_empty: () => number;
55
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
56
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
57
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
58
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
59
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
60
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
61
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
62
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
63
+ export const wasmdimensions_get_output_weight: (a: number) => number;
64
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
65
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
66
+ export const wasmdimensions_has_segwit: (a: number) => number;
67
+ export const wasmdimensions_plus: (a: number, b: number) => number;
68
+ export const wasmdimensions_times: (a: number, b: number) => number;
69
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
70
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
71
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
72
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
73
+ export const wasmtransaction_create: () => number;
74
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
75
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
76
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
77
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
78
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
79
+ export const wasmtransaction_get_vsize: (a: number) => number;
80
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
81
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
82
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
83
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
84
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
85
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
86
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
87
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
88
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
89
+ 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;
90
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
91
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
92
+ export const wrappsbt_clone: (a: number) => number;
93
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
94
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
95
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
96
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
97
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
98
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
99
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
100
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
101
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
102
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
103
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
104
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
105
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
106
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
107
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
108
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
109
+ export const wrappsbt_input_count: (a: number) => number;
110
+ export const wrappsbt_new: (a: number, b: number) => number;
111
+ export const wrappsbt_output_count: (a: number) => number;
112
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
113
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
114
+ export const wrappsbt_serialize: (a: number, b: number) => void;
115
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
116
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
117
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
118
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
119
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
120
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
121
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
122
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
123
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
124
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
125
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
126
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
127
+ export const wasmtransaction_input_count: (a: number) => number;
128
+ export const wasmtransaction_output_count: (a: number) => number;
129
+ export const wasmzcashtransaction_input_count: (a: number) => number;
130
+ export const wasmzcashtransaction_output_count: (a: number) => number;
131
+ export const wasmtransaction_lock_time: (a: number) => number;
132
+ export const wasmtransaction_version: (a: number) => number;
133
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
134
+ export const wasmzcashtransaction_version: (a: number) => number;
135
+ export const wrappsbt_lock_time: (a: number) => number;
136
+ export const wrappsbt_version: (a: number) => number;
4
137
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
5
138
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
6
139
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
@@ -57,6 +190,7 @@ export const bitgopsbt_get_network_type: (a: number, b: number) => void;
57
190
  export const bitgopsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
58
191
  export const bitgopsbt_get_outputs: (a: number, b: number) => void;
59
192
  export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
193
+ export const bitgopsbt_get_unsigned_tx: (a: number, b: number) => void;
60
194
  export const bitgopsbt_input_count: (a: number) => number;
61
195
  export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
62
196
  export const bitgopsbt_lock_time: (a: number) => number;
@@ -137,142 +271,11 @@ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number
137
271
  export const wasmrootwalletkeys_user_key: (a: number) => number;
138
272
  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;
139
273
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
140
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
141
274
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
142
275
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
276
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
143
277
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
144
278
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
145
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
146
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
147
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
148
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
149
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
150
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
151
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
152
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
153
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
154
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
155
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
156
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
157
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
158
- 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;
159
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
160
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
161
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
162
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
163
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
164
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
165
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
166
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
167
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
168
- export const wasmdashtransaction_input_count: (a: number) => number;
169
- export const wasmdashtransaction_lock_time: (a: number) => number;
170
- export const wasmdashtransaction_output_count: (a: number) => number;
171
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
172
- export const wasmdashtransaction_version: (a: number) => number;
173
- export const wasmdimensions_empty: () => number;
174
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
175
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
176
- export const wasmdimensions_from_output_script_length: (a: number) => number;
177
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
178
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
179
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
180
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
181
- export const wasmdimensions_get_output_vsize: (a: number) => number;
182
- export const wasmdimensions_get_output_weight: (a: number) => number;
183
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
184
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
185
- export const wasmdimensions_has_segwit: (a: number) => number;
186
- export const wasmdimensions_plus: (a: number, b: number) => number;
187
- export const wasmdimensions_times: (a: number, b: number) => number;
188
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
189
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
190
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
191
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
192
- export const wasmtransaction_create: () => number;
193
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
194
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
195
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
196
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
197
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
198
- export const wasmtransaction_get_vsize: (a: number) => number;
199
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
200
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
201
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
202
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
203
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
204
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
205
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
206
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
207
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
208
- 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;
209
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
210
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
211
- export const wrappsbt_clone: (a: number) => number;
212
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
213
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
214
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
215
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
216
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
217
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
218
- export const wrappsbt_get_global_xpubs: (a: number) => number;
219
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
220
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
221
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
222
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
223
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
224
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
225
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
226
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
227
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
228
- export const wrappsbt_input_count: (a: number) => number;
229
- export const wrappsbt_new: (a: number, b: number) => number;
230
- export const wrappsbt_output_count: (a: number) => number;
231
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
232
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
233
- export const wrappsbt_serialize: (a: number, b: number) => void;
234
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
235
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
236
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
237
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
238
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
239
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
240
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
241
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
242
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
243
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
244
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
245
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
246
- export const wasmtransaction_input_count: (a: number) => number;
247
- export const wasmtransaction_output_count: (a: number) => number;
248
- export const wasmzcashtransaction_input_count: (a: number) => number;
249
- export const wasmzcashtransaction_output_count: (a: number) => number;
250
- export const wasmtransaction_lock_time: (a: number) => number;
251
- export const wasmtransaction_version: (a: number) => number;
252
- export const wasmzcashtransaction_lock_time: (a: number) => number;
253
- export const wasmzcashtransaction_version: (a: number) => number;
254
- export const wrappsbt_lock_time: (a: number) => number;
255
- export const wrappsbt_version: (a: number) => number;
256
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
257
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
258
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
259
- export const wrapdescriptor_descType: (a: number, b: number) => void;
260
- export const wrapdescriptor_encode: (a: number, b: number) => void;
261
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
262
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
263
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
264
- export const wrapdescriptor_hasWildcard: (a: number) => number;
265
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
266
- export const wrapdescriptor_node: (a: number, b: number) => void;
267
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
268
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
269
- export const wrapdescriptor_toString: (a: number, b: number) => void;
270
- export const wrapminiscript_encode: (a: number, b: number) => void;
271
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
272
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
273
- export const wrapminiscript_node: (a: number, b: number) => void;
274
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
275
- export const wrapminiscript_toString: (a: number, b: number) => void;
276
279
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
277
280
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
278
281
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -585,6 +585,15 @@ export declare class BitGoPsbt extends PsbtBase<WasmBitGoPsbt> implements IPsbtW
585
585
  * ```
586
586
  */
587
587
  getHalfSignedLegacyFormat(): Uint8Array;
588
+ /**
589
+ * Serialize the unsigned transaction embedded in this PSBT.
590
+ *
591
+ * Unlike {@link extractTransaction}, this does NOT require finalization or signatures.
592
+ * Equivalent to utxo-lib's `UtxoPsbt.getUnsignedTx().toBuffer()`.
593
+ *
594
+ * @returns The serialized unsigned transaction bytes (network/consensus encoding).
595
+ */
596
+ getUnsignedTransaction(): Uint8Array;
588
597
  /**
589
598
  * Get all PSBT outputs with resolved address strings
590
599
  *
@@ -593,6 +593,17 @@ export class BitGoPsbt extends PsbtBase {
593
593
  getHalfSignedLegacyFormat() {
594
594
  return this._wasm.extract_half_signed_legacy_tx();
595
595
  }
596
+ /**
597
+ * Serialize the unsigned transaction embedded in this PSBT.
598
+ *
599
+ * Unlike {@link extractTransaction}, this does NOT require finalization or signatures.
600
+ * Equivalent to utxo-lib's `UtxoPsbt.getUnsignedTx().toBuffer()`.
601
+ *
602
+ * @returns The serialized unsigned transaction bytes (network/consensus encoding).
603
+ */
604
+ getUnsignedTransaction() {
605
+ return this._wasm.get_unsigned_tx();
606
+ }
596
607
  /**
597
608
  * Get all PSBT outputs with resolved address strings
598
609
  *
@@ -48,6 +48,8 @@ declare module "./wasm/wasm_utxo.js" {
48
48
  namespace WrapMiniscript {
49
49
  function fromString(miniscript: string, ctx: ScriptContext): WrapMiniscript;
50
50
  function fromBitcoinScript(script: Uint8Array, ctx: ScriptContext): WrapMiniscript;
51
+ function fromStringExt(miniscript: string, ctx: ScriptContext, extParams?: ExtParamsConfig): WrapMiniscript;
52
+ function fromBitcoinScriptExt(script: Uint8Array, ctx: ScriptContext, extParams?: ExtParamsConfig): WrapMiniscript;
51
53
  }
52
54
  /** BIP32 derivation data from a PSBT */
53
55
  interface PsbtBip32Derivation {
@@ -404,6 +404,12 @@ export class BitGoPsbt {
404
404
  get_output_kv(index: number, key: any): Uint8Array | undefined;
405
405
  get_outputs(): any;
406
406
  get_outputs_with_address(): any;
407
+ /**
408
+ * Serialize the unsigned transaction embedded in this PSBT.
409
+ *
410
+ * Unlike `extract_transaction()`, this does NOT require finalization or signatures.
411
+ */
412
+ get_unsigned_tx(): Uint8Array;
407
413
  input_count(): number;
408
414
  /**
409
415
  * Check if an input is a MuSig2 keypath input.
@@ -1565,6 +1565,25 @@ export class BitGoPsbt {
1565
1565
  wasm.__wbindgen_add_to_stack_pointer(16);
1566
1566
  }
1567
1567
  }
1568
+ /**
1569
+ * Serialize the unsigned transaction embedded in this PSBT.
1570
+ *
1571
+ * Unlike `extract_transaction()`, this does NOT require finalization or signatures.
1572
+ * @returns {Uint8Array}
1573
+ */
1574
+ get_unsigned_tx() {
1575
+ try {
1576
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1577
+ wasm.bitgopsbt_get_unsigned_tx(retptr, this.__wbg_ptr);
1578
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1579
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1580
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
1581
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1582
+ return v1;
1583
+ } finally {
1584
+ wasm.__wbindgen_add_to_stack_pointer(16);
1585
+ }
1586
+ }
1568
1587
  /**
1569
1588
  * @returns {number}
1570
1589
  */
@@ -5072,6 +5091,31 @@ export class WrapMiniscript {
5072
5091
  wasm.__wbindgen_add_to_stack_pointer(16);
5073
5092
  }
5074
5093
  }
5094
+ /**
5095
+ * @param {Uint8Array} script
5096
+ * @param {string} context_type
5097
+ * @param {any} ext_params_config
5098
+ * @returns {WrapMiniscript}
5099
+ */
5100
+ static fromBitcoinScriptExt(script, context_type, ext_params_config) {
5101
+ try {
5102
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5103
+ const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
5104
+ const len0 = WASM_VECTOR_LEN;
5105
+ const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5106
+ const len1 = WASM_VECTOR_LEN;
5107
+ wasm.wrapminiscript_fromBitcoinScriptExt(retptr, ptr0, len0, ptr1, len1, addHeapObject(ext_params_config));
5108
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5109
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5110
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5111
+ if (r2) {
5112
+ throw takeObject(r1);
5113
+ }
5114
+ return WrapMiniscript.__wrap(r0);
5115
+ } finally {
5116
+ wasm.__wbindgen_add_to_stack_pointer(16);
5117
+ }
5118
+ }
5075
5119
  /**
5076
5120
  * @param {string} script
5077
5121
  * @param {string} context_type
@@ -5096,6 +5140,31 @@ export class WrapMiniscript {
5096
5140
  wasm.__wbindgen_add_to_stack_pointer(16);
5097
5141
  }
5098
5142
  }
5143
+ /**
5144
+ * @param {string} script
5145
+ * @param {string} context_type
5146
+ * @param {any} ext_params_config
5147
+ * @returns {WrapMiniscript}
5148
+ */
5149
+ static fromStringExt(script, context_type, ext_params_config) {
5150
+ try {
5151
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5152
+ const ptr0 = passStringToWasm0(script, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5153
+ const len0 = WASM_VECTOR_LEN;
5154
+ const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
5155
+ const len1 = WASM_VECTOR_LEN;
5156
+ wasm.wrapminiscript_fromStringExt(retptr, ptr0, len0, ptr1, len1, addHeapObject(ext_params_config));
5157
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5158
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5159
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
5160
+ if (r2) {
5161
+ throw takeObject(r1);
5162
+ }
5163
+ return WrapMiniscript.__wrap(r0);
5164
+ } finally {
5165
+ wasm.__wbindgen_add_to_stack_pointer(16);
5166
+ }
5167
+ }
5099
5168
  /**
5100
5169
  * @returns {any}
5101
5170
  */
Binary file
@@ -1,6 +1,139 @@
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;
26
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
27
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
28
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
29
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
30
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
31
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
32
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
33
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
34
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
35
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
36
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
37
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
38
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
39
+ 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;
40
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
41
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
42
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
43
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
44
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
45
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
46
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
47
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
48
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
49
+ export const wasmdashtransaction_input_count: (a: number) => number;
50
+ export const wasmdashtransaction_lock_time: (a: number) => number;
51
+ export const wasmdashtransaction_output_count: (a: number) => number;
52
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
53
+ export const wasmdashtransaction_version: (a: number) => number;
54
+ export const wasmdimensions_empty: () => number;
55
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
56
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
57
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
58
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
59
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
60
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
61
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
62
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
63
+ export const wasmdimensions_get_output_weight: (a: number) => number;
64
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
65
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
66
+ export const wasmdimensions_has_segwit: (a: number) => number;
67
+ export const wasmdimensions_plus: (a: number, b: number) => number;
68
+ export const wasmdimensions_times: (a: number, b: number) => number;
69
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
70
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
71
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
72
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
73
+ export const wasmtransaction_create: () => number;
74
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
75
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
76
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
77
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
78
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
79
+ export const wasmtransaction_get_vsize: (a: number) => number;
80
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
81
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
82
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
83
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
84
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
85
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
86
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
87
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
88
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
89
+ 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;
90
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
91
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
92
+ export const wrappsbt_clone: (a: number) => number;
93
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
94
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
95
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
96
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
97
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
98
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
99
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
100
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
101
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
102
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
103
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
104
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
105
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
106
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
107
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
108
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
109
+ export const wrappsbt_input_count: (a: number) => number;
110
+ export const wrappsbt_new: (a: number, b: number) => number;
111
+ export const wrappsbt_output_count: (a: number) => number;
112
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
113
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
114
+ export const wrappsbt_serialize: (a: number, b: number) => void;
115
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
116
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
117
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
118
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
119
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
120
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
121
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
122
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
123
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
124
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
125
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
126
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
127
+ export const wasmtransaction_input_count: (a: number) => number;
128
+ export const wasmtransaction_output_count: (a: number) => number;
129
+ export const wasmzcashtransaction_input_count: (a: number) => number;
130
+ export const wasmzcashtransaction_output_count: (a: number) => number;
131
+ export const wasmtransaction_lock_time: (a: number) => number;
132
+ export const wasmtransaction_version: (a: number) => number;
133
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
134
+ export const wasmzcashtransaction_version: (a: number) => number;
135
+ export const wrappsbt_lock_time: (a: number) => number;
136
+ export const wrappsbt_version: (a: number) => number;
4
137
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
5
138
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
6
139
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
@@ -57,6 +190,7 @@ export const bitgopsbt_get_network_type: (a: number, b: number) => void;
57
190
  export const bitgopsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
58
191
  export const bitgopsbt_get_outputs: (a: number, b: number) => void;
59
192
  export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
193
+ export const bitgopsbt_get_unsigned_tx: (a: number, b: number) => void;
60
194
  export const bitgopsbt_input_count: (a: number) => number;
61
195
  export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
62
196
  export const bitgopsbt_lock_time: (a: number) => number;
@@ -137,142 +271,11 @@ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number
137
271
  export const wasmrootwalletkeys_user_key: (a: number) => number;
138
272
  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;
139
273
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
140
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
141
274
  export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
142
275
  export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
276
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
143
277
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
144
278
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
145
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
146
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
147
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
148
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
149
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
150
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
151
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
152
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
153
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
154
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
155
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
156
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
157
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
158
- 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;
159
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
160
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
161
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
162
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
163
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
164
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
165
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
166
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
167
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
168
- export const wasmdashtransaction_input_count: (a: number) => number;
169
- export const wasmdashtransaction_lock_time: (a: number) => number;
170
- export const wasmdashtransaction_output_count: (a: number) => number;
171
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
172
- export const wasmdashtransaction_version: (a: number) => number;
173
- export const wasmdimensions_empty: () => number;
174
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
175
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
176
- export const wasmdimensions_from_output_script_length: (a: number) => number;
177
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
178
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
179
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
180
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
181
- export const wasmdimensions_get_output_vsize: (a: number) => number;
182
- export const wasmdimensions_get_output_weight: (a: number) => number;
183
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
184
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
185
- export const wasmdimensions_has_segwit: (a: number) => number;
186
- export const wasmdimensions_plus: (a: number, b: number) => number;
187
- export const wasmdimensions_times: (a: number, b: number) => number;
188
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
189
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
190
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
191
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
192
- export const wasmtransaction_create: () => number;
193
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
194
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
195
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
196
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
197
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
198
- export const wasmtransaction_get_vsize: (a: number) => number;
199
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
200
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
201
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
202
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
203
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
204
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
205
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
206
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
207
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
208
- 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;
209
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
210
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
211
- export const wrappsbt_clone: (a: number) => number;
212
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
213
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
214
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
215
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
216
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
217
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
218
- export const wrappsbt_get_global_xpubs: (a: number) => number;
219
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
220
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
221
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
222
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
223
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
224
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
225
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
226
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
227
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
228
- export const wrappsbt_input_count: (a: number) => number;
229
- export const wrappsbt_new: (a: number, b: number) => number;
230
- export const wrappsbt_output_count: (a: number) => number;
231
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
232
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
233
- export const wrappsbt_serialize: (a: number, b: number) => void;
234
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
235
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
236
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
237
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
238
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
239
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
240
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
241
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
242
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
243
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
244
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
245
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
246
- export const wasmtransaction_input_count: (a: number) => number;
247
- export const wasmtransaction_output_count: (a: number) => number;
248
- export const wasmzcashtransaction_input_count: (a: number) => number;
249
- export const wasmzcashtransaction_output_count: (a: number) => number;
250
- export const wasmtransaction_lock_time: (a: number) => number;
251
- export const wasmtransaction_version: (a: number) => number;
252
- export const wasmzcashtransaction_lock_time: (a: number) => number;
253
- export const wasmzcashtransaction_version: (a: number) => number;
254
- export const wrappsbt_lock_time: (a: number) => number;
255
- export const wrappsbt_version: (a: number) => number;
256
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
257
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
258
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
259
- export const wrapdescriptor_descType: (a: number, b: number) => void;
260
- export const wrapdescriptor_encode: (a: number, b: number) => void;
261
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
262
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
263
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
264
- export const wrapdescriptor_hasWildcard: (a: number) => number;
265
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
266
- export const wrapdescriptor_node: (a: number, b: number) => void;
267
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
268
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
269
- export const wrapdescriptor_toString: (a: number, b: number) => void;
270
- export const wrapminiscript_encode: (a: number, b: number) => void;
271
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
272
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
273
- export const wrapminiscript_node: (a: number, b: number) => void;
274
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
275
- export const wrapminiscript_toString: (a: number, b: number) => void;
276
279
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
277
280
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
278
281
  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.12.0",
4
+ "version": "4.14.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",