@bitgo/wasm-utxo 3.0.0 → 4.0.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.
@@ -1,98 +1,8 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
5
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
6
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
7
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
8
- 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;
9
- export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
10
- export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
11
- export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
12
- export const wasmrootwalletkeys_backup_key: (a: number) => number;
13
- export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
14
- export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
15
- export const wasmrootwalletkeys_user_key: (a: number) => number;
16
- 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;
17
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
18
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
19
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
20
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
21
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
22
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
23
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
24
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
25
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
26
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
27
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
28
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
29
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
30
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
31
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
32
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
33
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
34
- export const wasmecpair_private_key: (a: number) => number;
35
- export const wasmecpair_public_key: (a: number) => number;
36
- export const wasmecpair_to_wif: (a: number, b: number) => void;
37
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
38
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
39
- export const wrapminiscript_encode: (a: number, b: number) => void;
40
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
41
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
42
- export const wrapminiscript_node: (a: number, b: number) => void;
43
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
44
- export const wrapminiscript_toString: (a: number, b: number) => void;
45
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
46
- 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;
47
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
48
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
49
- export const wrappsbt_clone: (a: number) => number;
50
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
51
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
52
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
53
- export const wrappsbt_get_global_xpubs: (a: number) => number;
54
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
55
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
56
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
57
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
58
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
59
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
60
- export const wrappsbt_input_count: (a: number) => number;
61
- export const wrappsbt_lock_time: (a: number) => number;
62
- export const wrappsbt_new: (a: number, b: number) => number;
63
- export const wrappsbt_output_count: (a: number) => number;
64
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
65
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
66
- export const wrappsbt_serialize: (a: number, b: number) => void;
67
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
68
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
69
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
70
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
71
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
72
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
73
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
74
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
75
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
76
- export const wrappsbt_version: (a: number) => number;
77
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
78
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
79
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
80
4
  export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
81
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
82
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
83
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
84
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
85
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
86
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
87
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
88
- export const wasmtransaction_create: () => number;
89
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
90
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
91
- export const wasmtransaction_get_vsize: (a: number) => number;
92
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
93
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
94
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
95
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
5
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
96
6
  export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
97
7
  export const wrapdescriptor_descType: (a: number, b: number) => void;
98
8
  export const wrapdescriptor_encode: (a: number, b: number) => void;
@@ -104,12 +14,20 @@ export const wrapdescriptor_node: (a: number, b: number) => void;
104
14
  export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
105
15
  export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
106
16
  export const wrapdescriptor_toString: (a: number, b: number) => void;
17
+ export const wrapminiscript_encode: (a: number, b: number) => void;
18
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
19
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
20
+ export const wrapminiscript_node: (a: number, b: number) => void;
21
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
22
+ export const wrapminiscript_toString: (a: number, b: number) => void;
107
23
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
108
24
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
109
25
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
26
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
110
27
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
111
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
28
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
112
29
  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;
30
+ export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
113
31
  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;
114
32
  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;
115
33
  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;
@@ -139,6 +57,7 @@ export const bitgopsbt_extract_transaction: (a: number, b: number) => void;
139
57
  export const bitgopsbt_extract_zcash_transaction: (a: number, b: number) => void;
140
58
  export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
141
59
  export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
60
+ export const bitgopsbt_from_half_signed_legacy_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
142
61
  export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
143
62
  export const bitgopsbt_get_global_xpubs: (a: number) => number;
144
63
  export const bitgopsbt_get_inputs: (a: number, b: number) => void;
@@ -178,6 +97,9 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
178
97
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
179
98
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
180
99
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
100
+ export const isInspectEnabled: () => number;
101
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
102
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
181
103
  export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
182
104
  export const wasmbip32_chain_code: (a: number) => number;
183
105
  export const wasmbip32_depth: (a: number) => number;
@@ -201,6 +123,81 @@ export const wasmbip32_private_key: (a: number) => number;
201
123
  export const wasmbip32_public_key: (a: number) => number;
202
124
  export const wasmbip32_to_base58: (a: number, b: number) => void;
203
125
  export const wasmbip32_to_wif: (a: number, b: number) => void;
