@bitgo/wasm-utxo 5.0.0 → 5.1.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/findDescriptors.js +16 -12
- package/dist/cjs/js/index.d.ts +16 -0
- package/dist/cjs/js/psbt.d.ts +2 -1
- package/dist/cjs/js/psbtBase.d.ts +3 -1
- package/dist/cjs/js/psbtBase.js +3 -0
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +2 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +38 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +83 -81
- package/dist/esm/js/descriptorWallet/psbt/findDescriptors.js +16 -12
- package/dist/esm/js/index.d.ts +16 -0
- package/dist/esm/js/psbt.d.ts +2 -1
- package/dist/esm/js/psbtBase.d.ts +3 -1
- package/dist/esm/js/psbtBase.js +3 -0
- package/dist/esm/js/wasm/wasm_utxo.d.ts +2 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +38 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +83 -81
- package/package.json +1 -1
|
@@ -48,11 +48,11 @@ function findDescriptorForDerivationIndex(script, index, descriptorMap) {
|
|
|
48
48
|
function getDerivationIndexFromPath(path) {
|
|
49
49
|
const indexStr = path.split("/").pop();
|
|
50
50
|
if (!indexStr) {
|
|
51
|
-
|
|
51
|
+
return undefined;
|
|
52
52
|
}
|
|
53
|
-
const index =
|
|
54
|
-
if (index.toString() !== indexStr) {
|
|
55
|
-
|
|
53
|
+
const index = Number(indexStr);
|
|
54
|
+
if (!Number.isSafeInteger(index) || index < 0 || index.toString() !== indexStr) {
|
|
55
|
+
return undefined;
|
|
56
56
|
}
|
|
57
57
|
return index;
|
|
58
58
|
}
|
|
@@ -63,7 +63,13 @@ function getDerivationIndexFromPath(path) {
|
|
|
63
63
|
* @param descriptorMap
|
|
64
64
|
*/
|
|
65
65
|
function findDescriptorForAnyDerivationPath(script, derivationPaths, descriptorMap) {
|
|
66
|
-
const derivationIndexSet = new Set(
|
|
66
|
+
const derivationIndexSet = new Set();
|
|
67
|
+
for (const path of derivationPaths) {
|
|
68
|
+
const index = getDerivationIndexFromPath(path);
|
|
69
|
+
if (index !== undefined) {
|
|
70
|
+
derivationIndexSet.add(index);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
67
73
|
for (const index of [...derivationIndexSet]) {
|
|
68
74
|
const desc = findDescriptorForDerivationIndex(script, index, descriptorMap);
|
|
69
75
|
if (desc) {
|
|
@@ -73,13 +79,11 @@ function findDescriptorForAnyDerivationPath(script, derivationPaths, descriptorM
|
|
|
73
79
|
return undefined;
|
|
74
80
|
}
|
|
75
81
|
function getDerivationPaths(v) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
return undefined;
|
|
82
|
+
const paths = [
|
|
83
|
+
...(v.bip32Derivation ?? []).map((derivation) => derivation.path),
|
|
84
|
+
...(v.tapBip32Derivation ?? []).map((derivation) => derivation.path),
|
|
85
|
+
].filter((path) => path !== "" && path !== "m");
|
|
86
|
+
return paths.length > 0 ? paths : undefined;
|
|
83
87
|
}
|
|
84
88
|
/**
|
|
85
89
|
* @param input
|
package/dist/cjs/js/index.d.ts
CHANGED
|
@@ -70,6 +70,21 @@ declare module "./wasm/wasm_utxo.js" {
|
|
|
70
70
|
bip32Derivation: PsbtBip32Derivation[];
|
|
71
71
|
tapBip32Derivation: PsbtBip32Derivation[];
|
|
72
72
|
}
|
|
73
|
+
/** A serialized input-map record with a standard PSBT key type. */
|
|
74
|
+
interface PsbtKnownInputKeyValue {
|
|
75
|
+
type: "known";
|
|
76
|
+
key: string;
|
|
77
|
+
keyData: Uint8Array;
|
|
78
|
+
value: Uint8Array;
|
|
79
|
+
}
|
|
80
|
+
/** A serialized input-map record whose key type is unrecognized. */
|
|
81
|
+
interface PsbtUnknownInputKeyValue {
|
|
82
|
+
type: "unknown";
|
|
83
|
+
keyType: bigint;
|
|
84
|
+
keyData: Uint8Array;
|
|
85
|
+
value: Uint8Array;
|
|
86
|
+
}
|
|
87
|
+
type PsbtInputKeyValue = PsbtKnownInputKeyValue | PsbtUnknownInputKeyValue;
|
|
73
88
|
/** Raw PSBT output data returned by getOutputs() */
|
|
74
89
|
interface PsbtOutputData {
|
|
75
90
|
script: Uint8Array;
|
|
@@ -112,3 +127,4 @@ export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
|
112
127
|
export { Psbt } from "./descriptorWallet/Psbt.js";
|
|
113
128
|
export { DashTransaction, Transaction, ZcashTransaction, type ITransaction, type ITransactionCommon, } from "./transaction.js";
|
|
114
129
|
export { hasPsbtMagic, type IPsbt, type IPsbtWithAddress } from "./psbt.js";
|
|
130
|
+
export type { PsbtInputKeyValue } from "./wasm/wasm_utxo.js";
|
package/dist/cjs/js/psbt.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
1
|
+
import type { PsbtInputData, PsbtInputKeyValue, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
2
2
|
import type { BIP32 } from "./bip32.js";
|
|
3
3
|
import type { ITransactionCommon } from "./transaction.js";
|
|
4
4
|
import type { PsbtKvKey } from "./fixedScriptWallet/BitGoKeySubtype.js";
|
|
5
5
|
/** Common interface for PSBT types */
|
|
6
6
|
export interface IPsbt extends ITransactionCommon<PsbtInputData, PsbtOutputData> {
|
|
7
7
|
getGlobalXpubs(): BIP32[];
|
|
8
|
+
getInputKeyValues(index: number): PsbtInputKeyValue[];
|
|
8
9
|
unsignedTxId(): string;
|
|
9
10
|
addInputAtIndex(index: number, txid: string, vout: number, value: bigint, script: Uint8Array, sequence?: number): number;
|
|
10
11
|
addOutputAtIndex(index: number, script: Uint8Array, value: bigint): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PsbtInputData, PsbtOutputData } from "./wasm/wasm_utxo.js";
|
|
1
|
+
import type { PsbtInputData, PsbtInputKeyValue, PsbtOutputData } from "./wasm/wasm_utxo.js";
|
|
2
2
|
import { BIP32 } from "./bip32.js";
|
|
3
3
|
import type { PsbtKvKey } from "./fixedScriptWallet/BitGoKeySubtype.js";
|
|
4
4
|
interface WasmPsbtBase {
|
|
@@ -9,6 +9,7 @@ interface WasmPsbtBase {
|
|
|
9
9
|
unsigned_tx_id(): string;
|
|
10
10
|
serialize(): Uint8Array;
|
|
11
11
|
get_inputs(): unknown;
|
|
12
|
+
get_input_key_values(index: number): unknown;
|
|
12
13
|
get_outputs(): unknown;
|
|
13
14
|
get_global_xpubs(): unknown;
|
|
14
15
|
remove_input(index: number): void;
|
|
@@ -33,6 +34,7 @@ export declare abstract class PsbtBase<W extends WasmPsbtBase> {
|
|
|
33
34
|
unsignedTxId(): string;
|
|
34
35
|
serialize(): Uint8Array;
|
|
35
36
|
getInputs(): PsbtInputData[];
|
|
37
|
+
getInputKeyValues(index: number): PsbtInputKeyValue[];
|
|
36
38
|
getOutputs(): PsbtOutputData[];
|
|
37
39
|
getGlobalXpubs(): BIP32[];
|
|
38
40
|
removeInput(index: number): void;
|
package/dist/cjs/js/psbtBase.js
CHANGED
|
@@ -488,6 +488,7 @@ export class BitGoPsbt {
|
|
|
488
488
|
*/
|
|
489
489
|
generate_musig2_nonces(xpriv: WasmBIP32, session_id_bytes?: Uint8Array | null): void;
|
|
490
490
|
get_global_xpubs(): any;
|
|
491
|
+
get_input_key_values(index: number): any;
|
|
491
492
|
get_input_kv(index: number, key: any): Uint8Array | undefined;
|
|
492
493
|
get_inputs(): any;
|
|
493
494
|
get_kv(key: any): Uint8Array | undefined;
|
|
@@ -1658,6 +1659,7 @@ export class WrapPsbt {
|
|
|
1658
1659
|
*/
|
|
1659
1660
|
finalize_mut_zcash(consensus_branch_id: number, version_group_id?: number | null, expiry_height?: number | null): void;
|
|
1660
1661
|
get_global_xpubs(): any;
|
|
1662
|
+
get_input_key_values(index: number): any;
|
|
1661
1663
|
get_input_kv(index: number, key: any): Uint8Array | undefined;
|
|
1662
1664
|
get_inputs(): any;
|
|
1663
1665
|
get_kv(key: any): Uint8Array | undefined;
|
|
@@ -1691,6 +1691,25 @@ class BitGoPsbt {
|
|
|
1691
1691
|
const ret = wasm.bitgopsbt_get_global_xpubs(this.__wbg_ptr);
|
|
1692
1692
|
return takeObject(ret);
|
|
1693
1693
|
}
|
|
1694
|
+
/**
|
|
1695
|
+
* @param {number} index
|
|
1696
|
+
* @returns {any}
|
|
1697
|
+
*/
|
|
1698
|
+
get_input_key_values(index) {
|
|
1699
|
+
try {
|
|
1700
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1701
|
+
wasm.bitgopsbt_get_input_key_values(retptr, this.__wbg_ptr, index);
|
|
1702
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1703
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1704
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1705
|
+
if (r2) {
|
|
1706
|
+
throw takeObject(r1);
|
|
1707
|
+
}
|
|
1708
|
+
return takeObject(r0);
|
|
1709
|
+
} finally {
|
|
1710
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1694
1713
|
/**
|
|
1695
1714
|
* @param {number} index
|
|
1696
1715
|
* @param {any} key
|
|
@@ -6105,6 +6124,25 @@ class WrapPsbt {
|
|
|
6105
6124
|
const ret = wasm.wrappsbt_get_global_xpubs(this.__wbg_ptr);
|
|
6106
6125
|
return takeObject(ret);
|
|
6107
6126
|
}
|
|
6127
|
+
/**
|
|
6128
|
+
* @param {number} index
|
|
6129
|
+
* @returns {any}
|
|
6130
|
+
*/
|
|
6131
|
+
get_input_key_values(index) {
|
|
6132
|
+
try {
|
|
6133
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
6134
|
+
wasm.wrappsbt_get_input_key_values(retptr, this.__wbg_ptr, index);
|
|
6135
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
6136
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
6137
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
6138
|
+
if (r2) {
|
|
6139
|
+
throw takeObject(r1);
|
|
6140
|
+
}
|
|
6141
|
+
return takeObject(r0);
|
|
6142
|
+
} finally {
|
|
6143
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
6144
|
+
}
|
|
6145
|
+
}
|
|
6108
6146
|
/**
|
|
6109
6147
|
* @param {number} index
|
|
6110
6148
|
* @param {any} key
|
|
Binary file
|
|
@@ -1,42 +1,57 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
4
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
6
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
7
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
8
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
9
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
11
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
13
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
14
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
15
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
16
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
17
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
18
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
19
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
20
|
+
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
|
+
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
23
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
24
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
25
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
26
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
27
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
28
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
29
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
30
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
31
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
32
|
+
export const isInspectEnabled: () => number;
|
|
33
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
34
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
35
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
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;
|
|
49
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
50
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
36
51
|
export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
|
|
37
52
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
38
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
39
53
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
54
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
40
55
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
41
56
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
42
57
|
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
@@ -54,9 +69,6 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
54
69
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
55
70
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
56
71
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
57
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
58
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
59
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
60
72
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
61
73
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
62
74
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -69,6 +81,7 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
69
81
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
70
82
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
71
83
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
84
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
72
85
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
73
86
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
74
87
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -91,6 +104,7 @@ export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
|
|
|
91
104
|
export const wrappsbt_finalize_mut: (a: number, b: number) => void;
|
|
92
105
|
export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
93
106
|
export const wrappsbt_get_global_xpubs: (a: number) => number;
|
|
107
|
+
export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
|
|
94
108
|
export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
95
109
|
export const wrappsbt_get_inputs: (a: number, b: number) => void;
|
|
96
110
|
export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
|
|
@@ -155,29 +169,38 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
155
169
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
156
170
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
157
171
|
export const wrappsbt_version: (a: number) => number;
|
|
158
|
-
export const
|
|
159
|
-
export const
|
|
160
|
-
export const
|
|
161
|
-
export const
|
|
162
|
-
export const
|
|
163
|
-
export const
|
|
164
|
-
export const
|
|
165
|
-
export const
|
|
166
|
-
export const
|
|
167
|
-
export const
|
|
168
|
-
export const
|
|
169
|
-
export const
|
|
170
|
-
export const
|
|
171
|
-
export const
|
|
172
|
-
export const
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
175
|
-
export const
|
|
176
|
-
export const
|
|
177
|
-
export const
|
|
178
|
-
export const
|
|
179
|
-
export const
|
|
180
|
-
export const
|
|
172
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
173
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
174
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
175
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
176
|
+
export const wasmdimensions_empty: () => number;
|
|
177
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
178
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
179
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
180
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
181
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
182
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
183
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
184
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
185
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
186
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
187
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
188
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
189
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
190
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
191
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
192
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
193
|
+
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;
|
|
194
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
195
|
+
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;
|
|
196
|
+
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;
|
|
197
|
+
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;
|
|
198
|
+
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;
|
|
199
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
200
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
201
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
202
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
203
|
+
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;
|
|
181
204
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
182
205
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
183
206
|
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
@@ -227,6 +250,7 @@ export const bitgopsbt_from_network_format_zcash_with_block_height: (a: number,
|
|
|
227
250
|
export const bitgopsbt_from_network_format_zcash_with_branch_id: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
228
251
|
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
229
252
|
export const bitgopsbt_get_global_xpubs: (a: number) => number;
|
|
253
|
+
export const bitgopsbt_get_input_key_values: (a: number, b: number, c: number) => void;
|
|
230
254
|
export const bitgopsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
231
255
|
export const bitgopsbt_get_inputs: (a: number, b: number) => void;
|
|
232
256
|
export const bitgopsbt_get_kv: (a: number, b: number, c: number) => void;
|
|
@@ -306,28 +330,6 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
|
306
330
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
307
331
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
308
332
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
309
|
-
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
310
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
311
|
-
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
312
|
-
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
313
|
-
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
314
|
-
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
315
|
-
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
316
|
-
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
317
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
318
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
319
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
320
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
321
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
322
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
323
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
324
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
325
|
-
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
326
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
327
|
-
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
328
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
329
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
330
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
331
333
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
332
334
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
333
335
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
@@ -44,11 +44,11 @@ function findDescriptorForDerivationIndex(script, index, descriptorMap) {
|
|
|
44
44
|
function getDerivationIndexFromPath(path) {
|
|
45
45
|
const indexStr = path.split("/").pop();
|
|
46
46
|
if (!indexStr) {
|
|
47
|
-
|
|
47
|
+
return undefined;
|
|
48
48
|
}
|
|
49
|
-
const index =
|
|
50
|
-
if (index.toString() !== indexStr) {
|
|
51
|
-
|
|
49
|
+
const index = Number(indexStr);
|
|
50
|
+
if (!Number.isSafeInteger(index) || index < 0 || index.toString() !== indexStr) {
|
|
51
|
+
return undefined;
|
|
52
52
|
}
|
|
53
53
|
return index;
|
|
54
54
|
}
|
|
@@ -59,7 +59,13 @@ function getDerivationIndexFromPath(path) {
|
|
|
59
59
|
* @param descriptorMap
|
|
60
60
|
*/
|
|
61
61
|
function findDescriptorForAnyDerivationPath(script, derivationPaths, descriptorMap) {
|
|
62
|
-
const derivationIndexSet = new Set(
|
|
62
|
+
const derivationIndexSet = new Set();
|
|
63
|
+
for (const path of derivationPaths) {
|
|
64
|
+
const index = getDerivationIndexFromPath(path);
|
|
65
|
+
if (index !== undefined) {
|
|
66
|
+
derivationIndexSet.add(index);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
63
69
|
for (const index of [...derivationIndexSet]) {
|
|
64
70
|
const desc = findDescriptorForDerivationIndex(script, index, descriptorMap);
|
|
65
71
|
if (desc) {
|
|
@@ -69,13 +75,11 @@ function findDescriptorForAnyDerivationPath(script, derivationPaths, descriptorM
|
|
|
69
75
|
return undefined;
|
|
70
76
|
}
|
|
71
77
|
function getDerivationPaths(v) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
return undefined;
|
|
78
|
+
const paths = [
|
|
79
|
+
...(v.bip32Derivation ?? []).map((derivation) => derivation.path),
|
|
80
|
+
...(v.tapBip32Derivation ?? []).map((derivation) => derivation.path),
|
|
81
|
+
].filter((path) => path !== "" && path !== "m");
|
|
82
|
+
return paths.length > 0 ? paths : undefined;
|
|
79
83
|
}
|
|
80
84
|
/**
|
|
81
85
|
* @param input
|
package/dist/esm/js/index.d.ts
CHANGED
|
@@ -70,6 +70,21 @@ declare module "./wasm/wasm_utxo.js" {
|
|
|
70
70
|
bip32Derivation: PsbtBip32Derivation[];
|
|
71
71
|
tapBip32Derivation: PsbtBip32Derivation[];
|
|
72
72
|
}
|
|
73
|
+
/** A serialized input-map record with a standard PSBT key type. */
|
|
74
|
+
interface PsbtKnownInputKeyValue {
|
|
75
|
+
type: "known";
|
|
76
|
+
key: string;
|
|
77
|
+
keyData: Uint8Array;
|
|
78
|
+
value: Uint8Array;
|
|
79
|
+
}
|
|
80
|
+
/** A serialized input-map record whose key type is unrecognized. */
|
|
81
|
+
interface PsbtUnknownInputKeyValue {
|
|
82
|
+
type: "unknown";
|
|
83
|
+
keyType: bigint;
|
|
84
|
+
keyData: Uint8Array;
|
|
85
|
+
value: Uint8Array;
|
|
86
|
+
}
|
|
87
|
+
type PsbtInputKeyValue = PsbtKnownInputKeyValue | PsbtUnknownInputKeyValue;
|
|
73
88
|
/** Raw PSBT output data returned by getOutputs() */
|
|
74
89
|
interface PsbtOutputData {
|
|
75
90
|
script: Uint8Array;
|
|
@@ -112,3 +127,4 @@ export { WrapMiniscript as Miniscript } from "./wasm/wasm_utxo.js";
|
|
|
112
127
|
export { Psbt } from "./descriptorWallet/Psbt.js";
|
|
113
128
|
export { DashTransaction, Transaction, ZcashTransaction, type ITransaction, type ITransactionCommon, } from "./transaction.js";
|
|
114
129
|
export { hasPsbtMagic, type IPsbt, type IPsbtWithAddress } from "./psbt.js";
|
|
130
|
+
export type { PsbtInputKeyValue } from "./wasm/wasm_utxo.js";
|
package/dist/esm/js/psbt.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { PsbtInputData, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
1
|
+
import type { PsbtInputData, PsbtInputKeyValue, PsbtOutputData, PsbtOutputDataWithAddress } from "./wasm/wasm_utxo.js";
|
|
2
2
|
import type { BIP32 } from "./bip32.js";
|
|
3
3
|
import type { ITransactionCommon } from "./transaction.js";
|
|
4
4
|
import type { PsbtKvKey } from "./fixedScriptWallet/BitGoKeySubtype.js";
|
|
5
5
|
/** Common interface for PSBT types */
|
|
6
6
|
export interface IPsbt extends ITransactionCommon<PsbtInputData, PsbtOutputData> {
|
|
7
7
|
getGlobalXpubs(): BIP32[];
|
|
8
|
+
getInputKeyValues(index: number): PsbtInputKeyValue[];
|
|
8
9
|
unsignedTxId(): string;
|
|
9
10
|
addInputAtIndex(index: number, txid: string, vout: number, value: bigint, script: Uint8Array, sequence?: number): number;
|
|
10
11
|
addOutputAtIndex(index: number, script: Uint8Array, value: bigint): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PsbtInputData, PsbtOutputData } from "./wasm/wasm_utxo.js";
|
|
1
|
+
import type { PsbtInputData, PsbtInputKeyValue, PsbtOutputData } from "./wasm/wasm_utxo.js";
|
|
2
2
|
import { BIP32 } from "./bip32.js";
|
|
3
3
|
import type { PsbtKvKey } from "./fixedScriptWallet/BitGoKeySubtype.js";
|
|
4
4
|
interface WasmPsbtBase {
|
|
@@ -9,6 +9,7 @@ interface WasmPsbtBase {
|
|
|
9
9
|
unsigned_tx_id(): string;
|
|
10
10
|
serialize(): Uint8Array;
|
|
11
11
|
get_inputs(): unknown;
|
|
12
|
+
get_input_key_values(index: number): unknown;
|
|
12
13
|
get_outputs(): unknown;
|
|
13
14
|
get_global_xpubs(): unknown;
|
|
14
15
|
remove_input(index: number): void;
|
|
@@ -33,6 +34,7 @@ export declare abstract class PsbtBase<W extends WasmPsbtBase> {
|
|
|
33
34
|
unsignedTxId(): string;
|
|
34
35
|
serialize(): Uint8Array;
|
|
35
36
|
getInputs(): PsbtInputData[];
|
|
37
|
+
getInputKeyValues(index: number): PsbtInputKeyValue[];
|
|
36
38
|
getOutputs(): PsbtOutputData[];
|
|
37
39
|
getGlobalXpubs(): BIP32[];
|
|
38
40
|
removeInput(index: number): void;
|
package/dist/esm/js/psbtBase.js
CHANGED
|
@@ -488,6 +488,7 @@ export class BitGoPsbt {
|
|
|
488
488
|
*/
|
|
489
489
|
generate_musig2_nonces(xpriv: WasmBIP32, session_id_bytes?: Uint8Array | null): void;
|
|
490
490
|
get_global_xpubs(): any;
|
|
491
|
+
get_input_key_values(index: number): any;
|
|
491
492
|
get_input_kv(index: number, key: any): Uint8Array | undefined;
|
|
492
493
|
get_inputs(): any;
|
|
493
494
|
get_kv(key: any): Uint8Array | undefined;
|
|
@@ -1658,6 +1659,7 @@ export class WrapPsbt {
|
|
|
1658
1659
|
*/
|
|
1659
1660
|
finalize_mut_zcash(consensus_branch_id: number, version_group_id?: number | null, expiry_height?: number | null): void;
|
|
1660
1661
|
get_global_xpubs(): any;
|
|
1662
|
+
get_input_key_values(index: number): any;
|
|
1661
1663
|
get_input_kv(index: number, key: any): Uint8Array | undefined;
|
|
1662
1664
|
get_inputs(): any;
|
|
1663
1665
|
get_kv(key: any): Uint8Array | undefined;
|
|
@@ -1687,6 +1687,25 @@ export class BitGoPsbt {
|
|
|
1687
1687
|
const ret = wasm.bitgopsbt_get_global_xpubs(this.__wbg_ptr);
|
|
1688
1688
|
return takeObject(ret);
|
|
1689
1689
|
}
|
|
1690
|
+
/**
|
|
1691
|
+
* @param {number} index
|
|
1692
|
+
* @returns {any}
|
|
1693
|
+
*/
|
|
1694
|
+
get_input_key_values(index) {
|
|
1695
|
+
try {
|
|
1696
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1697
|
+
wasm.bitgopsbt_get_input_key_values(retptr, this.__wbg_ptr, index);
|
|
1698
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1699
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1700
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1701
|
+
if (r2) {
|
|
1702
|
+
throw takeObject(r1);
|
|
1703
|
+
}
|
|
1704
|
+
return takeObject(r0);
|
|
1705
|
+
} finally {
|
|
1706
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1690
1709
|
/**
|
|
1691
1710
|
* @param {number} index
|
|
1692
1711
|
* @param {any} key
|
|
@@ -6084,6 +6103,25 @@ export class WrapPsbt {
|
|
|
6084
6103
|
const ret = wasm.wrappsbt_get_global_xpubs(this.__wbg_ptr);
|
|
6085
6104
|
return takeObject(ret);
|
|
6086
6105
|
}
|
|
6106
|
+
/**
|
|
6107
|
+
* @param {number} index
|
|
6108
|
+
* @returns {any}
|
|
6109
|
+
*/
|
|
6110
|
+
get_input_key_values(index) {
|
|
6111
|
+
try {
|
|
6112
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
6113
|
+
wasm.wrappsbt_get_input_key_values(retptr, this.__wbg_ptr, index);
|
|
6114
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
6115
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
6116
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
6117
|
+
if (r2) {
|
|
6118
|
+
throw takeObject(r1);
|
|
6119
|
+
}
|
|
6120
|
+
return takeObject(r0);
|
|
6121
|
+
} finally {
|
|
6122
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
6123
|
+
}
|
|
6124
|
+
}
|
|
6087
6125
|
/**
|
|
6088
6126
|
* @param {number} index
|
|
6089
6127
|
* @param {any} key
|
|
Binary file
|
|
@@ -1,42 +1,57 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
4
|
+
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
6
|
+
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
7
|
+
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
8
|
+
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
9
|
+
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
+
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
11
|
+
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
12
|
+
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
13
|
+
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
14
|
+
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
15
|
+
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
16
|
+
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
17
|
+
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
18
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
19
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
20
|
+
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
|
+
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
23
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
24
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
25
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
26
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
27
|
+
export const __wbg_messagenamespace_free: (a: number, b: number) => void;
|
|
28
|
+
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
29
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
30
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
31
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
32
|
+
export const isInspectEnabled: () => number;
|
|
33
|
+
export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
|
|
34
|
+
export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
35
|
+
export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
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;
|
|
49
|
+
export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
50
|
+
export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
36
51
|
export const __wbg_ironwoodwitness_free: (a: number, b: number) => void;
|
|
37
52
|
export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
|
|
38
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
39
53
|
export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
|
|
54
|
+
export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
|
|
40
55
|
export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
|
|
41
56
|
export const __wbg_wrappsbt_free: (a: number, b: number) => void;
|
|
42
57
|
export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
|
|
@@ -54,9 +69,6 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
|
|
|
54
69
|
export const wasmdashtransaction_output_count: (a: number) => number;
|
|
55
70
|
export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
|
|
56
71
|
export const wasmdashtransaction_version: (a: number) => number;
|
|
57
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
58
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
59
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
60
72
|
export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
61
73
|
export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
62
74
|
export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
|
|
@@ -69,6 +81,7 @@ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c:
|
|
|
69
81
|
export const wasmtransaction_get_txid: (a: number, b: number) => void;
|
|
70
82
|
export const wasmtransaction_get_vsize: (a: number) => number;
|
|
71
83
|
export const wasmtransaction_to_bytes: (a: number, b: number) => void;
|
|
84
|
+
export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
|
|
72
85
|
export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
|
|
73
86
|
export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
|
|
74
87
|
export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
|
|
@@ -91,6 +104,7 @@ export const wrappsbt_finalize_input: (a: number, b: number, c: number) => void;
|
|
|
91
104
|
export const wrappsbt_finalize_mut: (a: number, b: number) => void;
|
|
92
105
|
export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
93
106
|
export const wrappsbt_get_global_xpubs: (a: number) => number;
|
|
107
|
+
export const wrappsbt_get_input_key_values: (a: number, b: number, c: number) => void;
|
|
94
108
|
export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
95
109
|
export const wrappsbt_get_inputs: (a: number, b: number) => void;
|
|
96
110
|
export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
|
|
@@ -155,29 +169,38 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
|
|
|
155
169
|
export const wasmzcashtransaction_version: (a: number) => number;
|
|
156
170
|
export const wrappsbt_lock_time: (a: number) => number;
|
|
157
171
|
export const wrappsbt_version: (a: number) => number;
|
|
158
|
-
export const
|
|
159
|
-
export const
|
|
160
|
-
export const
|
|
161
|
-
export const
|
|
162
|
-
export const
|
|
163
|
-
export const
|
|
164
|
-
export const
|
|
165
|
-
export const
|
|
166
|
-
export const
|
|
167
|
-
export const
|
|
168
|
-
export const
|
|
169
|
-
export const
|
|
170
|
-
export const
|
|
171
|
-
export const
|
|
172
|
-
export const
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
175
|
-
export const
|
|
176
|
-
export const
|
|
177
|
-
export const
|
|
178
|
-
export const
|
|
179
|
-
export const
|
|
180
|
-
export const
|
|
172
|
+
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
173
|
+
export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
|
|
174
|
+
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
175
|
+
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
176
|
+
export const wasmdimensions_empty: () => number;
|
|
177
|
+
export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
178
|
+
export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
|
|
179
|
+
export const wasmdimensions_from_output_script_length: (a: number) => number;
|
|
180
|
+
export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
|
|
181
|
+
export const wasmdimensions_from_psbt: (a: number, b: number) => void;
|
|
182
|
+
export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
|
|
183
|
+
export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
|
|
184
|
+
export const wasmdimensions_get_output_vsize: (a: number) => number;
|
|
185
|
+
export const wasmdimensions_get_output_weight: (a: number) => number;
|
|
186
|
+
export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
|
|
187
|
+
export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
|
|
188
|
+
export const wasmdimensions_has_segwit: (a: number) => number;
|
|
189
|
+
export const wasmdimensions_plus: (a: number, b: number) => number;
|
|
190
|
+
export const wasmdimensions_times: (a: number, b: number) => number;
|
|
191
|
+
export const __wbg_bip322namespace_free: (a: number, b: number) => void;
|
|
192
|
+
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
193
|
+
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;
|
|
194
|
+
export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
|
|
195
|
+
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;
|
|
196
|
+
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;
|
|
197
|
+
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;
|
|
198
|
+
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;
|
|
199
|
+
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
200
|
+
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
201
|
+
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
202
|
+
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
203
|
+
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;
|
|
181
204
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
182
205
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
183
206
|
export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
|
|
@@ -227,6 +250,7 @@ export const bitgopsbt_from_network_format_zcash_with_block_height: (a: number,
|
|
|
227
250
|
export const bitgopsbt_from_network_format_zcash_with_branch_id: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
228
251
|
export const bitgopsbt_generate_musig2_nonces: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
229
252
|
export const bitgopsbt_get_global_xpubs: (a: number) => number;
|
|
253
|
+
export const bitgopsbt_get_input_key_values: (a: number, b: number, c: number) => void;
|
|
230
254
|
export const bitgopsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
|
|
231
255
|
export const bitgopsbt_get_inputs: (a: number, b: number) => void;
|
|
232
256
|
export const bitgopsbt_get_kv: (a: number, b: number, c: number) => void;
|
|
@@ -306,28 +330,6 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
|
306
330
|
export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
|
|
307
331
|
export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
|
|
308
332
|
export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
|
|
309
|
-
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
310
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
311
|
-
export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
|
|
312
|
-
export const wrapdescriptor_descType: (a: number, b: number) => void;
|
|
313
|
-
export const wrapdescriptor_encode: (a: number, b: number) => void;
|
|
314
|
-
export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
315
|
-
export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
|
|
316
|
-
export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
317
|
-
export const wrapdescriptor_hasWildcard: (a: number) => number;
|
|
318
|
-
export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
|
|
319
|
-
export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
320
|
-
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
321
|
-
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
322
|
-
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
323
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
324
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
325
|
-
export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
326
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
327
|
-
export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
328
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
329
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
330
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
331
333
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
332
334
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
333
335
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|