@bitgo/wasm-utxo 5.5.0 → 5.6.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.
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +35 -0
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +39 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.d.ts +16 -9
- package/dist/cjs/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.js +14 -8
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +31 -5
- package/dist/cjs/js/wasm/wasm_utxo.js +58 -5
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +169 -167
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +35 -0
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +39 -0
- package/dist/esm/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.d.ts +16 -9
- package/dist/esm/js/fixedScriptWallet/ZcashIronwoodBitGoPsbt.js +14 -8
- package/dist/esm/js/wasm/wasm_utxo.d.ts +31 -5
- package/dist/esm/js/wasm/wasm_utxo_bg.js +58 -5
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +169 -167
- package/package.json +1 -1
|
@@ -1,114 +1,37 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
4
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
6
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
7
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
8
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
11
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
12
|
+
export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
|
|
7
13
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
14
|
+
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
15
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
10
16
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const bitgopsbt_combine_ironwood_proof: (a: number, b: number, c: number, d: number) => void;
|
|
30
|
-
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
31
|
-
export const bitgopsbt_consensus_branch_id: (a: number) => number;
|
|
32
|
-
export const bitgopsbt_create_empty: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
33
|
-
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;
|
|
34
|
-
export const bitgopsbt_create_empty_zcash_at_height: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
35
|
-
export const bitgopsbt_create_empty_zcash_v6: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
36
|
-
export const bitgopsbt_create_empty_zcash_v6_at_height: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
37
|
-
export const bitgopsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
38
|
-
export const bitgopsbt_delete_kv: (a: number, b: number, c: number) => void;
|
|
39
|
-
export const bitgopsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
|
|
40
|
-
export const bitgopsbt_expiry_height: (a: number) => number;
|
|
41
|
-
export const bitgopsbt_extract_bitcoin_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
42
|
-
export const bitgopsbt_extract_dash_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
43
|
-
export const bitgopsbt_extract_half_signed_legacy_tx: (a: number, b: number) => void;
|
|
44
|
-
export const bitgopsbt_extract_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
45
|
-
export const bitgopsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
46
|
-
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
47
|
-
export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
48
|
-
export const bitgopsbt_from_half_signed_legacy_transaction: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
49
|
-
export const bitgopsbt_from_half_signed_legacy_transaction_dash: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
50
|
-
export const bitgopsbt_from_network_format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
51
|
-
export const bitgopsbt_from_network_format_dash: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
52
|
-
export const bitgopsbt_from_network_format_zcash_with_block_height: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
53
|
-
export const bitgopsbt_from_network_format_zcash_with_branch_id: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
54
|
-
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
55
|
-
export const bitgopsbt_get_global_xpubs: (a: number) => number;
|
|
56
|
-
export const bitgopsbt_get_input_key_values: (a: number, b: number, c: number) => void;
|
|
57
|
-
export const bitgopsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
58
|
-
export const bitgopsbt_get_inputs: (a: number, b: number) => void;
|
|
59
|
-
export const bitgopsbt_get_kv: (a: number, b: number, c: number) => void;
|
|
60
|
-
export const bitgopsbt_get_network_type: (a: number, b: number) => void;
|
|
61
|
-
export const bitgopsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
|
|
62
|
-
export const bitgopsbt_get_outputs: (a: number, b: number) => void;
|
|
63
|
-
export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
|
|
64
|
-
export const bitgopsbt_get_unsigned_tx: (a: number, b: number) => void;
|
|
65
|
-
export const bitgopsbt_input_count: (a: number) => number;
|
|
66
|
-
export const bitgopsbt_ironwood_pczt_bytes: (a: number, b: number) => void;
|
|
67
|
-
export const bitgopsbt_ironwood_v6_transparent_sighash: (a: number, b: number, c: number) => void;
|
|
68
|
-
export const bitgopsbt_ironwood_v6_txid: (a: number, b: number) => void;
|
|
69
|
-
export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
|
|
70
|
-
export const bitgopsbt_lock_time: (a: number) => number;
|
|
71
|
-
export const bitgopsbt_network: (a: number, b: number) => void;
|
|
72
|
-
export const bitgopsbt_output_count: (a: number) => number;
|
|
73
|
-
export const bitgopsbt_parse_outputs_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
74
|
-
export const bitgopsbt_parse_transaction_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
75
|
-
export const bitgopsbt_remove_input: (a: number, b: number, c: number) => void;
|
|
76
|
-
export const bitgopsbt_remove_output: (a: number, b: number, c: number) => void;
|
|
77
|
-
export const bitgopsbt_serialize: (a: number, b: number) => void;
|
|
78
|
-
export const bitgopsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
79
|
-
export const bitgopsbt_set_ironwood_out_ciphertext: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
80
|
-
export const bitgopsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
81
|
-
export const bitgopsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
82
|
-
export const bitgopsbt_sign_all_musig2_inputs: (a: number, b: number, c: number) => void;
|
|
83
|
-
export const bitgopsbt_sign_all_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
84
|
-
export const bitgopsbt_sign_all_wallet_inputs: (a: number, b: number, c: number) => void;
|
|
85
|
-
export const bitgopsbt_sign_ironwood_v6: (a: number, b: number, c: number, d: number) => void;
|
|
86
|
-
export const bitgopsbt_sign_musig2_input: (a: number, b: number, c: number, d: number) => void;
|
|
87
|
-
export const bitgopsbt_sign_single_input_with_privkey: (a: number, b: number, c: number, d: number) => void;
|
|
88
|
-
export const bitgopsbt_sign_single_input_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
89
|
-
export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: number) => void;
|
|
90
|
-
export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
91
|
-
export const bitgopsbt_transparent_output_unified_address: (a: number, b: number, c: number) => void;
|
|
92
|
-
export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
|
|
93
|
-
export const bitgopsbt_verify_ironwood_v6_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
94
|
-
export const bitgopsbt_verify_ironwood_v6_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
95
|
-
export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
|
|
96
|
-
export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
97
|
-
export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
98
|
-
export const bitgopsbt_version: (a: number) => number;
|
|
99
|
-
export const bitgopsbt_version_group_id: (a: number) => number;
|
|
100
|
-
export const fixedscriptwalletnamespace_address: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
101
|
-
export const fixedscriptwalletnamespace_address_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
102
|
-
export const fixedscriptwalletnamespace_chain_code_table: () => number;
|
|
103
|
-
export const fixedscriptwalletnamespace_create_op_return_script: (a: number, b: number, c: number) => void;
|
|
104
|
-
export const fixedscriptwalletnamespace_get_bitgo_key_subtypes: () => number;
|
|
105
|
-
export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
106
|
-
export const fixedscriptwalletnamespace_output_script_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
107
|
-
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
108
|
-
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
109
|
-
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
110
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
111
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
17
|
+
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
18
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
19
|
+
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
20
|
+
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
21
|
+
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
22
|
+
export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
|
|
23
|
+
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;
|
|
24
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
25
|
+
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;
|
|
26
|
+
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;
|
|
27
|
+
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;
|
|
28
|
+
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;
|
|
29
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
30
|
+
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;
|
|
31
|
+
export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
32
|
+
export const ironwood_build_witness_from_shard: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
33
|
+
export const ironwoodwitness_auth_path: (a: number, b: number) => void;
|
|
34
|
+
export const ironwoodwitness_position: (a: number) => number;
|
|
112
35
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
113
36
|
export const wasmbip32_depth: (a: number) => number;
|
|
114
37
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -131,61 +54,6 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
131
54
|
export const wasmbip32_public_key: (a: number) => number;
|
|
132
55
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
133
56
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
134
|
-
export const wasmdimensions_empty: () => number;
|
|
135
|
-
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
136
|
-
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
137
|
-
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
138
|
-
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
139
|
-
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
140
|
-
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
141
|
-
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
142
|
-
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
143
|
-
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
144
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
145
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
146
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
147
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
148
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
149
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
150
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
151
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
152
|
-
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
153
|
-
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
154
|
-
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
155
|
-
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
156
|
-
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;
|
|
157
|
-
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
158
|
-
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
159
|
-
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
160
|
-
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
161
|
-
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
162
|
-
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
163
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
164
|
-
export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
|
|
165
|
-
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
166
|
-
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
167
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
168
|
-
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
169
|
-
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
170
|
-
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
171
|
-
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
172
|
-
export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
|
|
173
|
-
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
174
|
-
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
175
|
-
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;
|
|
176
|
-
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
177
|
-
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;
|
|
178
|
-
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;
|
|
179
|
-
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;
|
|
180
|
-
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;
|
|
181
|
-
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
182
|
-
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;
|
|
183
|
-
export const ironwood_build_witness: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
184
|
-
export const ironwood_build_witness_from_shard: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
185
|
-
export const ironwoodwitness_auth_path: (a: number, b: number) => void;
|
|
186
|
-
export const ironwoodwitness_position: (a: number) => number;
|
|
187
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
188
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
189
57
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
190
58
|
export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
|
|
191
59
|
export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -206,6 +74,11 @@ export const wasmecpair_public_key: (a: number) => number;
|
|
|
206
74
|
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
207
75
|
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
208
76
|
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
77
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
78
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
79
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
80
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
81
|
+
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;
|
|
209
82
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
210
83
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
211
84
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -218,6 +91,7 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
218
91
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
219
92
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
220
93
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
94
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
221
95
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
222
96
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
223
97
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -296,6 +170,7 @@ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
|
|
|
296
170
|
export const zcashv6transaction_toBytes: (a: number, b: number) => void;
|
|
297
171
|
export const zcashv6transaction_transparentSighash: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
298
172
|
export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
|
|
173
|
+
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
299
174
|
export const wasmtransaction_input_count: (a: number) => number;
|
|
300
175
|
export const wasmtransaction_output_count: (a: number) => number;
|
|
301
176
|
export const wasmzcashtransaction_input_count: (a: number) => number;
|
|
@@ -306,12 +181,141 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
306
181
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
307
182
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
308
183
|
export const wrappsbt_version: (a: number) => number;
|
|
309
|
-
export const
|
|
310
|
-
export const
|
|
311
|
-
export const
|
|
312
|
-
export const
|
|
184
|
+
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
185
|
+
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
186
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
187
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
188
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
189
|
+
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;
|
|
190
|
+
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;
|
|
191
|
+
export const bitgopsbt_add_ironwood_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
192
|
+
export const bitgopsbt_add_ironwood_outputs: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
193
|
+
export const bitgopsbt_add_ironwood_v6_signature: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
194
|
+
export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
|
|
195
|
+
export const bitgopsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
|
|
196
|
+
export const bitgopsbt_add_output_with_address: (a: number, b: number, c: number, d: number, e: bigint) => void;
|
|
197
|
+
export const bitgopsbt_add_output_with_address_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
|
|
198
|
+
export const bitgopsbt_add_paygo_attestation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
199
|
+
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;
|
|
200
|
+
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;
|
|
201
|
+
export const bitgopsbt_add_transparent_output: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number) => void;
|
|
202
|
+
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;
|
|
203
|
+
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;
|
|
204
|
+
export const bitgopsbt_add_wallet_output: (a: number, b: number, c: number, d: number, e: bigint, f: number) => void;
|
|
205
|
+
export const bitgopsbt_add_wallet_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number) => void;
|
|
206
|
+
export const bitgopsbt_assert_sighash_all_policy: (a: number, b: number) => void;
|
|
207
|
+
export const bitgopsbt_combine_inputs: (a: number, b: number, c: number, d: number) => void;
|
|
208
|
+
export const bitgopsbt_combine_ironwood_proof: (a: number, b: number, c: number, d: number) => void;
|
|
209
|
+
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
210
|
+
export const bitgopsbt_consensus_branch_id: (a: number) => number;
|
|
211
|
+
export const bitgopsbt_create_empty: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
212
|
+
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;
|
|
213
|
+
export const bitgopsbt_create_empty_zcash_at_height: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
214
|
+
export const bitgopsbt_create_empty_zcash_v6: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
215
|
+
export const bitgopsbt_create_empty_zcash_v6_at_height: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
216
|
+
export const bitgopsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
217
|
+
export const bitgopsbt_delete_kv: (a: number, b: number, c: number) => void;
|
|
218
|
+
export const bitgopsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
|
|
219
|
+
export const bitgopsbt_expiry_height: (a: number) => number;
|
|
220
|
+
export const bitgopsbt_extract_bitcoin_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
221
|
+
export const bitgopsbt_extract_dash_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
222
|
+
export const bitgopsbt_extract_half_signed_legacy_tx: (a: number, b: number) => void;
|
|
223
|
+
export const bitgopsbt_extract_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
224
|
+
export const bitgopsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
225
|
+
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
226
|
+
export const bitgopsbt_from_bytes: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
227
|
+
export const bitgopsbt_from_half_signed_legacy_transaction: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
228
|
+
export const bitgopsbt_from_half_signed_legacy_transaction_dash: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
229
|
+
export const bitgopsbt_from_network_format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
230
|
+
export const bitgopsbt_from_network_format_dash: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
231
|
+
export const bitgopsbt_from_network_format_zcash_with_block_height: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
232
|
+
export const bitgopsbt_from_network_format_zcash_with_branch_id: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
233
|
+
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
234
|
+
export const bitgopsbt_get_global_xpubs: (a: number) => number;
|
|
235
|
+
export const bitgopsbt_get_input_key_values: (a: number, b: number, c: number) => void;
|
|
236
|
+
export const bitgopsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
237
|
+
export const bitgopsbt_get_input_sighash_types: (a: number, b: number) => void;
|
|
238
|
+
export const bitgopsbt_get_inputs: (a: number, b: number) => void;
|
|
239
|
+
export const bitgopsbt_get_kv: (a: number, b: number, c: number) => void;
|
|
240
|
+
export const bitgopsbt_get_network_type: (a: number, b: number) => void;
|
|
241
|
+
export const bitgopsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
|
|
242
|
+
export const bitgopsbt_get_outputs: (a: number, b: number) => void;
|
|
243
|
+
export const bitgopsbt_get_outputs_with_address: (a: number, b: number) => void;
|
|
244
|
+
export const bitgopsbt_get_unsigned_tx: (a: number, b: number) => void;
|
|
245
|
+
export const bitgopsbt_input_count: (a: number) => number;
|
|
246
|
+
export const bitgopsbt_ironwood_pczt_bytes: (a: number, b: number) => void;
|
|
247
|
+
export const bitgopsbt_ironwood_v6_transparent_sighash: (a: number, b: number, c: number) => void;
|
|
248
|
+
export const bitgopsbt_ironwood_v6_txid: (a: number, b: number) => void;
|
|
249
|
+
export const bitgopsbt_is_musig2_input: (a: number, b: number) => number;
|
|
250
|
+
export const bitgopsbt_lock_time: (a: number) => number;
|
|
251
|
+
export const bitgopsbt_network: (a: number, b: number) => void;
|
|
252
|
+
export const bitgopsbt_output_count: (a: number) => number;
|
|
253
|
+
export const bitgopsbt_parse_outputs_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
254
|
+
export const bitgopsbt_parse_transaction_with_wallet_keys: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
255
|
+
export const bitgopsbt_remove_input: (a: number, b: number, c: number) => void;
|
|
256
|
+
export const bitgopsbt_remove_output: (a: number, b: number, c: number) => void;
|
|
257
|
+
export const bitgopsbt_serialize: (a: number, b: number) => void;
|
|
258
|
+
export const bitgopsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
259
|
+
export const bitgopsbt_set_ironwood_out_ciphertext: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
260
|
+
export const bitgopsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
261
|
+
export const bitgopsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
262
|
+
export const bitgopsbt_sign_all_musig2_inputs: (a: number, b: number, c: number) => void;
|
|
263
|
+
export const bitgopsbt_sign_all_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
264
|
+
export const bitgopsbt_sign_all_wallet_inputs: (a: number, b: number, c: number) => void;
|
|
265
|
+
export const bitgopsbt_sign_ironwood_v6: (a: number, b: number, c: number, d: number) => void;
|
|
266
|
+
export const bitgopsbt_sign_musig2_input: (a: number, b: number, c: number, d: number) => void;
|
|
267
|
+
export const bitgopsbt_sign_single_input_with_privkey: (a: number, b: number, c: number, d: number) => void;
|
|
268
|
+
export const bitgopsbt_sign_single_input_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
269
|
+
export const bitgopsbt_sign_with_privkey: (a: number, b: number, c: number, d: number) => void;
|
|
270
|
+
export const bitgopsbt_sign_with_xpriv: (a: number, b: number, c: number, d: number) => void;
|
|
271
|
+
export const bitgopsbt_transparent_output_unified_address: (a: number, b: number, c: number) => void;
|
|
272
|
+
export const bitgopsbt_unsigned_tx_id: (a: number, b: number) => void;
|
|
273
|
+
export const bitgopsbt_verify_ironwood_v6_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
274
|
+
export const bitgopsbt_verify_ironwood_v6_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
275
|
+
export const bitgopsbt_verify_replay_protection_signature: (a: number, b: number, c: number, d: number) => void;
|
|
276
|
+
export const bitgopsbt_verify_signature_with_pub: (a: number, b: number, c: number, d: number) => void;
|
|
277
|
+
export const bitgopsbt_verify_signature_with_xpub: (a: number, b: number, c: number, d: number) => void;
|
|
278
|
+
export const bitgopsbt_version: (a: number) => number;
|
|
279
|
+
export const bitgopsbt_version_group_id: (a: number) => number;
|
|
280
|
+
export const fixedscriptwalletnamespace_address: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
281
|
+
export const fixedscriptwalletnamespace_address_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
282
|
+
export const fixedscriptwalletnamespace_chain_code_table: () => number;
|
|
283
|
+
export const fixedscriptwalletnamespace_create_op_return_script: (a: number, b: number, c: number) => void;
|
|
284
|
+
export const fixedscriptwalletnamespace_get_bitgo_key_subtypes: () => number;
|
|
285
|
+
export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
286
|
+
export const fixedscriptwalletnamespace_output_script_with_network_str: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
287
|
+
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
288
|
+
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
289
|
+
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
313
290
|
export const isInspectEnabled: () => number;
|
|
291
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
292
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
314
293
|
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
294
|
+
export const wasmdimensions_empty: () => number;
|
|
295
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
296
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
297
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
298
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
299
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
300
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
301
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
302
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
303
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
304
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
305
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
306
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
307
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
308
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
309
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
310
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
311
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
312
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
313
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
314
|
+
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
315
|
+
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
316
|
+
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
317
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
318
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
315
319
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
316
320
|
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
317
321
|
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
@@ -332,8 +336,6 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
|
|
|
332
336
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
333
337
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
334
338
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
335
|
-
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
336
|
-
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
337
339
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
338
340
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
339
341
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
@@ -610,6 +610,41 @@ export declare class BitGoPsbt<TOutput extends ParsedOutput = ParsedOutput> exte
|
|
|
610
610
|
* @returns The serialized unsigned transaction bytes (network/consensus encoding).
|
|
611
611
|
*/
|
|
612
612
|
getUnsignedTransaction(): Uint8Array;
|
|
613
|
+
/**
|
|
614
|
+
* Returns each input's declared sighash type (BIP-174 PSBT_IN_SIGHASH_TYPE),
|
|
615
|
+
* in input order.
|
|
616
|
+
*
|
|
617
|
+
* Entries are `undefined` when the input does not declare a sighash type, in
|
|
618
|
+
* which case the signer's default sighash type applies.
|
|
619
|
+
*/
|
|
620
|
+
getInputSighashTypes(): (number | undefined)[];
|
|
621
|
+
/**
|
|
622
|
+
* Asserts the sighash policy required when signing an externally supplied
|
|
623
|
+
* PSBT: every input must commit to the entire transaction.
|
|
624
|
+
*
|
|
625
|
+
* For every input this checks that
|
|
626
|
+
*
|
|
627
|
+
* 1. the declared sighash type (PSBT_IN_SIGHASH_TYPE), if present, commits
|
|
628
|
+
* to every input and every output: SIGHASH_ALL (0x01) — SIGHASH_ALL |
|
|
629
|
+
* SIGHASH_FORKID (0x41) on BCH-family coins — or SIGHASH_DEFAULT
|
|
630
|
+
* (0x00) / SIGHASH_ALL (0x01) on Taproot inputs. An absent sighash type
|
|
631
|
+
* is accepted: the signer then applies its default, which commits to
|
|
632
|
+
* the entire transaction.
|
|
633
|
+
* 2. every signature already present on the input (ECDSA partial
|
|
634
|
+
* signatures, Taproot key-path and script-path signatures) uses such a
|
|
635
|
+
* sighash type. MuSig2 partial signatures carry no sighash byte; the
|
|
636
|
+
* declared sighash type checked above governs them.
|
|
637
|
+
*
|
|
638
|
+
* SIGHASH_NONE, SIGHASH_SINGLE, SIGHASH_ANYONECANPAY, and combinations
|
|
639
|
+
* thereof leave outputs (or inputs) uncommitted, so a signature produced
|
|
640
|
+
* under one of them does not bind the signer to the transaction the signer
|
|
641
|
+
* reviewed. Callers that ingest foreign PSBTs must run this check before
|
|
642
|
+
* signing and again afterwards.
|
|
643
|
+
*
|
|
644
|
+
* @throws Error if any input declares a sighash type, or carries a
|
|
645
|
+
* signature, that does not commit to the entire transaction.
|
|
646
|
+
*/
|
|
647
|
+
assertSighashAllPolicy(): void;
|
|
613
648
|
/**
|
|
614
649
|
* Get all PSBT outputs with resolved address strings
|
|
615
650
|
*
|
|
@@ -622,6 +622,45 @@ export class BitGoPsbt extends PsbtBase {
|
|
|
622
622
|
getUnsignedTransaction() {
|
|
623
623
|
return this._wasm.get_unsigned_tx();
|
|
624
624
|
}
|
|
625
|
+
/**
|
|
626
|
+
* Returns each input's declared sighash type (BIP-174 PSBT_IN_SIGHASH_TYPE),
|
|
627
|
+
* in input order.
|
|
628
|
+
*
|
|
629
|
+
* Entries are `undefined` when the input does not declare a sighash type, in
|
|
630
|
+
* which case the signer's default sighash type applies.
|
|
631
|
+
*/
|
|
632
|
+
getInputSighashTypes() {
|
|
633
|
+
return this._wasm.get_input_sighash_types().map((sighashType) => sighashType ?? undefined);
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Asserts the sighash policy required when signing an externally supplied
|
|
637
|
+
* PSBT: every input must commit to the entire transaction.
|
|
638
|
+
*
|
|
639
|
+
* For every input this checks that
|
|
640
|
+
*
|
|
641
|
+
* 1. the declared sighash type (PSBT_IN_SIGHASH_TYPE), if present, commits
|
|
642
|
+
* to every input and every output: SIGHASH_ALL (0x01) — SIGHASH_ALL |
|
|
643
|
+
* SIGHASH_FORKID (0x41) on BCH-family coins — or SIGHASH_DEFAULT
|
|
644
|
+
* (0x00) / SIGHASH_ALL (0x01) on Taproot inputs. An absent sighash type
|
|
645
|
+
* is accepted: the signer then applies its default, which commits to
|
|
646
|
+
* the entire transaction.
|
|
647
|
+
* 2. every signature already present on the input (ECDSA partial
|
|
648
|
+
* signatures, Taproot key-path and script-path signatures) uses such a
|
|
649
|
+
* sighash type. MuSig2 partial signatures carry no sighash byte; the
|
|
650
|
+
* declared sighash type checked above governs them.
|
|
651
|
+
*
|
|
652
|
+
* SIGHASH_NONE, SIGHASH_SINGLE, SIGHASH_ANYONECANPAY, and combinations
|
|
653
|
+
* thereof leave outputs (or inputs) uncommitted, so a signature produced
|
|
654
|
+
* under one of them does not bind the signer to the transaction the signer
|
|
655
|
+
* reviewed. Callers that ingest foreign PSBTs must run this check before
|
|
656
|
+
* signing and again afterwards.
|
|
657
|
+
*
|
|
658
|
+
* @throws Error if any input declares a sighash type, or carries a
|
|
659
|
+
* signature, that does not commit to the entire transaction.
|
|
660
|
+
*/
|
|
661
|
+
assertSighashAllPolicy() {
|
|
662
|
+
this._wasm.assert_sighash_all_policy();
|
|
663
|
+
}
|
|
625
664
|
/**
|
|
626
665
|
* Get all PSBT outputs with resolved address strings
|
|
627
666
|
*
|
|
@@ -135,7 +135,9 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
135
135
|
* @param amount - note value in zatoshi
|
|
136
136
|
* @param options.anchor - 32-byte Ironwood note-commitment-tree root
|
|
137
137
|
* @param options.memo - optional 512-byte memo (defaults to the ZIP-302 "no memo" encoding)
|
|
138
|
-
* @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build)
|
|
138
|
+
* @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build). Has no
|
|
139
|
+
* effect in the normal flow: {@link sign}'s first round re-encrypts every action's
|
|
140
|
+
* `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
|
|
139
141
|
* @param options.unifiedAddress - optional full Unified Address string this output was addressed
|
|
140
142
|
* to. Its Orchard receiver must equal `recipient`. The PCZT itself only carries the raw 43-byte
|
|
141
143
|
* receiver — a lossy encoding for a multi-receiver UA, since any transparent/Sapling receiver
|
|
@@ -156,12 +158,14 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
156
158
|
* {@link addShieldedOutput}).
|
|
157
159
|
*
|
|
158
160
|
* @param outputs - one entry per recipient; `memo` defaults per-entry to the ZIP-302 "no memo"
|
|
159
|
-
* encoding, exactly as {@link addShieldedOutput}'s does
|
|
161
|
+
* encoding, exactly as {@link addShieldedOutput}'s does, and `ovk` is likewise replaced by
|
|
162
|
+
* {@link sign}'s first round
|
|
160
163
|
* @param anchor - 32-byte Ironwood note-commitment-tree root, shared by every output
|
|
161
164
|
* @returns the action index assigned to each output, in the same order as `outputs` — the
|
|
162
|
-
* orchard builder pads/reorders actions, so
|
|
163
|
-
*
|
|
164
|
-
* `
|
|
165
|
+
* orchard builder pads/reorders actions, so any caller correlating per-action data (a stored
|
|
166
|
+
* unified address, an explicit `setShieldedOutCiphertext` call) must use these indices, not the
|
|
167
|
+
* position in `outputs` — though note {@link sign}'s first round already patches every action's
|
|
168
|
+
* `out_ciphertext` with the wallet `ovk` on its own.
|
|
165
169
|
*/
|
|
166
170
|
addShieldedOutputs(outputs: Array<{
|
|
167
171
|
recipient: Uint8Array;
|
|
@@ -181,14 +185,16 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
181
185
|
* `ovk` derived from those is one neither the user nor the server can reproduce, and the resulting
|
|
182
186
|
* transaction would broadcast fine while leaving the shielded output permanently unrecoverable.
|
|
183
187
|
*
|
|
184
|
-
* Normally you do not call this directly: {@link sign} performs it
|
|
188
|
+
* Normally you do not call this directly: {@link sign} performs it for **every** action on the
|
|
189
|
+
* first signing round (idempotently — same `ovk`, same bytes).
|
|
185
190
|
*
|
|
186
191
|
* Must be called **before** signing: `out_ciphertext` is committed by the ZIP-244 sighash, so
|
|
187
192
|
* calling this after any transparent signature has been added (via
|
|
188
193
|
* {@link addTransparentSignature}) throws rather than silently invalidating that signature.
|
|
189
194
|
*
|
|
190
|
-
* @param actionIndex - index of the Ironwood action whose output to re-encrypt
|
|
191
|
-
*
|
|
195
|
+
* @param actionIndex - index of the Ironwood action whose output to re-encrypt; use an index
|
|
196
|
+
* returned by {@link addShieldedOutputs} (the orchard builder may reorder actions, so it is not
|
|
197
|
+
* necessarily the output's position in the call)
|
|
192
198
|
* @param userKey - the wallet's user root key (an xpriv)
|
|
193
199
|
* @param rootWalletKeys - the wallet's root keys, supplying the BitGo cosigner pubkey
|
|
194
200
|
*/
|
|
@@ -220,7 +226,8 @@ export declare class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
220
226
|
*
|
|
221
227
|
* If no transparent signature has been added to this PSBT yet, this is the first signing round and
|
|
222
228
|
* `key` must be the wallet's user root key: it is used with `rootWalletKeys.bitgoKey()` to derive
|
|
223
|
-
* this wallet's `ovk` and finalize `out_ciphertext` — the client-managed-`ovk`
|
|
229
|
+
* this wallet's `ovk` and finalize **every** action's `out_ciphertext` — the client-managed-`ovk`
|
|
230
|
+
* flow, multi-recipient builds included — before any
|
|
224
231
|
* sighash is computed. Once a signature exists, that step is a no-op, so a caller passes
|
|
225
232
|
* `rootWalletKeys` on every signing round unconditionally: `psbt.sign(userXpriv, rootWalletKeys)`
|
|
226
233
|
* and later `psbt.sign(bitgoXpriv, rootWalletKeys)` — only the first call actually uses it.
|
|
@@ -132,7 +132,9 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
132
132
|
* @param amount - note value in zatoshi
|
|
133
133
|
* @param options.anchor - 32-byte Ironwood note-commitment-tree root
|
|
134
134
|
* @param options.memo - optional 512-byte memo (defaults to the ZIP-302 "no memo" encoding)
|
|
135
|
-
* @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build)
|
|
135
|
+
* @param options.ovk - optional 32-byte outgoing viewing key (omit for a keyless build). Has no
|
|
136
|
+
* effect in the normal flow: {@link sign}'s first round re-encrypts every action's
|
|
137
|
+
* `out_ciphertext` under the wallet `ovk`, replacing whatever this produced
|
|
136
138
|
* @param options.unifiedAddress - optional full Unified Address string this output was addressed
|
|
137
139
|
* to. Its Orchard receiver must equal `recipient`. The PCZT itself only carries the raw 43-byte
|
|
138
140
|
* receiver — a lossy encoding for a multi-receiver UA, since any transparent/Sapling receiver
|
|
@@ -151,12 +153,14 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
151
153
|
* {@link addShieldedOutput}).
|
|
152
154
|
*
|
|
153
155
|
* @param outputs - one entry per recipient; `memo` defaults per-entry to the ZIP-302 "no memo"
|
|
154
|
-
* encoding, exactly as {@link addShieldedOutput}'s does
|
|
156
|
+
* encoding, exactly as {@link addShieldedOutput}'s does, and `ovk` is likewise replaced by
|
|
157
|
+
* {@link sign}'s first round
|
|
155
158
|
* @param anchor - 32-byte Ironwood note-commitment-tree root, shared by every output
|
|
156
159
|
* @returns the action index assigned to each output, in the same order as `outputs` — the
|
|
157
|
-
* orchard builder pads/reorders actions, so
|
|
158
|
-
*
|
|
159
|
-
* `
|
|
160
|
+
* orchard builder pads/reorders actions, so any caller correlating per-action data (a stored
|
|
161
|
+
* unified address, an explicit `setShieldedOutCiphertext` call) must use these indices, not the
|
|
162
|
+
* position in `outputs` — though note {@link sign}'s first round already patches every action's
|
|
163
|
+
* `out_ciphertext` with the wallet `ovk` on its own.
|
|
160
164
|
*/
|
|
161
165
|
addShieldedOutputs(outputs, anchor) {
|
|
162
166
|
return Array.from(this.wasm.add_ironwood_outputs(outputs.map((o) => ({
|
|
@@ -178,14 +182,16 @@ export class ZcashIronwoodBitGoPsbt extends ZcashBitGoPsbt {
|
|
|
178
182
|
* `ovk` derived from those is one neither the user nor the server can reproduce, and the resulting
|
|
179
183
|
* transaction would broadcast fine while leaving the shielded output permanently unrecoverable.
|
|
180
184
|
*
|
|
181
|
-
* Normally you do not call this directly: {@link sign} performs it
|
|
185
|
+
* Normally you do not call this directly: {@link sign} performs it for **every** action on the
|
|
186
|
+
* first signing round (idempotently — same `ovk`, same bytes).
|
|
182
187
|
*
|
|
183
188
|
* Must be called **before** signing: `out_ciphertext` is committed by the ZIP-244 sighash, so
|
|
184
189
|
* calling this after any transparent signature has been added (via
|
|
185
190
|
* {@link addTransparentSignature}) throws rather than silently invalidating that signature.
|
|
186
191
|
*
|
|
187
|
-
* @param actionIndex - index of the Ironwood action whose output to re-encrypt
|
|
188
|
-
*
|
|
192
|
+
* @param actionIndex - index of the Ironwood action whose output to re-encrypt; use an index
|
|
193
|
+
* returned by {@link addShieldedOutputs} (the orchard builder may reorder actions, so it is not
|
|
194
|
+
* necessarily the output's position in the call)
|
|
189
195
|
* @param userKey - the wallet's user root key (an xpriv)
|
|
190
196
|
* @param rootWalletKeys - the wallet's root keys, supplying the BitGo cosigner pubkey
|
|
191
197
|
*/
|