@bitgo/wasm-utxo 1.43.0 → 2.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.
Binary file
@@ -1,10 +1,103 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
5
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
6
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
7
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
8
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
9
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
10
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
11
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
12
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
13
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
14
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
15
+ export const wasmtransaction_create: () => number;
16
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
17
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
18
+ export const wasmtransaction_get_vsize: (a: number) => number;
19
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
20
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
21
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
22
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
23
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
24
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
25
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
26
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
27
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
28
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
29
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
30
+ export const wrapdescriptor_node: (a: number, b: number) => void;
31
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
32
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
33
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
34
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
4
35
  export const __wbg_messagenamespace_free: (a: number, b: number) => void;
5
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
36
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
37
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
38
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
39
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
40
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
41
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
6
42
  export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
7
43
  export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
44
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
45
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
46
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
47
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
48
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
49
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
50
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
51
+ export const wasmecpair_private_key: (a: number) => number;
52
+ export const wasmecpair_public_key: (a: number) => number;
53
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
54
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
55
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
56
+ export const wrapminiscript_encode: (a: number, b: number) => void;
57
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
58
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
59
+ export const wrapminiscript_node: (a: number, b: number) => void;
60
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
61
+ export const wrapminiscript_toString: (a: number, b: number) => void;
62
+ export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
63
+ export const wrappsbt_addInputAtIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
64
+ export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
65
+ export const wrappsbt_addOutputAtIndex: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
66
+ export const wrappsbt_clone: (a: number) => number;
67
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
68
+ export const wrappsbt_extractTransaction: (a: number, b: number) => void;
69
+ export const wrappsbt_finalize: (a: number, b: number) => void;
70
+ export const wrappsbt_getInputs: (a: number, b: number) => void;
71
+ export const wrappsbt_getOutputs: (a: number, b: number) => void;
72
+ export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
73
+ export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
74
+ export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
75
+ export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
76
+ export const wrappsbt_inputCount: (a: number) => number;
77
+ export const wrappsbt_lockTime: (a: number) => number;
78
+ export const wrappsbt_new: (a: number, b: number) => number;
79
+ export const wrappsbt_outputCount: (a: number) => number;
80
+ export const wrappsbt_removeInput: (a: number, b: number, c: number) => void;
81
+ export const wrappsbt_removeOutput: (a: number, b: number, c: number) => void;
82
+ export const wrappsbt_serialize: (a: number, b: number) => void;
83
+ export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
84
+ export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
85
+ export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
86
+ export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
87
+ export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
88
+ export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
89
+ export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
90
+ export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
91
+ export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
92
+ export const wrappsbt_version: (a: number) => number;
93
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
94
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
95
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
96
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
97
+ 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;
98
+ export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
99
+ export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
100
+ export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
8
101
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
9
102
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
10
103
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
@@ -13,22 +106,26 @@ export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number,
13
106
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
14
107
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
15
108
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
16
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
17
109
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
18
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
19
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
110
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
20
111
  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;
21
112
  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;
22
113
  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;
23
114
  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;
24
115
  export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
25
116
  export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
117
+ export const bitgopsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number) => void;
26
118
  export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
119
+ export const bitgopsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
27
120
  export const bitgopsbt_add_output_with_address: (a: number, b: number, c: number, d: number, e: bigint) => void;
121
+ export const bitgopsbt_add_output_with_address_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
28
122
  export const bitgopsbt_add_paygo_attestation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
29
123
  export const bitgopsbt_add_replay_protection_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
124
+ export const bitgopsbt_add_replay_protection_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: bigint, i: number, j: number, k: number) => void;
30
125
  export const bitgopsbt_add_wallet_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => void;
126
+ export const bitgopsbt_add_wallet_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => void;
31
127
  export const bitgopsbt_add_wallet_output: (a: number, b: number, c: number, d: number, e: bigint, f: number) => void;
128
+ export const bitgopsbt_add_wallet_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number) => void;
32
129
  export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
