@bitgo/wasm-utxo 4.38.0 → 4.39.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/descriptorWallet/Psbt.d.ts +4 -0
- package/dist/cjs/js/descriptorWallet/Psbt.js +8 -0
- package/dist/cjs/js/fixedScriptWallet/Dimensions.d.ts +15 -2
- package/dist/cjs/js/fixedScriptWallet/Dimensions.js +2 -2
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +11 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +40 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +77 -75
- package/dist/esm/js/descriptorWallet/Psbt.d.ts +4 -0
- package/dist/esm/js/descriptorWallet/Psbt.js +8 -0
- package/dist/esm/js/fixedScriptWallet/Dimensions.d.ts +15 -2
- package/dist/esm/js/fixedScriptWallet/Dimensions.js +2 -2
- package/dist/esm/js/wasm/wasm_utxo.d.ts +11 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +40 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +77 -75
- package/package.json +1 -1
|
@@ -20,6 +20,8 @@ export declare class Psbt extends PsbtBase<WasmPsbt> implements IPsbt {
|
|
|
20
20
|
addOutput(script: Uint8Array, value: bigint): number;
|
|
21
21
|
updateInputWithDescriptor(inputIndex: number, descriptor: WrapDescriptor): void;
|
|
22
22
|
updateOutputWithDescriptor(outputIndex: number, descriptor: WrapDescriptor): void;
|
|
23
|
+
/** Add a 32-byte SHA256 preimage for Miniscript descriptor finalization. */
|
|
24
|
+
addSha256Preimage(inputIndex: number, preimage: Uint8Array): void;
|
|
23
25
|
signWithXprv(xprv: string): SignPsbtResult;
|
|
24
26
|
signWithPrv(prv: Uint8Array): SignPsbtResult;
|
|
25
27
|
signAll(key: WasmBIP32): SignPsbtResult;
|
|
@@ -33,5 +35,7 @@ export declare class Psbt extends PsbtBase<WasmPsbt> implements IPsbt {
|
|
|
33
35
|
verifySignatureWithKey(inputIndex: number, key: WasmBIP32): boolean;
|
|
34
36
|
getUnsignedTx(): Uint8Array;
|
|
35
37
|
finalize(): void;
|
|
38
|
+
/** Finalize one Miniscript input without requiring all inputs to be complete. */
|
|
39
|
+
finalizeInput(inputIndex: number): void;
|
|
36
40
|
extractTransaction(): Transaction;
|
|
37
41
|
}
|
|
@@ -47,6 +47,10 @@ class Psbt extends psbtBase_js_1.PsbtBase {
|
|
|
47
47
|
updateOutputWithDescriptor(outputIndex, descriptor) {
|
|
48
48
|
this._wasm.update_output_with_descriptor(outputIndex, descriptor);
|
|
49
49
|
}
|
|
50
|
+
/** Add a 32-byte SHA256 preimage for Miniscript descriptor finalization. */
|
|
51
|
+
addSha256Preimage(inputIndex, preimage) {
|
|
52
|
+
this._wasm.add_sha256_preimage(inputIndex, preimage);
|
|
53
|
+
}
|
|
50
54
|
// -- Signing --
|
|
51
55
|
signWithXprv(xprv) {
|
|
52
56
|
return this._wasm.sign_with_xprv(xprv);
|
|
@@ -81,6 +85,10 @@ class Psbt extends psbtBase_js_1.PsbtBase {
|
|
|
81
85
|
finalize() {
|
|
82
86
|
this._wasm.finalize_mut();
|
|
83
87
|
}
|
|
88
|
+
/** Finalize one Miniscript input without requiring all inputs to be complete. */
|
|
89
|
+
finalizeInput(inputIndex) {
|
|
90
|
+
this._wasm.finalize_input(inputIndex);
|
|
91
|
+
}
|
|
84
92
|
extractTransaction() {
|
|
85
93
|
return transaction_js_1.Transaction.fromWasm(this._wasm.extract_transaction());
|
|
86
94
|
}
|
|
@@ -17,6 +17,16 @@ export type FromInputOptions = {
|
|
|
17
17
|
*/
|
|
18
18
|
utxolibCompat?: boolean;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Options for output dimension calculation
|
|
22
|
+
*/
|
|
23
|
+
export type FromOutputOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Set when `address` may be a ZIP-316 Unified Address whose Orchard receiver should be sized
|
|
26
|
+
* as a shielded output. Forwarded to `toOutputScriptWithCoin`'s `canBeShieldedOutput`.
|
|
27
|
+
*/
|
|
28
|
+
isShielded?: boolean;
|
|
29
|
+
};
|
|
20
30
|
/**
|
|
21
31
|
* Dimensions class for estimating transaction virtual size.
|
|
22
32
|
*
|
|
@@ -52,9 +62,12 @@ export declare class Dimensions {
|
|
|
52
62
|
*/
|
|
53
63
|
static fromOutput(script: Uint8Array): Dimensions;
|
|
54
64
|
/**
|
|
55
|
-
* Create dimensions for a single output from an address
|
|
65
|
+
* Create dimensions for a single output from an address.
|
|
66
|
+
*
|
|
67
|
+
* Pass `{ isShielded: true }` when `address` may be a ZIP-316 Unified Address whose Orchard
|
|
68
|
+
* receiver should be sized as a shielded output
|
|
56
69
|
*/
|
|
57
|
-
static fromOutput(address: string, network: CoinName): Dimensions;
|
|
70
|
+
static fromOutput(address: string, network: CoinName, options?: FromOutputOptions): Dimensions;
|
|
58
71
|
/**
|
|
59
72
|
* Create dimensions for a single output from script length only
|
|
60
73
|
*/
|
|
@@ -45,12 +45,12 @@ class Dimensions {
|
|
|
45
45
|
}
|
|
46
46
|
return new Dimensions(wasm_utxo_js_1.WasmDimensions.from_input(params.chain, params.signPath?.signer, params.signPath?.cosigner, compat));
|
|
47
47
|
}
|
|
48
|
-
static fromOutput(params, network) {
|
|
48
|
+
static fromOutput(params, network, options) {
|
|
49
49
|
if (typeof params === "string") {
|
|
50
50
|
if (network === undefined) {
|
|
51
51
|
throw new Error("network is required when passing an address string");
|
|
52
52
|
}
|
|
53
|
-
const script = (0, address_js_1.toOutputScriptWithCoin)(params, network);
|
|
53
|
+
const script = (0, address_js_1.toOutputScriptWithCoin)(params, network, options?.isShielded);
|
|
54
54
|
return new Dimensions(wasm_utxo_js_1.WasmDimensions.from_output_script_length(script.length));
|
|
55
55
|
}
|
|
56
56
|
if (typeof params === "object" && "scriptType" in params) {
|
|
@@ -1571,6 +1571,13 @@ export class WrapPsbt {
|
|
|
1571
1571
|
* The index of the newly added output
|
|
1572
1572
|
*/
|
|
1573
1573
|
add_output_at_index(index: number, script: Uint8Array, value: bigint): number;
|
|
1574
|
+
/**
|
|
1575
|
+
* Add a 32-byte SHA256 preimage to an input's standard BIP174 metadata.
|
|
1576
|
+
*
|
|
1577
|
+
* Descriptor finalization uses this metadata to satisfy `sha256(H)`
|
|
1578
|
+
* Miniscript fragments when `H == sha256(preimage)`.
|
|
1579
|
+
*/
|
|
1580
|
+
add_sha256_preimage(input_index: number, preimage: Uint8Array): void;
|
|
1574
1581
|
clone(): WrapPsbt;
|
|
1575
1582
|
delete_input_kv(index: number, key: any): void;
|
|
1576
1583
|
delete_kv(key: any): void;
|
|
@@ -1597,6 +1604,10 @@ export class WrapPsbt {
|
|
|
1597
1604
|
* * `expiry_height` - Transaction expiry height (default: 0)
|
|
1598
1605
|
*/
|
|
1599
1606
|
extract_zcash_transaction(version_group_id?: number | null, expiry_height?: number | null): WasmZcashTransaction;
|
|
1607
|
+
/**
|
|
1608
|
+
* Finalize one Miniscript input, preserving any other incomplete inputs.
|
|
1609
|
+
*/
|
|
1610
|
+
finalize_input(input_index: number): void;
|
|
1600
1611
|
finalize_mut(): void;
|
|
1601
1612
|
/**
|
|
1602
1613
|
* Finalize all Zcash transparent inputs using ZIP-243 sighash verification.
|
|
@@ -5780,6 +5780,29 @@ class WrapPsbt {
|
|
|
5780
5780
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5781
5781
|
}
|
|
5782
5782
|
}
|
|
5783
|
+
/**
|
|
5784
|
+
* Add a 32-byte SHA256 preimage to an input's standard BIP174 metadata.
|
|
5785
|
+
*
|
|
5786
|
+
* Descriptor finalization uses this metadata to satisfy `sha256(H)`
|
|
5787
|
+
* Miniscript fragments when `H == sha256(preimage)`.
|
|
5788
|
+
* @param {number} input_index
|
|
5789
|
+
* @param {Uint8Array} preimage
|
|
5790
|
+
*/
|
|
5791
|
+
add_sha256_preimage(input_index, preimage) {
|
|
5792
|
+
try {
|
|
5793
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5794
|
+
const ptr0 = passArray8ToWasm0(preimage, wasm.__wbindgen_export);
|
|
5795
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5796
|
+
wasm.wrappsbt_add_sha256_preimage(retptr, this.__wbg_ptr, input_index, ptr0, len0);
|
|
5797
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
5798
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
5799
|
+
if (r1) {
|
|
5800
|
+
throw takeObject(r0);
|
|
5801
|
+
}
|
|
5802
|
+
} finally {
|
|
5803
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5804
|
+
}
|
|
5805
|
+
}
|
|
5783
5806
|
/**
|
|
5784
5807
|
* @returns {WrapPsbt}
|
|
5785
5808
|
*/
|
|
@@ -5911,6 +5934,23 @@ class WrapPsbt {
|
|
|
5911
5934
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5912
5935
|
}
|
|
5913
5936
|
}
|
|
5937
|
+
/**
|
|
5938
|
+
* Finalize one Miniscript input, preserving any other incomplete inputs.
|
|
5939
|
+
* @param {number} input_index
|
|
5940
|
+
*/
|
|
5941
|
+
finalize_input(input_index) {
|
|
5942
|
+
try {
|
|
5943
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5944
|
+
wasm.wrappsbt_finalize_input(retptr, this.__wbg_ptr, input_index);
|
|
5945
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
5946
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
5947
|
+
if (r1) {
|
|
5948
|
+
throw takeObject(r0);
|
|
5949
|
+
}
|
|
5950
|
+
} finally {
|
|
5951
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5952
|
+
}
|
|
5953
|
+
}
|
|
5914
5954
|
finalize_mut() {
|
|
5915
5955
|
try {
|
|
5916
5956
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
Binary file
|
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
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 __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
7
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
8
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
11
|
+
export const wasmdimensions_empty: () => number;
|
|
12
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
13
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
14
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
15
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
16
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
17
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
18
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
19
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
20
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
21
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
22
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
23
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
24
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
25
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
4
26
|
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
5
27
|
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
6
28
|
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
7
29
|
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
11
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
12
|
-
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
13
|
-
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
14
|
-
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
15
|
-
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
16
|
-
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
17
|
-
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
18
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
19
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
20
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
21
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
22
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
23
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
24
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
25
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
26
|
-
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
27
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
28
|
-
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
29
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
30
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
31
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
32
|
-
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
33
|
-
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
30
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
31
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
34
32
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
35
33
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
36
34
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
37
35
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
38
36
|
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
39
37
|
export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
45
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
38
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
39
|
+
export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
|
|
40
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
41
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
46
42
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
47
43
|
export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
|
|
48
44
|
export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -75,6 +71,7 @@ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e:
|
|
|
75
71
|
export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
|
|
76
72
|
export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
77
73
|
export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
|
|
74
|
+
export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
78
75
|
export const wrappsbt_clone: (a: number) => number;
|
|
79
76
|
export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
80
77
|
export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
|
|
@@ -82,6 +79,7 @@ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: num
|
|
|
82
79
|
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
83
80
|
export const wrappsbt_extract_transaction: (a: number, b: number) => void;
|
|
84
81
|
export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
82
|
+
export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
|
|
85
83
|
export const wrappsbt_finalize_mut: (a: number, b: number) => void;
|
|
86
84
|
export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
87
85
|
export const wrappsbt_get_global_xpubs: (a: number) => number;
|
|
@@ -137,41 +135,17 @@ export const wasmtransaction_input_count: (a: number) => number;
|
|
|
137
135
|
export const wasmtransaction_output_count: (a: number) => number;
|
|
138
136
|
export const wasmzcashtransaction_input_count: (a: number) => number;
|
|
139
137
|
export const wasmzcashtransaction_output_count: (a: number) => 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
138
|
export const wasmtransaction_lock_time: (a: number) => number;
|
|
143
139
|
export const wasmtransaction_version: (a: number) => number;
|
|
144
140
|
export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
145
141
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
146
142
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
147
143
|
export const wrappsbt_version: (a: number) => number;
|
|
148
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
149
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
150
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
151
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
152
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
153
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
154
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
155
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
156
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
157
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
158
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
159
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
160
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
161
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
162
|
-
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
163
144
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
164
145
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
165
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
166
146
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
167
|
-
export const
|
|
147
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
168
148
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
169
|
-
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;
|
|
170
|
-
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
171
|
-
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;
|
|
172
|
-
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;
|
|
173
|
-
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;
|
|
174
|
-
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;
|
|
175
149
|
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;
|
|
176
150
|
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;
|
|
177
151
|
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;
|
|
@@ -266,8 +240,7 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
266
240
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
267
241
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
268
242
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
269
|
-
export const
|
|
270
|
-
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;
|
|
243
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
271
244
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
272
245
|
export const wasmbip32_depth: (a: number) => number;
|
|
273
246
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -290,30 +263,59 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
290
263
|
export const wasmbip32_public_key: (a: number) => number;
|
|
291
264
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
292
265
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
293
|
-
export const
|
|
294
|
-
export const
|
|
295
|
-
export const
|
|
296
|
-
export const
|
|
297
|
-
export const
|
|
298
|
-
export const
|
|
299
|
-
export const
|
|
300
|
-
export const
|
|
301
|
-
export const
|
|
302
|
-
export const
|
|
303
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
304
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
305
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
306
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
307
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
266
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
267
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
268
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
269
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
270
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
271
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
272
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
273
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
274
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
275
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
308
276
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
309
277
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
310
278
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
311
279
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
312
280
|
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;
|
|
313
281
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
314
|
-
export const
|
|
282
|
+
export const isInspectEnabled: () => number;
|
|
283
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
284
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
315
285
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
316
286
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
287
|
+
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
288
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
289
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
290
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
291
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
292
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
293
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
294
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
295
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
296
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
297
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
298
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
299
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
300
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
301
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
302
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
303
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
304
|
+
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
305
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
306
|
+
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
307
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
308
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
309
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
310
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
311
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
312
|
+
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;
|
|
313
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
314
|
+
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;
|
|
315
|
+
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;
|
|
316
|
+
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;
|
|
317
|
+
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;
|
|
318
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
317
319
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
318
320
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
319
321
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
@@ -20,6 +20,8 @@ export declare class Psbt extends PsbtBase<WasmPsbt> implements IPsbt {
|
|
|
20
20
|
addOutput(script: Uint8Array, value: bigint): number;
|
|
21
21
|
updateInputWithDescriptor(inputIndex: number, descriptor: WrapDescriptor): void;
|
|
22
22
|
updateOutputWithDescriptor(outputIndex: number, descriptor: WrapDescriptor): void;
|
|
23
|
+
/** Add a 32-byte SHA256 preimage for Miniscript descriptor finalization. */
|
|
24
|
+
addSha256Preimage(inputIndex: number, preimage: Uint8Array): void;
|
|
23
25
|
signWithXprv(xprv: string): SignPsbtResult;
|
|
24
26
|
signWithPrv(prv: Uint8Array): SignPsbtResult;
|
|
25
27
|
signAll(key: WasmBIP32): SignPsbtResult;
|
|
@@ -33,5 +35,7 @@ export declare class Psbt extends PsbtBase<WasmPsbt> implements IPsbt {
|
|
|
33
35
|
verifySignatureWithKey(inputIndex: number, key: WasmBIP32): boolean;
|
|
34
36
|
getUnsignedTx(): Uint8Array;
|
|
35
37
|
finalize(): void;
|
|
38
|
+
/** Finalize one Miniscript input without requiring all inputs to be complete. */
|
|
39
|
+
finalizeInput(inputIndex: number): void;
|
|
36
40
|
extractTransaction(): Transaction;
|
|
37
41
|
}
|
|
@@ -44,6 +44,10 @@ export class Psbt extends PsbtBase {
|
|
|
44
44
|
updateOutputWithDescriptor(outputIndex, descriptor) {
|
|
45
45
|
this._wasm.update_output_with_descriptor(outputIndex, descriptor);
|
|
46
46
|
}
|
|
47
|
+
/** Add a 32-byte SHA256 preimage for Miniscript descriptor finalization. */
|
|
48
|
+
addSha256Preimage(inputIndex, preimage) {
|
|
49
|
+
this._wasm.add_sha256_preimage(inputIndex, preimage);
|
|
50
|
+
}
|
|
47
51
|
// -- Signing --
|
|
48
52
|
signWithXprv(xprv) {
|
|
49
53
|
return this._wasm.sign_with_xprv(xprv);
|
|
@@ -78,6 +82,10 @@ export class Psbt extends PsbtBase {
|
|
|
78
82
|
finalize() {
|
|
79
83
|
this._wasm.finalize_mut();
|
|
80
84
|
}
|
|
85
|
+
/** Finalize one Miniscript input without requiring all inputs to be complete. */
|
|
86
|
+
finalizeInput(inputIndex) {
|
|
87
|
+
this._wasm.finalize_input(inputIndex);
|
|
88
|
+
}
|
|
81
89
|
extractTransaction() {
|
|
82
90
|
return Transaction.fromWasm(this._wasm.extract_transaction());
|
|
83
91
|
}
|
|
@@ -17,6 +17,16 @@ export type FromInputOptions = {
|
|
|
17
17
|
*/
|
|
18
18
|
utxolibCompat?: boolean;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Options for output dimension calculation
|
|
22
|
+
*/
|
|
23
|
+
export type FromOutputOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Set when `address` may be a ZIP-316 Unified Address whose Orchard receiver should be sized
|
|
26
|
+
* as a shielded output. Forwarded to `toOutputScriptWithCoin`'s `canBeShieldedOutput`.
|
|
27
|
+
*/
|
|
28
|
+
isShielded?: boolean;
|
|
29
|
+
};
|
|
20
30
|
/**
|
|
21
31
|
* Dimensions class for estimating transaction virtual size.
|
|
22
32
|
*
|
|
@@ -52,9 +62,12 @@ export declare class Dimensions {
|
|
|
52
62
|
*/
|
|
53
63
|
static fromOutput(script: Uint8Array): Dimensions;
|
|
54
64
|
/**
|
|
55
|
-
* Create dimensions for a single output from an address
|
|
65
|
+
* Create dimensions for a single output from an address.
|
|
66
|
+
*
|
|
67
|
+
* Pass `{ isShielded: true }` when `address` may be a ZIP-316 Unified Address whose Orchard
|
|
68
|
+
* receiver should be sized as a shielded output
|
|
56
69
|
*/
|
|
57
|
-
static fromOutput(address: string, network: CoinName): Dimensions;
|
|
70
|
+
static fromOutput(address: string, network: CoinName, options?: FromOutputOptions): Dimensions;
|
|
58
71
|
/**
|
|
59
72
|
* Create dimensions for a single output from script length only
|
|
60
73
|
*/
|
|
@@ -42,12 +42,12 @@ export class Dimensions {
|
|
|
42
42
|
}
|
|
43
43
|
return new Dimensions(WasmDimensions.from_input(params.chain, params.signPath?.signer, params.signPath?.cosigner, compat));
|
|
44
44
|
}
|
|
45
|
-
static fromOutput(params, network) {
|
|
45
|
+
static fromOutput(params, network, options) {
|
|
46
46
|
if (typeof params === "string") {
|
|
47
47
|
if (network === undefined) {
|
|
48
48
|
throw new Error("network is required when passing an address string");
|
|
49
49
|
}
|
|
50
|
-
const script = toOutputScriptWithCoin(params, network);
|
|
50
|
+
const script = toOutputScriptWithCoin(params, network, options?.isShielded);
|
|
51
51
|
return new Dimensions(WasmDimensions.from_output_script_length(script.length));
|
|
52
52
|
}
|
|
53
53
|
if (typeof params === "object" && "scriptType" in params) {
|
|
@@ -1571,6 +1571,13 @@ export class WrapPsbt {
|
|
|
1571
1571
|
* The index of the newly added output
|
|
1572
1572
|
*/
|
|
1573
1573
|
add_output_at_index(index: number, script: Uint8Array, value: bigint): number;
|
|
1574
|
+
/**
|
|
1575
|
+
* Add a 32-byte SHA256 preimage to an input's standard BIP174 metadata.
|
|
1576
|
+
*
|
|
1577
|
+
* Descriptor finalization uses this metadata to satisfy `sha256(H)`
|
|
1578
|
+
* Miniscript fragments when `H == sha256(preimage)`.
|
|
1579
|
+
*/
|
|
1580
|
+
add_sha256_preimage(input_index: number, preimage: Uint8Array): void;
|
|
1574
1581
|
clone(): WrapPsbt;
|
|
1575
1582
|
delete_input_kv(index: number, key: any): void;
|
|
1576
1583
|
delete_kv(key: any): void;
|
|
@@ -1597,6 +1604,10 @@ export class WrapPsbt {
|
|
|
1597
1604
|
* * `expiry_height` - Transaction expiry height (default: 0)
|
|
1598
1605
|
*/
|
|
1599
1606
|
extract_zcash_transaction(version_group_id?: number | null, expiry_height?: number | null): WasmZcashTransaction;
|
|
1607
|
+
/**
|
|
1608
|
+
* Finalize one Miniscript input, preserving any other incomplete inputs.
|
|
1609
|
+
*/
|
|
1610
|
+
finalize_input(input_index: number): void;
|
|
1600
1611
|
finalize_mut(): void;
|
|
1601
1612
|
/**
|
|
1602
1613
|
* Finalize all Zcash transparent inputs using ZIP-243 sighash verification.
|
|
@@ -5760,6 +5760,29 @@ export class WrapPsbt {
|
|
|
5760
5760
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5761
5761
|
}
|
|
5762
5762
|
}
|
|
5763
|
+
/**
|
|
5764
|
+
* Add a 32-byte SHA256 preimage to an input's standard BIP174 metadata.
|
|
5765
|
+
*
|
|
5766
|
+
* Descriptor finalization uses this metadata to satisfy `sha256(H)`
|
|
5767
|
+
* Miniscript fragments when `H == sha256(preimage)`.
|
|
5768
|
+
* @param {number} input_index
|
|
5769
|
+
* @param {Uint8Array} preimage
|
|
5770
|
+
*/
|
|
5771
|
+
add_sha256_preimage(input_index, preimage) {
|
|
5772
|
+
try {
|
|
5773
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5774
|
+
const ptr0 = passArray8ToWasm0(preimage, wasm.__wbindgen_export);
|
|
5775
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5776
|
+
wasm.wrappsbt_add_sha256_preimage(retptr, this.__wbg_ptr, input_index, ptr0, len0);
|
|
5777
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
5778
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
5779
|
+
if (r1) {
|
|
5780
|
+
throw takeObject(r0);
|
|
5781
|
+
}
|
|
5782
|
+
} finally {
|
|
5783
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5763
5786
|
/**
|
|
5764
5787
|
* @returns {WrapPsbt}
|
|
5765
5788
|
*/
|
|
@@ -5891,6 +5914,23 @@ export class WrapPsbt {
|
|
|
5891
5914
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5892
5915
|
}
|
|
5893
5916
|
}
|
|
5917
|
+
/**
|
|
5918
|
+
* Finalize one Miniscript input, preserving any other incomplete inputs.
|
|
5919
|
+
* @param {number} input_index
|
|
5920
|
+
*/
|
|
5921
|
+
finalize_input(input_index) {
|
|
5922
|
+
try {
|
|
5923
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5924
|
+
wasm.wrappsbt_finalize_input(retptr, this.__wbg_ptr, input_index);
|
|
5925
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
5926
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
5927
|
+
if (r1) {
|
|
5928
|
+
throw takeObject(r0);
|
|
5929
|
+
}
|
|
5930
|
+
} finally {
|
|
5931
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5932
|
+
}
|
|
5933
|
+
}
|
|
5894
5934
|
finalize_mut() {
|
|
5895
5935
|
try {
|
|
5896
5936
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
Binary file
|
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
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 __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
7
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
8
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
10
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
11
|
+
export const wasmdimensions_empty: () => number;
|
|
12
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
13
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
14
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
15
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
16
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
17
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
18
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
19
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
20
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
21
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
22
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
23
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
24
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
25
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
4
26
|
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
5
27
|
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
6
28
|
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
7
29
|
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
11
|
-
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
12
|
-
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
13
|
-
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
14
|
-
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
15
|
-
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
16
|
-
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
17
|
-
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
18
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
19
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
20
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
21
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
22
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
23
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
24
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
25
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
26
|
-
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
27
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
28
|
-
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
29
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
30
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
31
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
32
|
-
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
33
|
-
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
30
|
+
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
31
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
34
32
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
35
33
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
36
34
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
37
35
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
38
36
|
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
39
37
|
export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
45
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
38
|
+
export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
39
|
+
export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
|
|
40
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
41
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
46
42
|
export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
47
43
|
export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
|
|
48
44
|
export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -75,6 +71,7 @@ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e:
|
|
|
75
71
|
export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
|
|
76
72
|
export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
77
73
|
export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
|
|
74
|
+
export const wrappsbt_add_sha256_preimage: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
78
75
|
export const wrappsbt_clone: (a: number) => number;
|
|
79
76
|
export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
80
77
|
export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
|
|
@@ -82,6 +79,7 @@ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: num
|
|
|
82
79
|
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
83
80
|
export const wrappsbt_extract_transaction: (a: number, b: number) => void;
|
|
84
81
|
export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
|
|
82
|
+
export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
|
|
85
83
|
export const wrappsbt_finalize_mut: (a: number, b: number) => void;
|
|
86
84
|
export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
87
85
|
export const wrappsbt_get_global_xpubs: (a: number) => number;
|
|
@@ -137,41 +135,17 @@ export const wasmtransaction_input_count: (a: number) => number;
|
|
|
137
135
|
export const wasmtransaction_output_count: (a: number) => number;
|
|
138
136
|
export const wasmzcashtransaction_input_count: (a: number) => number;
|
|
139
137
|
export const wasmzcashtransaction_output_count: (a: number) => 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
138
|
export const wasmtransaction_lock_time: (a: number) => number;
|
|
143
139
|
export const wasmtransaction_version: (a: number) => number;
|
|
144
140
|
export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
145
141
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
146
142
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
147
143
|
export const wrappsbt_version: (a: number) => number;
|
|
148
|
-
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
149
|
-
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
150
|
-
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
151
|
-
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
152
|
-
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
153
|
-
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
154
|
-
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
155
|
-
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
156
|
-
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
157
|
-
export const wasmecpair_private_key: (a: number) => number;
|
|
158
|
-
export const wasmecpair_public_key: (a: number) => number;
|
|
159
|
-
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
160
|
-
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
161
|
-
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
162
|
-
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
163
144
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
164
145
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
165
|
-
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
166
146
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
167
|
-
export const
|
|
147
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
168
148
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
169
|
-
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;
|
|
170
|
-
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
171
|
-
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;
|
|
172
|
-
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;
|
|
173
|
-
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;
|
|
174
|
-
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;
|
|
175
149
|
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;
|
|
176
150
|
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;
|
|
177
151
|
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;
|
|
@@ -266,8 +240,7 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
|
|
|
266
240
|
export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
|
|
267
241
|
export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
268
242
|
export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
269
|
-
export const
|
|
270
|
-
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;
|
|
243
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
271
244
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
272
245
|
export const wasmbip32_depth: (a: number) => number;
|
|
273
246
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -290,30 +263,59 @@ export const wasmbip32_private_key: (a: number) => number;
|
|
|
290
263
|
export const wasmbip32_public_key: (a: number) => number;
|
|
291
264
|
export const wasmbip32_to_base58: (a: number, b: number) => void;
|
|
292
265
|
export const wasmbip32_to_wif: (a: number, b: number) => void;
|
|
293
|
-
export const
|
|
294
|
-
export const
|
|
295
|
-
export const
|
|
296
|
-
export const
|
|
297
|
-
export const
|
|
298
|
-
export const
|
|
299
|
-
export const
|
|
300
|
-
export const
|
|
301
|
-
export const
|
|
302
|
-
export const
|
|
303
|
-
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
304
|
-
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
305
|
-
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
306
|
-
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
307
|
-
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
266
|
+
export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
|
|
267
|
+
export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
|
|
268
|
+
export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
|
|
269
|
+
export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
|
|
270
|
+
export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
|
|
271
|
+
export const wasmecpair_private_key: (a: number) => number;
|
|
272
|
+
export const wasmecpair_public_key: (a: number) => number;
|
|
273
|
+
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
274
|
+
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
275
|
+
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
308
276
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
309
277
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
310
278
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
311
279
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
312
280
|
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;
|
|
313
281
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
314
|
-
export const
|
|
282
|
+
export const isInspectEnabled: () => number;
|
|
283
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
284
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
315
285
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
316
286
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
287
|
+
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
288
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
289
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
290
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
291
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
292
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
293
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
294
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
295
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
296
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
297
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
298
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
299
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
300
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
301
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
302
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
303
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
304
|
+
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
305
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
306
|
+
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
307
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
308
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
309
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
310
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
311
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
312
|
+
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;
|
|
313
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
314
|
+
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;
|
|
315
|
+
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;
|
|
316
|
+
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;
|
|
317
|
+
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;
|
|
318
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
317
319
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
318
320
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
319
321
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|