@bitgo/wasm-utxo 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +5 -0
- package/dist/cjs/js/wasm/wasm_utxo.js +12 -12
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +25 -25
- package/dist/cjs/package.json +1 -0
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +5 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.js +12 -12
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +25 -25
- package/package.json +3 -2
|
@@ -10,7 +10,12 @@ export type ScriptId = {
|
|
|
10
10
|
index: number;
|
|
11
11
|
};
|
|
12
12
|
export type InputScriptType = "p2shP2pk" | "p2sh" | "p2shP2wsh" | "p2wsh" | "p2trLegacy" | "p2trMusig2ScriptPath" | "p2trMusig2KeyPath";
|
|
13
|
+
export type OutPoint = {
|
|
14
|
+
txid: string;
|
|
15
|
+
vout: number;
|
|
16
|
+
};
|
|
13
17
|
export type ParsedInput = {
|
|
18
|
+
previousOutput: OutPoint;
|
|
14
19
|
address: string;
|
|
15
20
|
script: Uint8Array;
|
|
16
21
|
value: bigint;
|
|
@@ -133,6 +133,12 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
133
133
|
return ptr;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
function _assertClass(instance, klass) {
|
|
137
|
+
if (!(instance instanceof klass)) {
|
|
138
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
136
142
|
function passArray8ToWasm0(arg, malloc) {
|
|
137
143
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
138
144
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -140,10 +146,12 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
140
146
|
return ptr;
|
|
141
147
|
}
|
|
142
148
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
let stack_pointer = 128;
|
|
150
|
+
|
|
151
|
+
function addBorrowedObject(obj) {
|
|
152
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
153
|
+
heap[--stack_pointer] = obj;
|
|
154
|
+
return stack_pointer;
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
@@ -156,14 +164,6 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
156
164
|
return ptr;
|
|
157
165
|
}
|
|
158
166
|
|
|
159
|
-
let stack_pointer = 128;
|
|
160
|
-
|
|
161
|
-
function addBorrowedObject(obj) {
|
|
162
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
163
|
-
heap[--stack_pointer] = obj;
|
|
164
|
-
return stack_pointer;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
167
|
const AddressNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
168
168
|
? { register: () => {}, unregister: () => {} }
|
|
169
169
|
: new FinalizationRegistry(ptr => wasm.__wbg_addressnamespace_free(ptr >>> 0, 1));
|
|
Binary file
|
|
@@ -2,22 +2,12 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
5
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
6
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
7
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
9
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
11
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
12
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
13
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
14
|
-
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
15
5
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
16
6
|
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
17
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
18
7
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
8
|
+
export const __wbg_wrappsbt_free: (a: number, b: 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;
|
|
21
11
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
22
12
|
export const wasmbip32_depth: (a: number) => number;
|
|
23
13
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -48,19 +38,31 @@ export const wasmecpair_public_key: (a: number) => number;
|
|
|
48
38
|
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
49
39
|
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
50
40
|
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
51
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
52
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
53
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
54
41
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
55
42
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
56
43
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
57
44
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
58
45
|
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;
|
|
46
|
+
export const wrappsbt_clone: (a: number) => number;
|
|
47
|
+
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
48
|
+
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
49
|
+
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
50
|
+
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
51
|
+
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
52
|
+
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
53
|
+
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
59
54
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
55
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
56
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
57
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
58
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
59
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
60
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
61
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
60
62
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
61
63
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
62
64
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
63
|
-
export const
|
|
65
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
64
66
|
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
65
67
|
export const bitgopsbt_extract_transaction: (a: number, b: number) => void;
|
|
66
68
|
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
@@ -89,14 +91,12 @@ export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
|
89
91
|
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
90
92
|
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
91
93
|
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
92
|
-
export const
|
|
93
|
-
export const
|
|
94
|
-
export const
|
|
95
|
-
export const
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
98
|
-
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
99
|
-
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
94
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
95
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
96
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
97
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
98
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
99
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
100
100
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
101
101
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
102
102
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -10,7 +10,12 @@ export type ScriptId = {
|
|
|
10
10
|
index: number;
|
|
11
11
|
};
|
|
12
12
|
export type InputScriptType = "p2shP2pk" | "p2sh" | "p2shP2wsh" | "p2wsh" | "p2trLegacy" | "p2trMusig2ScriptPath" | "p2trMusig2KeyPath";
|
|
13
|
+
export type OutPoint = {
|
|
14
|
+
txid: string;
|
|
15
|
+
vout: number;
|
|
16
|
+
};
|
|
13
17
|
export type ParsedInput = {
|
|
18
|
+
previousOutput: OutPoint;
|
|
14
19
|
address: string;
|
|
15
20
|
script: Uint8Array;
|
|
16
21
|
value: bigint;
|
|
@@ -143,6 +143,12 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
143
143
|
return ptr;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
function _assertClass(instance, klass) {
|
|
147
|
+
if (!(instance instanceof klass)) {
|
|
148
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
146
152
|
function passArray8ToWasm0(arg, malloc) {
|
|
147
153
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
148
154
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -150,10 +156,12 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
150
156
|
return ptr;
|
|
151
157
|
}
|
|
152
158
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
let stack_pointer = 128;
|
|
160
|
+
|
|
161
|
+
function addBorrowedObject(obj) {
|
|
162
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
163
|
+
heap[--stack_pointer] = obj;
|
|
164
|
+
return stack_pointer;
|
|
157
165
|
}
|
|
158
166
|
|
|
159
167
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
@@ -166,14 +174,6 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
166
174
|
return ptr;
|
|
167
175
|
}
|
|
168
176
|
|
|
169
|
-
let stack_pointer = 128;
|
|
170
|
-
|
|
171
|
-
function addBorrowedObject(obj) {
|
|
172
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
173
|
-
heap[--stack_pointer] = obj;
|
|
174
|
-
return stack_pointer;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
177
|
const AddressNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
178
178
|
? { register: () => {}, unregister: () => {} }
|
|
179
179
|
: new FinalizationRegistry(ptr => wasm.__wbg_addressnamespace_free(ptr >>> 0, 1));
|
|
Binary file
|
|
@@ -2,22 +2,12 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
|
|
5
|
-
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
6
|
-
export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
7
|
-
export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
|
-
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
9
|
-
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
10
|
-
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
11
|
-
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
12
|
-
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
13
|
-
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
14
|
-
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
15
5
|
export const __wbg_wasmbip32_free: (a: number, b: number) => void;
|
|
16
6
|
export const __wbg_wasmecpair_free: (a: number, b: number) => void;
|
|
17
|
-
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
18
7
|
export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
8
|
+
export const __wbg_wrappsbt_free: (a: number, b: 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;
|
|
21
11
|
export const wasmbip32_chain_code: (a: number) => number;
|
|
22
12
|
export const wasmbip32_depth: (a: number) => number;
|
|
23
13
|
export const wasmbip32_derive: (a: number, b: number, c: number) => void;
|
|
@@ -48,19 +38,31 @@ export const wasmecpair_public_key: (a: number) => number;
|
|
|
48
38
|
export const wasmecpair_to_wif: (a: number, b: number) => void;
|
|
49
39
|
export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
|
|
50
40
|
export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
|
|
51
|
-
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
52
|
-
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
53
|
-
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
54
41
|
export const wasmrootwalletkeys_backup_key: (a: number) => number;
|
|
55
42
|
export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
|
|
56
43
|
export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
|
|
57
44
|
export const wasmrootwalletkeys_user_key: (a: number) => number;
|
|
58
45
|
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;
|
|
46
|
+
export const wrappsbt_clone: (a: number) => number;
|
|
47
|
+
export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
|
|
48
|
+
export const wrappsbt_finalize: (a: number, b: number) => void;
|
|
49
|
+
export const wrappsbt_serialize: (a: number, b: number) => void;
|
|
50
|
+
export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
|
|
51
|
+
export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
|
|
52
|
+
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
53
|
+
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
59
54
|
export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
|
|
55
|
+
export const __wbg_addressnamespace_free: (a: number, b: number) => void;
|
|
56
|
+
export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
|
|
57
|
+
export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
58
|
+
export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
59
|
+
export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
60
|
+
export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
|
|
61
|
+
export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
|
|
60
62
|
export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
|
|
61
63
|
export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
|
|
62
64
|
export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
|
|
63
|
-
export const
|
|
65
|
+
export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
|
|
64
66
|
export const bitgopsbt_combine_musig2_nonces: (a: number, b: number, c: number) => void;
|
|
65
67
|
export const bitgopsbt_extract_transaction: (a: number, b: number) => void;
|
|
66
68
|
export const bitgopsbt_finalize_all_inputs: (a: number, b: number) => void;
|
|
@@ -89,14 +91,12 @@ export const wrapdescriptor_node: (a: number, b: number) => void;
|
|
|
89
91
|
export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
|
|
90
92
|
export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
|
|
91
93
|
export const wrapdescriptor_toString: (a: number, b: number) => void;
|
|
92
|
-
export const
|
|
93
|
-
export const
|
|
94
|
-
export const
|
|
95
|
-
export const
|
|
96
|
-
export const
|
|
97
|
-
export const
|
|
98
|
-
export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
99
|
-
export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
|
|
94
|
+
export const wrapminiscript_encode: (a: number, b: number) => void;
|
|
95
|
+
export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
96
|
+
export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
97
|
+
export const wrapminiscript_node: (a: number, b: number) => void;
|
|
98
|
+
export const wrapminiscript_toAsmString: (a: number, b: number) => void;
|
|
99
|
+
export const wrapminiscript_toString: (a: number, b: number) => void;
|
|
100
100
|
export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
101
101
|
export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
102
102
|
export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitgo/wasm-utxo",
|
|
3
3
|
"description": "WebAssembly wrapper for rust-bitcoin (beta)",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/esm/js/**/*",
|
|
13
|
-
"dist/cjs/js/**/*"
|
|
13
|
+
"dist/cjs/js/**/*",
|
|
14
|
+
"dist/cjs/package.json"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|