@bitgo/wasm-utxo 4.16.0 → 4.18.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 +13 -0
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +15 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashBitGoPsbt.d.ts +10 -0
- package/dist/cjs/js/fixedScriptWallet/ZcashBitGoPsbt.js +14 -0
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +24 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +63 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +51 -48
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +13 -0
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +15 -0
- package/dist/esm/js/fixedScriptWallet/ZcashBitGoPsbt.d.ts +10 -0
- package/dist/esm/js/fixedScriptWallet/ZcashBitGoPsbt.js +15 -1
- package/dist/esm/js/wasm/wasm_utxo.d.ts +24 -0
- package/dist/esm/js/wasm/wasm_utxo.js +1 -1
- package/dist/esm/js/wasm/wasm_utxo_bg.js +62 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +51 -48
- package/package.json +1 -1
|
@@ -546,6 +546,19 @@ export declare class BitGoPsbt extends PsbtBase<WasmBitGoPsbt> implements IPsbtW
|
|
|
546
546
|
* ```
|
|
547
547
|
*/
|
|
548
548
|
combineMusig2Nonces(sourcePsbt: BitGoPsbt): void;
|
|
549
|
+
/**
|
|
550
|
+
* Merge all input fields from a raw PSBT (bytes) into this PSBT.
|
|
551
|
+
*
|
|
552
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
553
|
+
* bypassing network-specific validation (e.g. ZCash consensusBranchId), so the
|
|
554
|
+
* source may be a stripped PSBT that lacks those fields.
|
|
555
|
+
*
|
|
556
|
+
* Copies per input: partial_sigs, tap_key_sig, tap_script_sigs, proprietary.
|
|
557
|
+
*
|
|
558
|
+
* @param otherPsbtBytes - Raw bytes of the PSBT to merge signatures from
|
|
559
|
+
* @throws Error if PSBT parsing fails or input counts don't match
|
|
560
|
+
*/
|
|
561
|
+
combineInputs(otherPsbtBytes: Uint8Array): void;
|
|
549
562
|
/**
|
|
550
563
|
* Finalize all inputs in the PSBT
|
|
551
564
|
*
|
|
@@ -543,6 +543,21 @@ class BitGoPsbt extends psbtBase_js_1.PsbtBase {
|
|
|
543
543
|
combineMusig2Nonces(sourcePsbt) {
|
|
544
544
|
this._wasm.combine_musig2_nonces(sourcePsbt.wasm);
|
|
545
545
|
}
|
|
546
|
+
/**
|
|
547
|
+
* Merge all input fields from a raw PSBT (bytes) into this PSBT.
|
|
548
|
+
*
|
|
549
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
550
|
+
* bypassing network-specific validation (e.g. ZCash consensusBranchId), so the
|
|
551
|
+
* source may be a stripped PSBT that lacks those fields.
|
|
552
|
+
*
|
|
553
|
+
* Copies per input: partial_sigs, tap_key_sig, tap_script_sigs, proprietary.
|
|
554
|
+
*
|
|
555
|
+
* @param otherPsbtBytes - Raw bytes of the PSBT to merge signatures from
|
|
556
|
+
* @throws Error if PSBT parsing fails or input counts don't match
|
|
557
|
+
*/
|
|
558
|
+
combineInputs(otherPsbtBytes) {
|
|
559
|
+
this._wasm.combine_inputs(otherPsbtBytes);
|
|
560
|
+
}
|
|
546
561
|
/**
|
|
547
562
|
* Finalize all inputs in the PSBT
|
|
548
563
|
*
|
|
@@ -155,6 +155,16 @@ export declare class ZcashBitGoPsbt extends BitGoPsbt {
|
|
|
155
155
|
* @returns The expiry height (0 if not set)
|
|
156
156
|
*/
|
|
157
157
|
get expiryHeight(): number;
|
|
158
|
+
/**
|
|
159
|
+
* Get the Zcash consensus branch ID stored in the PSBT proprietary map.
|
|
160
|
+
* Returns undefined for v5 PSBTs or PSBTs without the key.
|
|
161
|
+
*/
|
|
162
|
+
get consensusBranchId(): number | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
165
|
+
* Returns undefined if `height` is before Overwinter activation.
|
|
166
|
+
*/
|
|
167
|
+
static branchIdForHeight(network: ZcashNetworkName, height: number): number | undefined;
|
|
158
168
|
/**
|
|
159
169
|
* Extract the final Zcash transaction from a finalized PSBT
|
|
160
170
|
*
|
|
@@ -173,6 +173,20 @@ class ZcashBitGoPsbt extends BitGoPsbt_js_1.BitGoPsbt {
|
|
|
173
173
|
get expiryHeight() {
|
|
174
174
|
return this.wasm.expiry_height();
|
|
175
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Get the Zcash consensus branch ID stored in the PSBT proprietary map.
|
|
178
|
+
* Returns undefined for v5 PSBTs or PSBTs without the key.
|
|
179
|
+
*/
|
|
180
|
+
get consensusBranchId() {
|
|
181
|
+
return this.wasm.consensus_branch_id();
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
185
|
+
* Returns undefined if `height` is before Overwinter activation.
|
|
186
|
+
*/
|
|
187
|
+
static branchIdForHeight(network, height) {
|
|
188
|
+
return (0, wasm_utxo_js_1.zcash_branch_id_for_height)(network, height);
|
|
189
|
+
}
|
|
176
190
|
/**
|
|
177
191
|
* Extract the final Zcash transaction from a finalized PSBT
|
|
178
192
|
*
|
|
@@ -159,6 +159,17 @@ export class BitGoPsbt {
|
|
|
159
159
|
add_wallet_input_at_index(index: number, txid: string, vout: number, value: bigint, wallet_keys: WasmRootWalletKeys, chain: number, derivation_index: number, signer?: string | null, cosigner?: string | null, sequence?: number | null, prev_tx?: Uint8Array | null): number;
|
|
160
160
|
add_wallet_output(chain: number, index: number, value: bigint, wallet_keys: WasmRootWalletKeys): number;
|
|
161
161
|
add_wallet_output_at_index(index: number, chain: number, derivation_index: number, value: bigint, wallet_keys: WasmRootWalletKeys): number;
|
|
162
|
+
/**
|
|
163
|
+
* Merge all input fields from a raw PSBT (given as bytes) into this PSBT.
|
|
164
|
+
*
|
|
165
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
166
|
+
* bypassing any network-specific validation, so the source may be a partial
|
|
167
|
+
* PSBT that lacks fields like ZecConsensusBranchId.
|
|
168
|
+
*
|
|
169
|
+
* # Errors
|
|
170
|
+
* Returns error if PSBT parsing fails or input counts don't match
|
|
171
|
+
*/
|
|
172
|
+
combine_inputs(other_bytes: Uint8Array): void;
|
|
162
173
|
/**
|
|
163
174
|
* Combine/merge data from another PSBT into this one
|
|
164
175
|
*
|
|
@@ -176,6 +187,10 @@ export class BitGoPsbt {
|
|
|
176
187
|
* Returns error if networks don't match
|
|
177
188
|
*/
|
|
178
189
|
combine_musig2_nonces(source_psbt: BitGoPsbt): void;
|
|
190
|
+
/**
|
|
191
|
+
* Get the Zcash consensus branch ID from the PSBT proprietary map (returns None for non-Zcash PSBTs)
|
|
192
|
+
*/
|
|
193
|
+
consensus_branch_id(): number | undefined;
|
|
179
194
|
/**
|
|
180
195
|
* Create an empty PSBT for the given network with wallet keys
|
|
181
196
|
*
|
|
@@ -1597,3 +1612,12 @@ export function parsePsbtToJson(psbt_bytes: Uint8Array, coin_name: string): stri
|
|
|
1597
1612
|
* - The network name is unknown
|
|
1598
1613
|
*/
|
|
1599
1614
|
export function parseTxToJson(tx_bytes: Uint8Array, coin_name: string): string;
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
1618
|
+
*
|
|
1619
|
+
* `network`: "zcash" / "zec" for mainnet, "zcashTest" / "tzec" for testnet.
|
|
1620
|
+
* Returns `None` if `height` is before Overwinter activation.
|
|
1621
|
+
* Throws if `network` is not a recognised Zcash network name.
|
|
1622
|
+
*/
|
|
1623
|
+
export function zcash_branch_id_for_height(network: string, height: number): number | undefined;
|
|
@@ -772,6 +772,32 @@ class BitGoPsbt {
|
|
|
772
772
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
|
+
/**
|
|
776
|
+
* Merge all input fields from a raw PSBT (given as bytes) into this PSBT.
|
|
777
|
+
*
|
|
778
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
779
|
+
* bypassing any network-specific validation, so the source may be a partial
|
|
780
|
+
* PSBT that lacks fields like ZecConsensusBranchId.
|
|
781
|
+
*
|
|
782
|
+
* # Errors
|
|
783
|
+
* Returns error if PSBT parsing fails or input counts don't match
|
|
784
|
+
* @param {Uint8Array} other_bytes
|
|
785
|
+
*/
|
|
786
|
+
combine_inputs(other_bytes) {
|
|
787
|
+
try {
|
|
788
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
789
|
+
const ptr0 = passArray8ToWasm0(other_bytes, wasm.__wbindgen_export);
|
|
790
|
+
const len0 = WASM_VECTOR_LEN;
|
|
791
|
+
wasm.bitgopsbt_combine_inputs(retptr, this.__wbg_ptr, ptr0, len0);
|
|
792
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
793
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
794
|
+
if (r1) {
|
|
795
|
+
throw takeObject(r0);
|
|
796
|
+
}
|
|
797
|
+
} finally {
|
|
798
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
775
801
|
/**
|
|
776
802
|
* Combine/merge data from another PSBT into this one
|
|
777
803
|
*
|
|
@@ -803,6 +829,14 @@ class BitGoPsbt {
|
|
|
803
829
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
804
830
|
}
|
|
805
831
|
}
|
|
832
|
+
/**
|
|
833
|
+
* Get the Zcash consensus branch ID from the PSBT proprietary map (returns None for non-Zcash PSBTs)
|
|
834
|
+
* @returns {number | undefined}
|
|
835
|
+
*/
|
|
836
|
+
consensus_branch_id() {
|
|
837
|
+
const ret = wasm.bitgopsbt_consensus_branch_id(this.__wbg_ptr);
|
|
838
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
839
|
+
}
|
|
806
840
|
/**
|
|
807
841
|
* Create an empty PSBT for the given network with wallet keys
|
|
808
842
|
*
|
|
@@ -6231,6 +6265,35 @@ function parseTxToJson(tx_bytes, coin_name) {
|
|
|
6231
6265
|
}
|
|
6232
6266
|
exports.parseTxToJson = parseTxToJson;
|
|
6233
6267
|
|
|
6268
|
+
/**
|
|
6269
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
6270
|
+
*
|
|
6271
|
+
* `network`: "zcash" / "zec" for mainnet, "zcashTest" / "tzec" for testnet.
|
|
6272
|
+
* Returns `None` if `height` is before Overwinter activation.
|
|
6273
|
+
* Throws if `network` is not a recognised Zcash network name.
|
|
6274
|
+
* @param {string} network
|
|
6275
|
+
* @param {number} height
|
|
6276
|
+
* @returns {number | undefined}
|
|
6277
|
+
*/
|
|
6278
|
+
function zcash_branch_id_for_height(network, height) {
|
|
6279
|
+
try {
|
|
6280
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
6281
|
+
const ptr0 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
6282
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6283
|
+
wasm.zcash_branch_id_for_height(retptr, ptr0, len0, height);
|
|
6284
|
+
var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
|
|
6285
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
6286
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
6287
|
+
if (r3) {
|
|
6288
|
+
throw takeObject(r2);
|
|
6289
|
+
}
|
|
6290
|
+
return r0 === 0x100000001 ? undefined : r0;
|
|
6291
|
+
} finally {
|
|
6292
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
6293
|
+
}
|
|
6294
|
+
}
|
|
6295
|
+
exports.zcash_branch_id_for_height = zcash_branch_id_for_height;
|
|
6296
|
+
|
|
6234
6297
|
function __wbg_get_imports() {
|
|
6235
6298
|
const import0 = {
|
|
6236
6299
|
__proto__: null,
|
|
Binary file
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
|
-
export const
|
|
5
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
6
6
|
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
7
7
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
8
8
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
9
|
-
export const
|
|
9
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
10
11
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
11
12
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
12
13
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
13
14
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
14
15
|
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
16
|
+
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;
|
|
17
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
18
|
+
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;
|
|
19
|
+
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;
|
|
20
|
+
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;
|
|
21
|
+
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;
|
|
17
22
|
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
18
23
|
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
19
24
|
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -28,21 +33,19 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
28
33
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
29
34
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
30
35
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
45
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
36
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
37
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
38
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
39
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
40
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
41
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
42
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
43
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
44
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
45
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
46
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
47
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
48
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
46
49
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
47
50
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
48
51
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -110,10 +113,9 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
110
113
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
111
114
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
112
115
|
export const wrappsbt_version: (a: number) => number;
|
|
113
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
114
116
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
115
117
|
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
116
|
-
export const
|
|
118
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
117
119
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
118
120
|
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
119
121
|
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
@@ -134,19 +136,17 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
|
|
|
134
136
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
135
137
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
136
138
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
137
|
-
export const
|
|
139
|
+
export const isInspectEnabled: () => number;
|
|
140
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
141
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
142
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
143
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
138
144
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
139
145
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
146
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
140
147
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
141
|
-
export const
|
|
142
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
148
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
143
149
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
144
|
-
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;
|
|
145
|
-
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
146
|
-
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;
|
|
147
|
-
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;
|
|
148
|
-
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;
|
|
149
|
-
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;
|
|
150
150
|
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;
|
|
151
151
|
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;
|
|
152
152
|
export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
|
|
@@ -160,7 +160,9 @@ export const bitgopsbt_add_wallet_input: (a: number, b: number, c: number, d: nu
|
|
|
160
160
|
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;
|
|
161
161
|
export const bitgopsbt_add_wallet_output: (a: number, b: number, c: number, d: number, e: bigint, f: number) => void;
|
|
162
162
|
export const bitgopsbt_add_wallet_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number) => void;
|
|
163
|
+
export const bitgopsbt_combine_inputs: (a: number, b: number, c: number, d: number) => void;
|
|
163
164
|
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
165
|
+
export const bitgopsbt_consensus_branch_id: (a: number) => number;
|
|
164
166
|
export const bitgopsbt_create_empty: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
165
167
|
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;
|
|
166
168
|
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;
|
|
@@ -228,8 +230,8 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
228
230
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
229
231
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
230
232
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
231
|
-
export const
|
|
232
|
-
export const
|
|
233
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
234
|
+
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;
|
|
233
235
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
234
236
|
export const wasmbip32_depth: (a: number) => number;
|
|
235
237
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -252,30 +254,31 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
252
254
|
export const wasmbip32_public_key: (a: number) => number;
|
|
253
255
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
254
256
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
255
|
-
export const
|
|
256
|
-
export const
|
|
257
|
-
export const
|
|
258
|
-
export const
|
|
259
|
-
export const
|
|
260
|
-
export const
|
|
261
|
-
export const
|
|
262
|
-
export const
|
|
263
|
-
export const
|
|
264
|
-
export const
|
|
265
|
-
export const
|
|
266
|
-
export const
|
|
267
|
-
export const
|
|
257
|
+
export const wasmdimensions_empty: () => number;
|
|
258
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
259
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
260
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
261
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
262
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
263
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
264
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
265
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
266
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
267
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
268
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
269
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
270
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
271
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
268
272
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
269
273
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
270
274
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
271
275
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
272
276
|
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;
|
|
277
|
+
export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
|
|
273
278
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
274
|
-
export const
|
|
275
|
-
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
279
|
+
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
276
280
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
277
281
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
278
|
-
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
279
282
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
280
283
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
281
284
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
@@ -546,6 +546,19 @@ export declare class BitGoPsbt extends PsbtBase<WasmBitGoPsbt> implements IPsbtW
|
|
|
546
546
|
* ```
|
|
547
547
|
*/
|
|
548
548
|
combineMusig2Nonces(sourcePsbt: BitGoPsbt): void;
|
|
549
|
+
/**
|
|
550
|
+
* Merge all input fields from a raw PSBT (bytes) into this PSBT.
|
|
551
|
+
*
|
|
552
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
553
|
+
* bypassing network-specific validation (e.g. ZCash consensusBranchId), so the
|
|
554
|
+
* source may be a stripped PSBT that lacks those fields.
|
|
555
|
+
*
|
|
556
|
+
* Copies per input: partial_sigs, tap_key_sig, tap_script_sigs, proprietary.
|
|
557
|
+
*
|
|
558
|
+
* @param otherPsbtBytes - Raw bytes of the PSBT to merge signatures from
|
|
559
|
+
* @throws Error if PSBT parsing fails or input counts don't match
|
|
560
|
+
*/
|
|
561
|
+
combineInputs(otherPsbtBytes: Uint8Array): void;
|
|
549
562
|
/**
|
|
550
563
|
* Finalize all inputs in the PSBT
|
|
551
564
|
*
|
|
@@ -539,6 +539,21 @@ export class BitGoPsbt extends PsbtBase {
|
|
|
539
539
|
combineMusig2Nonces(sourcePsbt) {
|
|
540
540
|
this._wasm.combine_musig2_nonces(sourcePsbt.wasm);
|
|
541
541
|
}
|
|
542
|
+
/**
|
|
543
|
+
* Merge all input fields from a raw PSBT (bytes) into this PSBT.
|
|
544
|
+
*
|
|
545
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
546
|
+
* bypassing network-specific validation (e.g. ZCash consensusBranchId), so the
|
|
547
|
+
* source may be a stripped PSBT that lacks those fields.
|
|
548
|
+
*
|
|
549
|
+
* Copies per input: partial_sigs, tap_key_sig, tap_script_sigs, proprietary.
|
|
550
|
+
*
|
|
551
|
+
* @param otherPsbtBytes - Raw bytes of the PSBT to merge signatures from
|
|
552
|
+
* @throws Error if PSBT parsing fails or input counts don't match
|
|
553
|
+
*/
|
|
554
|
+
combineInputs(otherPsbtBytes) {
|
|
555
|
+
this._wasm.combine_inputs(otherPsbtBytes);
|
|
556
|
+
}
|
|
542
557
|
/**
|
|
543
558
|
* Finalize all inputs in the PSBT
|
|
544
559
|
*
|
|
@@ -155,6 +155,16 @@ export declare class ZcashBitGoPsbt extends BitGoPsbt {
|
|
|
155
155
|
* @returns The expiry height (0 if not set)
|
|
156
156
|
*/
|
|
157
157
|
get expiryHeight(): number;
|
|
158
|
+
/**
|
|
159
|
+
* Get the Zcash consensus branch ID stored in the PSBT proprietary map.
|
|
160
|
+
* Returns undefined for v5 PSBTs or PSBTs without the key.
|
|
161
|
+
*/
|
|
162
|
+
get consensusBranchId(): number | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
165
|
+
* Returns undefined if `height` is before Overwinter activation.
|
|
166
|
+
*/
|
|
167
|
+
static branchIdForHeight(network: ZcashNetworkName, height: number): number | undefined;
|
|
158
168
|
/**
|
|
159
169
|
* Extract the final Zcash transaction from a finalized PSBT
|
|
160
170
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BitGoPsbt as WasmBitGoPsbt } from "../wasm/wasm_utxo.js";
|
|
1
|
+
import { BitGoPsbt as WasmBitGoPsbt, zcash_branch_id_for_height } from "../wasm/wasm_utxo.js";
|
|
2
2
|
import { RootWalletKeys } from "./RootWalletKeys.js";
|
|
3
3
|
import { BitGoPsbt } from "./BitGoPsbt.js";
|
|
4
4
|
import { ZcashTransaction } from "../transaction.js";
|
|
@@ -170,6 +170,20 @@ export class ZcashBitGoPsbt extends BitGoPsbt {
|
|
|
170
170
|
get expiryHeight() {
|
|
171
171
|
return this.wasm.expiry_height();
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Get the Zcash consensus branch ID stored in the PSBT proprietary map.
|
|
175
|
+
* Returns undefined for v5 PSBTs or PSBTs without the key.
|
|
176
|
+
*/
|
|
177
|
+
get consensusBranchId() {
|
|
178
|
+
return this.wasm.consensus_branch_id();
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
182
|
+
* Returns undefined if `height` is before Overwinter activation.
|
|
183
|
+
*/
|
|
184
|
+
static branchIdForHeight(network, height) {
|
|
185
|
+
return zcash_branch_id_for_height(network, height);
|
|
186
|
+
}
|
|
173
187
|
/**
|
|
174
188
|
* Extract the final Zcash transaction from a finalized PSBT
|
|
175
189
|
*
|
|
@@ -159,6 +159,17 @@ export class BitGoPsbt {
|
|
|
159
159
|
add_wallet_input_at_index(index: number, txid: string, vout: number, value: bigint, wallet_keys: WasmRootWalletKeys, chain: number, derivation_index: number, signer?: string | null, cosigner?: string | null, sequence?: number | null, prev_tx?: Uint8Array | null): number;
|
|
160
160
|
add_wallet_output(chain: number, index: number, value: bigint, wallet_keys: WasmRootWalletKeys): number;
|
|
161
161
|
add_wallet_output_at_index(index: number, chain: number, derivation_index: number, value: bigint, wallet_keys: WasmRootWalletKeys): number;
|
|
162
|
+
/**
|
|
163
|
+
* Merge all input fields from a raw PSBT (given as bytes) into this PSBT.
|
|
164
|
+
*
|
|
165
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
166
|
+
* bypassing any network-specific validation, so the source may be a partial
|
|
167
|
+
* PSBT that lacks fields like ZecConsensusBranchId.
|
|
168
|
+
*
|
|
169
|
+
* # Errors
|
|
170
|
+
* Returns error if PSBT parsing fails or input counts don't match
|
|
171
|
+
*/
|
|
172
|
+
combine_inputs(other_bytes: Uint8Array): void;
|
|
162
173
|
/**
|
|
163
174
|
* Combine/merge data from another PSBT into this one
|
|
164
175
|
*
|
|
@@ -176,6 +187,10 @@ export class BitGoPsbt {
|
|
|
176
187
|
* Returns error if networks don't match
|
|
177
188
|
*/
|
|
178
189
|
combine_musig2_nonces(source_psbt: BitGoPsbt): void;
|
|
190
|
+
/**
|
|
191
|
+
* Get the Zcash consensus branch ID from the PSBT proprietary map (returns None for non-Zcash PSBTs)
|
|
192
|
+
*/
|
|
193
|
+
consensus_branch_id(): number | undefined;
|
|
179
194
|
/**
|
|
180
195
|
* Create an empty PSBT for the given network with wallet keys
|
|
181
196
|
*
|
|
@@ -1597,3 +1612,12 @@ export function parsePsbtToJson(psbt_bytes: Uint8Array, coin_name: string): stri
|
|
|
1597
1612
|
* - The network name is unknown
|
|
1598
1613
|
*/
|
|
1599
1614
|
export function parseTxToJson(tx_bytes: Uint8Array, coin_name: string): string;
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
1618
|
+
*
|
|
1619
|
+
* `network`: "zcash" / "zec" for mainnet, "zcashTest" / "tzec" for testnet.
|
|
1620
|
+
* Returns `None` if `height` is before Overwinter activation.
|
|
1621
|
+
* Throws if `network` is not a recognised Zcash network name.
|
|
1622
|
+
*/
|
|
1623
|
+
export function zcash_branch_id_for_height(network: string, height: number): number | undefined;
|
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./wasm_utxo_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
|
-
AddressNamespace, Bip322Namespace, BitGoPsbt, FixedScriptWalletNamespace, InscriptionsNamespace, MessageNamespace, UtxolibCompatNamespace, WasmBIP32, WasmDashTransaction, WasmDimensions, WasmECPair, WasmReplayProtection, WasmRootWalletKeys, WasmTransaction, WasmUtxoNamespace, WasmZcashTransaction, WrapDescriptor, WrapMiniscript, WrapPsbt, isInspectEnabled, parsePsbtRawToJson, parsePsbtToJson, parseTxToJson
|
|
8
|
+
AddressNamespace, Bip322Namespace, BitGoPsbt, FixedScriptWalletNamespace, InscriptionsNamespace, MessageNamespace, UtxolibCompatNamespace, WasmBIP32, WasmDashTransaction, WasmDimensions, WasmECPair, WasmReplayProtection, WasmRootWalletKeys, WasmTransaction, WasmUtxoNamespace, WasmZcashTransaction, WrapDescriptor, WrapMiniscript, WrapPsbt, isInspectEnabled, parsePsbtRawToJson, parsePsbtToJson, parseTxToJson, zcash_branch_id_for_height
|
|
9
9
|
} from "./wasm_utxo_bg.js";
|
|
@@ -768,6 +768,32 @@ export class BitGoPsbt {
|
|
|
768
768
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* Merge all input fields from a raw PSBT (given as bytes) into this PSBT.
|
|
773
|
+
*
|
|
774
|
+
* The source bytes are parsed with the underlying bitcoin PSBT deserializer,
|
|
775
|
+
* bypassing any network-specific validation, so the source may be a partial
|
|
776
|
+
* PSBT that lacks fields like ZecConsensusBranchId.
|
|
777
|
+
*
|
|
778
|
+
* # Errors
|
|
779
|
+
* Returns error if PSBT parsing fails or input counts don't match
|
|
780
|
+
* @param {Uint8Array} other_bytes
|
|
781
|
+
*/
|
|
782
|
+
combine_inputs(other_bytes) {
|
|
783
|
+
try {
|
|
784
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
785
|
+
const ptr0 = passArray8ToWasm0(other_bytes, wasm.__wbindgen_export);
|
|
786
|
+
const len0 = WASM_VECTOR_LEN;
|
|
787
|
+
wasm.bitgopsbt_combine_inputs(retptr, this.__wbg_ptr, ptr0, len0);
|
|
788
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
789
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
790
|
+
if (r1) {
|
|
791
|
+
throw takeObject(r0);
|
|
792
|
+
}
|
|
793
|
+
} finally {
|
|
794
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
771
797
|
/**
|
|
772
798
|
* Combine/merge data from another PSBT into this one
|
|
773
799
|
*
|
|
@@ -799,6 +825,14 @@ export class BitGoPsbt {
|
|
|
799
825
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
800
826
|
}
|
|
801
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* Get the Zcash consensus branch ID from the PSBT proprietary map (returns None for non-Zcash PSBTs)
|
|
830
|
+
* @returns {number | undefined}
|
|
831
|
+
*/
|
|
832
|
+
consensus_branch_id() {
|
|
833
|
+
const ret = wasm.bitgopsbt_consensus_branch_id(this.__wbg_ptr);
|
|
834
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
835
|
+
}
|
|
802
836
|
/**
|
|
803
837
|
* Create an empty PSBT for the given network with wallet keys
|
|
804
838
|
*
|
|
@@ -6205,6 +6239,34 @@ export function parseTxToJson(tx_bytes, coin_name) {
|
|
|
6205
6239
|
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
6206
6240
|
}
|
|
6207
6241
|
}
|
|
6242
|
+
|
|
6243
|
+
/**
|
|
6244
|
+
* Return the Zcash consensus branch ID active at `height` on `network`.
|
|
6245
|
+
*
|
|
6246
|
+
* `network`: "zcash" / "zec" for mainnet, "zcashTest" / "tzec" for testnet.
|
|
6247
|
+
* Returns `None` if `height` is before Overwinter activation.
|
|
6248
|
+
* Throws if `network` is not a recognised Zcash network name.
|
|
6249
|
+
* @param {string} network
|
|
6250
|
+
* @param {number} height
|
|
6251
|
+
* @returns {number | undefined}
|
|
6252
|
+
*/
|
|
6253
|
+
export function zcash_branch_id_for_height(network, height) {
|
|
6254
|
+
try {
|
|
6255
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
6256
|
+
const ptr0 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
6257
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6258
|
+
wasm.zcash_branch_id_for_height(retptr, ptr0, len0, height);
|
|
6259
|
+
var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
|
|
6260
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
6261
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
6262
|
+
if (r3) {
|
|
6263
|
+
throw takeObject(r2);
|
|
6264
|
+
}
|
|
6265
|
+
return r0 === 0x100000001 ? undefined : r0;
|
|
6266
|
+
} finally {
|
|
6267
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
6268
|
+
}
|
|
6269
|
+
}
|
|
6208
6270
|
export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
|
|
6209
6271
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
6210
6272
|
return addHeapObject(ret);
|
|
Binary file
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
5
|
-
export const
|
|
5
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
6
6
|
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
7
7
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
8
8
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
9
|
-
export const
|
|
9
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
10
11
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
11
12
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
12
13
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
13
14
|
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
14
15
|
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
16
|
+
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;
|
|
17
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
18
|
+
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;
|
|
19
|
+
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;
|
|
20
|
+
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;
|
|
21
|
+
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;
|
|
17
22
|
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
18
23
|
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
19
24
|
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -28,21 +33,19 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
28
33
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
29
34
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
30
35
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
45
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
36
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
37
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
38
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
39
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
40
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
41
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
42
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
43
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
44
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
45
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
46
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
47
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
48
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
46
49
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
47
50
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
48
51
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -110,10 +113,9 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
110
113
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
111
114
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
112
115
|
export const wrappsbt_version: (a: number) => number;
|
|
113
|
-
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
114
116
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
115
117
|
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
116
|
-
export const
|
|
118
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
117
119
|
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
118
120
|
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
119
121
|
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
@@ -134,19 +136,17 @@ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d:
|
|
|
134
136
|
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
135
137
|
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
136
138
|
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
137
|
-
export const
|
|
139
|
+
export const isInspectEnabled: () => number;
|
|
140
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
141
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
142
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
143
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
138
144
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
139
145
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
146
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
140
147
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
141
|
-
export const
|
|
142
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
148
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
143
149
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
144
|
-
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;
|
|
145
|
-
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
146
|
-
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;
|
|
147
|
-
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;
|
|
148
|
-
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;
|
|
149
|
-
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;
|
|
150
150
|
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;
|
|
151
151
|
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;
|
|
152
152
|
export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
|
|
@@ -160,7 +160,9 @@ export const bitgopsbt_add_wallet_input: (a: number, b: number, c: number, d: nu
|
|
|
160
160
|
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;
|
|
161
161
|
export const bitgopsbt_add_wallet_output: (a: number, b: number, c: number, d: number, e: bigint, f: number) => void;
|
|
162
162
|
export const bitgopsbt_add_wallet_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number) => void;
|
|
163
|
+
export const bitgopsbt_combine_inputs: (a: number, b: number, c: number, d: number) => void;
|
|
163
164
|
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
165
|
+
export const bitgopsbt_consensus_branch_id: (a: number) => number;
|
|
164
166
|
export const bitgopsbt_create_empty: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
165
167
|
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;
|
|
166
168
|
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;
|
|
@@ -228,8 +230,8 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
228
230
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
229
231
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
230
232
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
231
|
-
export const
|
|
232
|
-
export const
|
|
233
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
234
|
+
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;
|
|
233
235
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
234
236
|
export const wasmbip32_depth: (a: number) => number;
|
|
235
237
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -252,30 +254,31 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
252
254
|
export const wasmbip32_public_key: (a: number) => number;
|
|
253
255
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
254
256
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
255
|
-
export const
|
|
256
|
-
export const
|
|
257
|
-
export const
|
|
258
|
-
export const
|
|
259
|
-
export const
|
|
260
|
-
export const
|
|
261
|
-
export const
|
|
262
|
-
export const
|
|
263
|
-
export const
|
|
264
|
-
export const
|
|
265
|
-
export const
|
|
266
|
-
export const
|
|
267
|
-
export const
|
|
257
|
+
export const wasmdimensions_empty: () => number;
|
|
258
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
259
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
260
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
261
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
262
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
263
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
264
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
265
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
266
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
267
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
268
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
269
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
270
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
271
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
268
272
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
269
273
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
270
274
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
271
275
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
272
276
|
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;
|
|
277
|
+
export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
|
|
273
278
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
274
|
-
export const
|
|
275
|
-
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
279
|
+
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
276
280
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
277
281
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
278
|
-
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
279
282
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
280
283
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
281
284
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|