126
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
127
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
128
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
129
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
130
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
131
+ export const wasmdashtransaction_input_count: (a: number) => number;
132
+ export const wasmdashtransaction_lock_time: (a: number) => number;
133
+ export const wasmdashtransaction_output_count: (a: number) => number;
134
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
135
+ export const wasmdashtransaction_version: (a: number) => number;
136
+ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
137
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
138
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
139
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
140
+ export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
141
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
142
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
143
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
144
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
145
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
146
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
147
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
148
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
149
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
150
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
151
+ 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;
152
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
153
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
154
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
155
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
156
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
157
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
158
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
159
+ export const wasmecpair_private_key: (a: number) => number;
160
+ export const wasmecpair_public_key: (a: number) => number;
161
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
162
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
163
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
164
+ export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
165
+ export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
166
+ export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
167
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
168
+ 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;
169
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
170
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
171
+ export const wrappsbt_clone: (a: number) => number;
172
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
173
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
174
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
175
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
176
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
177
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
178
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
179
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
180
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
181
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
182
+ export const wrappsbt_input_count: (a: number) => number;
183
+ export const wrappsbt_lock_time: (a: number) => number;
184
+ export const wrappsbt_new: (a: number, b: number) => number;
185
+ export const wrappsbt_output_count: (a: number) => number;
186
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
187
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
188
+ export const wrappsbt_serialize: (a: number, b: number) => void;
189
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
190
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
191
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
192
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
193
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
194
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
195
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
196
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
197
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
198
+ export const wrappsbt_version: (a: number) => number;
199
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
200
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
204
201
  export const wasmdimensions_empty: () => number;
205
202
  export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
206
203
  export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
@@ -216,13 +213,39 @@ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => num
216
213
  export const wasmdimensions_has_segwit: (a: number) => number;
217
214
  export const wasmdimensions_plus: (a: number, b: number) => number;
218
215
  export const wasmdimensions_times: (a: number, b: number) => number;