33
130
  export const bitgopsbt_create_empty: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
34
131
  export const bitgopsbt_create_empty_zcash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
@@ -53,6 +150,8 @@ export const bitgopsbt_network: (a: number, b: number) => void;
53
150
  export const bitgopsbt_output_count: (a: number) => number;
54
151
  export const bitgopsbt_parse_outputs_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
55
152
  export const bitgopsbt_parse_transaction_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
153
+ export const bitgopsbt_remove_input: (a: number, b: number, c: number) => void;
154
+ export const bitgopsbt_remove_output: (a: number, b: number, c: number) => void;
56
155
  export const bitgopsbt_serialize: (a: number, b: number) => void;
57
156
  export const bitgopsbt_sign_all_musig2_inputs: (a: number, b: number, c: number) => void;
58
157
  export const bitgopsbt_sign_all_replay_protection_inputs: (a: number, b: number, c: number) => void;
@@ -76,8 +175,8 @@ export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c:
76
175
  export const fixedscriptwalletnamespace_output_script_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
77
176
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
78
177
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
79
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
80
- 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;
178
+ export const isInspectEnabled: () => number;
179
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
81
180
  export const wasmbip32_chain_code: (a: number) => number;
82
181
  export const wasmbip32_depth: (a: number) => number;
83
182
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -100,22 +199,6 @@ export const wasmbip32_private_key: (a: number) => number;
100
199
  export const wasmbip32_public_key: (a: number) => number;
101
200
  export const wasmbip32_to_base58: (a: number, b: number) => void;
102
201
  export const wasmbip32_to_wif: (a: number, b: number) => void;
103
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
104
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
105
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
106
- export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
107
- export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
108
- export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
109
- export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
110
- export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
111
- export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
112
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
113
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
114
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
115
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
116
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
117
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
118
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
119
202
  export const wasmdimensions_empty: () => number;
120
203
  export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
121
204
  export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
@@ -131,77 +214,12 @@ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => num
131
214
  export const wasmdimensions_has_segwit: (a: number) => number;
132
215
  export const wasmdimensions_plus: (a: number, b: number) => number;
133
216
  export const wasmdimensions_times: (a: number, b: number) => number;
