@bitgo/wasm-utxo 1.12.0 → 1.14.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/README.md +1 -1
- package/dist/cjs/js/wasm/wasm_utxo.d.ts +11 -14
- package/dist/cjs/js/wasm/wasm_utxo.js +252 -298
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +53 -53
- package/dist/esm/js/wasm/wasm_utxo.d.ts +11 -14
- package/dist/esm/js/wasm/wasm_utxo_bg.js +257 -293
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +53 -53
- package/package.json +1 -1
|
@@ -3,30 +3,44 @@ export function __wbg_set_wasm(val) {
|
|
|
3
3
|
wasm = val;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
function addHeapObject(obj) {
|
|
7
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
8
|
+
const idx = heap_next;
|
|
9
|
+
heap_next = heap[idx];
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
heap[idx] = obj;
|
|
12
|
+
return idx;
|
|
13
|
+
}
|
|
8
14
|
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
|
|
15
|
+
function _assertClass(instance, klass) {
|
|
16
|
+
if (!(instance instanceof klass)) {
|
|
17
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
12
18
|
}
|
|
13
|
-
return cachedUint8ArrayMemory0;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
function addBorrowedObject(obj) {
|
|
22
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
23
|
+
heap[--stack_pointer] = obj;
|
|
24
|
+
return stack_pointer;
|
|
25
|
+
}
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
function dropObject(idx) {
|
|
28
|
+
if (idx < 132) return;
|
|
29
|
+
heap[idx] = heap_next;
|
|
30
|
+
heap_next = idx;
|
|
31
|
+
}
|
|
19
32
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
34
|
+
ptr = ptr >>> 0;
|
|
35
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let cachedDataViewMemory0 = null;
|
|
39
|
+
function getDataViewMemory0() {
|
|
40
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
41
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
28
42
|
}
|
|
29
|
-
return
|
|
43
|
+
return cachedDataViewMemory0;
|
|
30
44
|
}
|
|
31
45
|
|
|
32
46
|
function getStringFromWasm0(ptr, len) {
|
|
@@ -34,19 +48,12 @@ function getStringFromWasm0(ptr, len) {
|
|
|
34
48
|
return decodeText(ptr, len);
|
|
35
49
|
}
|
|
36
50
|
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function addHeapObject(obj) {
|
|
44
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
45
|
-
const idx = heap_next;
|
|
46
|
-
heap_next = heap[idx];
|
|
47
|
-
|
|
48
|
-
heap[idx] = obj;
|
|
49
|
-
return idx;
|
|
51
|
+
let cachedUint8ArrayMemory0 = null;
|
|
52
|
+
function getUint8ArrayMemory0() {
|
|
53
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
54
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
55
|
+
}
|
|
56
|
+
return cachedUint8ArrayMemory0;
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
function getObject(idx) { return heap[idx]; }
|
|
@@ -55,57 +62,37 @@ function handleError(f, args) {
|
|
|
55
62
|
try {
|
|
56
63
|
return f.apply(this, args);
|
|
57
64
|
} catch (e) {
|
|
58
|
-
wasm.
|
|
65
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
59
66
|
}
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function dropObject(idx) {
|
|
68
|
-
if (idx < 132) return;
|
|
69
|
-
heap[idx] = heap_next;
|
|
70
|
-
heap_next = idx;
|
|
71
|
-
}
|
|
69
|
+
let heap = new Array(128).fill(undefined);
|
|
70
|
+
heap.push(undefined, null, true, false);
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
const ret = getObject(idx);
|
|
75
|
-
dropObject(idx);
|
|
76
|
-
return ret;
|
|
77
|
-
}
|
|
72
|
+
let heap_next = heap.length;
|
|
78
73
|
|
|
79
74
|
function isLikeNone(x) {
|
|
80
75
|
return x === undefined || x === null;
|
|
81
76
|
}
|
|
82
77
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
return cachedDataViewMemory0;
|
|
78
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
79
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
80
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
81
|
+
WASM_VECTOR_LEN = arg.length;
|
|
82
|
+
return ptr;
|
|
90
83
|
}
|
|
91
84
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
98
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
99
|
-
view.set(buf);
|
|
100
|
-
return {
|
|
101
|
-
read: arg.length,
|
|
102
|
-
written: buf.length
|
|
103
|
-
};
|
|
85
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
86
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
87
|
+
const mem = getDataViewMemory0();
|
|
88
|
+
for (let i = 0; i < array.length; i++) {
|
|
89
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
104
90
|
}
|
|
91
|
+
WASM_VECTOR_LEN = array.length;
|
|
92
|
+
return ptr;
|
|
105
93
|
}
|
|
106
94
|
|
|
107
95
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
108
|
-
|
|
109
96
|
if (realloc === undefined) {
|
|
110
97
|
const buf = cachedTextEncoder.encode(arg);
|
|
111
98
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
@@ -126,7 +113,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
126
113
|
if (code > 0x7F) break;
|
|
127
114
|
mem[ptr + offset] = code;
|
|
128
115
|
}
|
|
129
|
-
|
|
130
116
|
if (offset !== len) {
|
|
131
117
|
if (offset !== 0) {
|
|
132
118
|
arg = arg.slice(offset);
|
|
@@ -143,50 +129,94 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
143
129
|
return ptr;
|
|
144
130
|
}
|
|
145
131
|
|
|
146
|
-
|
|
147
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
148
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
149
|
-
WASM_VECTOR_LEN = arg.length;
|
|
150
|
-
return ptr;
|
|
151
|
-
}
|
|
132
|
+
let stack_pointer = 128;
|
|
152
133
|
|
|
153
|
-
function
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
134
|
+
function takeObject(idx) {
|
|
135
|
+
const ret = getObject(idx);
|
|
136
|
+
dropObject(idx);
|
|
137
|
+
return ret;
|
|
157
138
|
}
|
|
158
139
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
140
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
141
|
+
cachedTextDecoder.decode();
|
|
142
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
143
|
+
let numBytesDecoded = 0;
|
|
144
|
+
function decodeText(ptr, len) {
|
|
145
|
+
numBytesDecoded += len;
|
|
146
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
147
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
148
|
+
cachedTextDecoder.decode();
|
|
149
|
+
numBytesDecoded = len;
|
|
164
150
|
}
|
|
165
|
-
|
|
166
|
-
return ptr;
|
|
151
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
167
152
|
}
|
|
168
153
|
|
|
169
|
-
|
|
154
|
+
const cachedTextEncoder = new TextEncoder();
|
|
170
155
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
156
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
157
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
158
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
159
|
+
view.set(buf);
|
|
160
|
+
return {
|
|
161
|
+
read: arg.length,
|
|
162
|
+
written: buf.length
|
|
163
|
+
};
|
|
164
|
+
}
|
|
175
165
|
}
|
|
176
166
|
|
|
167
|
+
let WASM_VECTOR_LEN = 0;
|
|
168
|
+
|
|
177
169
|
const AddressNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
178
170
|
? { register: () => {}, unregister: () => {} }
|
|
179
171
|
: new FinalizationRegistry(ptr => wasm.__wbg_addressnamespace_free(ptr >>> 0, 1));
|
|
180
172
|
|
|
181
|
-
|
|
173
|
+
const BitGoPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
174
|
+
? { register: () => {}, unregister: () => {} }
|
|
175
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_bitgopsbt_free(ptr >>> 0, 1));
|
|
176
|
+
|
|
177
|
+
const FixedScriptWalletNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
178
|
+
? { register: () => {}, unregister: () => {} }
|
|
179
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fixedscriptwalletnamespace_free(ptr >>> 0, 1));
|
|
180
|
+
|
|
181
|
+
const UtxolibCompatNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
182
|
+
? { register: () => {}, unregister: () => {} }
|
|
183
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_utxolibcompatnamespace_free(ptr >>> 0, 1));
|
|
184
|
+
|
|
185
|
+
const WasmBIP32Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
186
|
+
? { register: () => {}, unregister: () => {} }
|
|
187
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbip32_free(ptr >>> 0, 1));
|
|
188
|
+
|
|
189
|
+
const WasmECPairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
190
|
+
? { register: () => {}, unregister: () => {} }
|
|
191
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmecpair_free(ptr >>> 0, 1));
|
|
192
|
+
|
|
193
|
+
const WasmReplayProtectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
194
|
+
? { register: () => {}, unregister: () => {} }
|
|
195
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmreplayprotection_free(ptr >>> 0, 1));
|
|
196
|
+
|
|
197
|
+
const WasmRootWalletKeysFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
198
|
+
? { register: () => {}, unregister: () => {} }
|
|
199
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmrootwalletkeys_free(ptr >>> 0, 1));
|
|
200
|
+
|
|
201
|
+
const WrapDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
202
|
+
? { register: () => {}, unregister: () => {} }
|
|
203
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wrapdescriptor_free(ptr >>> 0, 1));
|
|
182
204
|
|
|
205
|
+
const WrapMiniscriptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
206
|
+
? { register: () => {}, unregister: () => {} }
|
|
207
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wrapminiscript_free(ptr >>> 0, 1));
|
|
208
|
+
|
|
209
|
+
const WrapPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
210
|
+
? { register: () => {}, unregister: () => {} }
|
|
211
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wrappsbt_free(ptr >>> 0, 1));
|
|
212
|
+
|
|
213
|
+
export class AddressNamespace {
|
|
183
214
|
__destroy_into_raw() {
|
|
184
215
|
const ptr = this.__wbg_ptr;
|
|
185
216
|
this.__wbg_ptr = 0;
|
|
186
217
|
AddressNamespaceFinalization.unregister(this);
|
|
187
218
|
return ptr;
|
|
188
219
|
}
|
|
189
|
-
|
|
190
220
|
free() {
|
|
191
221
|
const ptr = this.__destroy_into_raw();
|
|
192
222
|
wasm.__wbg_addressnamespace_free(ptr, 0);
|
|
@@ -199,9 +229,9 @@ export class AddressNamespace {
|
|
|
199
229
|
static to_output_script_with_coin(address, coin) {
|
|
200
230
|
try {
|
|
201
231
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
202
|
-
const ptr0 = passStringToWasm0(address, wasm.
|
|
232
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
203
233
|
const len0 = WASM_VECTOR_LEN;
|
|
204
|
-
const ptr1 = passStringToWasm0(coin, wasm.
|
|
234
|
+
const ptr1 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
205
235
|
const len1 = WASM_VECTOR_LEN;
|
|
206
236
|
wasm.addressnamespace_to_output_script_with_coin(retptr, ptr0, len0, ptr1, len1);
|
|
207
237
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -212,7 +242,7 @@ export class AddressNamespace {
|
|
|
212
242
|
throw takeObject(r2);
|
|
213
243
|
}
|
|
214
244
|
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
215
|
-
wasm.
|
|
245
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
216
246
|
return v3;
|
|
217
247
|
} finally {
|
|
218
248
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -229,11 +259,11 @@ export class AddressNamespace {
|
|
|
229
259
|
let deferred5_1;
|
|
230
260
|
try {
|
|
231
261
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
232
|
-
const ptr0 = passArray8ToWasm0(script, wasm.
|
|
262
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
233
263
|
const len0 = WASM_VECTOR_LEN;
|
|
234
|
-
const ptr1 = passStringToWasm0(coin, wasm.
|
|
264
|
+
const ptr1 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
235
265
|
const len1 = WASM_VECTOR_LEN;
|
|
236
|
-
var ptr2 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.
|
|
266
|
+
var ptr2 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
237
267
|
var len2 = WASM_VECTOR_LEN;
|
|
238
268
|
wasm.addressnamespace_from_output_script_with_coin(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
239
269
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -251,18 +281,13 @@ export class AddressNamespace {
|
|
|
251
281
|
return getStringFromWasm0(ptr4, len4);
|
|
252
282
|
} finally {
|
|
253
283
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
254
|
-
wasm.
|
|
284
|
+
wasm.__wbindgen_export4(deferred5_0, deferred5_1, 1);
|
|
255
285
|
}
|
|
256
286
|
}
|
|
257
287
|
}
|
|
258
288
|
if (Symbol.dispose) AddressNamespace.prototype[Symbol.dispose] = AddressNamespace.prototype.free;
|
|
259
289
|
|
|
260
|
-
const BitGoPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
261
|
-
? { register: () => {}, unregister: () => {} }
|
|
262
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_bitgopsbt_free(ptr >>> 0, 1));
|
|
263
|
-
|
|
264
290
|
export class BitGoPsbt {
|
|
265
|
-
|
|
266
291
|
static __wrap(ptr) {
|
|
267
292
|
ptr = ptr >>> 0;
|
|
268
293
|
const obj = Object.create(BitGoPsbt.prototype);
|
|
@@ -270,14 +295,12 @@ export class BitGoPsbt {
|
|
|
270
295
|
BitGoPsbtFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
271
296
|
return obj;
|
|
272
297
|
}
|
|
273
|
-
|
|
274
298
|
__destroy_into_raw() {
|
|
275
299
|
const ptr = this.__wbg_ptr;
|
|
276
300
|
this.__wbg_ptr = 0;
|
|
277
301
|
BitGoPsbtFinalization.unregister(this);
|
|
278
302
|
return ptr;
|
|
279
303
|
}
|
|
280
|
-
|
|
281
304
|
free() {
|
|
282
305
|
const ptr = this.__destroy_into_raw();
|
|
283
306
|
wasm.__wbg_bitgopsbt_free(ptr, 0);
|
|
@@ -291,9 +314,9 @@ export class BitGoPsbt {
|
|
|
291
314
|
static from_bytes(bytes, network) {
|
|
292
315
|
try {
|
|
293
316
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
294
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.
|
|
317
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
295
318
|
const len0 = WASM_VECTOR_LEN;
|
|
296
|
-
const ptr1 = passStringToWasm0(network, wasm.
|
|
319
|
+
const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
297
320
|
const len1 = WASM_VECTOR_LEN;
|
|
298
321
|
wasm.bitgopsbt_from_bytes(retptr, ptr0, len0, ptr1, len1);
|
|
299
322
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -324,7 +347,7 @@ export class BitGoPsbt {
|
|
|
324
347
|
return getStringFromWasm0(r0, r1);
|
|
325
348
|
} finally {
|
|
326
349
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
327
|
-
wasm.
|
|
350
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
328
351
|
}
|
|
329
352
|
}
|
|
330
353
|
/**
|
|
@@ -420,7 +443,7 @@ export class BitGoPsbt {
|
|
|
420
443
|
throw takeObject(r2);
|
|
421
444
|
}
|
|
422
445
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
423
|
-
wasm.
|
|
446
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
424
447
|
return v1;
|
|
425
448
|
} finally {
|
|
426
449
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -467,9 +490,9 @@ export class BitGoPsbt {
|
|
|
467
490
|
add_paygo_attestation(output_index, entropy, signature) {
|
|
468
491
|
try {
|
|
469
492
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
470
|
-
const ptr0 = passArray8ToWasm0(entropy, wasm.
|
|
493
|
+
const ptr0 = passArray8ToWasm0(entropy, wasm.__wbindgen_export);
|
|
471
494
|
const len0 = WASM_VECTOR_LEN;
|
|
472
|
-
const ptr1 = passArray8ToWasm0(signature, wasm.
|
|
495
|
+
const ptr1 = passArray8ToWasm0(signature, wasm.__wbindgen_export);
|
|
473
496
|
const len1 = WASM_VECTOR_LEN;
|
|
474
497
|
wasm.bitgopsbt_add_paygo_attestation(retptr, this.__wbg_ptr, output_index, ptr0, len0, ptr1, len1);
|
|
475
498
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -546,7 +569,7 @@ export class BitGoPsbt {
|
|
|
546
569
|
try {
|
|
547
570
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
548
571
|
_assertClass(xpriv, WasmBIP32);
|
|
549
|
-
var ptr0 = isLikeNone(session_id_bytes) ? 0 : passArray8ToWasm0(session_id_bytes, wasm.
|
|
572
|
+
var ptr0 = isLikeNone(session_id_bytes) ? 0 : passArray8ToWasm0(session_id_bytes, wasm.__wbindgen_export);
|
|
550
573
|
var len0 = WASM_VECTOR_LEN;
|
|
551
574
|
wasm.bitgopsbt_generate_musig2_nonces(retptr, this.__wbg_ptr, xpriv.__wbg_ptr, ptr0, len0);
|
|
552
575
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -645,7 +668,7 @@ export class BitGoPsbt {
|
|
|
645
668
|
try {
|
|
646
669
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
647
670
|
_assertClass(wallet_keys, WasmRootWalletKeys);
|
|
648
|
-
var ptr0 = isLikeNone(paygo_pubkeys) ? 0 : passArrayJsValueToWasm0(paygo_pubkeys, wasm.
|
|
671
|
+
var ptr0 = isLikeNone(paygo_pubkeys) ? 0 : passArrayJsValueToWasm0(paygo_pubkeys, wasm.__wbindgen_export);
|
|
649
672
|
var len0 = WASM_VECTOR_LEN;
|
|
650
673
|
wasm.bitgopsbt_parse_outputs_with_wallet_keys(retptr, this.__wbg_ptr, wallet_keys.__wbg_ptr, ptr0, len0);
|
|
651
674
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -671,7 +694,7 @@ export class BitGoPsbt {
|
|
|
671
694
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
672
695
|
_assertClass(wallet_keys, WasmRootWalletKeys);
|
|
673
696
|
_assertClass(replay_protection, WasmReplayProtection);
|
|
674
|
-
var ptr0 = isLikeNone(paygo_pubkeys) ? 0 : passArrayJsValueToWasm0(paygo_pubkeys, wasm.
|
|
697
|
+
var ptr0 = isLikeNone(paygo_pubkeys) ? 0 : passArrayJsValueToWasm0(paygo_pubkeys, wasm.__wbindgen_export);
|
|
675
698
|
var len0 = WASM_VECTOR_LEN;
|
|
676
699
|
wasm.bitgopsbt_parse_transaction_with_wallet_keys(retptr, this.__wbg_ptr, wallet_keys.__wbg_ptr, replay_protection.__wbg_ptr, ptr0, len0);
|
|
677
700
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -738,7 +761,7 @@ export class BitGoPsbt {
|
|
|
738
761
|
return getStringFromWasm0(r0, r1);
|
|
739
762
|
} finally {
|
|
740
763
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
741
|
-
wasm.
|
|
764
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
742
765
|
}
|
|
743
766
|
}
|
|
744
767
|
/**
|
|
@@ -760,7 +783,7 @@ export class BitGoPsbt {
|
|
|
760
783
|
throw takeObject(r2);
|
|
761
784
|
}
|
|
762
785
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
763
|
-
wasm.
|
|
786
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
764
787
|
return v1;
|
|
765
788
|
} finally {
|
|
766
789
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -769,19 +792,13 @@ export class BitGoPsbt {
|
|
|
769
792
|
}
|
|
770
793
|
if (Symbol.dispose) BitGoPsbt.prototype[Symbol.dispose] = BitGoPsbt.prototype.free;
|
|
771
794
|
|
|
772
|
-
const FixedScriptWalletNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
773
|
-
? { register: () => {}, unregister: () => {} }
|
|
774
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_fixedscriptwalletnamespace_free(ptr >>> 0, 1));
|
|
775
|
-
|
|
776
795
|
export class FixedScriptWalletNamespace {
|
|
777
|
-
|
|
778
796
|
__destroy_into_raw() {
|
|
779
797
|
const ptr = this.__wbg_ptr;
|
|
780
798
|
this.__wbg_ptr = 0;
|
|
781
799
|
FixedScriptWalletNamespaceFinalization.unregister(this);
|
|
782
800
|
return ptr;
|
|
783
801
|
}
|
|
784
|
-
|
|
785
802
|
free() {
|
|
786
803
|
const ptr = this.__destroy_into_raw();
|
|
787
804
|
wasm.__wbg_fixedscriptwalletnamespace_free(ptr, 0);
|
|
@@ -806,7 +823,7 @@ export class FixedScriptWalletNamespace {
|
|
|
806
823
|
throw takeObject(r2);
|
|
807
824
|
}
|
|
808
825
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
809
|
-
wasm.
|
|
826
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
810
827
|
return v1;
|
|
811
828
|
} finally {
|
|
812
829
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -826,7 +843,7 @@ export class FixedScriptWalletNamespace {
|
|
|
826
843
|
try {
|
|
827
844
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
828
845
|
_assertClass(keys, WasmRootWalletKeys);
|
|
829
|
-
var ptr0 = isLikeNone(address_format) ? 0 : passStringToWasm0(address_format, wasm.
|
|
846
|
+
var ptr0 = isLikeNone(address_format) ? 0 : passStringToWasm0(address_format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
830
847
|
var len0 = WASM_VECTOR_LEN;
|
|
831
848
|
wasm.fixedscriptwalletnamespace_address(retptr, keys.__wbg_ptr, chain, index, addHeapObject(network), ptr0, len0);
|
|
832
849
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -844,25 +861,19 @@ export class FixedScriptWalletNamespace {
|
|
|
844
861
|
return getStringFromWasm0(ptr2, len2);
|
|
845
862
|
} finally {
|
|
846
863
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
847
|
-
wasm.
|
|
864
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
848
865
|
}
|
|
849
866
|
}
|
|
850
867
|
}
|
|
851
868
|
if (Symbol.dispose) FixedScriptWalletNamespace.prototype[Symbol.dispose] = FixedScriptWalletNamespace.prototype.free;
|
|
852
869
|
|
|
853
|
-
const UtxolibCompatNamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
854
|
-
? { register: () => {}, unregister: () => {} }
|
|
855
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_utxolibcompatnamespace_free(ptr >>> 0, 1));
|
|
856
|
-
|
|
857
870
|
export class UtxolibCompatNamespace {
|
|
858
|
-
|
|
859
871
|
__destroy_into_raw() {
|
|
860
872
|
const ptr = this.__wbg_ptr;
|
|
861
873
|
this.__wbg_ptr = 0;
|
|
862
874
|
UtxolibCompatNamespaceFinalization.unregister(this);
|
|
863
875
|
return ptr;
|
|
864
876
|
}
|
|
865
|
-
|
|
866
877
|
free() {
|
|
867
878
|
const ptr = this.__destroy_into_raw();
|
|
868
879
|
wasm.__wbg_utxolibcompatnamespace_free(ptr, 0);
|
|
@@ -882,9 +893,9 @@ export class UtxolibCompatNamespace {
|
|
|
882
893
|
static to_output_script(address, network, format) {
|
|
883
894
|
try {
|
|
884
895
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
885
|
-
const ptr0 = passStringToWasm0(address, wasm.
|
|
896
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
886
897
|
const len0 = WASM_VECTOR_LEN;
|
|
887
|
-
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.
|
|
898
|
+
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
888
899
|
var len1 = WASM_VECTOR_LEN;
|
|
889
900
|
wasm.utxolibcompatnamespace_to_output_script(retptr, ptr0, len0, addHeapObject(network), ptr1, len1);
|
|
890
901
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -895,7 +906,7 @@ export class UtxolibCompatNamespace {
|
|
|
895
906
|
throw takeObject(r2);
|
|
896
907
|
}
|
|
897
908
|
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
898
|
-
wasm.
|
|
909
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
899
910
|
return v3;
|
|
900
911
|
} finally {
|
|
901
912
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -918,9 +929,9 @@ export class UtxolibCompatNamespace {
|
|
|
918
929
|
let deferred4_1;
|
|
919
930
|
try {
|
|
920
931
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
921
|
-
const ptr0 = passArray8ToWasm0(script, wasm.
|
|
932
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
922
933
|
const len0 = WASM_VECTOR_LEN;
|
|
923
|
-
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.
|
|
934
|
+
var ptr1 = isLikeNone(format) ? 0 : passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
924
935
|
var len1 = WASM_VECTOR_LEN;
|
|
925
936
|
wasm.utxolibcompatnamespace_from_output_script(retptr, ptr0, len0, addHeapObject(network), ptr1, len1);
|
|
926
937
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -938,21 +949,17 @@ export class UtxolibCompatNamespace {
|
|
|
938
949
|
return getStringFromWasm0(ptr3, len3);
|
|
939
950
|
} finally {
|
|
940
951
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
941
|
-
wasm.
|
|
952
|
+
wasm.__wbindgen_export4(deferred4_0, deferred4_1, 1);
|
|
942
953
|
}
|
|
943
954
|
}
|
|
944
955
|
}
|
|
945
956
|
if (Symbol.dispose) UtxolibCompatNamespace.prototype[Symbol.dispose] = UtxolibCompatNamespace.prototype.free;
|
|
946
957
|
|
|
947
|
-
const WasmBIP32Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
948
|
-
? { register: () => {}, unregister: () => {} }
|
|
949
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbip32_free(ptr >>> 0, 1));
|
|
950
958
|
/**
|
|
951
959
|
* WASM wrapper for BIP32 extended keys (Xpub/Xpriv)
|
|
952
960
|
* Implements the BIP32Interface TypeScript interface
|
|
953
961
|
*/
|
|
954
962
|
export class WasmBIP32 {
|
|
955
|
-
|
|
956
963
|
static __wrap(ptr) {
|
|
957
964
|
ptr = ptr >>> 0;
|
|
958
965
|
const obj = Object.create(WasmBIP32.prototype);
|
|
@@ -960,14 +967,12 @@ export class WasmBIP32 {
|
|
|
960
967
|
WasmBIP32Finalization.register(obj, obj.__wbg_ptr, obj);
|
|
961
968
|
return obj;
|
|
962
969
|
}
|
|
963
|
-
|
|
964
970
|
__destroy_into_raw() {
|
|
965
971
|
const ptr = this.__wbg_ptr;
|
|
966
972
|
this.__wbg_ptr = 0;
|
|
967
973
|
WasmBIP32Finalization.unregister(this);
|
|
968
974
|
return ptr;
|
|
969
975
|
}
|
|
970
|
-
|
|
971
976
|
free() {
|
|
972
977
|
const ptr = this.__destroy_into_raw();
|
|
973
978
|
wasm.__wbg_wasmbip32_free(ptr, 0);
|
|
@@ -1004,7 +1009,7 @@ export class WasmBIP32 {
|
|
|
1004
1009
|
derive_path(path) {
|
|
1005
1010
|
try {
|
|
1006
1011
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1007
|
-
const ptr0 = passStringToWasm0(path, wasm.
|
|
1012
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1008
1013
|
const len0 = WASM_VECTOR_LEN;
|
|
1009
1014
|
wasm.wasmbip32_derive_path(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1010
1015
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1034,7 +1039,7 @@ export class WasmBIP32 {
|
|
|
1034
1039
|
static from_base58(base58_str) {
|
|
1035
1040
|
try {
|
|
1036
1041
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1037
|
-
const ptr0 = passStringToWasm0(base58_str, wasm.
|
|
1042
|
+
const ptr0 = passStringToWasm0(base58_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1038
1043
|
const len0 = WASM_VECTOR_LEN;
|
|
1039
1044
|
wasm.wasmbip32_from_base58(retptr, ptr0, len0);
|
|
1040
1045
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1198,7 +1203,7 @@ export class WasmBIP32 {
|
|
|
1198
1203
|
return getStringFromWasm0(ptr1, len1);
|
|
1199
1204
|
} finally {
|
|
1200
1205
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1201
|
-
wasm.
|
|
1206
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1202
1207
|
}
|
|
1203
1208
|
}
|
|
1204
1209
|
/**
|
|
@@ -1218,9 +1223,9 @@ export class WasmBIP32 {
|
|
|
1218
1223
|
static from_seed(seed, network) {
|
|
1219
1224
|
try {
|
|
1220
1225
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1221
|
-
const ptr0 = passArray8ToWasm0(seed, wasm.
|
|
1226
|
+
const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_export);
|
|
1222
1227
|
const len0 = WASM_VECTOR_LEN;
|
|
1223
|
-
var ptr1 = isLikeNone(network) ? 0 : passStringToWasm0(network, wasm.
|
|
1228
|
+
var ptr1 = isLikeNone(network) ? 0 : passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1224
1229
|
var len1 = WASM_VECTOR_LEN;
|
|
1225
1230
|
wasm.wasmbip32_from_seed(retptr, ptr0, len0, ptr1, len1);
|
|
1226
1231
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1242,7 +1247,7 @@ export class WasmBIP32 {
|
|
|
1242
1247
|
static from_xprv(xprv_str) {
|
|
1243
1248
|
try {
|
|
1244
1249
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1245
|
-
const ptr0 = passStringToWasm0(xprv_str, wasm.
|
|
1250
|
+
const ptr0 = passStringToWasm0(xprv_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1246
1251
|
const len0 = WASM_VECTOR_LEN;
|
|
1247
1252
|
wasm.wasmbip32_from_xprv(retptr, ptr0, len0);
|
|
1248
1253
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1264,7 +1269,7 @@ export class WasmBIP32 {
|
|
|
1264
1269
|
static from_xpub(xpub_str) {
|
|
1265
1270
|
try {
|
|
1266
1271
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1267
|
-
const ptr0 = passStringToWasm0(xpub_str, wasm.
|
|
1272
|
+
const ptr0 = passStringToWasm0(xpub_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1268
1273
|
const len0 = WASM_VECTOR_LEN;
|
|
1269
1274
|
wasm.wasmbip32_from_xpub(retptr, ptr0, len0);
|
|
1270
1275
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1295,20 +1300,16 @@ export class WasmBIP32 {
|
|
|
1295
1300
|
return getStringFromWasm0(r0, r1);
|
|
1296
1301
|
} finally {
|
|
1297
1302
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1298
|
-
wasm.
|
|
1303
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1299
1304
|
}
|
|
1300
1305
|
}
|
|
1301
1306
|
}
|
|
1302
1307
|
if (Symbol.dispose) WasmBIP32.prototype[Symbol.dispose] = WasmBIP32.prototype.free;
|
|
1303
1308
|
|
|
1304
|
-
const WasmECPairFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1305
|
-
? { register: () => {}, unregister: () => {} }
|
|
1306
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmecpair_free(ptr >>> 0, 1));
|
|
1307
1309
|
/**
|
|
1308
1310
|
* WASM wrapper for elliptic curve key pairs (always uses compressed keys)
|
|
1309
1311
|
*/
|
|
1310
1312
|
export class WasmECPair {
|
|
1311
|
-
|
|
1312
1313
|
static __wrap(ptr) {
|
|
1313
1314
|
ptr = ptr >>> 0;
|
|
1314
1315
|
const obj = Object.create(WasmECPair.prototype);
|
|
@@ -1316,21 +1317,18 @@ export class WasmECPair {
|
|
|
1316
1317
|
WasmECPairFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1317
1318
|
return obj;
|
|
1318
1319
|
}
|
|
1319
|
-
|
|
1320
1320
|
static __unwrap(jsValue) {
|
|
1321
1321
|
if (!(jsValue instanceof WasmECPair)) {
|
|
1322
1322
|
return 0;
|
|
1323
1323
|
}
|
|
1324
1324
|
return jsValue.__destroy_into_raw();
|
|
1325
1325
|
}
|
|
1326
|
-
|
|
1327
1326
|
__destroy_into_raw() {
|
|
1328
1327
|
const ptr = this.__wbg_ptr;
|
|
1329
1328
|
this.__wbg_ptr = 0;
|
|
1330
1329
|
WasmECPairFinalization.unregister(this);
|
|
1331
1330
|
return ptr;
|
|
1332
1331
|
}
|
|
1333
|
-
|
|
1334
1332
|
free() {
|
|
1335
1333
|
const ptr = this.__destroy_into_raw();
|
|
1336
1334
|
wasm.__wbg_wasmecpair_free(ptr, 0);
|
|
@@ -1376,7 +1374,7 @@ export class WasmECPair {
|
|
|
1376
1374
|
return getStringFromWasm0(ptr1, len1);
|
|
1377
1375
|
} finally {
|
|
1378
1376
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1379
|
-
wasm.
|
|
1377
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1380
1378
|
}
|
|
1381
1379
|
}
|
|
1382
1380
|
/**
|
|
@@ -1404,7 +1402,7 @@ export class WasmECPair {
|
|
|
1404
1402
|
return getStringFromWasm0(ptr1, len1);
|
|
1405
1403
|
} finally {
|
|
1406
1404
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1407
|
-
wasm.
|
|
1405
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1408
1406
|
}
|
|
1409
1407
|
}
|
|
1410
1408
|
/**
|
|
@@ -1415,7 +1413,7 @@ export class WasmECPair {
|
|
|
1415
1413
|
static from_public_key(public_key) {
|
|
1416
1414
|
try {
|
|
1417
1415
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1418
|
-
const ptr0 = passArray8ToWasm0(public_key, wasm.
|
|
1416
|
+
const ptr0 = passArray8ToWasm0(public_key, wasm.__wbindgen_export);
|
|
1419
1417
|
const len0 = WASM_VECTOR_LEN;
|
|
1420
1418
|
wasm.wasmecpair_from_public_key(retptr, ptr0, len0);
|
|
1421
1419
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1437,7 +1435,7 @@ export class WasmECPair {
|
|
|
1437
1435
|
static from_private_key(private_key) {
|
|
1438
1436
|
try {
|
|
1439
1437
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1440
|
-
const ptr0 = passArray8ToWasm0(private_key, wasm.
|
|
1438
|
+
const ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_export);
|
|
1441
1439
|
const len0 = WASM_VECTOR_LEN;
|
|
1442
1440
|
wasm.wasmecpair_from_private_key(retptr, ptr0, len0);
|
|
1443
1441
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1459,7 +1457,7 @@ export class WasmECPair {
|
|
|
1459
1457
|
static from_wif_mainnet(wif_string) {
|
|
1460
1458
|
try {
|
|
1461
1459
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1462
|
-
const ptr0 = passStringToWasm0(wif_string, wasm.
|
|
1460
|
+
const ptr0 = passStringToWasm0(wif_string, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1463
1461
|
const len0 = WASM_VECTOR_LEN;
|
|
1464
1462
|
wasm.wasmecpair_from_wif_mainnet(retptr, ptr0, len0);
|
|
1465
1463
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1481,7 +1479,7 @@ export class WasmECPair {
|
|
|
1481
1479
|
static from_wif_testnet(wif_string) {
|
|
1482
1480
|
try {
|
|
1483
1481
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1484
|
-
const ptr0 = passStringToWasm0(wif_string, wasm.
|
|
1482
|
+
const ptr0 = passStringToWasm0(wif_string, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1485
1483
|
const len0 = WASM_VECTOR_LEN;
|
|
1486
1484
|
wasm.wasmecpair_from_wif_testnet(retptr, ptr0, len0);
|
|
1487
1485
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1520,7 +1518,7 @@ export class WasmECPair {
|
|
|
1520
1518
|
return getStringFromWasm0(ptr1, len1);
|
|
1521
1519
|
} finally {
|
|
1522
1520
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1523
|
-
wasm.
|
|
1521
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1524
1522
|
}
|
|
1525
1523
|
}
|
|
1526
1524
|
/**
|
|
@@ -1531,7 +1529,7 @@ export class WasmECPair {
|
|
|
1531
1529
|
static from_wif(wif_string) {
|
|
1532
1530
|
try {
|
|
1533
1531
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1534
|
-
const ptr0 = passStringToWasm0(wif_string, wasm.
|
|
1532
|
+
const ptr0 = passStringToWasm0(wif_string, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1535
1533
|
const len0 = WASM_VECTOR_LEN;
|
|
1536
1534
|
wasm.wasmecpair_from_wif(retptr, ptr0, len0);
|
|
1537
1535
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1548,14 +1546,10 @@ export class WasmECPair {
|
|
|
1548
1546
|
}
|
|
1549
1547
|
if (Symbol.dispose) WasmECPair.prototype[Symbol.dispose] = WasmECPair.prototype.free;
|
|
1550
1548
|
|
|
1551
|
-
const WasmReplayProtectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1552
|
-
? { register: () => {}, unregister: () => {} }
|
|
1553
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmreplayprotection_free(ptr >>> 0, 1));
|
|
1554
1549
|
/**
|
|
1555
1550
|
* WASM wrapper for ReplayProtection
|
|
1556
1551
|
*/
|
|
1557
1552
|
export class WasmReplayProtection {
|
|
1558
|
-
|
|
1559
1553
|
static __wrap(ptr) {
|
|
1560
1554
|
ptr = ptr >>> 0;
|
|
1561
1555
|
const obj = Object.create(WasmReplayProtection.prototype);
|
|
@@ -1563,14 +1557,12 @@ export class WasmReplayProtection {
|
|
|
1563
1557
|
WasmReplayProtectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1564
1558
|
return obj;
|
|
1565
1559
|
}
|
|
1566
|
-
|
|
1567
1560
|
__destroy_into_raw() {
|
|
1568
1561
|
const ptr = this.__wbg_ptr;
|
|
1569
1562
|
this.__wbg_ptr = 0;
|
|
1570
1563
|
WasmReplayProtectionFinalization.unregister(this);
|
|
1571
1564
|
return ptr;
|
|
1572
1565
|
}
|
|
1573
|
-
|
|
1574
1566
|
free() {
|
|
1575
1567
|
const ptr = this.__destroy_into_raw();
|
|
1576
1568
|
wasm.__wbg_wasmreplayprotection_free(ptr, 0);
|
|
@@ -1584,9 +1576,9 @@ export class WasmReplayProtection {
|
|
|
1584
1576
|
static from_addresses(addresses, network) {
|
|
1585
1577
|
try {
|
|
1586
1578
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1587
|
-
const ptr0 = passArrayJsValueToWasm0(addresses, wasm.
|
|
1579
|
+
const ptr0 = passArrayJsValueToWasm0(addresses, wasm.__wbindgen_export);
|
|
1588
1580
|
const len0 = WASM_VECTOR_LEN;
|
|
1589
|
-
const ptr1 = passStringToWasm0(network, wasm.
|
|
1581
|
+
const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1590
1582
|
const len1 = WASM_VECTOR_LEN;
|
|
1591
1583
|
wasm.wasmreplayprotection_from_addresses(retptr, ptr0, len0, ptr1, len1);
|
|
1592
1584
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1608,7 +1600,7 @@ export class WasmReplayProtection {
|
|
|
1608
1600
|
static from_public_keys(public_keys) {
|
|
1609
1601
|
try {
|
|
1610
1602
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1611
|
-
const ptr0 = passArrayJsValueToWasm0(public_keys, wasm.
|
|
1603
|
+
const ptr0 = passArrayJsValueToWasm0(public_keys, wasm.__wbindgen_export);
|
|
1612
1604
|
const len0 = WASM_VECTOR_LEN;
|
|
1613
1605
|
wasm.wasmreplayprotection_from_public_keys(retptr, ptr0, len0);
|
|
1614
1606
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1628,7 +1620,7 @@ export class WasmReplayProtection {
|
|
|
1628
1620
|
* @returns {WasmReplayProtection}
|
|
1629
1621
|
*/
|
|
1630
1622
|
static from_output_scripts(output_scripts) {
|
|
1631
|
-
const ptr0 = passArrayJsValueToWasm0(output_scripts, wasm.
|
|
1623
|
+
const ptr0 = passArrayJsValueToWasm0(output_scripts, wasm.__wbindgen_export);
|
|
1632
1624
|
const len0 = WASM_VECTOR_LEN;
|
|
1633
1625
|
const ret = wasm.wasmreplayprotection_from_output_scripts(ptr0, len0);
|
|
1634
1626
|
return WasmReplayProtection.__wrap(ret);
|
|
@@ -1636,15 +1628,11 @@ export class WasmReplayProtection {
|
|
|
1636
1628
|
}
|
|
1637
1629
|
if (Symbol.dispose) WasmReplayProtection.prototype[Symbol.dispose] = WasmReplayProtection.prototype.free;
|
|
1638
1630
|
|
|
1639
|
-
const WasmRootWalletKeysFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1640
|
-
? { register: () => {}, unregister: () => {} }
|
|
1641
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmrootwalletkeys_free(ptr >>> 0, 1));
|
|
1642
1631
|
/**
|
|
1643
1632
|
* WASM wrapper for RootWalletKeys
|
|
1644
1633
|
* Represents a set of three extended public keys with their derivation prefixes
|
|
1645
1634
|
*/
|
|
1646
1635
|
export class WasmRootWalletKeys {
|
|
1647
|
-
|
|
1648
1636
|
static __wrap(ptr) {
|
|
1649
1637
|
ptr = ptr >>> 0;
|
|
1650
1638
|
const obj = Object.create(WasmRootWalletKeys.prototype);
|
|
@@ -1652,14 +1640,12 @@ export class WasmRootWalletKeys {
|
|
|
1652
1640
|
WasmRootWalletKeysFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1653
1641
|
return obj;
|
|
1654
1642
|
}
|
|
1655
|
-
|
|
1656
1643
|
__destroy_into_raw() {
|
|
1657
1644
|
const ptr = this.__wbg_ptr;
|
|
1658
1645
|
this.__wbg_ptr = 0;
|
|
1659
1646
|
WasmRootWalletKeysFinalization.unregister(this);
|
|
1660
1647
|
return ptr;
|
|
1661
1648
|
}
|
|
1662
|
-
|
|
1663
1649
|
free() {
|
|
1664
1650
|
const ptr = this.__destroy_into_raw();
|
|
1665
1651
|
wasm.__wbg_wasmrootwalletkeys_free(ptr, 0);
|
|
@@ -1696,11 +1682,11 @@ export class WasmRootWalletKeys {
|
|
|
1696
1682
|
_assertClass(user, WasmBIP32);
|
|
1697
1683
|
_assertClass(backup, WasmBIP32);
|
|
1698
1684
|
_assertClass(bitgo, WasmBIP32);
|
|
1699
|
-
const ptr0 = passStringToWasm0(user_derivation, wasm.
|
|
1685
|
+
const ptr0 = passStringToWasm0(user_derivation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1700
1686
|
const len0 = WASM_VECTOR_LEN;
|
|
1701
|
-
const ptr1 = passStringToWasm0(backup_derivation, wasm.
|
|
1687
|
+
const ptr1 = passStringToWasm0(backup_derivation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1702
1688
|
const len1 = WASM_VECTOR_LEN;
|
|
1703
|
-
const ptr2 = passStringToWasm0(bitgo_derivation, wasm.
|
|
1689
|
+
const ptr2 = passStringToWasm0(bitgo_derivation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1704
1690
|
const len2 = WASM_VECTOR_LEN;
|
|
1705
1691
|
wasm.wasmrootwalletkeys_with_derivation_prefixes(retptr, user.__wbg_ptr, backup.__wbg_ptr, bitgo.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1706
1692
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1765,12 +1751,7 @@ export class WasmRootWalletKeys {
|
|
|
1765
1751
|
}
|
|
1766
1752
|
if (Symbol.dispose) WasmRootWalletKeys.prototype[Symbol.dispose] = WasmRootWalletKeys.prototype.free;
|
|
1767
1753
|
|
|
1768
|
-
const WrapDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1769
|
-
? { register: () => {}, unregister: () => {} }
|
|
1770
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wrapdescriptor_free(ptr >>> 0, 1));
|
|
1771
|
-
|
|
1772
1754
|
export class WrapDescriptor {
|
|
1773
|
-
|
|
1774
1755
|
static __wrap(ptr) {
|
|
1775
1756
|
ptr = ptr >>> 0;
|
|
1776
1757
|
const obj = Object.create(WrapDescriptor.prototype);
|
|
@@ -1778,14 +1759,12 @@ export class WrapDescriptor {
|
|
|
1778
1759
|
WrapDescriptorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1779
1760
|
return obj;
|
|
1780
1761
|
}
|
|
1781
|
-
|
|
1782
1762
|
__destroy_into_raw() {
|
|
1783
1763
|
const ptr = this.__wbg_ptr;
|
|
1784
1764
|
this.__wbg_ptr = 0;
|
|
1785
1765
|
WrapDescriptorFinalization.unregister(this);
|
|
1786
1766
|
return ptr;
|
|
1787
1767
|
}
|
|
1788
|
-
|
|
1789
1768
|
free() {
|
|
1790
1769
|
const ptr = this.__destroy_into_raw();
|
|
1791
1770
|
wasm.__wbg_wrapdescriptor_free(ptr, 0);
|
|
@@ -1821,9 +1800,9 @@ export class WrapDescriptor {
|
|
|
1821
1800
|
static fromString(descriptor, pk_type) {
|
|
1822
1801
|
try {
|
|
1823
1802
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1824
|
-
const ptr0 = passStringToWasm0(descriptor, wasm.
|
|
1803
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1825
1804
|
const len0 = WASM_VECTOR_LEN;
|
|
1826
|
-
const ptr1 = passStringToWasm0(pk_type, wasm.
|
|
1805
|
+
const ptr1 = passStringToWasm0(pk_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1827
1806
|
const len1 = WASM_VECTOR_LEN;
|
|
1828
1807
|
wasm.wrapdescriptor_fromString(retptr, ptr0, len0, ptr1, len1);
|
|
1829
1808
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -1859,7 +1838,7 @@ export class WrapDescriptor {
|
|
|
1859
1838
|
throw takeObject(r2);
|
|
1860
1839
|
}
|
|
1861
1840
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1862
|
-
wasm.
|
|
1841
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1863
1842
|
return v1;
|
|
1864
1843
|
} finally {
|
|
1865
1844
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -1889,7 +1868,7 @@ export class WrapDescriptor {
|
|
|
1889
1868
|
return getStringFromWasm0(ptr1, len1);
|
|
1890
1869
|
} finally {
|
|
1891
1870
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1892
|
-
wasm.
|
|
1871
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1893
1872
|
}
|
|
1894
1873
|
}
|
|
1895
1874
|
/**
|
|
@@ -1959,7 +1938,7 @@ export class WrapDescriptor {
|
|
|
1959
1938
|
static fromStringDetectType(descriptor) {
|
|
1960
1939
|
try {
|
|
1961
1940
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1962
|
-
const ptr0 = passStringToWasm0(descriptor, wasm.
|
|
1941
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1963
1942
|
const len0 = WASM_VECTOR_LEN;
|
|
1964
1943
|
wasm.wrapdescriptor_fromStringDetectType(retptr, ptr0, len0);
|
|
1965
1944
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2006,7 +1985,7 @@ export class WrapDescriptor {
|
|
|
2006
1985
|
throw takeObject(r2);
|
|
2007
1986
|
}
|
|
2008
1987
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2009
|
-
wasm.
|
|
1988
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2010
1989
|
return v1;
|
|
2011
1990
|
} finally {
|
|
2012
1991
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2046,18 +2025,13 @@ export class WrapDescriptor {
|
|
|
2046
2025
|
return getStringFromWasm0(r0, r1);
|
|
2047
2026
|
} finally {
|
|
2048
2027
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2049
|
-
wasm.
|
|
2028
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2050
2029
|
}
|
|
2051
2030
|
}
|
|
2052
2031
|
}
|
|
2053
2032
|
if (Symbol.dispose) WrapDescriptor.prototype[Symbol.dispose] = WrapDescriptor.prototype.free;
|
|
2054
2033
|
|
|
2055
|
-
const WrapMiniscriptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2056
|
-
? { register: () => {}, unregister: () => {} }
|
|
2057
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wrapminiscript_free(ptr >>> 0, 1));
|
|
2058
|
-
|
|
2059
2034
|
export class WrapMiniscript {
|
|
2060
|
-
|
|
2061
2035
|
static __wrap(ptr) {
|
|
2062
2036
|
ptr = ptr >>> 0;
|
|
2063
2037
|
const obj = Object.create(WrapMiniscript.prototype);
|
|
@@ -2065,14 +2039,12 @@ export class WrapMiniscript {
|
|
|
2065
2039
|
WrapMiniscriptFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2066
2040
|
return obj;
|
|
2067
2041
|
}
|
|
2068
|
-
|
|
2069
2042
|
__destroy_into_raw() {
|
|
2070
2043
|
const ptr = this.__wbg_ptr;
|
|
2071
2044
|
this.__wbg_ptr = 0;
|
|
2072
2045
|
WrapMiniscriptFinalization.unregister(this);
|
|
2073
2046
|
return ptr;
|
|
2074
2047
|
}
|
|
2075
|
-
|
|
2076
2048
|
free() {
|
|
2077
2049
|
const ptr = this.__destroy_into_raw();
|
|
2078
2050
|
wasm.__wbg_wrapminiscript_free(ptr, 0);
|
|
@@ -2085,9 +2057,9 @@ export class WrapMiniscript {
|
|
|
2085
2057
|
static fromString(script, context_type) {
|
|
2086
2058
|
try {
|
|
2087
2059
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2088
|
-
const ptr0 = passStringToWasm0(script, wasm.
|
|
2060
|
+
const ptr0 = passStringToWasm0(script, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2089
2061
|
const len0 = WASM_VECTOR_LEN;
|
|
2090
|
-
const ptr1 = passStringToWasm0(context_type, wasm.
|
|
2062
|
+
const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2091
2063
|
const len1 = WASM_VECTOR_LEN;
|
|
2092
2064
|
wasm.wrapminiscript_fromString(retptr, ptr0, len0, ptr1, len1);
|
|
2093
2065
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2125,7 +2097,7 @@ export class WrapMiniscript {
|
|
|
2125
2097
|
return getStringFromWasm0(ptr1, len1);
|
|
2126
2098
|
} finally {
|
|
2127
2099
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2128
|
-
wasm.
|
|
2100
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
2129
2101
|
}
|
|
2130
2102
|
}
|
|
2131
2103
|
/**
|
|
@@ -2136,9 +2108,9 @@ export class WrapMiniscript {
|
|
|
2136
2108
|
static fromBitcoinScript(script, context_type) {
|
|
2137
2109
|
try {
|
|
2138
2110
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2139
|
-
const ptr0 = passArray8ToWasm0(script, wasm.
|
|
2111
|
+
const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
|
|
2140
2112
|
const len0 = WASM_VECTOR_LEN;
|
|
2141
|
-
const ptr1 = passStringToWasm0(context_type, wasm.
|
|
2113
|
+
const ptr1 = passStringToWasm0(context_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2142
2114
|
const len1 = WASM_VECTOR_LEN;
|
|
2143
2115
|
wasm.wrapminiscript_fromBitcoinScript(retptr, ptr0, len0, ptr1, len1);
|
|
2144
2116
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2180,7 +2152,7 @@ export class WrapMiniscript {
|
|
|
2180
2152
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2181
2153
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2182
2154
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2183
|
-
wasm.
|
|
2155
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2184
2156
|
return v1;
|
|
2185
2157
|
} finally {
|
|
2186
2158
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2202,18 +2174,13 @@ export class WrapMiniscript {
|
|
|
2202
2174
|
return getStringFromWasm0(r0, r1);
|
|
2203
2175
|
} finally {
|
|
2204
2176
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2205
|
-
wasm.
|
|
2177
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2206
2178
|
}
|
|
2207
2179
|
}
|
|
2208
2180
|
}
|
|
2209
2181
|
if (Symbol.dispose) WrapMiniscript.prototype[Symbol.dispose] = WrapMiniscript.prototype.free;
|
|
2210
2182
|
|
|
2211
|
-
const WrapPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2212
|
-
? { register: () => {}, unregister: () => {} }
|
|
2213
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wrappsbt_free(ptr >>> 0, 1));
|
|
2214
|
-
|
|
2215
2183
|
export class WrapPsbt {
|
|
2216
|
-
|
|
2217
2184
|
static __wrap(ptr) {
|
|
2218
2185
|
ptr = ptr >>> 0;
|
|
2219
2186
|
const obj = Object.create(WrapPsbt.prototype);
|
|
@@ -2221,14 +2188,12 @@ export class WrapPsbt {
|
|
|
2221
2188
|
WrapPsbtFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2222
2189
|
return obj;
|
|
2223
2190
|
}
|
|
2224
|
-
|
|
2225
2191
|
__destroy_into_raw() {
|
|
2226
2192
|
const ptr = this.__wbg_ptr;
|
|
2227
2193
|
this.__wbg_ptr = 0;
|
|
2228
2194
|
WrapPsbtFinalization.unregister(this);
|
|
2229
2195
|
return ptr;
|
|
2230
2196
|
}
|
|
2231
|
-
|
|
2232
2197
|
free() {
|
|
2233
2198
|
const ptr = this.__destroy_into_raw();
|
|
2234
2199
|
wasm.__wbg_wrappsbt_free(ptr, 0);
|
|
@@ -2240,7 +2205,7 @@ export class WrapPsbt {
|
|
|
2240
2205
|
static deserialize(psbt) {
|
|
2241
2206
|
try {
|
|
2242
2207
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2243
|
-
const ptr0 = passArray8ToWasm0(psbt, wasm.
|
|
2208
|
+
const ptr0 = passArray8ToWasm0(psbt, wasm.__wbindgen_export);
|
|
2244
2209
|
const len0 = WASM_VECTOR_LEN;
|
|
2245
2210
|
wasm.wrappsbt_deserialize(retptr, ptr0, len0);
|
|
2246
2211
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2274,7 +2239,7 @@ export class WrapPsbt {
|
|
|
2274
2239
|
signWithPrv(prv) {
|
|
2275
2240
|
try {
|
|
2276
2241
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2277
|
-
const ptr0 = passArray8ToWasm0(prv, wasm.
|
|
2242
|
+
const ptr0 = passArray8ToWasm0(prv, wasm.__wbindgen_export);
|
|
2278
2243
|
const len0 = WASM_VECTOR_LEN;
|
|
2279
2244
|
wasm.wrappsbt_signWithPrv(retptr, this.__wbg_ptr, ptr0, len0);
|
|
2280
2245
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2295,7 +2260,7 @@ export class WrapPsbt {
|
|
|
2295
2260
|
signWithXprv(xprv) {
|
|
2296
2261
|
try {
|
|
2297
2262
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2298
|
-
const ptr0 = passStringToWasm0(xprv, wasm.
|
|
2263
|
+
const ptr0 = passStringToWasm0(xprv, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2299
2264
|
const len0 = WASM_VECTOR_LEN;
|
|
2300
2265
|
wasm.wrappsbt_signWithXprv(retptr, this.__wbg_ptr, ptr0, len0);
|
|
2301
2266
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -2362,7 +2327,7 @@ export class WrapPsbt {
|
|
|
2362
2327
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2363
2328
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2364
2329
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2365
|
-
wasm.
|
|
2330
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2366
2331
|
return v1;
|
|
2367
2332
|
} finally {
|
|
2368
2333
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2371,18 +2336,64 @@ export class WrapPsbt {
|
|
|
2371
2336
|
}
|
|
2372
2337
|
if (Symbol.dispose) WrapPsbt.prototype[Symbol.dispose] = WrapPsbt.prototype.free;
|
|
2373
2338
|
|
|
2374
|
-
export function
|
|
2339
|
+
export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
|
|
2375
2340
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2376
2341
|
return addHeapObject(ret);
|
|
2377
2342
|
};
|
|
2378
2343
|
|
|
2379
|
-
export function
|
|
2380
|
-
const ret = getObject(arg0)
|
|
2344
|
+
export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
|
|
2345
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
2346
|
+
return ret;
|
|
2347
|
+
};
|
|
2348
|
+
|
|
2349
|
+
export function __wbg___wbindgen_is_null_dfda7d66506c95b5(arg0) {
|
|
2350
|
+
const ret = getObject(arg0) === null;
|
|
2351
|
+
return ret;
|
|
2352
|
+
};
|
|
2353
|
+
|
|
2354
|
+
export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
|
|
2355
|
+
const val = getObject(arg0);
|
|
2356
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2357
|
+
return ret;
|
|
2358
|
+
};
|
|
2359
|
+
|
|
2360
|
+
export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
|
|
2361
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
2362
|
+
return ret;
|
|
2363
|
+
};
|
|
2364
|
+
|
|
2365
|
+
export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
|
|
2366
|
+
const ret = getObject(arg0) === undefined;
|
|
2367
|
+
return ret;
|
|
2368
|
+
};
|
|
2369
|
+
|
|
2370
|
+
export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
|
|
2371
|
+
const obj = getObject(arg1);
|
|
2372
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2373
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2374
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2375
|
+
};
|
|
2376
|
+
|
|
2377
|
+
export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
|
|
2378
|
+
const obj = getObject(arg1);
|
|
2379
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2380
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2381
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2382
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2383
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2386
|
+
export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
|
|
2387
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2388
|
+
};
|
|
2389
|
+
|
|
2390
|
+
export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
|
|
2391
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
2381
2392
|
return addHeapObject(ret);
|
|
2382
2393
|
}, arguments) };
|
|
2383
2394
|
|
|
2384
|
-
export function
|
|
2385
|
-
const ret = getObject(arg0).call(getObject(arg1)
|
|
2395
|
+
export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
|
|
2396
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
2386
2397
|
return addHeapObject(ret);
|
|
2387
2398
|
}, arguments) };
|
|
2388
2399
|
|
|
@@ -2395,12 +2406,12 @@ export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(fu
|
|
|
2395
2406
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2396
2407
|
}, arguments) };
|
|
2397
2408
|
|
|
2398
|
-
export function
|
|
2409
|
+
export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
|
|
2399
2410
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2400
2411
|
return addHeapObject(ret);
|
|
2401
2412
|
}, arguments) };
|
|
2402
2413
|
|
|
2403
|
-
export function
|
|
2414
|
+
export function __wbg_length_22ac23eaec9d8053(arg0) {
|
|
2404
2415
|
const ret = getObject(arg0).length;
|
|
2405
2416
|
return ret;
|
|
2406
2417
|
};
|
|
@@ -2410,37 +2421,37 @@ export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
|
|
|
2410
2421
|
return addHeapObject(ret);
|
|
2411
2422
|
};
|
|
2412
2423
|
|
|
2413
|
-
export function
|
|
2424
|
+
export function __wbg_new_1ba21ce319a06297() {
|
|
2414
2425
|
const ret = new Object();
|
|
2415
2426
|
return addHeapObject(ret);
|
|
2416
2427
|
};
|
|
2417
2428
|
|
|
2418
|
-
export function
|
|
2429
|
+
export function __wbg_new_25f239778d6112b9() {
|
|
2419
2430
|
const ret = new Array();
|
|
2420
2431
|
return addHeapObject(ret);
|
|
2421
2432
|
};
|
|
2422
2433
|
|
|
2423
|
-
export function
|
|
2434
|
+
export function __wbg_new_6421f6084cc5bc5a(arg0) {
|
|
2424
2435
|
const ret = new Uint8Array(getObject(arg0));
|
|
2425
2436
|
return addHeapObject(ret);
|
|
2426
2437
|
};
|
|
2427
2438
|
|
|
2428
|
-
export function
|
|
2439
|
+
export function __wbg_new_df1173567d5ff028(arg0, arg1) {
|
|
2429
2440
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2430
2441
|
return addHeapObject(ret);
|
|
2431
2442
|
};
|
|
2432
2443
|
|
|
2433
|
-
export function
|
|
2444
|
+
export function __wbg_new_from_slice_f9c22b9153b26992(arg0, arg1) {
|
|
2434
2445
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
2435
2446
|
return addHeapObject(ret);
|
|
2436
2447
|
};
|
|
2437
2448
|
|
|
2438
|
-
export function
|
|
2449
|
+
export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
|
|
2439
2450
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
2440
2451
|
return addHeapObject(ret);
|
|
2441
2452
|
};
|
|
2442
2453
|
|
|
2443
|
-
export function
|
|
2454
|
+
export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
|
|
2444
2455
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
2445
2456
|
return addHeapObject(ret);
|
|
2446
2457
|
};
|
|
@@ -2455,11 +2466,11 @@ export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
|
|
|
2455
2466
|
return addHeapObject(ret);
|
|
2456
2467
|
};
|
|
2457
2468
|
|
|
2458
|
-
export function
|
|
2469
|
+
export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
|
|
2459
2470
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
2460
2471
|
};
|
|
2461
2472
|
|
|
2462
|
-
export function
|
|
2473
|
+
export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
|
|
2463
2474
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
2464
2475
|
return ret;
|
|
2465
2476
|
};
|
|
@@ -2473,32 +2484,32 @@ export function __wbg_require_60cc747a6bc5215a() { return handleError(function (
|
|
|
2473
2484
|
return addHeapObject(ret);
|
|
2474
2485
|
}, arguments) };
|
|
2475
2486
|
|
|
2476
|
-
export function
|
|
2487
|
+
export function __wbg_set_781438a03c0c3c81() { return handleError(function (arg0, arg1, arg2) {
|
|
2477
2488
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2478
2489
|
return ret;
|
|
2479
2490
|
}, arguments) };
|
|
2480
2491
|
|
|
2481
|
-
export function
|
|
2492
|
+
export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
|
|
2482
2493
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2483
2494
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2484
2495
|
};
|
|
2485
2496
|
|
|
2486
|
-
export function
|
|
2497
|
+
export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
|
|
2487
2498
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2488
2499
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2489
2500
|
};
|
|
2490
2501
|
|
|
2491
|
-
export function
|
|
2502
|
+
export function __wbg_static_accessor_SELF_08f5a74c69739274() {
|
|
2492
2503
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2493
2504
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2494
2505
|
};
|
|
2495
2506
|
|
|
2496
|
-
export function
|
|
2507
|
+
export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
|
|
2497
2508
|
const ret = typeof window === 'undefined' ? null : window;
|
|
2498
2509
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2499
2510
|
};
|
|
2500
2511
|
|
|
2501
|
-
export function
|
|
2512
|
+
export function __wbg_subarray_845f2f5bce7d061a(arg0, arg1, arg2) {
|
|
2502
2513
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2503
2514
|
return addHeapObject(ret);
|
|
2504
2515
|
};
|
|
@@ -2509,56 +2520,10 @@ export function __wbg_versions_c01dfd4722a88165(arg0) {
|
|
|
2509
2520
|
};
|
|
2510
2521
|
|
|
2511
2522
|
export function __wbg_wasmecpair_unwrap(arg0) {
|
|
2512
|
-
const ret = WasmECPair.__unwrap(
|
|
2513
|
-
return ret;
|
|
2514
|
-
};
|
|
2515
|
-
|
|
2516
|
-
export function __wbg_wbindgenisfunction_8cee7dce3725ae74(arg0) {
|
|
2517
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
2518
|
-
return ret;
|
|
2519
|
-
};
|
|
2520
|
-
|
|
2521
|
-
export function __wbg_wbindgenisnull_f3037694abe4d97a(arg0) {
|
|
2522
|
-
const ret = getObject(arg0) === null;
|
|
2523
|
-
return ret;
|
|
2524
|
-
};
|
|
2525
|
-
|
|
2526
|
-
export function __wbg_wbindgenisobject_307a53c6bd97fbf8(arg0) {
|
|
2527
|
-
const val = getObject(arg0);
|
|
2528
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
2529
|
-
return ret;
|
|
2530
|
-
};
|
|
2531
|
-
|
|
2532
|
-
export function __wbg_wbindgenisstring_d4fa939789f003b0(arg0) {
|
|
2533
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
2534
|
-
return ret;
|
|
2535
|
-
};
|
|
2536
|
-
|
|
2537
|
-
export function __wbg_wbindgenisundefined_c4b71d073b92f3c5(arg0) {
|
|
2538
|
-
const ret = getObject(arg0) === undefined;
|
|
2523
|
+
const ret = WasmECPair.__unwrap(getObject(arg0));
|
|
2539
2524
|
return ret;
|
|
2540
2525
|
};
|
|
2541
2526
|
|
|
2542
|
-
export function __wbg_wbindgennumberget_f74b4c7525ac05cb(arg0, arg1) {
|
|
2543
|
-
const obj = getObject(arg1);
|
|
2544
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2545
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2546
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2547
|
-
};
|
|
2548
|
-
|
|
2549
|
-
export function __wbg_wbindgenstringget_0f16a6ddddef376f(arg0, arg1) {
|
|
2550
|
-
const obj = getObject(arg1);
|
|
2551
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2552
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
|
|
2553
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2554
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2555
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2556
|
-
};
|
|
2557
|
-
|
|
2558
|
-
export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
|
|
2559
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2560
|
-
};
|
|
2561
|
-
|
|
2562
2527
|
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
2563
2528
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2564
2529
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -2591,4 +2556,3 @@ export function __wbindgen_object_clone_ref(arg0) {
|
|
|
2591
2556
|
export function __wbindgen_object_drop_ref(arg0) {
|
|
2592
2557
|
takeObject(arg0);
|
|
2593
2558
|
};
|
|
2594
|
-
|