219
- export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
220
- export const isInspectEnabled: () => number;
221
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
222
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
223
- export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
224
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
225
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
216
+ export const wasmrootwalletkeys_backup_key: (a: number) => number;
217
+ export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
218
+ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
219
+ export const wasmrootwalletkeys_user_key: (a: number) => number;
220
+ 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;
221
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
222
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
223
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
224
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
225
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
226
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
227
+ export const wasmtransaction_create: () => number;
228
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
229
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
230
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
231
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
232
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
233
+ export const wasmtransaction_get_vsize: (a: number) => number;
234
+ export const wasmtransaction_input_count: (a: number) => number;
235
+ export const wasmtransaction_lock_time: (a: number) => number;
236
+ export const wasmtransaction_output_count: (a: number) => number;
237
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
238
+ export const wasmtransaction_version: (a: number) => number;
239
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
240
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
241
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
242
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
243
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
244
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
245
+ export const wasmzcashtransaction_input_count: (a: number) => number;
246
+ export const wasmzcashtransaction_output_count: (a: number) => number;
247
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
248
+ export const wasmzcashtransaction_version: (a: number) => number;
226
249
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
227
250
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
228
251
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -106,6 +106,11 @@ export type VerifyBip322TxInputParams = VerifyBip322InputParams & {
106
106
  * ```
107
107
  */
108
108
  export declare function addBip322Input(psbt: BitGoPsbt, params: AddBip322InputParams): number;
109
+ /**
110
+ * Get the BIP322 message stored at a PSBT input index.
111
+ * Returns null if no message is stored.
112
+ */
113
+ export declare function getBip322Message(psbt: BitGoPsbt, inputIndex: number): string | null;
109
114
  /**
110
115
  * Verify a single input of a BIP-0322 transaction proof
111
116
  *
@@ -68,6 +68,13 @@ export function addBip322Input(psbt, params) {
68
68
  const keys = RootWalletKeys.from(params.rootWalletKeys);
69
69
  return Bip322Namespace.add_bip322_input(psbt.wasm, params.message, params.scriptId.chain, params.scriptId.index, keys.wasm, params.signPath?.signer, params.signPath?.cosigner, params.tag);
70
70
  }
71
+ /**
72
+ * Get the BIP322 message stored at a PSBT input index.
73
+ * Returns null if no message is stored.
74
+ */
75
+ export function getBip322Message(psbt, inputIndex) {
76
+ return Bip322Namespace.get_bip322_message(psbt.wasm, inputIndex) ?? null;
77
+ }
71
78
  /**
72
79
  * Verify a single input of a BIP-0322 transaction proof
73
80
  *
@@ -98,6 +98,11 @@ export type ParseTransactionOptions = {
98
98
  export type ParseOutputsOptions = {
99
99
  payGoPubkeys?: ECPairArg[];
100
100
  };
101
+ export type HydrationUnspent = {
102
+ chain: number;
103
+ index: number;
104
+ value: bigint;
105
+ };
101
106
  export declare class BitGoPsbt implements IPsbtWithAddress {
102
107
  protected _wasm: WasmBitGoPsbt;
103
108
  protected constructor(_wasm: WasmBitGoPsbt);
@@ -136,6 +141,19 @@ export declare class BitGoPsbt implements IPsbtWithAddress {
136
141
  * @returns A BitGoPsbt instance
137
142
  */
138
143
  static fromBytes(bytes: Uint8Array, network: NetworkName): BitGoPsbt;
144
+ /**
145
+ * Convert a half-signed legacy transaction to a psbt-lite.
146
+ *
147
+ * Extracts partial signatures from scriptSig/witness and creates a PSBT
148
+ * with proper wallet metadata (bip32Derivation, scripts, witnessUtxo).
149
+ * Only supports p2sh, p2shP2wsh, and p2wsh inputs (not taproot).
150
+ *
151
+ * @param txBytes - The serialized half-signed legacy transaction
152
+ * @param network - Network name
153
+ * @param walletKeys - The wallet's root keys
154
+ * @param unspents - Chain, index, and value for each input
155
+ */
156
+ static fromHalfSignedLegacyTransaction(txBytes: Uint8Array, network: NetworkName, walletKeys: WalletKeysArg, unspents: HydrationUnspent[]): BitGoPsbt;
139
157
  /**
140
158
  * Add an input to the PSBT
141
159
  *
@@ -53,6 +53,23 @@ export class BitGoPsbt {
53
53
  const wasm = WasmBitGoPsbt.from_bytes(bytes, network);
54
54
  return new BitGoPsbt(wasm);
55
55
  }
56
+ /**
57
+ * Convert a half-signed legacy transaction to a psbt-lite.
58
+ *
59
+ * Extracts partial signatures from scriptSig/witness and creates a PSBT
60
+ * with proper wallet metadata (bip32Derivation, scripts, witnessUtxo).
61
+ * Only supports p2sh, p2shP2wsh, and p2wsh inputs (not taproot).
62
+ *
63
+ * @param txBytes - The serialized half-signed legacy transaction
64
+ * @param network - Network name
65
+ * @param walletKeys - The wallet's root keys
66
+ * @param unspents - Chain, index, and value for each input
67
+ */
68
+ static fromHalfSignedLegacyTransaction(txBytes, network, walletKeys, unspents) {
69
+ const keys = RootWalletKeys.from(walletKeys);
70
+ const wasm = WasmBitGoPsbt.from_half_signed_legacy_transaction(txBytes, network, keys.wasm, unspents);
71
+ return new BitGoPsbt(wasm);
72
+ }
56
73
  addInputAtIndex(index, txidOrOptions, voutOrScript, value, script, sequence) {
57
74
  if (typeof txidOrOptions === "string") {
58
75
  return this._wasm.add_input_at_index(index, txidOrOptions, voutOrScript, value, script, sequence);
@@ -5,7 +5,7 @@ export { outputScript, address } from "./address.js";
5
5
  export { Dimensions } from "./Dimensions.js";
6
6
  export { outputScriptTypes, inputScriptTypes, type OutputScriptType, type InputScriptType, type ScriptType, } from "./scriptType.js";
7
7
  export { ChainCode, chainCodes, assertChainCode, type Scope } from "./chains.js";
8
- export { BitGoPsbt, getWalletKeysFromPsbt, type NetworkName, type ScriptId, type ParsedInput, type ParsedOutput, type ParsedTransaction, type SignPath, type CreateEmptyOptions, type AddInputOptions, type AddOutputOptions, type AddWalletInputOptions, type AddWalletOutputOptions, type ParseTransactionOptions, type ParseOutputsOptions, } from "./BitGoPsbt.js";
8
+ export { BitGoPsbt, getWalletKeysFromPsbt, type NetworkName, type ScriptId, type ParsedInput, type ParsedOutput, type ParsedTransaction, type SignPath, type CreateEmptyOptions, type AddInputOptions, type AddOutputOptions, type AddWalletInputOptions, type AddWalletOutputOptions, type ParseTransactionOptions, type ParseOutputsOptions, type HydrationUnspent, } from "./BitGoPsbt.js";
9
9
  export { ZcashBitGoPsbt, type ZcashNetworkName, type CreateEmptyZcashOptions, } from "./ZcashBitGoPsbt.js";
10
10
  export type { PsbtBip32Derivation, PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress, PsbtWitnessUtxo, } from "../wasm/wasm_utxo.js";
11
11
  import type { ScriptType } from "./scriptType.js";
@@ -61,9 +61,30 @@ declare module "./wasm/wasm_utxo.js" {
61
61
  interface PsbtOutputDataWithAddress extends PsbtOutputData {
62
62
  address: string;
63
63
  }
64
+ /** Outpoint referencing a previous transaction output */
65
+ interface TxOutPoint {
66
+ txid: string;
67
+ vout: number;
68
+ }
69
+ /** Raw transaction input data returned by Transaction.getInputs() */
70
+ interface TxInputData {
71
+ previousOutput: TxOutPoint;
72
+ sequence: number;
73
+ scriptSig: Uint8Array;
74
+ witness: Uint8Array[];
75
+ }
76
+ /** Raw transaction output data returned by Transaction.getOutputs() */
77
+ interface TxOutputData {
78
+ script: Uint8Array;
79
+ value: bigint;
80
+ }
81
+ /** Transaction output data with resolved address */
82
+ interface TxOutputDataWithAddress extends TxOutputData {
83
+ address: string;
84
+ }
64
85
  }
65
86
  export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
66
87
  export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
67
88
  export { Psbt } from "./descriptorWallet/Psbt.js";
68
- export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
89
+ export { DashTransaction, Transaction, ZcashTransaction, type ITransaction, type ITransactionCommon, } from "./transaction.js";
69
90
  export { hasPsbtMagic, type IPsbt, type IPsbtWithAddress } from "./psbt.js";
@@ -22,5 +22,5 @@ export { getMainnet, isMainnet, isTestnet, isCoinName } from "./coinName.js";
22
22
  export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
23
23
  export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
24
24
  export { Psbt } from "./descriptorWallet/Psbt.js";
25
- export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
25
+ export { DashTransaction, Transaction, ZcashTransaction, } from "./transaction.js";
26
26
  export { hasPsbtMagic } from "./psbt.js";
@@ -1,14 +1,9 @@
1
1
  import type { PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
2
2
  import type { BIP32 } from "./bip32.js";
3
+ import type { ITransactionCommon } from "./transaction.js";
3
4
  /** Common interface for PSBT types */
4
- export interface IPsbt {
5
- inputCount(): number;
6
- outputCount(): number;
7
- getInputs(): PsbtInputData[];
8
- getOutputs(): PsbtOutputData[];
5
+ export interface IPsbt extends ITransactionCommon<PsbtInputData, PsbtOutputData> {
9
6
  getGlobalXpubs(): BIP32[];
10
- version(): number;
11
- lockTime(): number;
12
7
  unsignedTxId(): string;
13
8
  addInputAtIndex(index: number, txid: string, vout: number, value: bigint, script: Uint8Array, sequence?: number): number;
14
9
  addOutputAtIndex(index: number, script: Uint8Array, value: bigint): number;
@@ -1,10 +1,19 @@
1
- import { WasmDashTransaction, WasmTransaction, WasmZcashTransaction } from "./wasm/wasm_utxo.js";
2
- /**
3
- * Common interface for all transaction types
4
- */
5
- export interface ITransaction {
1
+ import { WasmDashTransaction, WasmTransaction, WasmZcashTransaction, type TxInputData, type TxOutputData, type TxOutputDataWithAddress } from "./wasm/wasm_utxo.js";
2
+ import type { CoinName } from "./coinName.js";
3
+ /** Common read-only interface shared by transactions and PSBTs */
4
+ export interface ITransactionCommon<TInput, TOutput> {
5
+ inputCount(): number;
6
+ outputCount(): number;
7
+ version(): number;
8
+ lockTime(): number;
9
+ getInputs(): TInput[];
10
+ getOutputs(): TOutput[];
11
+ }
12
+ /** Common interface for all transaction types */
13
+ export interface ITransaction extends ITransactionCommon<TxInputData, TxOutputData> {
6
14
  toBytes(): Uint8Array;
7
15
  getId(): string;
16
+ getOutputsWithAddress(coin: CoinName): TxOutputDataWithAddress[];
8
17
  }
9
18
  /**
10
19
  * Transaction wrapper (Bitcoin-like networks)
@@ -19,9 +28,7 @@ export declare class Transaction implements ITransaction {
19
28
  */
20
29
  static create(): Transaction;
21
30
  static fromBytes(bytes: Uint8Array): Transaction;
22
- /**
23
- * @internal Create from WASM instance directly (avoids re-parsing bytes)
24
- */
31
+ /** @internal Create from WASM instance directly (avoids re-parsing bytes) */
25
32
  static fromWasm(wasm: WasmTransaction): Transaction;
26
33
  /**
27
34
  * Add an input to the transaction
@@ -52,9 +59,14 @@ export declare class Transaction implements ITransaction {
52
59
  * @returns The virtual size in virtual bytes (vbytes)
53
60
  */
54
61
  getVSize(): number;
55
- /**
56
- * @internal
57
- */
62
+ inputCount(): number;
63
+ outputCount(): number;
64
+ version(): number;
65
+ lockTime(): number;
66
+ getInputs(): TxInputData[];
67
+ getOutputs(): TxOutputData[];
68
+ getOutputsWithAddress(coin: CoinName): TxOutputDataWithAddress[];
69
+ /** @internal */
58
70
  get wasm(): WasmTransaction;
59
71
  }
60
72
  /**
@@ -66,9 +78,7 @@ export declare class ZcashTransaction implements ITransaction {
66
78
  private _wasm;
67
79
  private constructor();
68
80
  static fromBytes(bytes: Uint8Array): ZcashTransaction;
69
- /**
70
- * @internal Create from WASM instance directly (avoids re-parsing bytes)
71
- */
81
+ /** @internal Create from WASM instance directly (avoids re-parsing bytes) */
72
82
  static fromWasm(wasm: WasmZcashTransaction): ZcashTransaction;
73
83
  toBytes(): Uint8Array;
74
84
  /**
@@ -80,9 +90,14 @@ export declare class ZcashTransaction implements ITransaction {
80
90
  * @returns The transaction ID as a hex string
81
91
  */
82
92
  getId(): string;
83
- /**
84
- * @internal
85
- */
93
+ inputCount(): number;
94
+ outputCount(): number;
95
+ version(): number;
96
+ lockTime(): number;
97
+ getInputs(): TxInputData[];
98
+ getOutputs(): TxOutputData[];
99
+ getOutputsWithAddress(coin: CoinName): TxOutputDataWithAddress[];
100
+ /** @internal */
86
101
  get wasm(): WasmZcashTransaction;
87
102
  }
88
103
  /**
@@ -94,9 +109,7 @@ export declare class DashTransaction implements ITransaction {
94
109
  private _wasm;
95
110
  private constructor();
96
111
  static fromBytes(bytes: Uint8Array): DashTransaction;
97
- /**
98
- * @internal Create from WASM instance directly (avoids re-parsing bytes)
99
- */
112
+ /** @internal Create from WASM instance directly (avoids re-parsing bytes) */
100
113
  static fromWasm(wasm: WasmDashTransaction): DashTransaction;
101
114
  toBytes(): Uint8Array;
102
115
  /**
@@ -108,8 +121,13 @@ export declare class DashTransaction implements ITransaction {
108
121
  * @returns The transaction ID as a hex string
109
122
  */
110
123
  getId(): string;
111
- /**
112
- * @internal
113
- */
124
+ inputCount(): number;
125
+ outputCount(): number;
126
+ version(): number;
127
+ lockTime(): number;
128
+ getInputs(): TxInputData[];
129
+ getOutputs(): TxOutputData[];
130
+ getOutputsWithAddress(coin: CoinName): TxOutputDataWithAddress[];
131
+ /** @internal */
114
132
  get wasm(): WasmDashTransaction;
115
133
  }