134
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
135
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
136
- export const wasmtransaction_create: () => number;
137
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
138
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
139
- export const wasmtransaction_get_vsize: (a: number) => number;
140
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
141
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
142
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
143
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
144
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
145
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
146
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
147
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
148
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
149
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
150
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
151
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
152
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
153
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
154
- export const wasmecpair_private_key: (a: number) => number;
155
- export const wasmecpair_public_key: (a: number) => number;
156
- export const wasmecpair_to_wif: (a: number, b: number) => void;
157
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
158
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
159
- export const wrappsbt_addInput: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
160
- export const wrappsbt_addOutput: (a: number, b: number, c: number, d: bigint) => number;
161
- export const wrappsbt_clone: (a: number) => number;
162
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
163
- export const wrappsbt_extractTransaction: (a: number, b: number) => void;
164
- export const wrappsbt_finalize: (a: number, b: number) => void;
165
- export const wrappsbt_getInputs: (a: number, b: number) => void;
166
- export const wrappsbt_getOutputs: (a: number, b: number) => void;
167
- export const wrappsbt_getOutputsWithAddress: (a: number, b: number, c: number, d: number) => void;
168
- export const wrappsbt_getPartialSignatures: (a: number, b: number, c: number) => void;
169
- export const wrappsbt_getUnsignedTx: (a: number, b: number) => void;
170
- export const wrappsbt_hasPartialSignatures: (a: number, b: number, c: number) => void;
171
- export const wrappsbt_inputCount: (a: number) => number;
172
- export const wrappsbt_lockTime: (a: number) => number;
173
- export const wrappsbt_new: (a: number, b: number) => number;
174
- export const wrappsbt_outputCount: (a: number) => number;
175
- export const wrappsbt_serialize: (a: number, b: number) => void;
176
- export const wrappsbt_signAll: (a: number, b: number, c: number) => void;
177
- export const wrappsbt_signAllWithEcpair: (a: number, b: number, c: number) => void;
178
- export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
179
- export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
180
- export const wrappsbt_unsignedTxId: (a: number, b: number) => void;
181
- export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
182
- export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
183
- export const wrappsbt_validateSignatureAtInput: (a: number, b: number, c: number, d: number, e: number) => void;
184
- export const wrappsbt_verifySignatureWithKey: (a: number, b: number, c: number, d: number) => void;
185
- export const wrappsbt_version: (a: number) => number;
186
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
187
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
188
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
189
- export const wrapdescriptor_descType: (a: number, b: number) => void;
190
- export const wrapdescriptor_encode: (a: number, b: number) => void;
191
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
192
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
193
- export const wrapdescriptor_hasWildcard: (a: number) => number;
194
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
195
- export const wrapdescriptor_node: (a: number, b: number) => void;
196
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
197
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
198
- export const wrapdescriptor_toString: (a: number, b: number) => void;
199
- export const wrapminiscript_encode: (a: number, b: number) => void;
200
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
201
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
202
- export const wrapminiscript_node: (a: number, b: number) => void;
203
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
204
- export const wrapminiscript_toString: (a: number, b: number) => void;
217
+ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
218
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
219
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
220
+ export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
221
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
222
+ export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
205
223
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
206
224
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
207
225
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -1,5 +1,5 @@
1
1
  import { BitGoPsbt as WasmBitGoPsbt, type PsbtInputData, type PsbtOutputData, type PsbtOutputDataWithAddress } from "../wasm/wasm_utxo.js";
2
- import type { IPsbtIntrospectionWithAddress } from "../psbt.js";
2
+ import type { IPsbtWithAddress } from "../psbt.js";
3
3
  import { type WalletKeysArg } from "./RootWalletKeys.js";
4
4
  import { type ReplayProtectionArg } from "./ReplayProtection.js";
5
5
  import { type BIP32Arg } from "../bip32.js";
