@bitgo/wasm-utxo 1.11.0 → 1.13.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 +17 -2
- package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +22 -4
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +26 -16
- package/dist/cjs/js/wasm/wasm_utxo.js +297 -293
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +53 -52
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +17 -2
- package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +22 -4
- package/dist/esm/js/wasm/wasm_utxo.d.ts +26 -16
- package/dist/esm/js/wasm/wasm_utxo_bg.js +303 -289
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +53 -52
- package/package.json +1 -1
|
@@ -2,34 +2,6 @@
|
|
|
2
2
|
let imports = {};
|
|
3
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
4
|
|
|
5
|
-
let cachedUint8ArrayMemory0 = null;
|
|
6
|
-
|
|
7
|
-
function getUint8ArrayMemory0() {
|
|
8
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
9
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
10
|
-
}
|
|
11
|
-
return cachedUint8ArrayMemory0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
15
|
-
|
|
16
|
-
cachedTextDecoder.decode();
|
|
17
|
-
|
|
18
|
-
function decodeText(ptr, len) {
|
|
19
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getStringFromWasm0(ptr, len) {
|
|
23
|
-
ptr = ptr >>> 0;
|
|
24
|
-
return decodeText(ptr, len);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let heap = new Array(128).fill(undefined);
|
|
28
|
-
|
|
29
|
-
heap.push(undefined, null, true, false);
|
|
30
|
-
|
|
31
|
-
let heap_next = heap.length;
|
|
32
|
-
|
|
33
5
|
function addHeapObject(obj) {
|
|
34
6
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
35
7
|
const idx = heap_next;
|
|
@@ -39,19 +11,16 @@ function addHeapObject(obj) {
|
|
|
39
11
|
return idx;
|
|
40
12
|
}
|
|
41
13
|
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
return f.apply(this, args);
|
|
47
|
-
} catch (e) {
|
|
48
|
-
wasm.__wbindgen_export_0(addHeapObject(e));
|
|
14
|
+
function _assertClass(instance, klass) {
|
|
15
|
+
if (!(instance instanceof klass)) {
|
|
16
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
49
17
|
}
|
|
50
18
|
}
|
|
51
19
|
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
20
|
+
function addBorrowedObject(obj) {
|
|
21
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
22
|
+
heap[--stack_pointer] = obj;
|
|
23
|
+
return stack_pointer;
|
|
55
24
|
}
|
|
56
25
|
|
|
57
26
|
function dropObject(idx) {
|
|
@@ -60,18 +29,12 @@ function dropObject(idx) {
|
|
|
60
29
|
heap_next = idx;
|
|
61
30
|
}
|
|
62
31
|
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return ret;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function isLikeNone(x) {
|
|
70
|
-
return x === undefined || x === null;
|
|
32
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
33
|
+
ptr = ptr >>> 0;
|
|
34
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
71
35
|
}
|
|
72
36
|
|
|
73
37
|
let cachedDataViewMemory0 = null;
|
|
74
|
-
|
|
75
38
|
function getDataViewMemory0() {
|
|
76
39
|
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
77
40
|
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
@@ -79,23 +42,56 @@ function getDataViewMemory0() {
|
|
|
79
42
|
return cachedDataViewMemory0;
|
|
80
43
|
}
|
|
81
44
|
|
|
82
|
-
|
|
45
|
+
function getStringFromWasm0(ptr, len) {
|
|
46
|
+
ptr = ptr >>> 0;
|
|
47
|
+
return decodeText(ptr, len);
|
|
48
|
+
}
|
|
83
49
|
|
|
84
|
-
|
|
50
|
+
let cachedUint8ArrayMemory0 = null;
|
|
51
|
+
function getUint8ArrayMemory0() {
|
|
52
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
53
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
54
|
+
}
|
|
55
|
+
return cachedUint8ArrayMemory0;
|
|
56
|
+
}
|
|
85
57
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
58
|
+
function getObject(idx) { return heap[idx]; }
|
|
59
|
+
|
|
60
|
+
function handleError(f, args) {
|
|
61
|
+
try {
|
|
62
|
+
return f.apply(this, args);
|
|
63
|
+
} catch (e) {
|
|
64
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
94
65
|
}
|
|
95
66
|
}
|
|
96
67
|
|
|
97
|
-
|
|
68
|
+
let heap = new Array(128).fill(undefined);
|
|
69
|
+
heap.push(undefined, null, true, false);
|
|
70
|
+
|
|
71
|
+
let heap_next = heap.length;
|
|
72
|
+
|
|
73
|
+
function isLikeNone(x) {
|
|
74
|
+
return x === undefined || x === null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
78
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
79
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
80
|
+
WASM_VECTOR_LEN = arg.length;
|
|
81
|
+
return ptr;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
85
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
86
|
+
const mem = getDataViewMemory0();
|
|
87
|
+
for (let i = 0; i < array.length; i++) {
|
|
88
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
89
|
+
}
|
|
90
|
+
WASM_VECTOR_LEN = array.length;
|
|
91
|
+
return ptr;
|
|
92
|
+
}
|
|
98
93
|
|
|
94
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
99
95
|
if (realloc === undefined) {
|
|
100
96
|
const buf = cachedTextEncoder.encode(arg);
|
|
101
97
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
@@ -116,7 +112,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
116
112
|
if (code > 0x7F) break;
|
|
117
113
|
mem[ptr + offset] = code;
|
|
118
114
|
}
|
|
119
|
-
|
|
120
115
|
if (offset !== len) {
|
|
121
116
|
if (offset !== 0) {
|
|
122
117
|
arg = arg.slice(offset);
|
|
@@ -133,50 +128,86 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
133
128
|
return ptr;
|
|
134
129
|
}
|
|
135
130
|
|
|
136
|
-
|
|
137
|
-
if (!(instance instanceof klass)) {
|
|
138
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
131
|
+
let stack_pointer = 128;
|
|
141
132
|
|
|
142
|
-
function
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return ptr;
|
|
133
|
+
function takeObject(idx) {
|
|
134
|
+
const ret = getObject(idx);
|
|
135
|
+
dropObject(idx);
|
|
136
|
+
return ret;
|
|
147
137
|
}
|
|
148
138
|
|
|
149
|
-
let
|
|
150
|
-
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
-
heap[--stack_pointer] = obj;
|
|
154
|
-
return stack_pointer;
|
|
139
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
140
|
+
cachedTextDecoder.decode();
|
|
141
|
+
function decodeText(ptr, len) {
|
|
142
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
155
143
|
}
|
|
156
144
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
145
|
+
const cachedTextEncoder = new TextEncoder();
|
|
146
|
+
|
|
147
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
148
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
149
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
150
|
+
view.set(buf);
|
|
151
|
+
return {
|
|
152
|
+
read: arg.length,
|
|
153
|
+
written: buf.length
|
|
154
|
+
};
|
|
162
155
|
}
|
|
163
|
-
WASM_VECTOR_LEN = array.length;
|
|
164
|
-
return ptr;
|
|
165
156
|
}
|
|
166
157
|
|
|
158
|
+
let WASM_VECTOR_LEN = 0;
|
|
159
|
+
|
|
167
160
|
const AddressNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
168
161
|
? { register: () => {}, unregister: () => {} }
|
|
169
162
|
: new FinalizationRegistry(ptr => wasm.__wbg_addressnamespace_free(ptr >>> 0, 1));
|
|
170
163
|
|
|
171
|
-
|
|
164
|
+
const BitGoPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
165
|
+
? { register: () => {}, unregister: () => {} }
|
|
166
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bitgopsbt_free(ptr >>> 0, 1));
|
|
167
|
+
|
|
168
|
+
const FixedScriptWalletNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
169
|
+
? { register: () => {}, unregister: () => {} }
|
|
170
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fixedscriptwalletnamespace_free(ptr >>> 0, 1));
|
|
171
|
+
|
|
172
|
+
const UtxolibCompatNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
173
|
+
? { register: () => {}, unregister: () => {} }
|
|
174
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_utxolibcompatnamespace_free(ptr >>> 0, 1));
|
|
175
|
+
|
|
176
|
+
const WasmBIP32Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
177
|
+
? { register: () => {}, unregister: () => {} }
|
|
178
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbip32_free(ptr >>> 0, 1));
|
|
179
|
+
|
|
180
|
+
const WasmECPairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
181
|
+
? { register: () => {}, unregister: () => {} }
|
|
182
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmecpair_free(ptr >>> 0, 1));
|
|
183
|
+
|
|
184
|
+
const WasmReplayProtectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
185
|
+
? { register: () => {}, unregister: () => {} }
|
|
186
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmreplayprotection_free(ptr >>> 0, 1));
|
|
187
|
+
|
|
188
|
+
const WasmRootWalletKeysFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
189
|
+
? { register: () => {}, unregister: () => {} }
|
|
190
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmrootwalletkeys_free(ptr >>> 0, 1));
|
|
191
|
+
|
|
192
|
+
const WrapDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
193
|
+
? { register: () => {}, unregister: () => {} }
|
|
194
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wrapdescriptor_free(ptr >>> 0, 1));
|
|
195
|
+
|
|
196
|
+
const WrapMiniscriptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
197
|
+
? { register: () => {}, unregister: () => {} }
|
|
198
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wrapminiscript_free(ptr >>> 0, 1));
|
|
199
|
+
|
|
200
|
+
const WrapPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
201
|
+
? { register: () => {}, unregister: () => {} }
|
|
202
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wrappsbt_free(ptr >>> 0, 1));
|
|
172
203
|
|
|
204
|
+
class AddressNamespace {
|
|
173
205
|
__destroy_into_raw() {
|
|
174
206
|
const ptr = this.__wbg_ptr;
|
|
175
207
|
this.__wbg_ptr = 0;
|
|
176
208
|
AddressNamespaceFinalization.unregister(this);
|
|
177
209
|
return ptr;
|
|
178
210
|
}
|
|
179
|
-
|
|
180
211
|
free() {
|
|
181
212
|
const ptr = this.__destroy_into_raw();
|
|
182
213
|
wasm.__wbg_addressnamespace_free(ptr, 0);
|
|
@@ -189,9 +220,9 @@ class AddressNamespace {
|
|
|
189
220
|
static to_output_script_with_coin(address, coin) {
|
|
190
221
|
try {
|
|
191
222
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
192
|
-
const ptr0 = passStringToWasm0(address, wasm.
|
|
223
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
193
224
|
const len0 = WASM_VECTOR_LEN;
|
|
194
|
-
const ptr1 = passStringToWasm0(coin, wasm.
|
|
225
|
+
const ptr1 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
195
226
|
const len1 = WASM_VECTOR_LEN;
|
|
196
227
|
wasm.addressnamespace_to_output_script_with_coin(retptr, ptr0, len0, ptr1, len1);
|
|
197
228
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -202,7 +233,7 @@ class AddressNamespace {
|
|
|
202
233
|
throw takeObject(r2);
|
|
203
234
|
}
|
|
204
235
|
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
205
|
-
wasm.
|
|
236
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
206
237
|
return v3;
|
|
207
238
|
} finally {
|
|
208
239
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -219,11 +250,11 @@ class AddressNamespace {
|
|
|
219
250
|
let deferred5_1;
|
|
220
251
|
try {
|
|
221
252
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
222
|
-
const ptr0 = passArray8ToWasm0(script, wasm.
|
|
253
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
223
254
|
const len0 = WASM_VECTOR_LEN;
|
|
224
|
-
const ptr1 = passStringToWasm0(coin, wasm.
|
|
255
|
+
const ptr1 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
225
256
|
const len1 = WASM_VECTOR_LEN;
|
|
226
|
-
var ptr2 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.
|
|
257
|
+
var ptr2 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
227
258
|
var len2 = WASM_VECTOR_LEN;
|
|
228
259
|
wasm.addressnamespace_from_output_script_with_coin(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
229
260
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -241,20 +272,14 @@ class AddressNamespace {
|
|
|
241
272
|
return getStringFromWasm0(ptr4, len4);
|
|
242
273
|
} finally {
|
|
243
274
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
244
|
-
wasm.
|
|
275
|
+
wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
245
276
|
}
|
|
246
277
|
}
|
|
247
278
|
}
|
|
248
279
|
if (Symbol.dispose) AddressNamespace.prototype[Symbol.dispose] = AddressNamespace.prototype.free;
|
|
249
|
-
|
|
250
280
|
exports.AddressNamespace = AddressNamespace;
|
|
251
281
|
|
|
252
|
-
const BitGoPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
253
|
-
? { register: () => {}, unregister: () => {} }
|
|
254
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_bitgopsbt_free(ptr >>> 0, 1));
|
|
255
|
-
|
|
256
282
|
class BitGoPsbt {
|
|
257
|
-
|
|
258
283
|
static __wrap(ptr) {
|
|
259
284
|
ptr = ptr >>> 0;
|
|
260
285
|
const obj = Object.create(BitGoPsbt.prototype);
|
|
@@ -262,14 +287,12 @@ class BitGoPsbt {
|
|
|
262
287
|
BitGoPsbtFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
263
288
|
return obj;
|
|
264
289
|
}
|
|
265
|
-
|
|
266
290
|
__destroy_into_raw() {
|
|
267
291
|
const ptr = this.__wbg_ptr;
|
|
268
292
|
this.__wbg_ptr = 0;
|
|
269
293
|
BitGoPsbtFinalization.unregister(this);
|
|
270
294
|
return ptr;
|
|
271
295
|
}
|
|
272
|
-
|
|
273
296
|
free() {
|
|
274
297
|
const ptr = this.__destroy_into_raw();
|
|
275
298
|
wasm.__wbg_bitgopsbt_free(ptr, 0);
|
|
@@ -283,9 +306,9 @@ class BitGoPsbt {
|
|
|
283
306
|
static from_bytes(bytes, network) {
|
|
284
307
|
try {
|
|
285
308
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
286
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.
|
|
309
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
287
310
|
const len0 = WASM_VECTOR_LEN;
|
|
288
|
-
const ptr1 = passStringToWasm0(network, wasm.
|
|
311
|
+
const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
289
312
|
const len1 = WASM_VECTOR_LEN;
|
|
290
313
|
wasm.bitgopsbt_from_bytes(retptr, ptr0, len0, ptr1, len1);
|
|
291
314
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -316,7 +339,7 @@ class BitGoPsbt {
|
|
|
316
339
|
return getStringFromWasm0(r0, r1);
|
|
317
340
|
} finally {
|
|
318
341
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
319
|
-
wasm.
|
|
342
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
320
343
|
}
|
|
321
344
|
}
|
|
322
345
|
/**
|
|
@@ -412,7 +435,7 @@ class BitGoPsbt {
|
|
|
412
435
|
throw takeObject(r2);
|
|
413
436
|
}
|
|
414
437
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
415
|
-
wasm.
|
|
438
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
416
439
|
return v1;
|
|
417
440
|
} finally {
|
|
418
441
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -441,6 +464,38 @@ class BitGoPsbt {
|
|
|
441
464
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
442
465
|
}
|
|
443
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* Add a PayGo attestation to a PSBT output
|
|
469
|
+
*
|
|
470
|
+
* # Arguments
|
|
471
|
+
* - `output_index`: The index of the output to add the attestation to
|
|
472
|
+
* - `entropy`: 64 bytes of entropy
|
|
473
|
+
* - `signature`: ECDSA signature bytes
|
|
474
|
+
*
|
|
475
|
+
* # Returns
|
|
476
|
+
* - `Ok(())` if the attestation was successfully added
|
|
477
|
+
* - `Err(WasmUtxoError)` if the output index is out of bounds or entropy is invalid
|
|
478
|
+
* @param {number} output_index
|
|
479
|
+
* @param {Uint8Array} entropy
|
|
480
|
+
* @param {Uint8Array} signature
|
|
481
|
+
*/
|
|
482
|
+
add_paygo_attestation(output_index, entropy, signature) {
|
|
483
|
+
try {
|
|
484
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
485
|
+
const ptr0 = passArray8ToWasm0(entropy, wasm.__wbindgen_export);
|
|
486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
487
|
+
const ptr1 = passArray8ToWasm0(signature, wasm.__wbindgen_export);
|
|
488
|
+
const len1 = WASM_VECTOR_LEN;
|
|
489
|
+
wasm.bitgopsbt_add_paygo_attestation(retptr, this.__wbg_ptr, output_index, ptr0, len0, ptr1, len1);
|
|
490
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
491
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
492
|
+
if (r1) {
|
|
493
|
+
throw takeObject(r0);
|
|
494
|
+
}
|
|
495
|
+
} finally {
|
|
496
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
444
499
|
/**
|
|
445
500
|
* Combine/merge data from another PSBT into this one
|
|
446
501
|
*
|
|
@@ -506,7 +561,7 @@ class BitGoPsbt {
|
|
|
506
561
|
try {
|
|
507
562
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
508
563
|
_assertClass(xpriv, WasmBIP32);
|
|
509
|
-
var ptr0 = isLikeNone(session_id_bytes) ? 0 : passArray8ToWasm0(session_id_bytes, wasm.
|
|
564
|
+
var ptr0 = isLikeNone(session_id_bytes) ? 0 : passArray8ToWasm0(session_id_bytes, wasm.__wbindgen_export);
|
|
510
565
|
var len0 = WASM_VECTOR_LEN;
|
|
511
566
|
wasm.bitgopsbt_generate_musig2_nonces(retptr, this.__wbg_ptr, xpriv.__wbg_ptr, ptr0, len0);
|
|
512
567
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -598,13 +653,16 @@ class BitGoPsbt {
|
|
|
598
653
|
*
|
|
599
654
|
* Note: This method does NOT validate wallet inputs. It only parses outputs.
|
|
600
655
|
* @param {WasmRootWalletKeys} wallet_keys
|
|
656
|
+
* @param {WasmECPair[] | null} [paygo_pubkeys]
|
|
601
657
|
* @returns {any}
|
|
602
658
|
*/
|
|
603
|
-
parse_outputs_with_wallet_keys(wallet_keys) {
|
|
659
|
+
parse_outputs_with_wallet_keys(wallet_keys, paygo_pubkeys) {
|
|
604
660
|
try {
|
|
605
661
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
606
662
|
_assertClass(wallet_keys, WasmRootWalletKeys);
|
|
607
|
-
|
|
663
|
+
var ptr0 = isLikeNone(paygo_pubkeys) ? 0 : passArrayJsValueToWasm0(paygo_pubkeys, wasm.__wbindgen_export);
|
|
664
|
+
var len0 = WASM_VECTOR_LEN;
|
|
665
|
+
wasm.bitgopsbt_parse_outputs_with_wallet_keys(retptr, this.__wbg_ptr, wallet_keys.__wbg_ptr, ptr0, len0);
|
|
608
666
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
609
667
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
610
668
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -620,14 +678,17 @@ class BitGoPsbt {
|
|
|
620
678
|
* Parse transaction with wallet keys to identify wallet inputs/outputs
|
|
621
679
|
* @param {WasmRootWalletKeys} wallet_keys
|
|
622
680
|
* @param {WasmReplayProtection} replay_protection
|
|
681
|
+
* @param {WasmECPair[] | null} [paygo_pubkeys]
|
|
623
682
|
* @returns {any}
|
|
624
683
|
*/
|
|
625
|
-
parse_transaction_with_wallet_keys(wallet_keys, replay_protection) {
|
|
684
|
+
parse_transaction_with_wallet_keys(wallet_keys, replay_protection, paygo_pubkeys) {
|
|
626
685
|
try {
|
|
627
686
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
628
687
|
_assertClass(wallet_keys, WasmRootWalletKeys);
|
|
629
688
|
_assertClass(replay_protection, WasmReplayProtection);
|
|
630
|
-
|
|
689
|
+
var ptr0 = isLikeNone(paygo_pubkeys) ? 0 : passArrayJsValueToWasm0(paygo_pubkeys, wasm.__wbindgen_export);
|
|
690
|
+
var len0 = WASM_VECTOR_LEN;
|
|
691
|
+
wasm.bitgopsbt_parse_transaction_with_wallet_keys(retptr, this.__wbg_ptr, wallet_keys.__wbg_ptr, replay_protection.__wbg_ptr, ptr0, len0);
|
|
631
692
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
632
693
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
633
694
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -692,7 +753,7 @@ class BitGoPsbt {
|
|
|
692
753
|
return getStringFromWasm0(r0, r1);
|
|
693
754
|
} finally {
|
|
694
755
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
695
|
-
wasm.
|
|
756
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
696
757
|
}
|
|
697
758
|
}
|
|
698
759
|
/**
|
|
@@ -714,7 +775,7 @@ class BitGoPsbt {
|
|
|
714
775
|
throw takeObject(r2);
|
|
715
776
|
}
|
|
716
777
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
717
|
-
wasm.
|
|
778
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
718
779
|
return v1;
|
|
719
780
|
} finally {
|
|
720
781
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -722,22 +783,15 @@ class BitGoPsbt {
|
|
|
722
783
|
}
|
|
723
784
|
}
|
|
724
785
|
if (Symbol.dispose) BitGoPsbt.prototype[Symbol.dispose] = BitGoPsbt.prototype.free;
|
|
725
|
-
|
|
726
786
|
exports.BitGoPsbt = BitGoPsbt;
|
|
727
787
|
|
|
728
|
-
const FixedScriptWalletNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
729
|
-
? { register: () => {}, unregister: () => {} }
|
|
730
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_fixedscriptwalletnamespace_free(ptr >>> 0, 1));
|
|
731
|
-
|
|
732
788
|
class FixedScriptWalletNamespace {
|
|
733
|
-
|
|
734
789
|
__destroy_into_raw() {
|
|
735
790
|
const ptr = this.__wbg_ptr;
|
|
736
791
|
this.__wbg_ptr = 0;
|
|
737
792
|
FixedScriptWalletNamespaceFinalization.unregister(this);
|
|
738
793
|
return ptr;
|
|
739
794
|
}
|
|
740
|
-
|
|
741
795
|
free() {
|
|
742
796
|
const ptr = this.__destroy_into_raw();
|
|
743
797
|
wasm.__wbg_fixedscriptwalletnamespace_free(ptr, 0);
|
|
@@ -762,7 +816,7 @@ class FixedScriptWalletNamespace {
|
|
|
762
816
|
throw takeObject(r2);
|
|
763
817
|
}
|
|
764
818
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
765
|
-
wasm.
|
|
819
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
766
820
|
return v1;
|
|
767
821
|
} finally {
|
|
768
822
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -782,7 +836,7 @@ class FixedScriptWalletNamespace {
|
|
|
782
836
|
try {
|
|
783
837
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
784
838
|
_assertClass(keys, WasmRootWalletKeys);
|
|
785
|
-
var ptr0 = isLikeNone(address_format) ? 0 : passStringToWasm0(address_format, wasm.
|
|
839
|
+
var ptr0 = isLikeNone(address_format) ? 0 : passStringToWasm0(address_format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
786
840
|
var len0 = WASM_VECTOR_LEN;
|
|
787
841
|
wasm.fixedscriptwalletnamespace_address(retptr, keys.__wbg_ptr, chain, index, addHeapObject(network), ptr0, len0);
|
|
788
842
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -800,27 +854,20 @@ class FixedScriptWalletNamespace {
|
|
|
800
854
|
return getStringFromWasm0(ptr2, len2);
|
|
801
855
|
} finally {
|
|
802
856
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
803
|
-
wasm.
|
|
857
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
804
858
|
}
|
|
805
859
|
}
|
|
806
860
|
}
|
|
807
861
|
if (Symbol.dispose) FixedScriptWalletNamespace.prototype[Symbol.dispose] = FixedScriptWalletNamespace.prototype.free;
|
|
808
|
-
|
|
809
862
|
exports.FixedScriptWalletNamespace = FixedScriptWalletNamespace;
|
|
810
863
|
|
|
811
|
-
const UtxolibCompatNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
812
|
-
? { register: () => {}, unregister: () => {} }
|
|
813
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_utxolibcompatnamespace_free(ptr >>> 0, 1));
|
|
814
|
-
|
|
815
864
|
class UtxolibCompatNamespace {
|
|
816
|
-
|
|
817
865
|
__destroy_into_raw() {
|
|
818
866
|
const ptr = this.__wbg_ptr;
|
|
819
867
|
this.__wbg_ptr = 0;
|
|
820
868
|
UtxolibCompatNamespaceFinalization.unregister(this);
|
|
821
869
|
return ptr;
|
|
822
870
|
}
|
|
823
|
-
|
|
824
871
|
free() {
|
|
825
872
|
const ptr = this.__destroy_into_raw();
|
|
826
873
|
wasm.__wbg_utxolibcompatnamespace_free(ptr, 0);
|
|
@@ -840,9 +887,9 @@ class UtxolibCompatNamespace {
|
|
|
840
887
|
static to_output_script(address, network, format) {
|
|
841
888
|
try {
|
|
842
889
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
843
|
-
const ptr0 = passStringToWasm0(address, wasm.
|
|
890
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
844
891
|
const len0 = WASM_VECTOR_LEN;
|
|
845
|
-
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.
|
|
892
|
+
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
846
893
|
var len1 = WASM_VECTOR_LEN;
|
|
847
894
|
wasm.utxolibcompatnamespace_to_output_script(retptr, ptr0, len0, addHeapObject(network), ptr1, len1);
|
|
848
895
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -853,7 +900,7 @@ class UtxolibCompatNamespace {
|
|
|
853
900
|
throw takeObject(r2);
|
|
854
901
|
}
|
|
855
902
|
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
856
|
-
wasm.
|
|
903
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
857
904
|
return v3;
|
|
858
905
|
} finally {
|
|
859
906
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -876,9 +923,9 @@ class UtxolibCompatNamespace {
|
|
|
876
923
|
let deferred4_1;
|
|
877
924
|
try {
|
|
878
925
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
879
|
-
const ptr0 = passArray8ToWasm0(script, wasm.
|
|
926
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
880
927
|
const len0 = WASM_VECTOR_LEN;
|
|
881
|
-
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.
|
|
928
|
+
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
882
929
|
var len1 = WASM_VECTOR_LEN;
|
|
883
930
|
wasm.utxolibcompatnamespace_from_output_script(retptr, ptr0, len0, addHeapObject(network), ptr1, len1);
|
|
884
931
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -896,23 +943,18 @@ class UtxolibCompatNamespace {
|
|
|
896
943
|
return getStringFromWasm0(ptr3, len3);
|
|
897
944
|
} finally {
|
|
898
945
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
899
|
-
wasm.
|
|
946
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
900
947
|
}
|
|
901
948
|
}
|
|
902
949
|
}
|
|
903
950
|
if (Symbol.dispose) UtxolibCompatNamespace.prototype[Symbol.dispose] = UtxolibCompatNamespace.prototype.free;
|
|
904
|
-
|
|
905
951
|
exports.UtxolibCompatNamespace = UtxolibCompatNamespace;
|
|
906
952
|
|
|
907
|
-
const WasmBIP32Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
908
|
-
? { register: () => {}, unregister: () => {} }
|
|
909
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbip32_free(ptr >>> 0, 1));
|
|
910
953
|
/**
|
|
911
954
|
* WASM wrapper for BIP32 extended keys (Xpub/Xpriv)
|
|
912
955
|
* Implements the BIP32Interface TypeScript interface
|
|
913
956
|
*/
|
|
914
957
|
class WasmBIP32 {
|
|
915
|
-
|
|
916
958
|
static __wrap(ptr) {
|
|
917
959
|
ptr = ptr >>> 0;
|
|
918
960
|
const obj = Object.create(WasmBIP32.prototype);
|
|
@@ -920,14 +962,12 @@ class WasmBIP32 {
|
|
|
920
962
|
WasmBIP32Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
921
963
|
return obj;
|
|
922
964
|
}
|
|
923
|
-
|
|
924
965
|
__destroy_into_raw() {
|
|
925
966
|
const ptr = this.__wbg_ptr;
|
|
926
967
|
this.__wbg_ptr = 0;
|
|
927
968
|
WasmBIP32Finalization.unregister(this);
|
|
928
969
|
return ptr;
|
|
929
970
|
}
|
|
930
|
-
|
|
931
971
|
free() {
|
|
932
972
|
const ptr = this.__destroy_into_raw();
|
|
933
973
|
wasm.__wbg_wasmbip32_free(ptr, 0);
|
|
@@ -964,7 +1004,7 @@ class WasmBIP32 {
|
|
|
964
1004
|
derive_path(path) {
|
|
965
1005
|
try {
|
|
966
1006
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
967
|
-
const ptr0 = passStringToWasm0(path, wasm.
|
|
1007
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
968
1008
|
const len0 = WASM_VECTOR_LEN;
|
|
969
1009
|
wasm.wasmbip32_derive_path(retptr, this.__wbg_ptr, ptr0, len0);
|
|
970
1010
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -994,7 +1034,7 @@ class WasmBIP32 {
|
|
|
994
1034
|
static from_base58(base58_str) {
|
|
995
1035
|
try {
|
|
996
1036
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
997
|
-
const ptr0 = passStringToWasm0(base58_str, wasm.
|
|
1037
|
+
const ptr0 = passStringToWasm0(base58_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
998
1038
|
const len0 = WASM_VECTOR_LEN;
|
|
999
1039
|
wasm.wasmbip32_from_base58(retptr, ptr0, len0);
|
|
1000
1040
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1158,7 +1198,7 @@ class WasmBIP32 {
|
|
|
1158
1198
|
return getStringFromWasm0(ptr1, len1);
|
|
1159
1199
|
} finally {
|
|
1160
1200
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1161
|
-
wasm.
|
|
1201
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1162
1202
|
}
|
|
1163
1203
|
}
|
|
1164
1204
|
/**
|
|
@@ -1178,9 +1218,9 @@ class WasmBIP32 {
|
|
|
1178
1218
|
static from_seed(seed, network) {
|
|
1179
1219
|
try {
|
|
1180
1220
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1181
|
-
const ptr0 = passArray8ToWasm0(seed, wasm.
|
|
1221
|
+
const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_export);
|
|
1182
1222
|
const len0 = WASM_VECTOR_LEN;
|
|
1183
|
-
var ptr1 = isLikeNone(network) ? 0 : passStringToWasm0(network, wasm.
|
|
1223
|
+
var ptr1 = isLikeNone(network) ? 0 : passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1184
1224
|
var len1 = WASM_VECTOR_LEN;
|
|
1185
1225
|
wasm.wasmbip32_from_seed(retptr, ptr0, len0, ptr1, len1);
|
|
1186
1226
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1202,7 +1242,7 @@ class WasmBIP32 {
|
|
|
1202
1242
|
static from_xprv(xprv_str) {
|
|
1203
1243
|
try {
|
|
1204
1244
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1205
|
-
const ptr0 = passStringToWasm0(xprv_str, wasm.
|
|
1245
|
+
const ptr0 = passStringToWasm0(xprv_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1206
1246
|
const len0 = WASM_VECTOR_LEN;
|
|
1207
1247
|
wasm.wasmbip32_from_xprv(retptr, ptr0, len0);
|
|
1208
1248
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1224,7 +1264,7 @@ class WasmBIP32 {
|
|
|
1224
1264
|
static from_xpub(xpub_str) {
|
|
1225
1265
|
try {
|
|
1226
1266
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1227
|
-
const ptr0 = passStringToWasm0(xpub_str, wasm.
|
|
1267
|
+
const ptr0 = passStringToWasm0(xpub_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1228
1268
|
const len0 = WASM_VECTOR_LEN;
|
|
1229
1269
|
wasm.wasmbip32_from_xpub(retptr, ptr0, len0);
|
|
1230
1270
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1255,22 +1295,17 @@ class WasmBIP32 {
|
|
|
1255
1295
|
return getStringFromWasm0(r0, r1);
|
|
1256
1296
|
} finally {
|
|
1257
1297
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1258
|
-
wasm.
|
|
1298
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1259
1299
|
}
|
|
1260
1300
|
}
|
|
1261
1301
|
}
|
|
1262
1302
|
if (Symbol.dispose) WasmBIP32.prototype[Symbol.dispose] = WasmBIP32.prototype.free;
|
|
1263
|
-
|
|
1264
1303
|
exports.WasmBIP32 = WasmBIP32;
|
|
1265
1304
|
|
|
1266
|
-
const WasmECPairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1267
|
-
? { register: () => {}, unregister: () => {} }
|
|
1268
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmecpair_free(ptr >>> 0, 1));
|
|
1269
1305
|
/**
|
|
1270
1306
|
* WASM wrapper for elliptic curve key pairs (always uses compressed keys)
|
|
1271
1307
|
*/
|
|
1272
1308
|
class WasmECPair {
|
|
1273
|
-
|
|
1274
1309
|
static __wrap(ptr) {
|
|
1275
1310
|
ptr = ptr >>> 0;
|
|
1276
1311
|
const obj = Object.create(WasmECPair.prototype);
|
|
@@ -1278,14 +1313,18 @@ class WasmECPair {
|
|
|
1278
1313
|
WasmECPairFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1279
1314
|
return obj;
|
|
1280
1315
|
}
|
|
1281
|
-
|
|
1316
|
+
static __unwrap(jsValue) {
|
|
1317
|
+
if (!(jsValue instanceof WasmECPair)) {
|
|
1318
|
+
return 0;
|
|
1319
|
+
}
|
|
1320
|
+
return jsValue.__destroy_into_raw();
|
|
1321
|
+
}
|
|
1282
1322
|
__destroy_into_raw() {
|
|
1283
1323
|
const ptr = this.__wbg_ptr;
|
|
1284
1324
|
this.__wbg_ptr = 0;
|
|
1285
1325
|
WasmECPairFinalization.unregister(this);
|
|
1286
1326
|
return ptr;
|
|
1287
1327
|
}
|
|
1288
|
-
|
|
1289
1328
|
free() {
|
|
1290
1329
|
const ptr = this.__destroy_into_raw();
|
|
1291
1330
|
wasm.__wbg_wasmecpair_free(ptr, 0);
|
|
@@ -1331,7 +1370,7 @@ class WasmECPair {
|
|
|
1331
1370
|
return getStringFromWasm0(ptr1, len1);
|
|
1332
1371
|
} finally {
|
|
1333
1372
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1334
|
-
wasm.
|
|
1373
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1335
1374
|
}
|
|
1336
1375
|
}
|
|
1337
1376
|
/**
|
|
@@ -1359,7 +1398,7 @@ class WasmECPair {
|
|
|
1359
1398
|
return getStringFromWasm0(ptr1, len1);
|
|
1360
1399
|
} finally {
|
|
1361
1400
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1362
|
-
wasm.
|
|
1401
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1363
1402
|
}
|
|
1364
1403
|
}
|
|
1365
1404
|
/**
|
|
@@ -1370,7 +1409,7 @@ class WasmECPair {
|
|
|
1370
1409
|
static from_public_key(public_key) {
|
|
1371
1410
|
try {
|
|
1372
1411
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1373
|
-
const ptr0 = passArray8ToWasm0(public_key, wasm.
|
|
1412
|
+
const ptr0 = passArray8ToWasm0(public_key, wasm.__wbindgen_export);
|
|
1374
1413
|
const len0 = WASM_VECTOR_LEN;
|
|
1375
1414
|
wasm.wasmecpair_from_public_key(retptr, ptr0, len0);
|
|
1376
1415
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1392,7 +1431,7 @@ class WasmECPair {
|
|
|
1392
1431
|
static from_private_key(private_key) {
|
|
1393
1432
|
try {
|
|
1394
1433
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1395
|
-
const ptr0 = passArray8ToWasm0(private_key, wasm.
|
|
1434
|
+
const ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_export);
|
|
1396
1435
|
const len0 = WASM_VECTOR_LEN;
|
|
1397
1436
|
wasm.wasmecpair_from_private_key(retptr, ptr0, len0);
|
|
1398
1437
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1414,7 +1453,7 @@ class WasmECPair {
|
|
|
1414
1453
|
static from_wif_mainnet(wif_string) {
|
|
1415
1454
|
try {
|
|
1416
1455
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1417
|
-
const ptr0 = passStringToWasm0(wif_string, wasm.
|
|
1456
|
+
const ptr0 = passStringToWasm0(wif_string, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1418
1457
|
const len0 = WASM_VECTOR_LEN;
|
|
1419
1458
|
wasm.wasmecpair_from_wif_mainnet(retptr, ptr0, len0);
|
|
1420
1459
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1436,7 +1475,7 @@ class WasmECPair {
|
|
|
1436
1475
|
static from_wif_testnet(wif_string) {
|
|
1437
1476
|
try {
|
|
1438
1477
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1439
|
-
const ptr0 = passStringToWasm0(wif_string, wasm.
|
|
1478
|
+
const ptr0 = passStringToWasm0(wif_string, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1440
1479
|
const len0 = WASM_VECTOR_LEN;
|
|
1441
1480
|
wasm.wasmecpair_from_wif_testnet(retptr, ptr0, len0);
|
|
1442
1481
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1475,7 +1514,7 @@ class WasmECPair {
|
|
|
1475
1514
|
return getStringFromWasm0(ptr1, len1);
|
|
1476
1515
|
} finally {
|
|
1477
1516
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1478
|
-
wasm.
|
|
1517
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1479
1518
|
}
|
|
1480
1519
|
}
|
|
1481
1520
|
/**
|
|
@@ -1486,7 +1525,7 @@ class WasmECPair {
|
|
|
1486
1525
|
static from_wif(wif_string) {
|
|
1487
1526
|
try {
|
|
1488
1527
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1489
|
-
const ptr0 = passStringToWasm0(wif_string, wasm.
|
|
1528
|
+
const ptr0 = passStringToWasm0(wif_string, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1490
1529
|
const len0 = WASM_VECTOR_LEN;
|
|
1491
1530
|
wasm.wasmecpair_from_wif(retptr, ptr0, len0);
|
|
1492
1531
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1502,17 +1541,12 @@ class WasmECPair {
|
|
|
1502
1541
|
}
|
|
1503
1542
|
}
|
|
1504
1543
|
if (Symbol.dispose) WasmECPair.prototype[Symbol.dispose] = WasmECPair.prototype.free;
|
|
1505
|
-
|
|
1506
1544
|
exports.WasmECPair = WasmECPair;
|
|
1507
1545
|
|
|
1508
|
-
const WasmReplayProtectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1509
|
-
? { register: () => {}, unregister: () => {} }
|
|
1510
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmreplayprotection_free(ptr >>> 0, 1));
|
|
1511
1546
|
/**
|
|
1512
1547
|
* WASM wrapper for ReplayProtection
|
|
1513
1548
|
*/
|
|
1514
1549
|
class WasmReplayProtection {
|
|
1515
|
-
|
|
1516
1550
|
static __wrap(ptr) {
|
|
1517
1551
|
ptr = ptr >>> 0;
|
|
1518
1552
|
const obj = Object.create(WasmReplayProtection.prototype);
|
|
@@ -1520,14 +1554,12 @@ class WasmReplayProtection {
|
|
|
1520
1554
|
WasmReplayProtectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1521
1555
|
return obj;
|
|
1522
1556
|
}
|
|
1523
|
-
|
|
1524
1557
|
__destroy_into_raw() {
|
|
1525
1558
|
const ptr = this.__wbg_ptr;
|
|
1526
1559
|
this.__wbg_ptr = 0;
|
|
1527
1560
|
WasmReplayProtectionFinalization.unregister(this);
|
|
1528
1561
|
return ptr;
|
|
1529
1562
|
}
|
|
1530
|
-
|
|
1531
1563
|
free() {
|
|
1532
1564
|
const ptr = this.__destroy_into_raw();
|
|
1533
1565
|
wasm.__wbg_wasmreplayprotection_free(ptr, 0);
|
|
@@ -1541,9 +1573,9 @@ class WasmReplayProtection {
|
|
|
1541
1573
|
static from_addresses(addresses, network) {
|
|
1542
1574
|
try {
|
|
1543
1575
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1544
|
-
const ptr0 = passArrayJsValueToWasm0(addresses, wasm.
|
|
1576
|
+
const ptr0 = passArrayJsValueToWasm0(addresses, wasm.__wbindgen_export);
|
|
1545
1577
|
const len0 = WASM_VECTOR_LEN;
|
|
1546
|
-
const ptr1 = passStringToWasm0(network, wasm.
|
|
1578
|
+
const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1547
1579
|
const len1 = WASM_VECTOR_LEN;
|
|
1548
1580
|
wasm.wasmreplayprotection_from_addresses(retptr, ptr0, len0, ptr1, len1);
|
|
1549
1581
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1565,7 +1597,7 @@ class WasmReplayProtection {
|
|
|
1565
1597
|
static from_public_keys(public_keys) {
|
|
1566
1598
|
try {
|
|
1567
1599
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1568
|
-
const ptr0 = passArrayJsValueToWasm0(public_keys, wasm.
|
|
1600
|
+
const ptr0 = passArrayJsValueToWasm0(public_keys, wasm.__wbindgen_export);
|
|
1569
1601
|
const len0 = WASM_VECTOR_LEN;
|
|
1570
1602
|
wasm.wasmreplayprotection_from_public_keys(retptr, ptr0, len0);
|
|
1571
1603
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1585,25 +1617,20 @@ class WasmReplayProtection {
|
|
|
1585
1617
|
* @returns {WasmReplayProtection}
|
|
1586
1618
|
*/
|
|
1587
1619
|
static from_output_scripts(output_scripts) {
|
|
1588
|
-
const ptr0 = passArrayJsValueToWasm0(output_scripts, wasm.
|
|
1620
|
+
const ptr0 = passArrayJsValueToWasm0(output_scripts, wasm.__wbindgen_export);
|
|
1589
1621
|
const len0 = WASM_VECTOR_LEN;
|
|
1590
1622
|
const ret = wasm.wasmreplayprotection_from_output_scripts(ptr0, len0);
|
|
1591
1623
|
return WasmReplayProtection.__wrap(ret);
|
|
1592
1624
|
}
|
|
1593
1625
|
}
|
|
1594
1626
|
if (Symbol.dispose) WasmReplayProtection.prototype[Symbol.dispose] = WasmReplayProtection.prototype.free;
|
|
1595
|
-
|
|
1596
1627
|
exports.WasmReplayProtection = WasmReplayProtection;
|
|
1597
1628
|
|
|
1598
|
-
const WasmRootWalletKeysFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1599
|
-
? { register: () => {}, unregister: () => {} }
|
|
1600
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmrootwalletkeys_free(ptr >>> 0, 1));
|
|
1601
1629
|
/**
|
|
1602
1630
|
* WASM wrapper for RootWalletKeys
|
|
1603
1631
|
* Represents a set of three extended public keys with their derivation prefixes
|
|
1604
1632
|
*/
|
|
1605
1633
|
class WasmRootWalletKeys {
|
|
1606
|
-
|
|
1607
1634
|
static __wrap(ptr) {
|
|
1608
1635
|
ptr = ptr >>> 0;
|
|
1609
1636
|
const obj = Object.create(WasmRootWalletKeys.prototype);
|
|
@@ -1611,14 +1638,12 @@ class WasmRootWalletKeys {
|
|
|
1611
1638
|
WasmRootWalletKeysFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1612
1639
|
return obj;
|
|
1613
1640
|
}
|
|
1614
|
-
|
|
1615
1641
|
__destroy_into_raw() {
|
|
1616
1642
|
const ptr = this.__wbg_ptr;
|
|
1617
1643
|
this.__wbg_ptr = 0;
|
|
1618
1644
|
WasmRootWalletKeysFinalization.unregister(this);
|
|
1619
1645
|
return ptr;
|
|
1620
1646
|
}
|
|
1621
|
-
|
|
1622
1647
|
free() {
|
|
1623
1648
|
const ptr = this.__destroy_into_raw();
|
|
1624
1649
|
wasm.__wbg_wasmrootwalletkeys_free(ptr, 0);
|
|
@@ -1655,11 +1680,11 @@ class WasmRootWalletKeys {
|
|
|
1655
1680
|
_assertClass(user, WasmBIP32);
|
|
1656
1681
|
_assertClass(backup, WasmBIP32);
|
|
1657
1682
|
_assertClass(bitgo, WasmBIP32);
|
|
1658
|
-
const ptr0 = passStringToWasm0(user_derivation, wasm.
|
|
1683
|
+
const ptr0 = passStringToWasm0(user_derivation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1659
1684
|
const len0 = WASM_VECTOR_LEN;
|
|
1660
|
-
const ptr1 = passStringToWasm0(backup_derivation, wasm.
|
|
1685
|
+
const ptr1 = passStringToWasm0(backup_derivation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1661
1686
|
const len1 = WASM_VECTOR_LEN;
|
|
1662
|
-
const ptr2 = passStringToWasm0(bitgo_derivation, wasm.
|
|
1687
|
+
const ptr2 = passStringToWasm0(bitgo_derivation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1663
1688
|
const len2 = WASM_VECTOR_LEN;
|
|
1664
1689
|
wasm.wasmrootwalletkeys_with_derivation_prefixes(retptr, user.__wbg_ptr, backup.__wbg_ptr, bitgo.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1665
1690
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1723,15 +1748,9 @@ class WasmRootWalletKeys {
|
|
|
1723
1748
|
}
|
|
1724
1749
|
}
|
|
1725
1750
|
if (Symbol.dispose) WasmRootWalletKeys.prototype[Symbol.dispose] = WasmRootWalletKeys.prototype.free;
|
|
1726
|
-
|
|
1727
1751
|
exports.WasmRootWalletKeys = WasmRootWalletKeys;
|
|
1728
1752
|
|
|
1729
|
-
const WrapDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1730
|
-
? { register: () => {}, unregister: () => {} }
|
|
1731
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wrapdescriptor_free(ptr >>> 0, 1));
|
|
1732
|
-
|
|
1733
1753
|
class WrapDescriptor {
|
|
1734
|
-
|
|
1735
1754
|
static __wrap(ptr) {
|
|
1736
1755
|
ptr = ptr >>> 0;
|
|
1737
1756
|
const obj = Object.create(WrapDescriptor.prototype);
|
|
@@ -1739,14 +1758,12 @@ class WrapDescriptor {
|
|
|
1739
1758
|
WrapDescriptorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1740
1759
|
return obj;
|
|
1741
1760
|
}
|
|
1742
|
-
|
|
1743
1761
|
__destroy_into_raw() {
|
|
1744
1762
|
const ptr = this.__wbg_ptr;
|
|
1745
1763
|
this.__wbg_ptr = 0;
|
|
1746
1764
|
WrapDescriptorFinalization.unregister(this);
|
|
1747
1765
|
return ptr;
|
|
1748
1766
|
}
|
|
1749
|
-
|
|
1750
1767
|
free() {
|
|
1751
1768
|
const ptr = this.__destroy_into_raw();
|
|
1752
1769
|
wasm.__wbg_wrapdescriptor_free(ptr, 0);
|
|
@@ -1782,9 +1799,9 @@ class WrapDescriptor {
|
|
|
1782
1799
|
static fromString(descriptor, pk_type) {
|
|
1783
1800
|
try {
|
|
1784
1801
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1785
|
-
const ptr0 = passStringToWasm0(descriptor, wasm.
|
|
1802
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1786
1803
|
const len0 = WASM_VECTOR_LEN;
|
|
1787
|
-
const ptr1 = passStringToWasm0(pk_type, wasm.
|
|
1804
|
+
const ptr1 = passStringToWasm0(pk_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1788
1805
|
const len1 = WASM_VECTOR_LEN;
|
|
1789
1806
|
wasm.wrapdescriptor_fromString(retptr, ptr0, len0, ptr1, len1);
|
|
1790
1807
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1820,7 +1837,7 @@ class WrapDescriptor {
|
|
|
1820
1837
|
throw takeObject(r2);
|
|
1821
1838
|
}
|
|
1822
1839
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1823
|
-
wasm.
|
|
1840
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1824
1841
|
return v1;
|
|
1825
1842
|
} finally {
|
|
1826
1843
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -1850,7 +1867,7 @@ class WrapDescriptor {
|
|
|
1850
1867
|
return getStringFromWasm0(ptr1, len1);
|
|
1851
1868
|
} finally {
|
|
1852
1869
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1853
|
-
wasm.
|
|
1870
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1854
1871
|
}
|
|
1855
1872
|
}
|
|
1856
1873
|
/**
|
|
@@ -1920,7 +1937,7 @@ class WrapDescriptor {
|
|
|
1920
1937
|
static fromStringDetectType(descriptor) {
|
|
1921
1938
|
try {
|
|
1922
1939
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1923
|
-
const ptr0 = passStringToWasm0(descriptor, wasm.
|
|
1940
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1924
1941
|
const len0 = WASM_VECTOR_LEN;
|
|
1925
1942
|
wasm.wrapdescriptor_fromStringDetectType(retptr, ptr0, len0);
|
|
1926
1943
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1967,7 +1984,7 @@ class WrapDescriptor {
|
|
|
1967
1984
|
throw takeObject(r2);
|
|
1968
1985
|
}
|
|
1969
1986
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1970
|
-
wasm.
|
|
1987
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1971
1988
|
return v1;
|
|
1972
1989
|
} finally {
|
|
1973
1990
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2007,20 +2024,14 @@ class WrapDescriptor {
|
|
|
2007
2024
|
return getStringFromWasm0(r0, r1);
|
|
2008
2025
|
} finally {
|
|
2009
2026
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2010
|
-
wasm.
|
|
2027
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2011
2028
|
}
|
|
2012
2029
|
}
|
|
2013
2030
|
}
|
|
2014
2031
|
if (Symbol.dispose) WrapDescriptor.prototype[Symbol.dispose] = WrapDescriptor.prototype.free;
|
|
2015
|
-
|
|
2016
2032
|
exports.WrapDescriptor = WrapDescriptor;
|
|
2017
2033
|
|
|
2018
|
-
const WrapMiniscriptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2019
|
-
? { register: () => {}, unregister: () => {} }
|
|
2020
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wrapminiscript_free(ptr >>> 0, 1));
|
|
2021
|
-
|
|
2022
2034
|
class WrapMiniscript {
|
|
2023
|
-
|
|
2024
2035
|
static __wrap(ptr) {
|
|
2025
2036
|
ptr = ptr >>> 0;
|
|
2026
2037
|
const obj = Object.create(WrapMiniscript.prototype);
|
|
@@ -2028,14 +2039,12 @@ class WrapMiniscript {
|
|
|
2028
2039
|
WrapMiniscriptFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2029
2040
|
return obj;
|
|
2030
2041
|
}
|
|
2031
|
-
|
|
2032
2042
|
__destroy_into_raw() {
|
|
2033
2043
|
const ptr = this.__wbg_ptr;
|
|
2034
2044
|
this.__wbg_ptr = 0;
|
|
2035
2045
|
WrapMiniscriptFinalization.unregister(this);
|
|
2036
2046
|
return ptr;
|
|
2037
2047
|
}
|
|
2038
|
-
|
|
2039
2048
|
free() {
|
|
2040
2049
|
const ptr = this.__destroy_into_raw();
|
|
2041
2050
|
wasm.__wbg_wrapminiscript_free(ptr, 0);
|
|
@@ -2048,9 +2057,9 @@ class WrapMiniscript {
|
|
|
2048
2057
|
static fromString(script, context_type) {
|
|
2049
2058
|
try {
|
|
2050
2059
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2051
|
-
const ptr0 = passStringToWasm0(script, wasm.
|
|
2060
|
+
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2052
2061
|
const len0 = WASM_VECTOR_LEN;
|
|
2053
|
-
const ptr1 = passStringToWasm0(context_type, wasm.
|
|
2062
|
+
const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2054
2063
|
const len1 = WASM_VECTOR_LEN;
|
|
2055
2064
|
wasm.wrapminiscript_fromString(retptr, ptr0, len0, ptr1, len1);
|
|
2056
2065
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2088,7 +2097,7 @@ class WrapMiniscript {
|
|
|
2088
2097
|
return getStringFromWasm0(ptr1, len1);
|
|
2089
2098
|
} finally {
|
|
2090
2099
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2091
|
-
wasm.
|
|
2100
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
2092
2101
|
}
|
|
2093
2102
|
}
|
|
2094
2103
|
/**
|
|
@@ -2099,9 +2108,9 @@ class WrapMiniscript {
|
|
|
2099
2108
|
static fromBitcoinScript(script, context_type) {
|
|
2100
2109
|
try {
|
|
2101
2110
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2102
|
-
const ptr0 = passArray8ToWasm0(script, wasm.
|
|
2111
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
2103
2112
|
const len0 = WASM_VECTOR_LEN;
|
|
2104
|
-
const ptr1 = passStringToWasm0(context_type, wasm.
|
|
2113
|
+
const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2105
2114
|
const len1 = WASM_VECTOR_LEN;
|
|
2106
2115
|
wasm.wrapminiscript_fromBitcoinScript(retptr, ptr0, len0, ptr1, len1);
|
|
2107
2116
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2143,7 +2152,7 @@ class WrapMiniscript {
|
|
|
2143
2152
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2144
2153
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2145
2154
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2146
|
-
wasm.
|
|
2155
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2147
2156
|
return v1;
|
|
2148
2157
|
} finally {
|
|
2149
2158
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2165,20 +2174,14 @@ class WrapMiniscript {
|
|
|
2165
2174
|
return getStringFromWasm0(r0, r1);
|
|
2166
2175
|
} finally {
|
|
2167
2176
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2168
|
-
wasm.
|
|
2177
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2169
2178
|
}
|
|
2170
2179
|
}
|
|
2171
2180
|
}
|
|
2172
2181
|
if (Symbol.dispose) WrapMiniscript.prototype[Symbol.dispose] = WrapMiniscript.prototype.free;
|
|
2173
|
-
|
|
2174
2182
|
exports.WrapMiniscript = WrapMiniscript;
|
|
2175
2183
|
|
|
2176
|
-
const WrapPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2177
|
-
? { register: () => {}, unregister: () => {} }
|
|
2178
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wrappsbt_free(ptr >>> 0, 1));
|
|
2179
|
-
|
|
2180
2184
|
class WrapPsbt {
|
|
2181
|
-
|
|
2182
2185
|
static __wrap(ptr) {
|
|
2183
2186
|
ptr = ptr >>> 0;
|
|
2184
2187
|
const obj = Object.create(WrapPsbt.prototype);
|
|
@@ -2186,14 +2189,12 @@ class WrapPsbt {
|
|
|
2186
2189
|
WrapPsbtFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2187
2190
|
return obj;
|
|
2188
2191
|
}
|
|
2189
|
-
|
|
2190
2192
|
__destroy_into_raw() {
|
|
2191
2193
|
const ptr = this.__wbg_ptr;
|
|
2192
2194
|
this.__wbg_ptr = 0;
|
|
2193
2195
|
WrapPsbtFinalization.unregister(this);
|
|
2194
2196
|
return ptr;
|
|
2195
2197
|
}
|
|
2196
|
-
|
|
2197
2198
|
free() {
|
|
2198
2199
|
const ptr = this.__destroy_into_raw();
|
|
2199
2200
|
wasm.__wbg_wrappsbt_free(ptr, 0);
|
|
@@ -2205,7 +2206,7 @@ class WrapPsbt {
|
|
|
2205
2206
|
static deserialize(psbt) {
|
|
2206
2207
|
try {
|
|
2207
2208
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2208
|
-
const ptr0 = passArray8ToWasm0(psbt, wasm.
|
|
2209
|
+
const ptr0 = passArray8ToWasm0(psbt, wasm.__wbindgen_export);
|
|
2209
2210
|
const len0 = WASM_VECTOR_LEN;
|
|
2210
2211
|
wasm.wrappsbt_deserialize(retptr, ptr0, len0);
|
|
2211
2212
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2239,7 +2240,7 @@ class WrapPsbt {
|
|
|
2239
2240
|
signWithPrv(prv) {
|
|
2240
2241
|
try {
|
|
2241
2242
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2242
|
-
const ptr0 = passArray8ToWasm0(prv, wasm.
|
|
2243
|
+
const ptr0 = passArray8ToWasm0(prv, wasm.__wbindgen_export);
|
|
2243
2244
|
const len0 = WASM_VECTOR_LEN;
|
|
2244
2245
|
wasm.wrappsbt_signWithPrv(retptr, this.__wbg_ptr, ptr0, len0);
|
|
2245
2246
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2260,7 +2261,7 @@ class WrapPsbt {
|
|
|
2260
2261
|
signWithXprv(xprv) {
|
|
2261
2262
|
try {
|
|
2262
2263
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2263
|
-
const ptr0 = passStringToWasm0(xprv, wasm.
|
|
2264
|
+
const ptr0 = passStringToWasm0(xprv, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2264
2265
|
const len0 = WASM_VECTOR_LEN;
|
|
2265
2266
|
wasm.wrappsbt_signWithXprv(retptr, this.__wbg_ptr, ptr0, len0);
|
|
2266
2267
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2327,7 +2328,7 @@ class WrapPsbt {
|
|
|
2327
2328
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2328
2329
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2329
2330
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2330
|
-
wasm.
|
|
2331
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2331
2332
|
return v1;
|
|
2332
2333
|
} finally {
|
|
2333
2334
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2335,21 +2336,66 @@ class WrapPsbt {
|
|
|
2335
2336
|
}
|
|
2336
2337
|
}
|
|
2337
2338
|
if (Symbol.dispose) WrapPsbt.prototype[Symbol.dispose] = WrapPsbt.prototype.free;
|
|
2338
|
-
|
|
2339
2339
|
exports.WrapPsbt = WrapPsbt;
|
|
2340
2340
|
|
|
2341
|
-
exports.
|
|
2341
|
+
exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
2342
2342
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2343
2343
|
return addHeapObject(ret);
|
|
2344
2344
|
};
|
|
2345
2345
|
|
|
2346
|
-
exports.
|
|
2347
|
-
const ret = getObject(arg0)
|
|
2346
|
+
exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
2347
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
2348
|
+
return ret;
|
|
2349
|
+
};
|
|
2350
|
+
|
|
2351
|
+
exports.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {
|
|
2352
|
+
const ret = getObject(arg0) === null;
|
|
2353
|
+
return ret;
|
|
2354
|
+
};
|
|
2355
|
+
|
|
2356
|
+
exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
2357
|
+
const val = getObject(arg0);
|
|
2358
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2359
|
+
return ret;
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2362
|
+
exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
2363
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
2364
|
+
return ret;
|
|
2365
|
+
};
|
|
2366
|
+
|
|
2367
|
+
exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
2368
|
+
const ret = getObject(arg0) === undefined;
|
|
2369
|
+
return ret;
|
|
2370
|
+
};
|
|
2371
|
+
|
|
2372
|
+
exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
2373
|
+
const obj = getObject(arg1);
|
|
2374
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2375
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2376
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2379
|
+
exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
2380
|
+
const obj = getObject(arg1);
|
|
2381
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2382
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2383
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2384
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2385
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2386
|
+
};
|
|
2387
|
+
|
|
2388
|
+
exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
2389
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2390
|
+
};
|
|
2391
|
+
|
|
2392
|
+
exports.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2393
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2348
2394
|
return addHeapObject(ret);
|
|
2349
2395
|
}, arguments) };
|
|
2350
2396
|
|
|
2351
|
-
exports.
|
|
2352
|
-
const ret = getObject(arg0).call(getObject(arg1)
|
|
2397
|
+
exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
2398
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
2353
2399
|
return addHeapObject(ret);
|
|
2354
2400
|
}, arguments) };
|
|
2355
2401
|
|
|
@@ -2362,12 +2408,12 @@ exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError
|
|
|
2362
2408
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2363
2409
|
}, arguments) };
|
|
2364
2410
|
|
|
2365
|
-
exports.
|
|
2411
|
+
exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
2366
2412
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2367
2413
|
return addHeapObject(ret);
|
|
2368
2414
|
}, arguments) };
|
|
2369
2415
|
|
|
2370
|
-
exports.
|
|
2416
|
+
exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
2371
2417
|
const ret = getObject(arg0).length;
|
|
2372
2418
|
return ret;
|
|
2373
2419
|
};
|
|
@@ -2377,37 +2423,37 @@ exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
|
2377
2423
|
return addHeapObject(ret);
|
|
2378
2424
|
};
|
|
2379
2425
|
|
|
2380
|
-
exports.
|
|
2426
|
+
exports.__wbg_new_1ba21ce319a06297 = function() {
|
|
2381
2427
|
const ret = new Object();
|
|
2382
2428
|
return addHeapObject(ret);
|
|
2383
2429
|
};
|
|
2384
2430
|
|
|
2385
|
-
exports.
|
|
2431
|
+
exports.__wbg_new_25f239778d6112b9 = function() {
|
|
2386
2432
|
const ret = new Array();
|
|
2387
2433
|
return addHeapObject(ret);
|
|
2388
2434
|
};
|
|
2389
2435
|
|
|
2390
|
-
exports.
|
|
2436
|
+
exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
2391
2437
|
const ret = new Uint8Array(getObject(arg0));
|
|
2392
2438
|
return addHeapObject(ret);
|
|
2393
2439
|
};
|
|
2394
2440
|
|
|
2395
|
-
exports.
|
|
2441
|
+
exports.__wbg_new_df1173567d5ff028 = function(arg0, arg1) {
|
|
2396
2442
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2397
2443
|
return addHeapObject(ret);
|
|
2398
2444
|
};
|
|
2399
2445
|
|
|
2400
|
-
exports.
|
|
2446
|
+
exports.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
|
|
2401
2447
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2402
2448
|
return addHeapObject(ret);
|
|
2403
2449
|
};
|
|
2404
2450
|
|
|
2405
|
-
exports.
|
|
2451
|
+
exports.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
|
|
2406
2452
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2407
2453
|
return addHeapObject(ret);
|
|
2408
2454
|
};
|
|
2409
2455
|
|
|
2410
|
-
exports.
|
|
2456
|
+
exports.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
|
|
2411
2457
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
2412
2458
|
return addHeapObject(ret);
|
|
2413
2459
|
};
|
|
@@ -2422,11 +2468,11 @@ exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
|
2422
2468
|
return addHeapObject(ret);
|
|
2423
2469
|
};
|
|
2424
2470
|
|
|
2425
|
-
exports.
|
|
2471
|
+
exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
2426
2472
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
2427
2473
|
};
|
|
2428
2474
|
|
|
2429
|
-
exports.
|
|
2475
|
+
exports.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
|
|
2430
2476
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
2431
2477
|
return ret;
|
|
2432
2478
|
};
|
|
@@ -2440,32 +2486,32 @@ exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(functio
|
|
|
2440
2486
|
return addHeapObject(ret);
|
|
2441
2487
|
}, arguments) };
|
|
2442
2488
|
|
|
2443
|
-
exports.
|
|
2489
|
+
exports.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2444
2490
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2445
2491
|
return ret;
|
|
2446
2492
|
}, arguments) };
|
|
2447
2493
|
|
|
2448
|
-
exports.
|
|
2494
|
+
exports.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
2449
2495
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2450
2496
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2451
2497
|
};
|
|
2452
2498
|
|
|
2453
|
-
exports.
|
|
2499
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
2454
2500
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2455
2501
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2456
2502
|
};
|
|
2457
2503
|
|
|
2458
|
-
exports.
|
|
2504
|
+
exports.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
2459
2505
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2460
2506
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2461
2507
|
};
|
|
2462
2508
|
|
|
2463
|
-
exports.
|
|
2509
|
+
exports.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
2464
2510
|
const ret = typeof window === 'undefined' ? null : window;
|
|
2465
2511
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2466
2512
|
};
|
|
2467
2513
|
|
|
2468
|
-
exports.
|
|
2514
|
+
exports.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
|
|
2469
2515
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2470
2516
|
return addHeapObject(ret);
|
|
2471
2517
|
};
|
|
@@ -2475,52 +2521,11 @@ exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
|
2475
2521
|
return addHeapObject(ret);
|
|
2476
2522
|
};
|
|
2477
2523
|
|
|
2478
|
-
exports.
|
|
2479
|
-
const ret =
|
|
2480
|
-
return ret;
|
|
2481
|
-
};
|
|
2482
|
-
|
|
2483
|
-
exports.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
|
|
2484
|
-
const ret = getObject(arg0) === null;
|
|
2485
|
-
return ret;
|
|
2486
|
-
};
|
|
2487
|
-
|
|
2488
|
-
exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
2489
|
-
const val = getObject(arg0);
|
|
2490
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2491
|
-
return ret;
|
|
2492
|
-
};
|
|
2493
|
-
|
|
2494
|
-
exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
|
|
2495
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
2496
|
-
return ret;
|
|
2497
|
-
};
|
|
2498
|
-
|
|
2499
|
-
exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
2500
|
-
const ret = getObject(arg0) === undefined;
|
|
2524
|
+
exports.__wbg_wasmecpair_unwrap = function(arg0) {
|
|
2525
|
+
const ret = WasmECPair.__unwrap(getObject(arg0));
|
|
2501
2526
|
return ret;
|
|
2502
2527
|
};
|
|
2503
2528
|
|
|
2504
|
-
exports.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
|
|
2505
|
-
const obj = getObject(arg1);
|
|
2506
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2507
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2508
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2509
|
-
};
|
|
2510
|
-
|
|
2511
|
-
exports.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
|
|
2512
|
-
const obj = getObject(arg1);
|
|
2513
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2514
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
2515
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2516
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2517
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2518
|
-
};
|
|
2519
|
-
|
|
2520
|
-
exports.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
2521
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2522
|
-
};
|
|
2523
|
-
|
|
2524
2529
|
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
2525
2530
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2526
2531
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -2558,4 +2563,3 @@ const wasmPath = `${__dirname}/wasm_utxo_bg.wasm`;
|
|
|
2558
2563
|
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
2559
2564
|
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
2560
2565
|
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
2561
|
-
|