@@ -98,7 +98,7 @@ export type ParseTransactionOptions = {
98
98
  export type ParseOutputsOptions = {
99
99
  payGoPubkeys?: ECPairArg[];
100
100
  };
101
- export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
101
+ export declare class BitGoPsbt implements IPsbtWithAddress {
102
102
  protected _wasm: WasmBitGoPsbt;
103
103
  protected constructor(_wasm: WasmBitGoPsbt);
104
104
  /**
@@ -155,6 +155,8 @@ export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
155
155
  * }, outputScript);
156
156
  * ```
157
157
  */
158
+ addInputAtIndex(index: number, txid: string, vout: number, value: bigint, script: Uint8Array, sequence?: number): number;
159
+ addInputAtIndex(index: number, options: AddInputOptions, script: Uint8Array): number;
158
160
  addInput(options: AddInputOptions, script: Uint8Array): number;
159
161
  /**
160
162
  * Add an output to the PSBT
@@ -168,41 +170,11 @@ export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
168
170
  * const outputIndex = psbt.addOutput(outputScript, 50000n);
169
171
  * ```
170
172
  */
173
+ addOutputAtIndex(index: number, script: Uint8Array, value: bigint): number;
174
+ addOutputAtIndex(index: number, address: string, value: bigint): number;
175
+ addOutputAtIndex(index: number, options: AddOutputOptions): number;
171
176
  addOutput(script: Uint8Array, value: bigint): number;
172
- /**
173
- * Add an output to the PSBT by address
174
- *
175
- * @param address - The destination address
176
- * @param value - Value in satoshis
177
- * @returns The index of the newly added output
178
- *
179
- * @example
180
- * ```typescript
181
- * const outputIndex = psbt.addOutput("bc1q...", 50000n);
182
- * ```
183
- */
184
177
  addOutput(address: string, value: bigint): number;
185
- /**
186
- * Add an output to the PSBT
187
- *
188
- * @param options - Output options (script or address, and value)
189
- * @returns The index of the newly added output
190
- *
191
- * @example
192
- * ```typescript
193
- * // Using script
194
- * const outputIndex = psbt.addOutput({
195
- * script: outputScript,
196
- * value: 50000n,
197
- * });
198
- *
199
- * // Using address
200
- * const outputIndex = psbt.addOutput({
201
- * address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
202
- * value: 50000n,
203
- * });
204
- * ```
205
- */
206
178
  addOutput(options: AddOutputOptions): number;
207
179
  /**
208
180
  * Add a wallet input with full PSBT metadata
@@ -243,6 +215,7 @@ export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
243
215
  * );
244
216
  * ```
245
217
  */
218
+ addWalletInputAtIndex(index: number, inputOptions: AddInputOptions, walletKeys: WalletKeysArg, walletOptions: AddWalletInputOptions): number;
246
219
  addWalletInput(inputOptions: AddInputOptions, walletKeys: WalletKeysArg, walletOptions: AddWalletInputOptions): number;
247
220
  /**
248
221
  * Add a wallet output with full PSBT metadata
@@ -274,6 +247,7 @@ export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
274
247
  * });
275
248
  * ```
276
249
  */
250
+ addWalletOutputAtIndex(index: number, walletKeys: WalletKeysArg, options: AddWalletOutputOptions): number;
277
251
  addWalletOutput(walletKeys: WalletKeysArg, options: AddWalletOutputOptions): number;
278
252
  /**
279
253
  * Add a replay protection input to the PSBT
@@ -294,22 +268,21 @@ export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
294
268
  * );
295
269
  * ```
296
270
  */
271
+ addReplayProtectionInputAtIndex(index: number, inputOptions: AddInputOptions, key: ECPairArg): number;
297
272
  addReplayProtectionInput(inputOptions: AddInputOptions, key: ECPairArg): number;
273
+ removeInput(index: number): void;
274
+ removeOutput(index: number): void;
298
275
  /**
299
276
  * Get the unsigned transaction ID
300
277
  * @returns The unsigned transaction ID
301
278
  */
302
- unsignedTxid(): string;
279
+ unsignedTxId(): string;
303
280
  /**
304
281
  * Get the transaction version
305
282
  * @returns The transaction version number
306
283
  */
307
- get version(): number;
308
- /**
309
- * Get the transaction lock time
310
- * @returns The transaction lock time
311
- */
312
- get lockTime(): number;
284
+ version(): number;
285
+ lockTime(): number;
313
286
  /**
314
287
  * Parse transaction with wallet keys to identify wallet inputs/outputs
315
288
  * @param walletKeys - The wallet keys to use for identification
@@ -584,12 +557,8 @@ export declare class BitGoPsbt implements IPsbtIntrospectionWithAddress {
584
557
  * Get the number of inputs in the PSBT
585
558
  * @returns The number of inputs
586
559
  */
587
- get inputCount(): number;
588
- /**
589
- * Get the number of outputs in the PSBT
590
- * @returns The number of outputs
591
- */
592
- get outputCount(): number;
560
+ inputCount(): number;
561
+ outputCount(): number;
593
562
  /**
594
563
  * Get all PSBT inputs as an array
595
564
  *
@@ -53,28 +53,35 @@ export class BitGoPsbt {
53
53
  const wasm = WasmBitGoPsbt.from_bytes(bytes, network);
54
54
  return new BitGoPsbt(wasm);
55
55
  }
56
- /**
57
- * Add an input to the PSBT
58
- *
59
- * This adds a transaction input and corresponding PSBT input metadata.
60
- * The witness_utxo is automatically populated for modern signing compatibility.
61
- *
62
- * @param options - Input options (txid, vout, value, sequence)
63
- * @param script - Output script of the UTXO being spent
64
- * @returns The index of the newly added input
65
- *
66
- * @example
67
- * ```typescript
68
- * const inputIndex = psbt.addInput({
69
- * txid: "abc123...",
70
- * vout: 0,
71
- * value: 100000n,
72
- * }, outputScript);
73
- * ```
74
- */
56
+ addInputAtIndex(index, txidOrOptions, voutOrScript, value, script, sequence) {
57
+ if (typeof txidOrOptions === "string") {
58
+ return this._wasm.add_input_at_index(index, txidOrOptions, voutOrScript, value, script, sequence);
59
+ }
60
+ const options = txidOrOptions;
61
+ return this._wasm.add_input_at_index(index, options.txid, options.vout, options.value, voutOrScript, options.sequence, options.prevTx);
62
+ }
75
63
  addInput(options, script) {
76
64
  return this._wasm.add_input(options.txid, options.vout, options.value, script, options.sequence, options.prevTx);
77
65
  }
66
+ addOutputAtIndex(index, scriptOrOptions, value) {
67
+ if (scriptOrOptions instanceof Uint8Array || typeof scriptOrOptions === "string") {
68
+ if (value === undefined) {
69
+ throw new Error("Value is required when passing a script or address");
70
+ }
71
+ if (scriptOrOptions instanceof Uint8Array) {
72
+ return this._wasm.add_output_at_index(index, scriptOrOptions, value);
73
+ }
74
+ return this._wasm.add_output_with_address_at_index(index, scriptOrOptions, value);
75
+ }
76
+ const options = scriptOrOptions;
77
+ if ("script" in options) {
78
+ return this._wasm.add_output_at_index(index, options.script, options.value);
79
+ }
80
+ if ("address" in options) {
81
+ return this._wasm.add_output_with_address_at_index(index, options.address, options.value);
82
+ }
83
+ throw new Error("Invalid output options");
84
+ }
78
85
  addOutput(scriptOrOptions, value) {
79
86
  if (scriptOrOptions instanceof Uint8Array || typeof scriptOrOptions === "string") {
80
87
  if (value === undefined) {
@@ -133,6 +140,10 @@ export class BitGoPsbt {
133
140
  * );
134
141
  * ```
135
142
  */
143
+ addWalletInputAtIndex(index, inputOptions, walletKeys, walletOptions) {
144
+ const keys = RootWalletKeys.from(walletKeys);
145
+ return this._wasm.add_wallet_input_at_index(index, inputOptions.txid, inputOptions.vout, inputOptions.value, keys.wasm, walletOptions.scriptId.chain, walletOptions.scriptId.index, walletOptions.signPath?.signer, walletOptions.signPath?.cosigner, inputOptions.sequence, inputOptions.prevTx);
146
+ }
136
147
  addWalletInput(inputOptions, walletKeys, walletOptions) {
137
148
  const keys = RootWalletKeys.from(walletKeys);
138
149
  return this._wasm.add_wallet_input(inputOptions.txid, inputOptions.vout, inputOptions.value, keys.wasm, walletOptions.scriptId.chain, walletOptions.scriptId.index, walletOptions.signPath?.signer, walletOptions.signPath?.cosigner, inputOptions.sequence, inputOptions.prevTx);
@@ -167,6 +178,10 @@ export class BitGoPsbt {
167
178
  * });
168
179
  * ```
169
180
  */
181
+ addWalletOutputAtIndex(index, walletKeys, options) {
182
+ const keys = RootWalletKeys.from(walletKeys);
183
+ return this._wasm.add_wallet_output_at_index(index, options.chain, options.index, options.value, keys.wasm);
184
+ }
170
185
  addWalletOutput(walletKeys, options) {
171
186
  const keys = RootWalletKeys.from(walletKeys);
172
187
  return this._wasm.add_wallet_output(options.chain, options.index, options.value, keys.wasm);
@@ -190,29 +205,35 @@ export class BitGoPsbt {
190
205
  * );
191
206
  * ```
192
207
  */
208
+ addReplayProtectionInputAtIndex(index, inputOptions, key) {
209
+ const ecpair = ECPair.from(key);
210
+ return this._wasm.add_replay_protection_input_at_index(index, ecpair.wasm, inputOptions.txid, inputOptions.vout, inputOptions.value, inputOptions.sequence, inputOptions.prevTx);
211
+ }
193
212
  addReplayProtectionInput(inputOptions, key) {
194
213
  const ecpair = ECPair.from(key);
195
214
  return this._wasm.add_replay_protection_input(ecpair.wasm, inputOptions.txid, inputOptions.vout, inputOptions.value, inputOptions.sequence, inputOptions.prevTx);
196
215
  }
216
+ removeInput(index) {
217
+ this._wasm.remove_input(index);
218
+ }
219
+ removeOutput(index) {
220
+ this._wasm.remove_output(index);
221
+ }
197
222
  /**
198
223
  * Get the unsigned transaction ID
199
224
  * @returns The unsigned transaction ID
200
225
  */
201
- unsignedTxid() {
226
+ unsignedTxId() {
202
227
  return this._wasm.unsigned_txid();
203
228
  }
204
229
  /**
205
230
  * Get the transaction version
206
231
  * @returns The transaction version number
207
232
  */
208
- get version() {
233
+ version() {
209
234
  return this._wasm.version();
210
235
  }
211
- /**
212
- * Get the transaction lock time
213
- * @returns The transaction lock time
214
- */
215
- get lockTime() {
236
+ lockTime() {
216
237
  return this._wasm.lock_time();
217
238
  }
218
239
  /**
@@ -538,14 +559,10 @@ export class BitGoPsbt {
538
559
  * Get the number of inputs in the PSBT
539
560
  * @returns The number of inputs
540
561
  */
541
- get inputCount() {
562
+ inputCount() {
542
563
  return this._wasm.input_count();
543
564
  }
544
- /**
545
- * Get the number of outputs in the PSBT
546
- * @returns The number of outputs
547
- */
548
- get outputCount() {
565
+ outputCount() {
549
566
  return this._wasm.output_count();
550
567
  }
551
568
  /**
@@ -82,6 +82,10 @@ declare module "./wasm/wasm_utxo.js" {
82
82
  validateSignatureAtInput(inputIndex: number, pubkey: Uint8Array): boolean;
83
83
  verifySignatureWithKey(inputIndex: number, key: WasmBIP32): boolean;
84
84
  extractTransaction(): WasmTransaction;
85
+ addInputAtIndex(index: number, txid: string, vout: number, value: bigint, script: Uint8Array, sequence?: number): number;
86
+ addOutputAtIndex(index: number, script: Uint8Array, value: bigint): number;
87
+ removeInput(index: number): void;
88
+ removeOutput(index: number): void;
85
89
  unsignedTxId(): string;
86
90
  lockTime(): number;
87
91
  version(): number;
@@ -91,4 +95,4 @@ export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
91
95
  export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
92
96
  export { WrapPsbt as Psbt } from "./wasm/wasm_utxo.js";
93
97
  export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
94
- export { hasPsbtMagic, type IPsbtIntrospection, type IPsbtIntrospectionWithAddress, } from "./psbt.js";
98
+ export { hasPsbtMagic, type IPsbt, type IPsbtWithAddress } from "./psbt.js";
@@ -23,4 +23,4 @@ export { WrapDescriptor as Descriptor } from "./wasm/wasm_utxo.js";
23
23
  export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
24
24
  export { WrapPsbt as Psbt } from "./wasm/wasm_utxo.js";
25
25
  export { DashTransaction, Transaction, ZcashTransaction } from "./transaction.js";
26
- export { hasPsbtMagic, } from "./psbt.js";
26
+ export { hasPsbtMagic } from "./psbt.js";