lwk_node 0.12.1 → 0.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/lwk_wasm.d.ts +320 -0
- package/lwk_wasm.js +1783 -558
- package/lwk_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/lwk_wasm.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
let imports = {};
|
|
3
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
-
let wasm;
|
|
5
|
-
const { TextEncoder, TextDecoder } = require(`util`);
|
|
6
|
-
|
|
7
|
-
let WASM_VECTOR_LEN = 0;
|
|
8
4
|
|
|
9
5
|
let cachedUint8ArrayMemory0 = null;
|
|
10
6
|
|
|
@@ -15,20 +11,33 @@ function getUint8ArrayMemory0() {
|
|
|
15
11
|
return cachedUint8ArrayMemory0;
|
|
16
12
|
}
|
|
17
13
|
|
|
18
|
-
let
|
|
14
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
15
|
+
|
|
16
|
+
cachedTextDecoder.decode();
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 WASM_VECTOR_LEN = 0;
|
|
28
|
+
|
|
29
|
+
const cachedTextEncoder = new TextEncoder();
|
|
30
|
+
|
|
31
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
32
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
33
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
34
|
+
view.set(buf);
|
|
35
|
+
return {
|
|
36
|
+
read: arg.length,
|
|
37
|
+
written: buf.length
|
|
38
|
+
};
|
|
39
|
+
}
|
|
23
40
|
}
|
|
24
|
-
: function (arg, view) {
|
|
25
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
26
|
-
view.set(buf);
|
|
27
|
-
return {
|
|
28
|
-
read: arg.length,
|
|
29
|
-
written: buf.length
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
41
|
|
|
33
42
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
34
43
|
|
|
@@ -59,7 +68,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
59
68
|
}
|
|
60
69
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
61
70
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
62
|
-
const ret =
|
|
71
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
63
72
|
|
|
64
73
|
offset += ret.written;
|
|
65
74
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -78,15 +87,6 @@ function getDataViewMemory0() {
|
|
|
78
87
|
return cachedDataViewMemory0;
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
82
|
-
|
|
83
|
-
cachedTextDecoder.decode();
|
|
84
|
-
|
|
85
|
-
function getStringFromWasm0(ptr, len) {
|
|
86
|
-
ptr = ptr >>> 0;
|
|
87
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
90
|
function addToExternrefTable0(obj) {
|
|
91
91
|
const idx = wasm.__externref_table_alloc();
|
|
92
92
|
wasm.__wbindgen_export_4.set(idx, obj);
|
|
@@ -102,44 +102,13 @@ function handleError(f, args) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
function isLikeNone(x) {
|
|
106
|
-
return x === undefined || x === null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
105
|
function getArrayU8FromWasm0(ptr, len) {
|
|
110
106
|
ptr = ptr >>> 0;
|
|
111
107
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
112
108
|
}
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
: new FinalizationRegistry(state => {
|
|
117
|
-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
121
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
122
|
-
const real = (...args) => {
|
|
123
|
-
// First up with a closure we increment the internal reference
|
|
124
|
-
// count. This ensures that the Rust closure environment won't
|
|
125
|
-
// be deallocated while we're invoking it.
|
|
126
|
-
state.cnt++;
|
|
127
|
-
const a = state.a;
|
|
128
|
-
state.a = 0;
|
|
129
|
-
try {
|
|
130
|
-
return f(a, state.b, ...args);
|
|
131
|
-
} finally {
|
|
132
|
-
if (--state.cnt === 0) {
|
|
133
|
-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
134
|
-
CLOSURE_DTORS.unregister(state);
|
|
135
|
-
} else {
|
|
136
|
-
state.a = a;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
real.original = state;
|
|
141
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
142
|
-
return real;
|
|
110
|
+
function isLikeNone(x) {
|
|
111
|
+
return x === undefined || x === null;
|
|
143
112
|
}
|
|
144
113
|
|
|
145
114
|
function debugString(val) {
|
|
@@ -207,6 +176,40 @@ function debugString(val) {
|
|
|
207
176
|
return className;
|
|
208
177
|
}
|
|
209
178
|
|
|
179
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
180
|
+
? { register: () => {}, unregister: () => {} }
|
|
181
|
+
: new FinalizationRegistry(
|
|
182
|
+
state => {
|
|
183
|
+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
188
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
189
|
+
const real = (...args) => {
|
|
190
|
+
|
|
191
|
+
// First up with a closure we increment the internal reference
|
|
192
|
+
// count. This ensures that the Rust closure environment won't
|
|
193
|
+
// be deallocated while we're invoking it.
|
|
194
|
+
state.cnt++;
|
|
195
|
+
const a = state.a;
|
|
196
|
+
state.a = 0;
|
|
197
|
+
try {
|
|
198
|
+
return f(a, state.b, ...args);
|
|
199
|
+
} finally {
|
|
200
|
+
if (--state.cnt === 0) {
|
|
201
|
+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
202
|
+
CLOSURE_DTORS.unregister(state);
|
|
203
|
+
} else {
|
|
204
|
+
state.a = a;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
real.original = state;
|
|
209
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
210
|
+
return real;
|
|
211
|
+
}
|
|
212
|
+
|
|
210
213
|
function takeFromExternrefTable0(idx) {
|
|
211
214
|
const value = wasm.__wbindgen_export_4.get(idx);
|
|
212
215
|
wasm.__externref_table_dealloc(idx);
|
|
@@ -231,7 +234,7 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
231
234
|
/**
|
|
232
235
|
* @returns {Promise<HIDDevice>}
|
|
233
236
|
*/
|
|
234
|
-
|
|
237
|
+
exports.searchLedgerDevice = function() {
|
|
235
238
|
const ret = wasm.searchLedgerDevice();
|
|
236
239
|
return ret;
|
|
237
240
|
};
|
|
@@ -263,34 +266,77 @@ function getUint32ArrayMemory0() {
|
|
|
263
266
|
return cachedUint32ArrayMemory0;
|
|
264
267
|
}
|
|
265
268
|
|
|
266
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
267
|
-
ptr = ptr >>> 0;
|
|
268
|
-
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
269
|
function passArray32ToWasm0(arg, malloc) {
|
|
272
270
|
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
273
271
|
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
274
272
|
WASM_VECTOR_LEN = arg.length;
|
|
275
273
|
return ptr;
|
|
276
274
|
}
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
/**
|
|
276
|
+
* Convert the given string to a QR code image uri
|
|
277
|
+
*
|
|
278
|
+
* The image format is monocromatic bitmap, returned as an encoded in base64 uri.
|
|
279
|
+
*
|
|
280
|
+
* Without `pixel_per_module` the default is no border, and 1 pixel per module, to be used
|
|
281
|
+
* for example in html: `style="image-rendering: pixelated; border: 20px solid white;"`
|
|
282
|
+
* @param {string} str
|
|
283
|
+
* @param {number | null} [pixel_per_module]
|
|
284
|
+
* @returns {string}
|
|
285
|
+
*/
|
|
286
|
+
exports.stringToQr = function(str, pixel_per_module) {
|
|
287
|
+
let deferred3_0;
|
|
288
|
+
let deferred3_1;
|
|
289
|
+
try {
|
|
290
|
+
const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
291
|
+
const len0 = WASM_VECTOR_LEN;
|
|
292
|
+
const ret = wasm.stringToQr(ptr0, len0, isLikeNone(pixel_per_module) ? 0xFFFFFF : pixel_per_module);
|
|
293
|
+
var ptr2 = ret[0];
|
|
294
|
+
var len2 = ret[1];
|
|
295
|
+
if (ret[3]) {
|
|
296
|
+
ptr2 = 0; len2 = 0;
|
|
297
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
298
|
+
}
|
|
299
|
+
deferred3_0 = ptr2;
|
|
300
|
+
deferred3_1 = len2;
|
|
301
|
+
return getStringFromWasm0(ptr2, len2);
|
|
302
|
+
} finally {
|
|
303
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
function getArrayU32FromWasm0(ptr, len) {
|
|
308
|
+
ptr = ptr >>> 0;
|
|
309
|
+
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
310
|
+
}
|
|
311
|
+
function __wbg_adapter_6(arg0, arg1) {
|
|
312
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h05232c3defb8be20(arg0, arg1);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function __wbg_adapter_9(arg0, arg1, arg2) {
|
|
316
|
+
wasm.closure1305_externref_shim(arg0, arg1, arg2);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function __wbg_adapter_12(arg0, arg1, arg2) {
|
|
320
|
+
wasm.closure1933_externref_shim(arg0, arg1, arg2);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function __wbg_adapter_23(arg0, arg1, arg2) {
|
|
324
|
+
wasm.closure773_externref_shim(arg0, arg1, arg2);
|
|
279
325
|
}
|
|
280
326
|
|
|
281
|
-
function
|
|
282
|
-
wasm.
|
|
327
|
+
function __wbg_adapter_32(arg0, arg1) {
|
|
328
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h912986096667d3cb(arg0, arg1);
|
|
283
329
|
}
|
|
284
330
|
|
|
285
|
-
function
|
|
286
|
-
wasm.
|
|
331
|
+
function __wbg_adapter_632(arg0, arg1, arg2, arg3) {
|
|
332
|
+
wasm.closure2710_externref_shim(arg0, arg1, arg2, arg3);
|
|
287
333
|
}
|
|
288
334
|
|
|
289
335
|
/**
|
|
290
336
|
* Wallet chain
|
|
291
337
|
* @enum {0 | 1}
|
|
292
338
|
*/
|
|
293
|
-
|
|
339
|
+
exports.Chain = Object.freeze({
|
|
294
340
|
/**
|
|
295
341
|
* External address, shown when asked for a payment.
|
|
296
342
|
* Wallet having a single descriptor are considered External
|
|
@@ -304,6 +350,8 @@ module.exports.Chain = Object.freeze({
|
|
|
304
350
|
|
|
305
351
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
306
352
|
|
|
353
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
354
|
+
|
|
307
355
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
308
356
|
|
|
309
357
|
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
@@ -469,7 +517,9 @@ class Address {
|
|
|
469
517
|
}
|
|
470
518
|
}
|
|
471
519
|
}
|
|
472
|
-
|
|
520
|
+
if (Symbol.dispose) Address.prototype[Symbol.dispose] = Address.prototype.free;
|
|
521
|
+
|
|
522
|
+
exports.Address = Address;
|
|
473
523
|
|
|
474
524
|
const AddressResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
475
525
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -517,7 +567,9 @@ class AddressResult {
|
|
|
517
567
|
return ret >>> 0;
|
|
518
568
|
}
|
|
519
569
|
}
|
|
520
|
-
|
|
570
|
+
if (Symbol.dispose) AddressResult.prototype[Symbol.dispose] = AddressResult.prototype.free;
|
|
571
|
+
|
|
572
|
+
exports.AddressResult = AddressResult;
|
|
521
573
|
|
|
522
574
|
const Amp0Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
523
575
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -677,7 +729,9 @@ class Amp0 {
|
|
|
677
729
|
return ret;
|
|
678
730
|
}
|
|
679
731
|
}
|
|
680
|
-
|
|
732
|
+
if (Symbol.dispose) Amp0.prototype[Symbol.dispose] = Amp0.prototype.free;
|
|
733
|
+
|
|
734
|
+
exports.Amp0 = Amp0;
|
|
681
735
|
|
|
682
736
|
const Amp0ConnectedFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
683
737
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -743,7 +797,9 @@ class Amp0Connected {
|
|
|
743
797
|
return ret;
|
|
744
798
|
}
|
|
745
799
|
}
|
|
746
|
-
|
|
800
|
+
if (Symbol.dispose) Amp0Connected.prototype[Symbol.dispose] = Amp0Connected.prototype.free;
|
|
801
|
+
|
|
802
|
+
exports.Amp0Connected = Amp0Connected;
|
|
747
803
|
|
|
748
804
|
const Amp0LoggedInFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
749
805
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -829,7 +885,9 @@ class Amp0LoggedIn {
|
|
|
829
885
|
return ret;
|
|
830
886
|
}
|
|
831
887
|
}
|
|
832
|
-
|
|
888
|
+
if (Symbol.dispose) Amp0LoggedIn.prototype[Symbol.dispose] = Amp0LoggedIn.prototype.free;
|
|
889
|
+
|
|
890
|
+
exports.Amp0LoggedIn = Amp0LoggedIn;
|
|
833
891
|
|
|
834
892
|
const Amp0PsetFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
835
893
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -900,7 +958,9 @@ class Amp0Pset {
|
|
|
900
958
|
return v1;
|
|
901
959
|
}
|
|
902
960
|
}
|
|
903
|
-
|
|
961
|
+
if (Symbol.dispose) Amp0Pset.prototype[Symbol.dispose] = Amp0Pset.prototype.free;
|
|
962
|
+
|
|
963
|
+
exports.Amp0Pset = Amp0Pset;
|
|
904
964
|
|
|
905
965
|
const Amp0SignerDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
906
966
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -928,7 +988,9 @@ class Amp0SignerData {
|
|
|
928
988
|
wasm.__wbg_amp0signerdata_free(ptr, 0);
|
|
929
989
|
}
|
|
930
990
|
}
|
|
931
|
-
|
|
991
|
+
if (Symbol.dispose) Amp0SignerData.prototype[Symbol.dispose] = Amp0SignerData.prototype.free;
|
|
992
|
+
|
|
993
|
+
exports.Amp0SignerData = Amp0SignerData;
|
|
932
994
|
|
|
933
995
|
const Amp2Finalization = (typeof FinalizationRegistry === 'undefined')
|
|
934
996
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1000,7 +1062,9 @@ class Amp2 {
|
|
|
1000
1062
|
return ret;
|
|
1001
1063
|
}
|
|
1002
1064
|
}
|
|
1003
|
-
|
|
1065
|
+
if (Symbol.dispose) Amp2.prototype[Symbol.dispose] = Amp2.prototype.free;
|
|
1066
|
+
|
|
1067
|
+
exports.Amp2 = Amp2;
|
|
1004
1068
|
|
|
1005
1069
|
const Amp2DescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1006
1070
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1054,7 +1118,9 @@ class Amp2Descriptor {
|
|
|
1054
1118
|
}
|
|
1055
1119
|
}
|
|
1056
1120
|
}
|
|
1057
|
-
|
|
1121
|
+
if (Symbol.dispose) Amp2Descriptor.prototype[Symbol.dispose] = Amp2Descriptor.prototype.free;
|
|
1122
|
+
|
|
1123
|
+
exports.Amp2Descriptor = Amp2Descriptor;
|
|
1058
1124
|
|
|
1059
1125
|
const AssetAmountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1060
1126
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1098,7 +1164,9 @@ class AssetAmount {
|
|
|
1098
1164
|
return AssetId.__wrap(ret);
|
|
1099
1165
|
}
|
|
1100
1166
|
}
|
|
1101
|
-
|
|
1167
|
+
if (Symbol.dispose) AssetAmount.prototype[Symbol.dispose] = AssetAmount.prototype.free;
|
|
1168
|
+
|
|
1169
|
+
exports.AssetAmount = AssetAmount;
|
|
1102
1170
|
|
|
1103
1171
|
const AssetIdFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1104
1172
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1162,7 +1230,9 @@ class AssetId {
|
|
|
1162
1230
|
}
|
|
1163
1231
|
}
|
|
1164
1232
|
}
|
|
1165
|
-
|
|
1233
|
+
if (Symbol.dispose) AssetId.prototype[Symbol.dispose] = AssetId.prototype.free;
|
|
1234
|
+
|
|
1235
|
+
exports.AssetId = AssetId;
|
|
1166
1236
|
|
|
1167
1237
|
const AssetIdsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1168
1238
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1219,7 +1289,9 @@ class AssetIds {
|
|
|
1219
1289
|
}
|
|
1220
1290
|
}
|
|
1221
1291
|
}
|
|
1222
|
-
|
|
1292
|
+
if (Symbol.dispose) AssetIds.prototype[Symbol.dispose] = AssetIds.prototype.free;
|
|
1293
|
+
|
|
1294
|
+
exports.AssetIds = AssetIds;
|
|
1223
1295
|
|
|
1224
1296
|
const AssetMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1225
1297
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1267,7 +1339,9 @@ class AssetMeta {
|
|
|
1267
1339
|
return Transaction.__wrap(ret);
|
|
1268
1340
|
}
|
|
1269
1341
|
}
|
|
1270
|
-
|
|
1342
|
+
if (Symbol.dispose) AssetMeta.prototype[Symbol.dispose] = AssetMeta.prototype.free;
|
|
1343
|
+
|
|
1344
|
+
exports.AssetMeta = AssetMeta;
|
|
1271
1345
|
|
|
1272
1346
|
const BalanceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1273
1347
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1339,7 +1413,9 @@ class Balance {
|
|
|
1339
1413
|
}
|
|
1340
1414
|
}
|
|
1341
1415
|
}
|
|
1342
|
-
|
|
1416
|
+
if (Symbol.dispose) Balance.prototype[Symbol.dispose] = Balance.prototype.free;
|
|
1417
|
+
|
|
1418
|
+
exports.Balance = Balance;
|
|
1343
1419
|
|
|
1344
1420
|
const BipFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1345
1421
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1409,233 +1485,772 @@ class Bip {
|
|
|
1409
1485
|
}
|
|
1410
1486
|
}
|
|
1411
1487
|
}
|
|
1412
|
-
|
|
1488
|
+
if (Symbol.dispose) Bip.prototype[Symbol.dispose] = Bip.prototype.free;
|
|
1413
1489
|
|
|
1414
|
-
|
|
1490
|
+
exports.Bip = Bip;
|
|
1491
|
+
|
|
1492
|
+
const BoltzSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1415
1493
|
? { register: () => {}, unregister: () => {} }
|
|
1416
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1494
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_boltzsession_free(ptr >>> 0, 1));
|
|
1417
1495
|
/**
|
|
1418
|
-
*
|
|
1496
|
+
* Wrapper over [`lwk_boltz::BoltzSession`]
|
|
1419
1497
|
*/
|
|
1420
|
-
class
|
|
1498
|
+
class BoltzSession {
|
|
1421
1499
|
|
|
1422
1500
|
static __wrap(ptr) {
|
|
1423
1501
|
ptr = ptr >>> 0;
|
|
1424
|
-
const obj = Object.create(
|
|
1502
|
+
const obj = Object.create(BoltzSession.prototype);
|
|
1425
1503
|
obj.__wbg_ptr = ptr;
|
|
1426
|
-
|
|
1504
|
+
BoltzSessionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1427
1505
|
return obj;
|
|
1428
1506
|
}
|
|
1429
1507
|
|
|
1430
1508
|
__destroy_into_raw() {
|
|
1431
1509
|
const ptr = this.__wbg_ptr;
|
|
1432
1510
|
this.__wbg_ptr = 0;
|
|
1433
|
-
|
|
1511
|
+
BoltzSessionFinalization.unregister(this);
|
|
1434
1512
|
return ptr;
|
|
1435
1513
|
}
|
|
1436
1514
|
|
|
1437
1515
|
free() {
|
|
1438
1516
|
const ptr = this.__destroy_into_raw();
|
|
1439
|
-
wasm.
|
|
1440
|
-
}
|
|
1441
|
-
/**
|
|
1442
|
-
* Creates a `Contract`
|
|
1443
|
-
* @param {string} domain
|
|
1444
|
-
* @param {string} issuer_pubkey
|
|
1445
|
-
* @param {string} name
|
|
1446
|
-
* @param {number} precision
|
|
1447
|
-
* @param {string} ticker
|
|
1448
|
-
* @param {number} version
|
|
1449
|
-
*/
|
|
1450
|
-
constructor(domain, issuer_pubkey, name, precision, ticker, version) {
|
|
1451
|
-
const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1452
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1453
|
-
const ptr1 = passStringToWasm0(issuer_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1454
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1455
|
-
const ptr2 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1456
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1457
|
-
const ptr3 = passStringToWasm0(ticker, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1458
|
-
const len3 = WASM_VECTOR_LEN;
|
|
1459
|
-
const ret = wasm.contract_new(ptr0, len0, ptr1, len1, ptr2, len2, precision, ptr3, len3, version);
|
|
1460
|
-
if (ret[2]) {
|
|
1461
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1462
|
-
}
|
|
1463
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
1464
|
-
ContractFinalization.register(this, this.__wbg_ptr, this);
|
|
1465
|
-
return this;
|
|
1517
|
+
wasm.__wbg_boltzsession_free(ptr, 0);
|
|
1466
1518
|
}
|
|
1467
1519
|
/**
|
|
1468
|
-
*
|
|
1520
|
+
* Get the rescue file
|
|
1469
1521
|
* @returns {string}
|
|
1470
1522
|
*/
|
|
1471
|
-
|
|
1472
|
-
let
|
|
1473
|
-
let
|
|
1523
|
+
rescueFile() {
|
|
1524
|
+
let deferred2_0;
|
|
1525
|
+
let deferred2_1;
|
|
1474
1526
|
try {
|
|
1475
|
-
const ret = wasm.
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1527
|
+
const ret = wasm.boltzsession_rescueFile(this.__wbg_ptr);
|
|
1528
|
+
var ptr1 = ret[0];
|
|
1529
|
+
var len1 = ret[1];
|
|
1530
|
+
if (ret[3]) {
|
|
1531
|
+
ptr1 = 0; len1 = 0;
|
|
1532
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1533
|
+
}
|
|
1534
|
+
deferred2_0 = ptr1;
|
|
1535
|
+
deferred2_1 = len1;
|
|
1536
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1479
1537
|
} finally {
|
|
1480
|
-
wasm.__wbindgen_free(
|
|
1538
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1481
1539
|
}
|
|
1482
1540
|
}
|
|
1483
1541
|
/**
|
|
1484
|
-
*
|
|
1485
|
-
* @
|
|
1542
|
+
* Prepare a lightning invoice payment
|
|
1543
|
+
* @param {LightningPayment} lightning_payment
|
|
1544
|
+
* @param {Address} refund_address
|
|
1545
|
+
* @returns {Promise<PreparePayResponse>}
|
|
1486
1546
|
*/
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
deferred1_0 = ret[0];
|
|
1493
|
-
deferred1_1 = ret[1];
|
|
1494
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1495
|
-
} finally {
|
|
1496
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1497
|
-
}
|
|
1547
|
+
preparePay(lightning_payment, refund_address) {
|
|
1548
|
+
_assertClass(lightning_payment, LightningPayment);
|
|
1549
|
+
_assertClass(refund_address, Address);
|
|
1550
|
+
const ret = wasm.boltzsession_preparePay(this.__wbg_ptr, lightning_payment.__wbg_ptr, refund_address.__wbg_ptr);
|
|
1551
|
+
return ret;
|
|
1498
1552
|
}
|
|
1499
1553
|
/**
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1504
|
-
* @returns {
|
|
1554
|
+
* Create a lightning invoice for receiving payment
|
|
1555
|
+
* @param {bigint} amount
|
|
1556
|
+
* @param {string | null | undefined} description
|
|
1557
|
+
* @param {Address} claim_address
|
|
1558
|
+
* @returns {Promise<InvoiceResponse>}
|
|
1505
1559
|
*/
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1560
|
+
invoice(amount, description, claim_address) {
|
|
1561
|
+
var ptr0 = isLikeNone(description) ? 0 : passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1562
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1563
|
+
_assertClass(claim_address, Address);
|
|
1564
|
+
const ret = wasm.boltzsession_invoice(this.__wbg_ptr, amount, ptr0, len0, claim_address.__wbg_ptr);
|
|
1565
|
+
return ret;
|
|
1566
|
+
}
|
|
1567
|
+
/**
|
|
1568
|
+
* Restore a swap from its serialized data
|
|
1569
|
+
* @param {string} data
|
|
1570
|
+
* @returns {Promise<PreparePayResponse>}
|
|
1571
|
+
*/
|
|
1572
|
+
restorePreparePay(data) {
|
|
1573
|
+
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1574
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1575
|
+
const ret = wasm.boltzsession_restorePreparePay(this.__wbg_ptr, ptr0, len0);
|
|
1576
|
+
return ret;
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Restore a swap from its serialized data
|
|
1580
|
+
* @param {string} data
|
|
1581
|
+
* @returns {Promise<InvoiceResponse>}
|
|
1582
|
+
*/
|
|
1583
|
+
restoreInvoice(data) {
|
|
1584
|
+
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1585
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1586
|
+
const ret = wasm.boltzsession_restoreInvoice(this.__wbg_ptr, ptr0, len0);
|
|
1587
|
+
return ret;
|
|
1509
1588
|
}
|
|
1510
1589
|
}
|
|
1511
|
-
|
|
1590
|
+
if (Symbol.dispose) BoltzSession.prototype[Symbol.dispose] = BoltzSession.prototype.free;
|
|
1512
1591
|
|
|
1513
|
-
|
|
1592
|
+
exports.BoltzSession = BoltzSession;
|
|
1593
|
+
|
|
1594
|
+
const BoltzSessionBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1514
1595
|
? { register: () => {}, unregister: () => {} }
|
|
1515
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1596
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_boltzsessionbuilder_free(ptr >>> 0, 1));
|
|
1516
1597
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
* [esplora HTTP API](https://github.com/blockstream/esplora/blob/master/API.md).
|
|
1519
|
-
* But can also use the [waterfalls](https://github.com/RCasatta/waterfalls)
|
|
1520
|
-
* endpoint to speed up the scan if supported by the server.
|
|
1598
|
+
* Wrapper over [`lwk_boltz::BoltzSessionBuilder`]
|
|
1521
1599
|
*/
|
|
1522
|
-
class
|
|
1600
|
+
class BoltzSessionBuilder {
|
|
1523
1601
|
|
|
1524
1602
|
static __wrap(ptr) {
|
|
1525
1603
|
ptr = ptr >>> 0;
|
|
1526
|
-
const obj = Object.create(
|
|
1604
|
+
const obj = Object.create(BoltzSessionBuilder.prototype);
|
|
1527
1605
|
obj.__wbg_ptr = ptr;
|
|
1528
|
-
|
|
1606
|
+
BoltzSessionBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1529
1607
|
return obj;
|
|
1530
1608
|
}
|
|
1531
1609
|
|
|
1532
1610
|
__destroy_into_raw() {
|
|
1533
1611
|
const ptr = this.__wbg_ptr;
|
|
1534
1612
|
this.__wbg_ptr = 0;
|
|
1535
|
-
|
|
1613
|
+
BoltzSessionBuilderFinalization.unregister(this);
|
|
1536
1614
|
return ptr;
|
|
1537
1615
|
}
|
|
1538
1616
|
|
|
1539
1617
|
free() {
|
|
1540
1618
|
const ptr = this.__destroy_into_raw();
|
|
1541
|
-
wasm.
|
|
1619
|
+
wasm.__wbg_boltzsessionbuilder_free(ptr, 0);
|
|
1542
1620
|
}
|
|
1543
1621
|
/**
|
|
1544
|
-
*
|
|
1622
|
+
* Create a new BoltzSessionBuilder with the given network
|
|
1623
|
+
*
|
|
1624
|
+
* This creates a builder with default Esplora client for the network.
|
|
1545
1625
|
* @param {Network} network
|
|
1546
|
-
* @param {
|
|
1547
|
-
* @param {boolean} waterfalls
|
|
1548
|
-
* @param {number} concurrency
|
|
1549
|
-
* @param {boolean} utxo_only
|
|
1626
|
+
* @param {EsploraClient} esplora_client
|
|
1550
1627
|
*/
|
|
1551
|
-
constructor(network,
|
|
1628
|
+
constructor(network, esplora_client) {
|
|
1552
1629
|
_assertClass(network, Network);
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
const ret = wasm.esploraclient_new(network.__wbg_ptr, ptr0, len0, waterfalls, concurrency, utxo_only);
|
|
1630
|
+
_assertClass(esplora_client, EsploraClient);
|
|
1631
|
+
const ret = wasm.boltzsessionbuilder_new(network.__wbg_ptr, esplora_client.__wbg_ptr);
|
|
1556
1632
|
if (ret[2]) {
|
|
1557
1633
|
throw takeFromExternrefTable0(ret[1]);
|
|
1558
1634
|
}
|
|
1559
1635
|
this.__wbg_ptr = ret[0] >>> 0;
|
|
1560
|
-
|
|
1636
|
+
BoltzSessionBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
1561
1637
|
return this;
|
|
1562
1638
|
}
|
|
1563
1639
|
/**
|
|
1564
|
-
*
|
|
1640
|
+
* Set the timeout for creating swaps
|
|
1565
1641
|
*
|
|
1566
|
-
*
|
|
1567
|
-
*
|
|
1568
|
-
*
|
|
1642
|
+
* If not set, the default timeout of 10 seconds is used.
|
|
1643
|
+
* @param {bigint} timeout_seconds
|
|
1644
|
+
* @returns {BoltzSessionBuilder}
|
|
1645
|
+
*/
|
|
1646
|
+
createSwapTimeout(timeout_seconds) {
|
|
1647
|
+
const ptr = this.__destroy_into_raw();
|
|
1648
|
+
const ret = wasm.boltzsessionbuilder_createSwapTimeout(ptr, timeout_seconds);
|
|
1649
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Set the timeout for the advance call
|
|
1569
1653
|
*
|
|
1570
|
-
*
|
|
1654
|
+
* If not set, the default timeout of 3 minutes is used.
|
|
1655
|
+
* @param {bigint} timeout_seconds
|
|
1656
|
+
* @returns {BoltzSessionBuilder}
|
|
1657
|
+
*/
|
|
1658
|
+
timeoutAdvance(timeout_seconds) {
|
|
1659
|
+
const ptr = this.__destroy_into_raw();
|
|
1660
|
+
const ret = wasm.boltzsessionbuilder_timeoutAdvance(ptr, timeout_seconds);
|
|
1661
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Set the mnemonic for deriving swap keys
|
|
1665
|
+
*
|
|
1666
|
+
* If not set, a new random mnemonic will be generated.
|
|
1667
|
+
* @param {Mnemonic} mnemonic
|
|
1668
|
+
* @returns {BoltzSessionBuilder}
|
|
1669
|
+
*/
|
|
1670
|
+
mnemonic(mnemonic) {
|
|
1671
|
+
const ptr = this.__destroy_into_raw();
|
|
1672
|
+
_assertClass(mnemonic, Mnemonic);
|
|
1673
|
+
const ret = wasm.boltzsessionbuilder_mnemonic(ptr, mnemonic.__wbg_ptr);
|
|
1674
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Set the polling flag
|
|
1678
|
+
*
|
|
1679
|
+
* If true, the advance call will not await on the websocket connection returning immediately
|
|
1680
|
+
* even if there is no update, thus requiring the caller to poll for updates.
|
|
1681
|
+
*
|
|
1682
|
+
* If true, the timeout_advance will be ignored even if set.
|
|
1683
|
+
* @param {boolean} polling
|
|
1684
|
+
* @returns {BoltzSessionBuilder}
|
|
1685
|
+
*/
|
|
1686
|
+
polling(polling) {
|
|
1687
|
+
const ptr = this.__destroy_into_raw();
|
|
1688
|
+
const ret = wasm.boltzsessionbuilder_polling(ptr, polling);
|
|
1689
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Set the next index to use for deriving keypairs
|
|
1693
|
+
*
|
|
1694
|
+
* Avoid a call to the boltz API to recover this information.
|
|
1695
|
+
*
|
|
1696
|
+
* When the mnemonic is not set, this is ignored.
|
|
1697
|
+
* @param {number} next_index_to_use
|
|
1698
|
+
* @returns {BoltzSessionBuilder}
|
|
1699
|
+
*/
|
|
1700
|
+
nextIndexToUse(next_index_to_use) {
|
|
1701
|
+
const ptr = this.__destroy_into_raw();
|
|
1702
|
+
const ret = wasm.boltzsessionbuilder_nextIndexToUse(ptr, next_index_to_use);
|
|
1703
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Set the referral id for the BoltzSession
|
|
1707
|
+
* @param {string} referral_id
|
|
1708
|
+
* @returns {BoltzSessionBuilder}
|
|
1709
|
+
*/
|
|
1710
|
+
referralId(referral_id) {
|
|
1711
|
+
const ptr = this.__destroy_into_raw();
|
|
1712
|
+
const ptr0 = passStringToWasm0(referral_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1713
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1714
|
+
const ret = wasm.boltzsessionbuilder_referralId(ptr, ptr0, len0);
|
|
1715
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Set the url of the bitcoin electrum client
|
|
1719
|
+
* @param {string} bitcoin_electrum_client
|
|
1720
|
+
* @returns {BoltzSessionBuilder}
|
|
1721
|
+
*/
|
|
1722
|
+
bitcoinElectrumClient(bitcoin_electrum_client) {
|
|
1723
|
+
const ptr = this.__destroy_into_raw();
|
|
1724
|
+
const ptr0 = passStringToWasm0(bitcoin_electrum_client, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1725
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1726
|
+
const ret = wasm.boltzsessionbuilder_bitcoinElectrumClient(ptr, ptr0, len0);
|
|
1727
|
+
if (ret[2]) {
|
|
1728
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1729
|
+
}
|
|
1730
|
+
return BoltzSessionBuilder.__wrap(ret[0]);
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Set the random preimages flag
|
|
1734
|
+
*
|
|
1735
|
+
* The default is false, the preimages will be deterministic and the rescue file will be
|
|
1736
|
+
* compatible with the Boltz web app.
|
|
1737
|
+
* If true, the preimages will be random potentially allowing concurrent sessions with the same
|
|
1738
|
+
* mnemonic, but completing the swap will be possible only with the preimage data. For example
|
|
1739
|
+
* the boltz web app will be able only to refund the swap, not to bring it to completion.
|
|
1740
|
+
* If true, when serializing the swap data, the preimage will be saved in the data.
|
|
1741
|
+
* @param {boolean} random_preimages
|
|
1742
|
+
* @returns {BoltzSessionBuilder}
|
|
1743
|
+
*/
|
|
1744
|
+
randomPreimages(random_preimages) {
|
|
1745
|
+
const ptr = this.__destroy_into_raw();
|
|
1746
|
+
const ret = wasm.boltzsessionbuilder_randomPreimages(ptr, random_preimages);
|
|
1747
|
+
return BoltzSessionBuilder.__wrap(ret);
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Build the BoltzSession
|
|
1751
|
+
* @returns {Promise<BoltzSession>}
|
|
1752
|
+
*/
|
|
1753
|
+
build() {
|
|
1754
|
+
const ptr = this.__destroy_into_raw();
|
|
1755
|
+
const ret = wasm.boltzsessionbuilder_build(ptr);
|
|
1756
|
+
return ret;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
if (Symbol.dispose) BoltzSessionBuilder.prototype[Symbol.dispose] = BoltzSessionBuilder.prototype.free;
|
|
1760
|
+
|
|
1761
|
+
exports.BoltzSessionBuilder = BoltzSessionBuilder;
|
|
1762
|
+
|
|
1763
|
+
const ContractFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1764
|
+
? { register: () => {}, unregister: () => {} }
|
|
1765
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_contract_free(ptr >>> 0, 1));
|
|
1766
|
+
/**
|
|
1767
|
+
* A contract defining metadata of an asset such the name and the ticker
|
|
1768
|
+
*/
|
|
1769
|
+
class Contract {
|
|
1770
|
+
|
|
1771
|
+
static __wrap(ptr) {
|
|
1772
|
+
ptr = ptr >>> 0;
|
|
1773
|
+
const obj = Object.create(Contract.prototype);
|
|
1774
|
+
obj.__wbg_ptr = ptr;
|
|
1775
|
+
ContractFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1776
|
+
return obj;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
__destroy_into_raw() {
|
|
1780
|
+
const ptr = this.__wbg_ptr;
|
|
1781
|
+
this.__wbg_ptr = 0;
|
|
1782
|
+
ContractFinalization.unregister(this);
|
|
1783
|
+
return ptr;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
free() {
|
|
1787
|
+
const ptr = this.__destroy_into_raw();
|
|
1788
|
+
wasm.__wbg_contract_free(ptr, 0);
|
|
1789
|
+
}
|
|
1790
|
+
/**
|
|
1791
|
+
* Creates a `Contract`
|
|
1792
|
+
* @param {string} domain
|
|
1793
|
+
* @param {string} issuer_pubkey
|
|
1794
|
+
* @param {string} name
|
|
1795
|
+
* @param {number} precision
|
|
1796
|
+
* @param {string} ticker
|
|
1797
|
+
* @param {number} version
|
|
1798
|
+
*/
|
|
1799
|
+
constructor(domain, issuer_pubkey, name, precision, ticker, version) {
|
|
1800
|
+
const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1801
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1802
|
+
const ptr1 = passStringToWasm0(issuer_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1803
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1804
|
+
const ptr2 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1805
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1806
|
+
const ptr3 = passStringToWasm0(ticker, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1807
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1808
|
+
const ret = wasm.contract_new(ptr0, len0, ptr1, len1, ptr2, len2, precision, ptr3, len3, version);
|
|
1809
|
+
if (ret[2]) {
|
|
1810
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1811
|
+
}
|
|
1812
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
1813
|
+
ContractFinalization.register(this, this.__wbg_ptr, this);
|
|
1814
|
+
return this;
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Return the string representation of the contract.
|
|
1818
|
+
* @returns {string}
|
|
1819
|
+
*/
|
|
1820
|
+
toString() {
|
|
1821
|
+
let deferred1_0;
|
|
1822
|
+
let deferred1_1;
|
|
1823
|
+
try {
|
|
1824
|
+
const ret = wasm.contract_toString(this.__wbg_ptr);
|
|
1825
|
+
deferred1_0 = ret[0];
|
|
1826
|
+
deferred1_1 = ret[1];
|
|
1827
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1828
|
+
} finally {
|
|
1829
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Return the domain of the issuer of the contract.
|
|
1834
|
+
* @returns {string}
|
|
1835
|
+
*/
|
|
1836
|
+
domain() {
|
|
1837
|
+
let deferred1_0;
|
|
1838
|
+
let deferred1_1;
|
|
1839
|
+
try {
|
|
1840
|
+
const ret = wasm.contract_domain(this.__wbg_ptr);
|
|
1841
|
+
deferred1_0 = ret[0];
|
|
1842
|
+
deferred1_1 = ret[1];
|
|
1843
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1844
|
+
} finally {
|
|
1845
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
/**
|
|
1849
|
+
* Make a copy of the contract.
|
|
1850
|
+
*
|
|
1851
|
+
* This is needed to pass it to a function that requires a `Contract` (without borrowing)
|
|
1852
|
+
* but you need the same contract after that call.
|
|
1853
|
+
* @returns {Contract}
|
|
1854
|
+
*/
|
|
1855
|
+
clone() {
|
|
1856
|
+
const ret = wasm.contract_clone(this.__wbg_ptr);
|
|
1857
|
+
return Contract.__wrap(ret);
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
if (Symbol.dispose) Contract.prototype[Symbol.dispose] = Contract.prototype.free;
|
|
1861
|
+
|
|
1862
|
+
exports.Contract = Contract;
|
|
1863
|
+
|
|
1864
|
+
const CurrencyCodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1865
|
+
? { register: () => {}, unregister: () => {} }
|
|
1866
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_currencycode_free(ptr >>> 0, 1));
|
|
1867
|
+
|
|
1868
|
+
class CurrencyCode {
|
|
1869
|
+
|
|
1870
|
+
__destroy_into_raw() {
|
|
1871
|
+
const ptr = this.__wbg_ptr;
|
|
1872
|
+
this.__wbg_ptr = 0;
|
|
1873
|
+
CurrencyCodeFinalization.unregister(this);
|
|
1874
|
+
return ptr;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
free() {
|
|
1878
|
+
const ptr = this.__destroy_into_raw();
|
|
1879
|
+
wasm.__wbg_currencycode_free(ptr, 0);
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* @param {string} code
|
|
1883
|
+
*/
|
|
1884
|
+
constructor(code) {
|
|
1885
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1886
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1887
|
+
const ret = wasm.currencycode_new(ptr0, len0);
|
|
1888
|
+
if (ret[2]) {
|
|
1889
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1890
|
+
}
|
|
1891
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
1892
|
+
CurrencyCodeFinalization.register(this, this.__wbg_ptr, this);
|
|
1893
|
+
return this;
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* @returns {string}
|
|
1897
|
+
*/
|
|
1898
|
+
name() {
|
|
1899
|
+
let deferred1_0;
|
|
1900
|
+
let deferred1_1;
|
|
1901
|
+
try {
|
|
1902
|
+
const ret = wasm.currencycode_name(this.__wbg_ptr);
|
|
1903
|
+
deferred1_0 = ret[0];
|
|
1904
|
+
deferred1_1 = ret[1];
|
|
1905
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1906
|
+
} finally {
|
|
1907
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
/**
|
|
1911
|
+
* @returns {string}
|
|
1912
|
+
*/
|
|
1913
|
+
alpha3() {
|
|
1914
|
+
let deferred1_0;
|
|
1915
|
+
let deferred1_1;
|
|
1916
|
+
try {
|
|
1917
|
+
const ret = wasm.currencycode_alpha3(this.__wbg_ptr);
|
|
1918
|
+
deferred1_0 = ret[0];
|
|
1919
|
+
deferred1_1 = ret[1];
|
|
1920
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1921
|
+
} finally {
|
|
1922
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* @returns {number}
|
|
1927
|
+
*/
|
|
1928
|
+
exp() {
|
|
1929
|
+
const ret = wasm.currencycode_exp(this.__wbg_ptr);
|
|
1930
|
+
return ret;
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
if (Symbol.dispose) CurrencyCode.prototype[Symbol.dispose] = CurrencyCode.prototype.free;
|
|
1934
|
+
|
|
1935
|
+
exports.CurrencyCode = CurrencyCode;
|
|
1936
|
+
|
|
1937
|
+
const EsploraClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1938
|
+
? { register: () => {}, unregister: () => {} }
|
|
1939
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_esploraclient_free(ptr >>> 0, 1));
|
|
1940
|
+
/**
|
|
1941
|
+
* A blockchain backend implementation based on the
|
|
1942
|
+
* [esplora HTTP API](https://github.com/blockstream/esplora/blob/master/API.md).
|
|
1943
|
+
* But can also use the [waterfalls](https://github.com/RCasatta/waterfalls)
|
|
1944
|
+
* endpoint to speed up the scan if supported by the server.
|
|
1945
|
+
*/
|
|
1946
|
+
class EsploraClient {
|
|
1947
|
+
|
|
1948
|
+
static __wrap(ptr) {
|
|
1949
|
+
ptr = ptr >>> 0;
|
|
1950
|
+
const obj = Object.create(EsploraClient.prototype);
|
|
1951
|
+
obj.__wbg_ptr = ptr;
|
|
1952
|
+
EsploraClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1953
|
+
return obj;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
__destroy_into_raw() {
|
|
1957
|
+
const ptr = this.__wbg_ptr;
|
|
1958
|
+
this.__wbg_ptr = 0;
|
|
1959
|
+
EsploraClientFinalization.unregister(this);
|
|
1960
|
+
return ptr;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
free() {
|
|
1964
|
+
const ptr = this.__destroy_into_raw();
|
|
1965
|
+
wasm.__wbg_esploraclient_free(ptr, 0);
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Creates an Esplora client with the given options
|
|
1969
|
+
* @param {Network} network
|
|
1970
|
+
* @param {string} url
|
|
1971
|
+
* @param {boolean} waterfalls
|
|
1972
|
+
* @param {number} concurrency
|
|
1973
|
+
* @param {boolean} utxo_only
|
|
1974
|
+
*/
|
|
1975
|
+
constructor(network, url, waterfalls, concurrency, utxo_only) {
|
|
1976
|
+
_assertClass(network, Network);
|
|
1977
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1978
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1979
|
+
const ret = wasm.esploraclient_new(network.__wbg_ptr, ptr0, len0, waterfalls, concurrency, utxo_only);
|
|
1980
|
+
if (ret[2]) {
|
|
1981
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1982
|
+
}
|
|
1983
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
1984
|
+
EsploraClientFinalization.register(this, this.__wbg_ptr, this);
|
|
1985
|
+
return this;
|
|
1986
|
+
}
|
|
1987
|
+
/**
|
|
1988
|
+
* Scan the blockchain for the scripts generated by a watch-only wallet
|
|
1989
|
+
*
|
|
1990
|
+
* This method scans both external and internal address chains, stopping after finding
|
|
1991
|
+
* 20 consecutive unused addresses (the gap limit) as recommended by
|
|
1992
|
+
* [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#address-gap-limit).
|
|
1993
|
+
*
|
|
1994
|
+
* Returns `Some(Update)` if any changes were found during scanning, or `None` if no changes
|
|
1571
1995
|
* were detected.
|
|
1572
1996
|
*
|
|
1573
1997
|
* To scan beyond the gap limit use `full_scan_to_index()` instead.
|
|
1574
1998
|
* @param {Wollet} wollet
|
|
1575
1999
|
* @returns {Promise<Update | undefined>}
|
|
1576
2000
|
*/
|
|
1577
|
-
fullScan(wollet) {
|
|
1578
|
-
_assertClass(wollet, Wollet);
|
|
1579
|
-
const ret = wasm.esploraclient_fullScan(this.__wbg_ptr, wollet.__wbg_ptr);
|
|
1580
|
-
return ret;
|
|
2001
|
+
fullScan(wollet) {
|
|
2002
|
+
_assertClass(wollet, Wollet);
|
|
2003
|
+
const ret = wasm.esploraclient_fullScan(this.__wbg_ptr, wollet.__wbg_ptr);
|
|
2004
|
+
return ret;
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* Scan the blockchain for the scripts generated by a watch-only wallet up to a specified derivation index
|
|
2008
|
+
*
|
|
2009
|
+
* While `full_scan()` stops after finding 20 consecutive unused addresses (the gap limit),
|
|
2010
|
+
* this method will scan at least up to the given derivation index. This is useful to prevent
|
|
2011
|
+
* missing funds in cases where outputs exist beyond the gap limit.
|
|
2012
|
+
*
|
|
2013
|
+
* Will scan both external and internal address chains up to the given index for maximum safety,
|
|
2014
|
+
* even though internal addresses may not need such deep scanning.
|
|
2015
|
+
*
|
|
2016
|
+
* If transactions are found beyond the gap limit during this scan, subsequent calls to
|
|
2017
|
+
* `full_scan()` will automatically scan up to the highest used index, preventing any
|
|
2018
|
+
* previously-found transactions from being missed.
|
|
2019
|
+
*
|
|
2020
|
+
* See `full_scan_to_index()` for a blocking version of this method.
|
|
2021
|
+
* @param {Wollet} wollet
|
|
2022
|
+
* @param {number} index
|
|
2023
|
+
* @returns {Promise<Update | undefined>}
|
|
2024
|
+
*/
|
|
2025
|
+
fullScanToIndex(wollet, index) {
|
|
2026
|
+
_assertClass(wollet, Wollet);
|
|
2027
|
+
const ret = wasm.esploraclient_fullScanToIndex(this.__wbg_ptr, wollet.__wbg_ptr, index);
|
|
2028
|
+
return ret;
|
|
2029
|
+
}
|
|
2030
|
+
/**
|
|
2031
|
+
* Broadcast a transaction to the network so that a miner can include it in a block.
|
|
2032
|
+
* @param {Transaction} tx
|
|
2033
|
+
* @returns {Promise<Txid>}
|
|
2034
|
+
*/
|
|
2035
|
+
broadcastTx(tx) {
|
|
2036
|
+
_assertClass(tx, Transaction);
|
|
2037
|
+
const ret = wasm.esploraclient_broadcastTx(this.__wbg_ptr, tx.__wbg_ptr);
|
|
2038
|
+
return ret;
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Broadcast a PSET by extracting the transaction from the PSET and broadcasting it.
|
|
2042
|
+
* @param {Pset} pset
|
|
2043
|
+
* @returns {Promise<Txid>}
|
|
2044
|
+
*/
|
|
2045
|
+
broadcast(pset) {
|
|
2046
|
+
_assertClass(pset, Pset);
|
|
2047
|
+
const ret = wasm.esploraclient_broadcast(this.__wbg_ptr, pset.__wbg_ptr);
|
|
2048
|
+
return ret;
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2051
|
+
* Set the waterfalls server recipient key. This is used to encrypt the descriptor when calling the waterfalls endpoint.
|
|
2052
|
+
* @param {string} recipient
|
|
2053
|
+
* @returns {Promise<void>}
|
|
2054
|
+
*/
|
|
2055
|
+
setWaterfallsServerRecipient(recipient) {
|
|
2056
|
+
const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2057
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2058
|
+
const ret = wasm.esploraclient_setWaterfallsServerRecipient(this.__wbg_ptr, ptr0, len0);
|
|
2059
|
+
return ret;
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
if (Symbol.dispose) EsploraClient.prototype[Symbol.dispose] = EsploraClient.prototype.free;
|
|
2063
|
+
|
|
2064
|
+
exports.EsploraClient = EsploraClient;
|
|
2065
|
+
|
|
2066
|
+
const ExchangeRatesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2067
|
+
? { register: () => {}, unregister: () => {} }
|
|
2068
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_exchangerates_free(ptr >>> 0, 1));
|
|
2069
|
+
/**
|
|
2070
|
+
* Multiple exchange rates against BTC provided from various sources
|
|
2071
|
+
*/
|
|
2072
|
+
class ExchangeRates {
|
|
2073
|
+
|
|
2074
|
+
static __wrap(ptr) {
|
|
2075
|
+
ptr = ptr >>> 0;
|
|
2076
|
+
const obj = Object.create(ExchangeRates.prototype);
|
|
2077
|
+
obj.__wbg_ptr = ptr;
|
|
2078
|
+
ExchangeRatesFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2079
|
+
return obj;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
__destroy_into_raw() {
|
|
2083
|
+
const ptr = this.__wbg_ptr;
|
|
2084
|
+
this.__wbg_ptr = 0;
|
|
2085
|
+
ExchangeRatesFinalization.unregister(this);
|
|
2086
|
+
return ptr;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
free() {
|
|
2090
|
+
const ptr = this.__destroy_into_raw();
|
|
2091
|
+
wasm.__wbg_exchangerates_free(ptr, 0);
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Get the median exchange rate
|
|
2095
|
+
* @returns {number}
|
|
2096
|
+
*/
|
|
2097
|
+
median() {
|
|
2098
|
+
const ret = wasm.exchangerates_median(this.__wbg_ptr);
|
|
2099
|
+
return ret;
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* Get the individual exchange rates as a JSON array
|
|
2103
|
+
*
|
|
2104
|
+
* Each rate contains: rate, currency, source, and timestamp
|
|
2105
|
+
* @returns {any}
|
|
2106
|
+
*/
|
|
2107
|
+
results() {
|
|
2108
|
+
const ret = wasm.exchangerates_results(this.__wbg_ptr);
|
|
2109
|
+
if (ret[2]) {
|
|
2110
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2111
|
+
}
|
|
2112
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2113
|
+
}
|
|
2114
|
+
/**
|
|
2115
|
+
* Get the number of sources that provided rates
|
|
2116
|
+
* @returns {number}
|
|
2117
|
+
*/
|
|
2118
|
+
resultsCount() {
|
|
2119
|
+
const ret = wasm.exchangerates_resultsCount(this.__wbg_ptr);
|
|
2120
|
+
return ret >>> 0;
|
|
2121
|
+
}
|
|
2122
|
+
/**
|
|
2123
|
+
* Serialize the entire response to JSON string
|
|
2124
|
+
* @returns {string}
|
|
2125
|
+
*/
|
|
2126
|
+
serialize() {
|
|
2127
|
+
let deferred2_0;
|
|
2128
|
+
let deferred2_1;
|
|
2129
|
+
try {
|
|
2130
|
+
const ret = wasm.exchangerates_serialize(this.__wbg_ptr);
|
|
2131
|
+
var ptr1 = ret[0];
|
|
2132
|
+
var len1 = ret[1];
|
|
2133
|
+
if (ret[3]) {
|
|
2134
|
+
ptr1 = 0; len1 = 0;
|
|
2135
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2136
|
+
}
|
|
2137
|
+
deferred2_0 = ptr1;
|
|
2138
|
+
deferred2_1 = len1;
|
|
2139
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2140
|
+
} finally {
|
|
2141
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
if (Symbol.dispose) ExchangeRates.prototype[Symbol.dispose] = ExchangeRates.prototype.free;
|
|
2146
|
+
|
|
2147
|
+
exports.ExchangeRates = ExchangeRates;
|
|
2148
|
+
|
|
2149
|
+
const InvoiceResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2150
|
+
? { register: () => {}, unregister: () => {} }
|
|
2151
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_invoiceresponse_free(ptr >>> 0, 1));
|
|
2152
|
+
/**
|
|
2153
|
+
* Wrapper over [`lwk_boltz::InvoiceResponse`]
|
|
2154
|
+
*/
|
|
2155
|
+
class InvoiceResponse {
|
|
2156
|
+
|
|
2157
|
+
static __wrap(ptr) {
|
|
2158
|
+
ptr = ptr >>> 0;
|
|
2159
|
+
const obj = Object.create(InvoiceResponse.prototype);
|
|
2160
|
+
obj.__wbg_ptr = ptr;
|
|
2161
|
+
InvoiceResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2162
|
+
return obj;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
__destroy_into_raw() {
|
|
2166
|
+
const ptr = this.__wbg_ptr;
|
|
2167
|
+
this.__wbg_ptr = 0;
|
|
2168
|
+
InvoiceResponseFinalization.unregister(this);
|
|
2169
|
+
return ptr;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
free() {
|
|
2173
|
+
const ptr = this.__destroy_into_raw();
|
|
2174
|
+
wasm.__wbg_invoiceresponse_free(ptr, 0);
|
|
2175
|
+
}
|
|
2176
|
+
/**
|
|
2177
|
+
* Serialize the response to JSON string for JS interop
|
|
2178
|
+
* @returns {string}
|
|
2179
|
+
*/
|
|
2180
|
+
serialize() {
|
|
2181
|
+
let deferred2_0;
|
|
2182
|
+
let deferred2_1;
|
|
2183
|
+
try {
|
|
2184
|
+
const ret = wasm.invoiceresponse_serialize(this.__wbg_ptr);
|
|
2185
|
+
var ptr1 = ret[0];
|
|
2186
|
+
var len1 = ret[1];
|
|
2187
|
+
if (ret[3]) {
|
|
2188
|
+
ptr1 = 0; len1 = 0;
|
|
2189
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2190
|
+
}
|
|
2191
|
+
deferred2_0 = ptr1;
|
|
2192
|
+
deferred2_1 = len1;
|
|
2193
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2194
|
+
} finally {
|
|
2195
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2196
|
+
}
|
|
1581
2197
|
}
|
|
1582
2198
|
/**
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1585
|
-
* While `full_scan()` stops after finding 20 consecutive unused addresses (the gap limit),
|
|
1586
|
-
* this method will scan at least up to the given derivation index. This is useful to prevent
|
|
1587
|
-
* missing funds in cases where outputs exist beyond the gap limit.
|
|
1588
|
-
*
|
|
1589
|
-
* Will scan both external and internal address chains up to the given index for maximum safety,
|
|
1590
|
-
* even though internal addresses may not need such deep scanning.
|
|
1591
|
-
*
|
|
1592
|
-
* If transactions are found beyond the gap limit during this scan, subsequent calls to
|
|
1593
|
-
* `full_scan()` will automatically scan up to the highest used index, preventing any
|
|
1594
|
-
* previously-found transactions from being missed.
|
|
1595
|
-
*
|
|
1596
|
-
* See `full_scan_to_index()` for a blocking version of this method.
|
|
1597
|
-
* @param {Wollet} wollet
|
|
1598
|
-
* @param {number} index
|
|
1599
|
-
* @returns {Promise<Update | undefined>}
|
|
2199
|
+
* Return the bolt11 invoice string
|
|
2200
|
+
* @returns {string}
|
|
1600
2201
|
*/
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
2202
|
+
bolt11Invoice() {
|
|
2203
|
+
let deferred1_0;
|
|
2204
|
+
let deferred1_1;
|
|
2205
|
+
try {
|
|
2206
|
+
const ret = wasm.invoiceresponse_bolt11Invoice(this.__wbg_ptr);
|
|
2207
|
+
deferred1_0 = ret[0];
|
|
2208
|
+
deferred1_1 = ret[1];
|
|
2209
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2210
|
+
} finally {
|
|
2211
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2212
|
+
}
|
|
1605
2213
|
}
|
|
1606
2214
|
/**
|
|
1607
|
-
*
|
|
1608
|
-
* @param {Transaction} tx
|
|
1609
|
-
* @returns {Promise<Txid>}
|
|
2215
|
+
* @returns {string}
|
|
1610
2216
|
*/
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
2217
|
+
swapId() {
|
|
2218
|
+
let deferred1_0;
|
|
2219
|
+
let deferred1_1;
|
|
2220
|
+
try {
|
|
2221
|
+
const ret = wasm.invoiceresponse_swapId(this.__wbg_ptr);
|
|
2222
|
+
deferred1_0 = ret[0];
|
|
2223
|
+
deferred1_1 = ret[1];
|
|
2224
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2225
|
+
} finally {
|
|
2226
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2227
|
+
}
|
|
1615
2228
|
}
|
|
1616
2229
|
/**
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1619
|
-
*
|
|
2230
|
+
* The fee of the swap provider
|
|
2231
|
+
*
|
|
2232
|
+
* It is equal to the amount of the invoice minus the amount of the onchain transaction.
|
|
2233
|
+
* Does not include the fee of the onchain transaction.
|
|
2234
|
+
* @returns {bigint | undefined}
|
|
1620
2235
|
*/
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
return ret;
|
|
2236
|
+
fee() {
|
|
2237
|
+
const ret = wasm.invoiceresponse_fee(this.__wbg_ptr);
|
|
2238
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
|
1625
2239
|
}
|
|
1626
2240
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
*
|
|
1629
|
-
* @returns {Promise<
|
|
2241
|
+
* Complete the payment by advancing through the swap states until completion or failure
|
|
2242
|
+
* Consumes self as the inner method does
|
|
2243
|
+
* @returns {Promise<boolean>}
|
|
1630
2244
|
*/
|
|
1631
|
-
|
|
1632
|
-
const
|
|
1633
|
-
const
|
|
1634
|
-
const ret = wasm.esploraclient_setWaterfallsServerRecipient(this.__wbg_ptr, ptr0, len0);
|
|
2245
|
+
completePay() {
|
|
2246
|
+
const ptr = this.__destroy_into_raw();
|
|
2247
|
+
const ret = wasm.invoiceresponse_completePay(ptr);
|
|
1635
2248
|
return ret;
|
|
1636
2249
|
}
|
|
1637
2250
|
}
|
|
1638
|
-
|
|
2251
|
+
if (Symbol.dispose) InvoiceResponse.prototype[Symbol.dispose] = InvoiceResponse.prototype.free;
|
|
2252
|
+
|
|
2253
|
+
exports.InvoiceResponse = InvoiceResponse;
|
|
1639
2254
|
|
|
1640
2255
|
const IssuanceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1641
2256
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1713,7 +2328,9 @@ class Issuance {
|
|
|
1713
2328
|
return ret !== 0;
|
|
1714
2329
|
}
|
|
1715
2330
|
}
|
|
1716
|
-
|
|
2331
|
+
if (Symbol.dispose) Issuance.prototype[Symbol.dispose] = Issuance.prototype.free;
|
|
2332
|
+
|
|
2333
|
+
exports.Issuance = Issuance;
|
|
1717
2334
|
|
|
1718
2335
|
const JadeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1719
2336
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1866,7 +2483,9 @@ class Jade {
|
|
|
1866
2483
|
return ret;
|
|
1867
2484
|
}
|
|
1868
2485
|
}
|
|
1869
|
-
|
|
2486
|
+
if (Symbol.dispose) Jade.prototype[Symbol.dispose] = Jade.prototype.free;
|
|
2487
|
+
|
|
2488
|
+
exports.Jade = Jade;
|
|
1870
2489
|
|
|
1871
2490
|
const JadeWebSocketFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1872
2491
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2020,7 +2639,9 @@ class JadeWebSocket {
|
|
|
2020
2639
|
return ret;
|
|
2021
2640
|
}
|
|
2022
2641
|
}
|
|
2023
|
-
|
|
2642
|
+
if (Symbol.dispose) JadeWebSocket.prototype[Symbol.dispose] = JadeWebSocket.prototype.free;
|
|
2643
|
+
|
|
2644
|
+
exports.JadeWebSocket = JadeWebSocket;
|
|
2024
2645
|
|
|
2025
2646
|
const LedgerWebFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2026
2647
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2031,87 +2652,239 @@ class LedgerWeb {
|
|
|
2031
2652
|
__destroy_into_raw() {
|
|
2032
2653
|
const ptr = this.__wbg_ptr;
|
|
2033
2654
|
this.__wbg_ptr = 0;
|
|
2034
|
-
LedgerWebFinalization.unregister(this);
|
|
2655
|
+
LedgerWebFinalization.unregister(this);
|
|
2656
|
+
return ptr;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
free() {
|
|
2660
|
+
const ptr = this.__destroy_into_raw();
|
|
2661
|
+
wasm.__wbg_ledgerweb_free(ptr, 0);
|
|
2662
|
+
}
|
|
2663
|
+
/**
|
|
2664
|
+
* hid_device must be already opened
|
|
2665
|
+
* @param {HIDDevice} hid_device
|
|
2666
|
+
* @param {Network} network
|
|
2667
|
+
*/
|
|
2668
|
+
constructor(hid_device, network) {
|
|
2669
|
+
_assertClass(network, Network);
|
|
2670
|
+
const ret = wasm.ledgerweb_new(hid_device, network.__wbg_ptr);
|
|
2671
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2672
|
+
LedgerWebFinalization.register(this, this.__wbg_ptr, this);
|
|
2673
|
+
return this;
|
|
2674
|
+
}
|
|
2675
|
+
/**
|
|
2676
|
+
* @returns {Promise<string>}
|
|
2677
|
+
*/
|
|
2678
|
+
getVersion() {
|
|
2679
|
+
const ret = wasm.ledgerweb_getVersion(this.__wbg_ptr);
|
|
2680
|
+
return ret;
|
|
2681
|
+
}
|
|
2682
|
+
/**
|
|
2683
|
+
* @param {string} path
|
|
2684
|
+
* @returns {Promise<string>}
|
|
2685
|
+
*/
|
|
2686
|
+
deriveXpub(path) {
|
|
2687
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2688
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2689
|
+
const ret = wasm.ledgerweb_deriveXpub(this.__wbg_ptr, ptr0, len0);
|
|
2690
|
+
return ret;
|
|
2691
|
+
}
|
|
2692
|
+
/**
|
|
2693
|
+
* @returns {Promise<string>}
|
|
2694
|
+
*/
|
|
2695
|
+
slip77MasterBlindingKey() {
|
|
2696
|
+
const ret = wasm.ledgerweb_slip77MasterBlindingKey(this.__wbg_ptr);
|
|
2697
|
+
return ret;
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* @returns {Promise<string>}
|
|
2701
|
+
*/
|
|
2702
|
+
fingerprint() {
|
|
2703
|
+
const ret = wasm.ledgerweb_fingerprint(this.__wbg_ptr);
|
|
2704
|
+
return ret;
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* TODO Should use Signer::wpkh_slip77_descriptor
|
|
2708
|
+
* @returns {Promise<WolletDescriptor>}
|
|
2709
|
+
*/
|
|
2710
|
+
wpkhSlip77Descriptor() {
|
|
2711
|
+
const ret = wasm.ledgerweb_wpkhSlip77Descriptor(this.__wbg_ptr);
|
|
2712
|
+
return ret;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Sign and consume the given PSET, returning the signed one
|
|
2716
|
+
* @param {Pset} pset
|
|
2717
|
+
* @returns {Promise<Pset>}
|
|
2718
|
+
*/
|
|
2719
|
+
sign(pset) {
|
|
2720
|
+
_assertClass(pset, Pset);
|
|
2721
|
+
var ptr0 = pset.__destroy_into_raw();
|
|
2722
|
+
const ret = wasm.ledgerweb_sign(this.__wbg_ptr, ptr0);
|
|
2723
|
+
return ret;
|
|
2724
|
+
}
|
|
2725
|
+
/**
|
|
2726
|
+
* Return a single sig address with the given `variant` and `index`
|
|
2727
|
+
* @param {number} index
|
|
2728
|
+
* @returns {Promise<string>}
|
|
2729
|
+
*/
|
|
2730
|
+
getReceiveAddressSingle(index) {
|
|
2731
|
+
const ret = wasm.ledgerweb_getReceiveAddressSingle(this.__wbg_ptr, index);
|
|
2732
|
+
return ret;
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
if (Symbol.dispose) LedgerWeb.prototype[Symbol.dispose] = LedgerWeb.prototype.free;
|
|
2736
|
+
|
|
2737
|
+
exports.LedgerWeb = LedgerWeb;
|
|
2738
|
+
|
|
2739
|
+
const LightningPaymentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2740
|
+
? { register: () => {}, unregister: () => {} }
|
|
2741
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_lightningpayment_free(ptr >>> 0, 1));
|
|
2742
|
+
/**
|
|
2743
|
+
* Wrapper over [`lwk_boltz::LightningPayment`]
|
|
2744
|
+
*/
|
|
2745
|
+
class LightningPayment {
|
|
2746
|
+
|
|
2747
|
+
__destroy_into_raw() {
|
|
2748
|
+
const ptr = this.__wbg_ptr;
|
|
2749
|
+
this.__wbg_ptr = 0;
|
|
2750
|
+
LightningPaymentFinalization.unregister(this);
|
|
2751
|
+
return ptr;
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
free() {
|
|
2755
|
+
const ptr = this.__destroy_into_raw();
|
|
2756
|
+
wasm.__wbg_lightningpayment_free(ptr, 0);
|
|
2757
|
+
}
|
|
2758
|
+
/**
|
|
2759
|
+
* Create a LightningPayment from a bolt11 invoice string or a bolt12 offer
|
|
2760
|
+
* @param {string} invoice
|
|
2761
|
+
*/
|
|
2762
|
+
constructor(invoice) {
|
|
2763
|
+
const ptr0 = passStringToWasm0(invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2764
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2765
|
+
const ret = wasm.lightningpayment_new(ptr0, len0);
|
|
2766
|
+
if (ret[2]) {
|
|
2767
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2768
|
+
}
|
|
2769
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
2770
|
+
LightningPaymentFinalization.register(this, this.__wbg_ptr, this);
|
|
2771
|
+
return this;
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Return a string representation of the LightningPayment
|
|
2775
|
+
* @returns {string}
|
|
2776
|
+
*/
|
|
2777
|
+
toString() {
|
|
2778
|
+
let deferred1_0;
|
|
2779
|
+
let deferred1_1;
|
|
2780
|
+
try {
|
|
2781
|
+
const ret = wasm.lightningpayment_toString(this.__wbg_ptr);
|
|
2782
|
+
deferred1_0 = ret[0];
|
|
2783
|
+
deferred1_1 = ret[1];
|
|
2784
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2785
|
+
} finally {
|
|
2786
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* Return a QR code image uri for the LightningPayment
|
|
2791
|
+
* @param {number | null} [pixel_per_module]
|
|
2792
|
+
* @returns {string}
|
|
2793
|
+
*/
|
|
2794
|
+
toUriQr(pixel_per_module) {
|
|
2795
|
+
let deferred2_0;
|
|
2796
|
+
let deferred2_1;
|
|
2797
|
+
try {
|
|
2798
|
+
const ret = wasm.lightningpayment_toUriQr(this.__wbg_ptr, isLikeNone(pixel_per_module) ? 0xFFFFFF : pixel_per_module);
|
|
2799
|
+
var ptr1 = ret[0];
|
|
2800
|
+
var len1 = ret[1];
|
|
2801
|
+
if (ret[3]) {
|
|
2802
|
+
ptr1 = 0; len1 = 0;
|
|
2803
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2804
|
+
}
|
|
2805
|
+
deferred2_0 = ptr1;
|
|
2806
|
+
deferred2_1 = len1;
|
|
2807
|
+
return getStringFromWasm0(ptr1, len1);
|
|
2808
|
+
} finally {
|
|
2809
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
if (Symbol.dispose) LightningPayment.prototype[Symbol.dispose] = LightningPayment.prototype.free;
|
|
2814
|
+
|
|
2815
|
+
exports.LightningPayment = LightningPayment;
|
|
2816
|
+
|
|
2817
|
+
const MagicRoutingHintFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2818
|
+
? { register: () => {}, unregister: () => {} }
|
|
2819
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_magicroutinghint_free(ptr >>> 0, 1));
|
|
2820
|
+
/**
|
|
2821
|
+
* A struct representing a magic routing hint, with details on how to pay directly without using Boltz
|
|
2822
|
+
*/
|
|
2823
|
+
class MagicRoutingHint {
|
|
2824
|
+
|
|
2825
|
+
static __wrap(ptr) {
|
|
2826
|
+
ptr = ptr >>> 0;
|
|
2827
|
+
const obj = Object.create(MagicRoutingHint.prototype);
|
|
2828
|
+
obj.__wbg_ptr = ptr;
|
|
2829
|
+
MagicRoutingHintFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2830
|
+
return obj;
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
__destroy_into_raw() {
|
|
2834
|
+
const ptr = this.__wbg_ptr;
|
|
2835
|
+
this.__wbg_ptr = 0;
|
|
2836
|
+
MagicRoutingHintFinalization.unregister(this);
|
|
2035
2837
|
return ptr;
|
|
2036
2838
|
}
|
|
2037
2839
|
|
|
2038
2840
|
free() {
|
|
2039
2841
|
const ptr = this.__destroy_into_raw();
|
|
2040
|
-
wasm.
|
|
2041
|
-
}
|
|
2042
|
-
/**
|
|
2043
|
-
* hid_device must be already opened
|
|
2044
|
-
* @param {HIDDevice} hid_device
|
|
2045
|
-
* @param {Network} network
|
|
2046
|
-
*/
|
|
2047
|
-
constructor(hid_device, network) {
|
|
2048
|
-
_assertClass(network, Network);
|
|
2049
|
-
const ret = wasm.ledgerweb_new(hid_device, network.__wbg_ptr);
|
|
2050
|
-
this.__wbg_ptr = ret >>> 0;
|
|
2051
|
-
LedgerWebFinalization.register(this, this.__wbg_ptr, this);
|
|
2052
|
-
return this;
|
|
2053
|
-
}
|
|
2054
|
-
/**
|
|
2055
|
-
* @returns {Promise<string>}
|
|
2056
|
-
*/
|
|
2057
|
-
getVersion() {
|
|
2058
|
-
const ret = wasm.ledgerweb_getVersion(this.__wbg_ptr);
|
|
2059
|
-
return ret;
|
|
2060
|
-
}
|
|
2061
|
-
/**
|
|
2062
|
-
* @param {string} path
|
|
2063
|
-
* @returns {Promise<string>}
|
|
2064
|
-
*/
|
|
2065
|
-
deriveXpub(path) {
|
|
2066
|
-
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2067
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2068
|
-
const ret = wasm.ledgerweb_deriveXpub(this.__wbg_ptr, ptr0, len0);
|
|
2069
|
-
return ret;
|
|
2070
|
-
}
|
|
2071
|
-
/**
|
|
2072
|
-
* @returns {Promise<string>}
|
|
2073
|
-
*/
|
|
2074
|
-
slip77MasterBlindingKey() {
|
|
2075
|
-
const ret = wasm.ledgerweb_slip77MasterBlindingKey(this.__wbg_ptr);
|
|
2076
|
-
return ret;
|
|
2077
|
-
}
|
|
2078
|
-
/**
|
|
2079
|
-
* @returns {Promise<string>}
|
|
2080
|
-
*/
|
|
2081
|
-
fingerprint() {
|
|
2082
|
-
const ret = wasm.ledgerweb_fingerprint(this.__wbg_ptr);
|
|
2083
|
-
return ret;
|
|
2842
|
+
wasm.__wbg_magicroutinghint_free(ptr, 0);
|
|
2084
2843
|
}
|
|
2085
2844
|
/**
|
|
2086
|
-
*
|
|
2087
|
-
* @returns {
|
|
2845
|
+
* The address to pay directly to
|
|
2846
|
+
* @returns {string}
|
|
2088
2847
|
*/
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2848
|
+
address() {
|
|
2849
|
+
let deferred1_0;
|
|
2850
|
+
let deferred1_1;
|
|
2851
|
+
try {
|
|
2852
|
+
const ret = wasm.magicroutinghint_address(this.__wbg_ptr);
|
|
2853
|
+
deferred1_0 = ret[0];
|
|
2854
|
+
deferred1_1 = ret[1];
|
|
2855
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2856
|
+
} finally {
|
|
2857
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2858
|
+
}
|
|
2092
2859
|
}
|
|
2093
2860
|
/**
|
|
2094
|
-
*
|
|
2095
|
-
* @
|
|
2096
|
-
* @returns {Promise<Pset>}
|
|
2861
|
+
* The amount to pay directly to
|
|
2862
|
+
* @returns {bigint}
|
|
2097
2863
|
*/
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
const ret = wasm.ledgerweb_sign(this.__wbg_ptr, ptr0);
|
|
2102
|
-
return ret;
|
|
2864
|
+
amount() {
|
|
2865
|
+
const ret = wasm.magicroutinghint_amount(this.__wbg_ptr);
|
|
2866
|
+
return BigInt.asUintN(64, ret);
|
|
2103
2867
|
}
|
|
2104
2868
|
/**
|
|
2105
|
-
*
|
|
2106
|
-
* @
|
|
2107
|
-
* @returns {Promise<string>}
|
|
2869
|
+
* The URI to pay directly to
|
|
2870
|
+
* @returns {string}
|
|
2108
2871
|
*/
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2872
|
+
uri() {
|
|
2873
|
+
let deferred1_0;
|
|
2874
|
+
let deferred1_1;
|
|
2875
|
+
try {
|
|
2876
|
+
const ret = wasm.magicroutinghint_uri(this.__wbg_ptr);
|
|
2877
|
+
deferred1_0 = ret[0];
|
|
2878
|
+
deferred1_1 = ret[1];
|
|
2879
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2880
|
+
} finally {
|
|
2881
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2882
|
+
}
|
|
2112
2883
|
}
|
|
2113
2884
|
}
|
|
2114
|
-
|
|
2885
|
+
if (Symbol.dispose) MagicRoutingHint.prototype[Symbol.dispose] = MagicRoutingHint.prototype.free;
|
|
2886
|
+
|
|
2887
|
+
exports.MagicRoutingHint = MagicRoutingHint;
|
|
2115
2888
|
|
|
2116
2889
|
const MnemonicFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2117
2890
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2203,7 +2976,9 @@ class Mnemonic {
|
|
|
2203
2976
|
return Mnemonic.__wrap(ret[0]);
|
|
2204
2977
|
}
|
|
2205
2978
|
}
|
|
2206
|
-
|
|
2979
|
+
if (Symbol.dispose) Mnemonic.prototype[Symbol.dispose] = Mnemonic.prototype.free;
|
|
2980
|
+
|
|
2981
|
+
exports.Mnemonic = Mnemonic;
|
|
2207
2982
|
|
|
2208
2983
|
const NetworkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2209
2984
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2347,7 +3122,9 @@ class Network {
|
|
|
2347
3122
|
}
|
|
2348
3123
|
}
|
|
2349
3124
|
}
|
|
2350
|
-
|
|
3125
|
+
if (Symbol.dispose) Network.prototype[Symbol.dispose] = Network.prototype.free;
|
|
3126
|
+
|
|
3127
|
+
exports.Network = Network;
|
|
2351
3128
|
|
|
2352
3129
|
const OptionWalletTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2353
3130
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2386,7 +3163,9 @@ class OptionWalletTxOut {
|
|
|
2386
3163
|
return ret === 0 ? undefined : WalletTxOut.__wrap(ret);
|
|
2387
3164
|
}
|
|
2388
3165
|
}
|
|
2389
|
-
|
|
3166
|
+
if (Symbol.dispose) OptionWalletTxOut.prototype[Symbol.dispose] = OptionWalletTxOut.prototype.free;
|
|
3167
|
+
|
|
3168
|
+
exports.OptionWalletTxOut = OptionWalletTxOut;
|
|
2390
3169
|
|
|
2391
3170
|
const OutPointFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2392
3171
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2454,7 +3233,9 @@ class OutPoint {
|
|
|
2454
3233
|
return ret >>> 0;
|
|
2455
3234
|
}
|
|
2456
3235
|
}
|
|
2457
|
-
|
|
3236
|
+
if (Symbol.dispose) OutPoint.prototype[Symbol.dispose] = OutPoint.prototype.free;
|
|
3237
|
+
|
|
3238
|
+
exports.OutPoint = OutPoint;
|
|
2458
3239
|
|
|
2459
3240
|
const PrecisionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2460
3241
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2527,7 +3308,199 @@ class Precision {
|
|
|
2527
3308
|
return ret[0];
|
|
2528
3309
|
}
|
|
2529
3310
|
}
|
|
2530
|
-
|
|
3311
|
+
if (Symbol.dispose) Precision.prototype[Symbol.dispose] = Precision.prototype.free;
|
|
3312
|
+
|
|
3313
|
+
exports.Precision = Precision;
|
|
3314
|
+
|
|
3315
|
+
const PreparePayResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3316
|
+
? { register: () => {}, unregister: () => {} }
|
|
3317
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_preparepayresponse_free(ptr >>> 0, 1));
|
|
3318
|
+
|
|
3319
|
+
class PreparePayResponse {
|
|
3320
|
+
|
|
3321
|
+
static __wrap(ptr) {
|
|
3322
|
+
ptr = ptr >>> 0;
|
|
3323
|
+
const obj = Object.create(PreparePayResponse.prototype);
|
|
3324
|
+
obj.__wbg_ptr = ptr;
|
|
3325
|
+
PreparePayResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3326
|
+
return obj;
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
__destroy_into_raw() {
|
|
3330
|
+
const ptr = this.__wbg_ptr;
|
|
3331
|
+
this.__wbg_ptr = 0;
|
|
3332
|
+
PreparePayResponseFinalization.unregister(this);
|
|
3333
|
+
return ptr;
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
free() {
|
|
3337
|
+
const ptr = this.__destroy_into_raw();
|
|
3338
|
+
wasm.__wbg_preparepayresponse_free(ptr, 0);
|
|
3339
|
+
}
|
|
3340
|
+
/**
|
|
3341
|
+
* Serialize the response to JSON string for JS interop
|
|
3342
|
+
* @returns {string}
|
|
3343
|
+
*/
|
|
3344
|
+
serialize() {
|
|
3345
|
+
let deferred2_0;
|
|
3346
|
+
let deferred2_1;
|
|
3347
|
+
try {
|
|
3348
|
+
const ret = wasm.preparepayresponse_serialize(this.__wbg_ptr);
|
|
3349
|
+
var ptr1 = ret[0];
|
|
3350
|
+
var len1 = ret[1];
|
|
3351
|
+
if (ret[3]) {
|
|
3352
|
+
ptr1 = 0; len1 = 0;
|
|
3353
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
3354
|
+
}
|
|
3355
|
+
deferred2_0 = ptr1;
|
|
3356
|
+
deferred2_1 = len1;
|
|
3357
|
+
return getStringFromWasm0(ptr1, len1);
|
|
3358
|
+
} finally {
|
|
3359
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
3362
|
+
/**
|
|
3363
|
+
* @returns {string}
|
|
3364
|
+
*/
|
|
3365
|
+
swapId() {
|
|
3366
|
+
let deferred1_0;
|
|
3367
|
+
let deferred1_1;
|
|
3368
|
+
try {
|
|
3369
|
+
const ret = wasm.preparepayresponse_swapId(this.__wbg_ptr);
|
|
3370
|
+
deferred1_0 = ret[0];
|
|
3371
|
+
deferred1_1 = ret[1];
|
|
3372
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3373
|
+
} finally {
|
|
3374
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
/**
|
|
3378
|
+
* @returns {string}
|
|
3379
|
+
*/
|
|
3380
|
+
uri() {
|
|
3381
|
+
let deferred1_0;
|
|
3382
|
+
let deferred1_1;
|
|
3383
|
+
try {
|
|
3384
|
+
const ret = wasm.preparepayresponse_uri(this.__wbg_ptr);
|
|
3385
|
+
deferred1_0 = ret[0];
|
|
3386
|
+
deferred1_1 = ret[1];
|
|
3387
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3388
|
+
} finally {
|
|
3389
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
/**
|
|
3393
|
+
* @returns {Address}
|
|
3394
|
+
*/
|
|
3395
|
+
uriAddress() {
|
|
3396
|
+
const ret = wasm.preparepayresponse_uriAddress(this.__wbg_ptr);
|
|
3397
|
+
if (ret[2]) {
|
|
3398
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3399
|
+
}
|
|
3400
|
+
return Address.__wrap(ret[0]);
|
|
3401
|
+
}
|
|
3402
|
+
/**
|
|
3403
|
+
* @returns {bigint}
|
|
3404
|
+
*/
|
|
3405
|
+
uriAmount() {
|
|
3406
|
+
const ret = wasm.preparepayresponse_uriAmount(this.__wbg_ptr);
|
|
3407
|
+
return BigInt.asUintN(64, ret);
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* The fee of the swap provider
|
|
3411
|
+
*
|
|
3412
|
+
* It is equal to the amount requested onchain minus the amount of the bolt11 invoice
|
|
3413
|
+
* Does not include the fee of the onchain transaction.
|
|
3414
|
+
* @returns {bigint | undefined}
|
|
3415
|
+
*/
|
|
3416
|
+
fee() {
|
|
3417
|
+
const ret = wasm.preparepayresponse_fee(this.__wbg_ptr);
|
|
3418
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
|
3419
|
+
}
|
|
3420
|
+
/**
|
|
3421
|
+
* @returns {Promise<boolean>}
|
|
3422
|
+
*/
|
|
3423
|
+
completePay() {
|
|
3424
|
+
const ptr = this.__destroy_into_raw();
|
|
3425
|
+
const ret = wasm.preparepayresponse_completePay(ptr);
|
|
3426
|
+
return ret;
|
|
3427
|
+
}
|
|
3428
|
+
}
|
|
3429
|
+
if (Symbol.dispose) PreparePayResponse.prototype[Symbol.dispose] = PreparePayResponse.prototype.free;
|
|
3430
|
+
|
|
3431
|
+
exports.PreparePayResponse = PreparePayResponse;
|
|
3432
|
+
|
|
3433
|
+
const PricesFetcherFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3434
|
+
? { register: () => {}, unregister: () => {} }
|
|
3435
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_pricesfetcher_free(ptr >>> 0, 1));
|
|
3436
|
+
/**
|
|
3437
|
+
* Wrapper over [`lwk_wollet::PricesFetcher`]
|
|
3438
|
+
*/
|
|
3439
|
+
class PricesFetcher {
|
|
3440
|
+
|
|
3441
|
+
__destroy_into_raw() {
|
|
3442
|
+
const ptr = this.__wbg_ptr;
|
|
3443
|
+
this.__wbg_ptr = 0;
|
|
3444
|
+
PricesFetcherFinalization.unregister(this);
|
|
3445
|
+
return ptr;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
free() {
|
|
3449
|
+
const ptr = this.__destroy_into_raw();
|
|
3450
|
+
wasm.__wbg_pricesfetcher_free(ptr, 0);
|
|
3451
|
+
}
|
|
3452
|
+
/**
|
|
3453
|
+
* Create a new PricesFetcher with default settings
|
|
3454
|
+
*/
|
|
3455
|
+
constructor() {
|
|
3456
|
+
const ret = wasm.pricesfetcher_new();
|
|
3457
|
+
if (ret[2]) {
|
|
3458
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3459
|
+
}
|
|
3460
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
3461
|
+
PricesFetcherFinalization.register(this, this.__wbg_ptr, this);
|
|
3462
|
+
return this;
|
|
3463
|
+
}
|
|
3464
|
+
/**
|
|
3465
|
+
* Fetch exchange rates for the given currency (e.g., "USD", "EUR", "CHF")
|
|
3466
|
+
*
|
|
3467
|
+
* Returns an ExchangeRates object containing rates from multiple sources and the median
|
|
3468
|
+
* @param {CurrencyCode} currency
|
|
3469
|
+
* @returns {Promise<ExchangeRates>}
|
|
3470
|
+
*/
|
|
3471
|
+
rates(currency) {
|
|
3472
|
+
_assertClass(currency, CurrencyCode);
|
|
3473
|
+
const ret = wasm.pricesfetcher_rates(this.__wbg_ptr, currency.__wbg_ptr);
|
|
3474
|
+
return ret;
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
if (Symbol.dispose) PricesFetcher.prototype[Symbol.dispose] = PricesFetcher.prototype.free;
|
|
3478
|
+
|
|
3479
|
+
exports.PricesFetcher = PricesFetcher;
|
|
3480
|
+
|
|
3481
|
+
const PricesFetcherBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3482
|
+
? { register: () => {}, unregister: () => {} }
|
|
3483
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_pricesfetcherbuilder_free(ptr >>> 0, 1));
|
|
3484
|
+
/**
|
|
3485
|
+
* Wrapper over [`lwk_wollet::PricesFetcherBuilder`]
|
|
3486
|
+
*/
|
|
3487
|
+
class PricesFetcherBuilder {
|
|
3488
|
+
|
|
3489
|
+
__destroy_into_raw() {
|
|
3490
|
+
const ptr = this.__wbg_ptr;
|
|
3491
|
+
this.__wbg_ptr = 0;
|
|
3492
|
+
PricesFetcherBuilderFinalization.unregister(this);
|
|
3493
|
+
return ptr;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
free() {
|
|
3497
|
+
const ptr = this.__destroy_into_raw();
|
|
3498
|
+
wasm.__wbg_pricesfetcherbuilder_free(ptr, 0);
|
|
3499
|
+
}
|
|
3500
|
+
}
|
|
3501
|
+
if (Symbol.dispose) PricesFetcherBuilder.prototype[Symbol.dispose] = PricesFetcherBuilder.prototype.free;
|
|
3502
|
+
|
|
3503
|
+
exports.PricesFetcherBuilder = PricesFetcherBuilder;
|
|
2531
3504
|
|
|
2532
3505
|
const PsetFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2533
3506
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2633,7 +3606,9 @@ class Pset {
|
|
|
2633
3606
|
return v1;
|
|
2634
3607
|
}
|
|
2635
3608
|
}
|
|
2636
|
-
|
|
3609
|
+
if (Symbol.dispose) Pset.prototype[Symbol.dispose] = Pset.prototype.free;
|
|
3610
|
+
|
|
3611
|
+
exports.Pset = Pset;
|
|
2637
3612
|
|
|
2638
3613
|
const PsetBalanceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2639
3614
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2691,7 +3666,9 @@ class PsetBalance {
|
|
|
2691
3666
|
return v1;
|
|
2692
3667
|
}
|
|
2693
3668
|
}
|
|
2694
|
-
|
|
3669
|
+
if (Symbol.dispose) PsetBalance.prototype[Symbol.dispose] = PsetBalance.prototype.free;
|
|
3670
|
+
|
|
3671
|
+
exports.PsetBalance = PsetBalance;
|
|
2695
3672
|
|
|
2696
3673
|
const PsetDetailsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2697
3674
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2774,7 +3751,9 @@ class PsetDetails {
|
|
|
2774
3751
|
return v1;
|
|
2775
3752
|
}
|
|
2776
3753
|
}
|
|
2777
|
-
|
|
3754
|
+
if (Symbol.dispose) PsetDetails.prototype[Symbol.dispose] = PsetDetails.prototype.free;
|
|
3755
|
+
|
|
3756
|
+
exports.PsetDetails = PsetDetails;
|
|
2778
3757
|
|
|
2779
3758
|
const PsetInputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2780
3759
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2836,7 +3815,9 @@ class PsetInput {
|
|
|
2836
3815
|
return ret === 0 ? undefined : AssetId.__wrap(ret);
|
|
2837
3816
|
}
|
|
2838
3817
|
}
|
|
2839
|
-
|
|
3818
|
+
if (Symbol.dispose) PsetInput.prototype[Symbol.dispose] = PsetInput.prototype.free;
|
|
3819
|
+
|
|
3820
|
+
exports.PsetInput = PsetInput;
|
|
2840
3821
|
|
|
2841
3822
|
const PsetOutputFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2842
3823
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2873,7 +3854,9 @@ class PsetOutput {
|
|
|
2873
3854
|
return Script.__wrap(ret);
|
|
2874
3855
|
}
|
|
2875
3856
|
}
|
|
2876
|
-
|
|
3857
|
+
if (Symbol.dispose) PsetOutput.prototype[Symbol.dispose] = PsetOutput.prototype.free;
|
|
3858
|
+
|
|
3859
|
+
exports.PsetOutput = PsetOutput;
|
|
2877
3860
|
|
|
2878
3861
|
const PsetSignaturesFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2879
3862
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2918,7 +3901,9 @@ class PsetSignatures {
|
|
|
2918
3901
|
return ret;
|
|
2919
3902
|
}
|
|
2920
3903
|
}
|
|
2921
|
-
|
|
3904
|
+
if (Symbol.dispose) PsetSignatures.prototype[Symbol.dispose] = PsetSignatures.prototype.free;
|
|
3905
|
+
|
|
3906
|
+
exports.PsetSignatures = PsetSignatures;
|
|
2922
3907
|
|
|
2923
3908
|
const RecipientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2924
3909
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -2976,7 +3961,9 @@ class Recipient {
|
|
|
2976
3961
|
return ret >>> 0;
|
|
2977
3962
|
}
|
|
2978
3963
|
}
|
|
2979
|
-
|
|
3964
|
+
if (Symbol.dispose) Recipient.prototype[Symbol.dispose] = Recipient.prototype.free;
|
|
3965
|
+
|
|
3966
|
+
exports.Recipient = Recipient;
|
|
2980
3967
|
|
|
2981
3968
|
const RegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2982
3969
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3110,7 +4097,9 @@ class Registry {
|
|
|
3110
4097
|
return Pset.__wrap(ret[0]);
|
|
3111
4098
|
}
|
|
3112
4099
|
}
|
|
3113
|
-
|
|
4100
|
+
if (Symbol.dispose) Registry.prototype[Symbol.dispose] = Registry.prototype.free;
|
|
4101
|
+
|
|
4102
|
+
exports.Registry = Registry;
|
|
3114
4103
|
|
|
3115
4104
|
const RegistryDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3116
4105
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3190,7 +4179,9 @@ class RegistryData {
|
|
|
3190
4179
|
}
|
|
3191
4180
|
}
|
|
3192
4181
|
}
|
|
3193
|
-
|
|
4182
|
+
if (Symbol.dispose) RegistryData.prototype[Symbol.dispose] = RegistryData.prototype.free;
|
|
4183
|
+
|
|
4184
|
+
exports.RegistryData = RegistryData;
|
|
3194
4185
|
|
|
3195
4186
|
const RegistryPostFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3196
4187
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3243,7 +4234,9 @@ class RegistryPost {
|
|
|
3243
4234
|
}
|
|
3244
4235
|
}
|
|
3245
4236
|
}
|
|
3246
|
-
|
|
4237
|
+
if (Symbol.dispose) RegistryPost.prototype[Symbol.dispose] = RegistryPost.prototype.free;
|
|
4238
|
+
|
|
4239
|
+
exports.RegistryPost = RegistryPost;
|
|
3247
4240
|
|
|
3248
4241
|
const ScriptFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3249
4242
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3333,7 +4326,9 @@ class Script {
|
|
|
3333
4326
|
}
|
|
3334
4327
|
}
|
|
3335
4328
|
}
|
|
3336
|
-
|
|
4329
|
+
if (Symbol.dispose) Script.prototype[Symbol.dispose] = Script.prototype.free;
|
|
4330
|
+
|
|
4331
|
+
exports.Script = Script;
|
|
3337
4332
|
|
|
3338
4333
|
const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3339
4334
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3540,12 +4535,27 @@ class Signer {
|
|
|
3540
4535
|
* Return the mnemonic of the signer
|
|
3541
4536
|
* @returns {Mnemonic}
|
|
3542
4537
|
*/
|
|
3543
|
-
mnemonic() {
|
|
3544
|
-
const ret = wasm.signer_mnemonic(this.__wbg_ptr);
|
|
3545
|
-
return Mnemonic.__wrap(ret);
|
|
4538
|
+
mnemonic() {
|
|
4539
|
+
const ret = wasm.signer_mnemonic(this.__wbg_ptr);
|
|
4540
|
+
return Mnemonic.__wrap(ret);
|
|
4541
|
+
}
|
|
4542
|
+
/**
|
|
4543
|
+
* Return the derived BIP85 mnemonic
|
|
4544
|
+
* @param {number} index
|
|
4545
|
+
* @param {number} word_count
|
|
4546
|
+
* @returns {Mnemonic}
|
|
4547
|
+
*/
|
|
4548
|
+
derive_bip85_mnemonic(index, word_count) {
|
|
4549
|
+
const ret = wasm.signer_derive_bip85_mnemonic(this.__wbg_ptr, index, word_count);
|
|
4550
|
+
if (ret[2]) {
|
|
4551
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
4552
|
+
}
|
|
4553
|
+
return Mnemonic.__wrap(ret[0]);
|
|
3546
4554
|
}
|
|
3547
4555
|
}
|
|
3548
|
-
|
|
4556
|
+
if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
|
|
4557
|
+
|
|
4558
|
+
exports.Signer = Signer;
|
|
3549
4559
|
|
|
3550
4560
|
const SinglesigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3551
4561
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3586,7 +4596,9 @@ class Singlesig {
|
|
|
3586
4596
|
return Singlesig.__wrap(ret[0]);
|
|
3587
4597
|
}
|
|
3588
4598
|
}
|
|
3589
|
-
|
|
4599
|
+
if (Symbol.dispose) Singlesig.prototype[Symbol.dispose] = Singlesig.prototype.free;
|
|
4600
|
+
|
|
4601
|
+
exports.Singlesig = Singlesig;
|
|
3590
4602
|
|
|
3591
4603
|
const TipFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3592
4604
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3645,7 +4657,9 @@ class Tip {
|
|
|
3645
4657
|
return ret === 0x100000001 ? undefined : ret;
|
|
3646
4658
|
}
|
|
3647
4659
|
}
|
|
3648
|
-
|
|
4660
|
+
if (Symbol.dispose) Tip.prototype[Symbol.dispose] = Tip.prototype.free;
|
|
4661
|
+
|
|
4662
|
+
exports.Tip = Tip;
|
|
3649
4663
|
|
|
3650
4664
|
const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3651
4665
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3738,7 +4752,9 @@ class Transaction {
|
|
|
3738
4752
|
}
|
|
3739
4753
|
}
|
|
3740
4754
|
}
|
|
3741
|
-
|
|
4755
|
+
if (Symbol.dispose) Transaction.prototype[Symbol.dispose] = Transaction.prototype.free;
|
|
4756
|
+
|
|
4757
|
+
exports.Transaction = Transaction;
|
|
3742
4758
|
|
|
3743
4759
|
const TxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3744
4760
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3773,7 +4789,7 @@ class TxBuilder {
|
|
|
3773
4789
|
*/
|
|
3774
4790
|
constructor(network) {
|
|
3775
4791
|
_assertClass(network, Network);
|
|
3776
|
-
const ret = wasm.
|
|
4792
|
+
const ret = wasm.txbuilder_new(network.__wbg_ptr);
|
|
3777
4793
|
this.__wbg_ptr = ret >>> 0;
|
|
3778
4794
|
TxBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
3779
4795
|
return this;
|
|
@@ -4060,8 +5076,20 @@ class TxBuilder {
|
|
|
4060
5076
|
}
|
|
4061
5077
|
return TxBuilder.__wrap(ret[0]);
|
|
4062
5078
|
}
|
|
5079
|
+
/**
|
|
5080
|
+
* Add input rangeproofs
|
|
5081
|
+
* @param {boolean} add_rangeproofs
|
|
5082
|
+
* @returns {TxBuilder}
|
|
5083
|
+
*/
|
|
5084
|
+
addInputRangeproofs(add_rangeproofs) {
|
|
5085
|
+
const ptr = this.__destroy_into_raw();
|
|
5086
|
+
const ret = wasm.txbuilder_addInputRangeproofs(ptr, add_rangeproofs);
|
|
5087
|
+
return TxBuilder.__wrap(ret);
|
|
5088
|
+
}
|
|
4063
5089
|
}
|
|
4064
|
-
|
|
5090
|
+
if (Symbol.dispose) TxBuilder.prototype[Symbol.dispose] = TxBuilder.prototype.free;
|
|
5091
|
+
|
|
5092
|
+
exports.TxBuilder = TxBuilder;
|
|
4065
5093
|
|
|
4066
5094
|
const TxOutSecretsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4067
5095
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4183,7 +5211,9 @@ class TxOutSecrets {
|
|
|
4183
5211
|
}
|
|
4184
5212
|
}
|
|
4185
5213
|
}
|
|
4186
|
-
|
|
5214
|
+
if (Symbol.dispose) TxOutSecrets.prototype[Symbol.dispose] = TxOutSecrets.prototype.free;
|
|
5215
|
+
|
|
5216
|
+
exports.TxOutSecrets = TxOutSecrets;
|
|
4187
5217
|
|
|
4188
5218
|
const TxidFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4189
5219
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4247,7 +5277,9 @@ class Txid {
|
|
|
4247
5277
|
}
|
|
4248
5278
|
}
|
|
4249
5279
|
}
|
|
4250
|
-
|
|
5280
|
+
if (Symbol.dispose) Txid.prototype[Symbol.dispose] = Txid.prototype.free;
|
|
5281
|
+
|
|
5282
|
+
exports.Txid = Txid;
|
|
4251
5283
|
|
|
4252
5284
|
const UnvalidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4253
5285
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4352,7 +5384,9 @@ class UnvalidatedLiquidexProposal {
|
|
|
4352
5384
|
}
|
|
4353
5385
|
}
|
|
4354
5386
|
}
|
|
4355
|
-
|
|
5387
|
+
if (Symbol.dispose) UnvalidatedLiquidexProposal.prototype[Symbol.dispose] = UnvalidatedLiquidexProposal.prototype.free;
|
|
5388
|
+
|
|
5389
|
+
exports.UnvalidatedLiquidexProposal = UnvalidatedLiquidexProposal;
|
|
4356
5390
|
|
|
4357
5391
|
const UpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4358
5392
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4471,7 +5505,9 @@ class Update {
|
|
|
4471
5505
|
wasm.update_prune(this.__wbg_ptr, wollet.__wbg_ptr);
|
|
4472
5506
|
}
|
|
4473
5507
|
}
|
|
4474
|
-
|
|
5508
|
+
if (Symbol.dispose) Update.prototype[Symbol.dispose] = Update.prototype.free;
|
|
5509
|
+
|
|
5510
|
+
exports.Update = Update;
|
|
4475
5511
|
|
|
4476
5512
|
const ValidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4477
5513
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4537,7 +5573,9 @@ class ValidatedLiquidexProposal {
|
|
|
4537
5573
|
}
|
|
4538
5574
|
}
|
|
4539
5575
|
}
|
|
4540
|
-
|
|
5576
|
+
if (Symbol.dispose) ValidatedLiquidexProposal.prototype[Symbol.dispose] = ValidatedLiquidexProposal.prototype.free;
|
|
5577
|
+
|
|
5578
|
+
exports.ValidatedLiquidexProposal = ValidatedLiquidexProposal;
|
|
4541
5579
|
|
|
4542
5580
|
const WalletTxFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4543
5581
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4677,7 +5715,9 @@ class WalletTx {
|
|
|
4677
5715
|
}
|
|
4678
5716
|
}
|
|
4679
5717
|
}
|
|
4680
|
-
|
|
5718
|
+
if (Symbol.dispose) WalletTx.prototype[Symbol.dispose] = WalletTx.prototype.free;
|
|
5719
|
+
|
|
5720
|
+
exports.WalletTx = WalletTx;
|
|
4681
5721
|
|
|
4682
5722
|
const WalletTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4683
5723
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4763,7 +5803,9 @@ class WalletTxOut {
|
|
|
4763
5803
|
return Address.__wrap(ret);
|
|
4764
5804
|
}
|
|
4765
5805
|
}
|
|
4766
|
-
|
|
5806
|
+
if (Symbol.dispose) WalletTxOut.prototype[Symbol.dispose] = WalletTxOut.prototype.free;
|
|
5807
|
+
|
|
5808
|
+
exports.WalletTxOut = WalletTxOut;
|
|
4767
5809
|
|
|
4768
5810
|
const WolletFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4769
5811
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4823,6 +5865,28 @@ class Wollet {
|
|
|
4823
5865
|
}
|
|
4824
5866
|
return AddressResult.__wrap(ret[0]);
|
|
4825
5867
|
}
|
|
5868
|
+
/**
|
|
5869
|
+
* Return the [ELIP152](https://github.com/ElementsProject/ELIPs/blob/main/elip-0152.mediawiki) deterministic wallet identifier.
|
|
5870
|
+
* @returns {string}
|
|
5871
|
+
*/
|
|
5872
|
+
dwid() {
|
|
5873
|
+
let deferred2_0;
|
|
5874
|
+
let deferred2_1;
|
|
5875
|
+
try {
|
|
5876
|
+
const ret = wasm.wollet_dwid(this.__wbg_ptr);
|
|
5877
|
+
var ptr1 = ret[0];
|
|
5878
|
+
var len1 = ret[1];
|
|
5879
|
+
if (ret[3]) {
|
|
5880
|
+
ptr1 = 0; len1 = 0;
|
|
5881
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
5882
|
+
}
|
|
5883
|
+
deferred2_0 = ptr1;
|
|
5884
|
+
deferred2_1 = len1;
|
|
5885
|
+
return getStringFromWasm0(ptr1, len1);
|
|
5886
|
+
} finally {
|
|
5887
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
5888
|
+
}
|
|
5889
|
+
}
|
|
4826
5890
|
/**
|
|
4827
5891
|
* Get the full derivation path for an address
|
|
4828
5892
|
*
|
|
@@ -5028,7 +6092,9 @@ class Wollet {
|
|
|
5028
6092
|
return ret !== 0;
|
|
5029
6093
|
}
|
|
5030
6094
|
}
|
|
5031
|
-
|
|
6095
|
+
if (Symbol.dispose) Wollet.prototype[Symbol.dispose] = Wollet.prototype.free;
|
|
6096
|
+
|
|
6097
|
+
exports.Wollet = Wollet;
|
|
5032
6098
|
|
|
5033
6099
|
const WolletDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5034
6100
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5123,7 +6189,9 @@ class WolletDescriptor {
|
|
|
5123
6189
|
return ret !== 0;
|
|
5124
6190
|
}
|
|
5125
6191
|
}
|
|
5126
|
-
|
|
6192
|
+
if (Symbol.dispose) WolletDescriptor.prototype[Symbol.dispose] = WolletDescriptor.prototype.free;
|
|
6193
|
+
|
|
6194
|
+
exports.WolletDescriptor = WolletDescriptor;
|
|
5127
6195
|
|
|
5128
6196
|
const XpubFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5129
6197
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5231,9 +6299,16 @@ class Xpub {
|
|
|
5231
6299
|
return ret !== 0;
|
|
5232
6300
|
}
|
|
5233
6301
|
}
|
|
5234
|
-
|
|
6302
|
+
if (Symbol.dispose) Xpub.prototype[Symbol.dispose] = Xpub.prototype.free;
|
|
6303
|
+
|
|
6304
|
+
exports.Xpub = Xpub;
|
|
6305
|
+
|
|
6306
|
+
exports.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
|
|
6307
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
6308
|
+
return ret;
|
|
6309
|
+
};
|
|
5235
6310
|
|
|
5236
|
-
|
|
6311
|
+
exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
5237
6312
|
const ret = String(arg1);
|
|
5238
6313
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5239
6314
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -5241,159 +6316,191 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
|
5241
6316
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
5242
6317
|
};
|
|
5243
6318
|
|
|
5244
|
-
|
|
6319
|
+
exports.__wbg_abort_67e1b49bf6614565 = function(arg0) {
|
|
5245
6320
|
arg0.abort();
|
|
5246
6321
|
};
|
|
5247
6322
|
|
|
5248
|
-
|
|
6323
|
+
exports.__wbg_abort_d830bf2e9aa6ec5b = function(arg0, arg1) {
|
|
6324
|
+
arg0.abort(arg1);
|
|
6325
|
+
};
|
|
6326
|
+
|
|
6327
|
+
exports.__wbg_addressresult_new = function(arg0) {
|
|
5249
6328
|
const ret = AddressResult.__wrap(arg0);
|
|
5250
6329
|
return ret;
|
|
5251
6330
|
};
|
|
5252
6331
|
|
|
5253
|
-
|
|
6332
|
+
exports.__wbg_amp0_new = function(arg0) {
|
|
5254
6333
|
const ret = Amp0.__wrap(arg0);
|
|
5255
6334
|
return ret;
|
|
5256
6335
|
};
|
|
5257
6336
|
|
|
5258
|
-
|
|
6337
|
+
exports.__wbg_amp0connected_new = function(arg0) {
|
|
5259
6338
|
const ret = Amp0Connected.__wrap(arg0);
|
|
5260
6339
|
return ret;
|
|
5261
6340
|
};
|
|
5262
6341
|
|
|
5263
|
-
|
|
6342
|
+
exports.__wbg_amp0loggedin_new = function(arg0) {
|
|
5264
6343
|
const ret = Amp0LoggedIn.__wrap(arg0);
|
|
5265
6344
|
return ret;
|
|
5266
6345
|
};
|
|
5267
6346
|
|
|
5268
|
-
|
|
6347
|
+
exports.__wbg_append_72a3c0addd2bce38 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
5269
6348
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
5270
6349
|
}, arguments) };
|
|
5271
6350
|
|
|
5272
|
-
|
|
6351
|
+
exports.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() { return handleError(function (arg0) {
|
|
5273
6352
|
const ret = arg0.arrayBuffer();
|
|
5274
6353
|
return ret;
|
|
5275
6354
|
}, arguments) };
|
|
5276
6355
|
|
|
5277
|
-
|
|
6356
|
+
exports.__wbg_assetmeta_new = function(arg0) {
|
|
5278
6357
|
const ret = AssetMeta.__wrap(arg0);
|
|
5279
6358
|
return ret;
|
|
5280
6359
|
};
|
|
5281
6360
|
|
|
5282
|
-
|
|
5283
|
-
const ret = arg0
|
|
6361
|
+
exports.__wbg_boltzsession_new = function(arg0) {
|
|
6362
|
+
const ret = BoltzSession.__wrap(arg0);
|
|
5284
6363
|
return ret;
|
|
5285
6364
|
};
|
|
5286
6365
|
|
|
5287
|
-
|
|
6366
|
+
exports.__wbg_buffer_8d40b1d762fb3c66 = function(arg0) {
|
|
5288
6367
|
const ret = arg0.buffer;
|
|
5289
6368
|
return ret;
|
|
5290
6369
|
};
|
|
5291
6370
|
|
|
5292
|
-
|
|
6371
|
+
exports.__wbg_byteLength_8ccf68e3ac59ff5e = function(arg0) {
|
|
5293
6372
|
const ret = arg0.byteLength;
|
|
5294
6373
|
return ret;
|
|
5295
6374
|
};
|
|
5296
6375
|
|
|
5297
|
-
|
|
6376
|
+
exports.__wbg_byteOffset_673c717c222fef8e = function(arg0) {
|
|
5298
6377
|
const ret = arg0.byteOffset;
|
|
5299
6378
|
return ret;
|
|
5300
6379
|
};
|
|
5301
6380
|
|
|
5302
|
-
|
|
6381
|
+
exports.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
5303
6382
|
const ret = arg0.call(arg1);
|
|
5304
6383
|
return ret;
|
|
5305
6384
|
}, arguments) };
|
|
5306
6385
|
|
|
5307
|
-
|
|
6386
|
+
exports.__wbg_call_641db1bb5db5a579 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
6387
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
6388
|
+
return ret;
|
|
6389
|
+
}, arguments) };
|
|
6390
|
+
|
|
6391
|
+
exports.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5308
6392
|
const ret = arg0.call(arg1, arg2);
|
|
5309
6393
|
return ret;
|
|
5310
6394
|
}, arguments) };
|
|
5311
6395
|
|
|
5312
|
-
|
|
5313
|
-
const ret = arg0
|
|
6396
|
+
exports.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
6397
|
+
const ret = clearTimeout(arg0);
|
|
6398
|
+
return ret;
|
|
6399
|
+
};
|
|
6400
|
+
|
|
6401
|
+
exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
|
|
6402
|
+
const ret = clearTimeout(arg0);
|
|
5314
6403
|
return ret;
|
|
6404
|
+
};
|
|
6405
|
+
|
|
6406
|
+
exports.__wbg_close_6437264570d2d37f = function() { return handleError(function (arg0) {
|
|
6407
|
+
arg0.close();
|
|
6408
|
+
}, arguments) };
|
|
6409
|
+
|
|
6410
|
+
exports.__wbg_close_dadc273a120c03ec = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
6411
|
+
arg0.close(arg1, getStringFromWasm0(arg2, arg3));
|
|
5315
6412
|
}, arguments) };
|
|
5316
6413
|
|
|
5317
|
-
|
|
6414
|
+
exports.__wbg_code_177e3bed72688e58 = function(arg0) {
|
|
6415
|
+
const ret = arg0.code;
|
|
6416
|
+
return ret;
|
|
6417
|
+
};
|
|
6418
|
+
|
|
6419
|
+
exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
5318
6420
|
const ret = arg0.crypto;
|
|
5319
6421
|
return ret;
|
|
5320
6422
|
};
|
|
5321
6423
|
|
|
5322
|
-
|
|
6424
|
+
exports.__wbg_data_8cd553c9786c9361 = function(arg0) {
|
|
5323
6425
|
const ret = arg0.data;
|
|
5324
6426
|
return ret;
|
|
5325
6427
|
};
|
|
5326
6428
|
|
|
5327
|
-
|
|
6429
|
+
exports.__wbg_data_9ab529722bcc4e6c = function(arg0) {
|
|
5328
6430
|
const ret = arg0.data;
|
|
5329
6431
|
return ret;
|
|
5330
6432
|
};
|
|
5331
6433
|
|
|
5332
|
-
|
|
6434
|
+
exports.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
|
|
5333
6435
|
const ret = arg0.done;
|
|
5334
6436
|
return ret;
|
|
5335
6437
|
};
|
|
5336
6438
|
|
|
5337
|
-
|
|
6439
|
+
exports.__wbg_exchangerates_new = function(arg0) {
|
|
6440
|
+
const ret = ExchangeRates.__wrap(arg0);
|
|
6441
|
+
return ret;
|
|
6442
|
+
};
|
|
6443
|
+
|
|
6444
|
+
exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
|
|
5338
6445
|
const ret = fetch(arg0);
|
|
5339
6446
|
return ret;
|
|
5340
6447
|
};
|
|
5341
6448
|
|
|
5342
|
-
|
|
6449
|
+
exports.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
|
|
5343
6450
|
const ret = arg0.fetch(arg1);
|
|
5344
6451
|
return ret;
|
|
5345
6452
|
};
|
|
5346
6453
|
|
|
5347
|
-
|
|
6454
|
+
exports.__wbg_getDevices_abebcc7be30632a7 = function(arg0) {
|
|
5348
6455
|
const ret = arg0.getDevices();
|
|
5349
6456
|
return ret;
|
|
5350
6457
|
};
|
|
5351
6458
|
|
|
5352
|
-
|
|
6459
|
+
exports.__wbg_getPorts_3a0fce782d01e063 = function(arg0) {
|
|
5353
6460
|
const ret = arg0.getPorts();
|
|
5354
6461
|
return ret;
|
|
5355
6462
|
};
|
|
5356
6463
|
|
|
5357
|
-
|
|
6464
|
+
exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
5358
6465
|
arg0.getRandomValues(arg1);
|
|
5359
6466
|
}, arguments) };
|
|
5360
6467
|
|
|
5361
|
-
|
|
6468
|
+
exports.__wbg_getUint8_083c6ed87b45a86a = function(arg0, arg1) {
|
|
5362
6469
|
const ret = arg0.getUint8(arg1 >>> 0);
|
|
5363
6470
|
return ret;
|
|
5364
6471
|
};
|
|
5365
6472
|
|
|
5366
|
-
|
|
6473
|
+
exports.__wbg_getWriter_03d7689e275ac6a4 = function() { return handleError(function (arg0) {
|
|
5367
6474
|
const ret = arg0.getWriter();
|
|
5368
6475
|
return ret;
|
|
5369
6476
|
}, arguments) };
|
|
5370
6477
|
|
|
5371
|
-
|
|
5372
|
-
const ret = Reflect.get(arg0, arg1);
|
|
5373
|
-
return ret;
|
|
5374
|
-
}, arguments) };
|
|
5375
|
-
|
|
5376
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
6478
|
+
exports.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
5377
6479
|
const ret = arg0[arg1 >>> 0];
|
|
5378
6480
|
return ret;
|
|
5379
6481
|
};
|
|
5380
6482
|
|
|
5381
|
-
|
|
6483
|
+
exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
|
|
6484
|
+
const ret = Reflect.get(arg0, arg1);
|
|
6485
|
+
return ret;
|
|
6486
|
+
}, arguments) };
|
|
6487
|
+
|
|
6488
|
+
exports.__wbg_has_b89e451f638123e3 = function() { return handleError(function (arg0, arg1) {
|
|
5382
6489
|
const ret = Reflect.has(arg0, arg1);
|
|
5383
6490
|
return ret;
|
|
5384
6491
|
}, arguments) };
|
|
5385
6492
|
|
|
5386
|
-
|
|
6493
|
+
exports.__wbg_headers_29fec3c72865cd75 = function(arg0) {
|
|
5387
6494
|
const ret = arg0.headers;
|
|
5388
6495
|
return ret;
|
|
5389
6496
|
};
|
|
5390
6497
|
|
|
5391
|
-
|
|
6498
|
+
exports.__wbg_hid_fc50a7126d53c63c = function(arg0) {
|
|
5392
6499
|
const ret = arg0.hid;
|
|
5393
6500
|
return ret;
|
|
5394
6501
|
};
|
|
5395
6502
|
|
|
5396
|
-
|
|
6503
|
+
exports.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
|
|
5397
6504
|
let result;
|
|
5398
6505
|
try {
|
|
5399
6506
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -5404,7 +6511,18 @@ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
|
5404
6511
|
return ret;
|
|
5405
6512
|
};
|
|
5406
6513
|
|
|
5407
|
-
|
|
6514
|
+
exports.__wbg_instanceof_Blob_3db67efd3f1b960f = function(arg0) {
|
|
6515
|
+
let result;
|
|
6516
|
+
try {
|
|
6517
|
+
result = arg0 instanceof Blob;
|
|
6518
|
+
} catch (_) {
|
|
6519
|
+
result = false;
|
|
6520
|
+
}
|
|
6521
|
+
const ret = result;
|
|
6522
|
+
return ret;
|
|
6523
|
+
};
|
|
6524
|
+
|
|
6525
|
+
exports.__wbg_instanceof_HidDevice_ab5b9b1c208f5539 = function(arg0) {
|
|
5408
6526
|
let result;
|
|
5409
6527
|
try {
|
|
5410
6528
|
result = arg0 instanceof HIDDevice;
|
|
@@ -5415,7 +6533,7 @@ module.exports.__wbg_instanceof_HidDevice_281d00db95a533c6 = function(arg0) {
|
|
|
5415
6533
|
return ret;
|
|
5416
6534
|
};
|
|
5417
6535
|
|
|
5418
|
-
|
|
6536
|
+
exports.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
|
|
5419
6537
|
let result;
|
|
5420
6538
|
try {
|
|
5421
6539
|
result = arg0 instanceof Response;
|
|
@@ -5426,7 +6544,7 @@ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
|
5426
6544
|
return ret;
|
|
5427
6545
|
};
|
|
5428
6546
|
|
|
5429
|
-
|
|
6547
|
+
exports.__wbg_instanceof_SerialPort_5f6213e35dce8b2a = function(arg0) {
|
|
5430
6548
|
let result;
|
|
5431
6549
|
try {
|
|
5432
6550
|
result = arg0 instanceof SerialPort;
|
|
@@ -5437,7 +6555,7 @@ module.exports.__wbg_instanceof_SerialPort_cb6aa528c64488f2 = function(arg0) {
|
|
|
5437
6555
|
return ret;
|
|
5438
6556
|
};
|
|
5439
6557
|
|
|
5440
|
-
|
|
6558
|
+
exports.__wbg_instanceof_Window_12d20d558ef92592 = function(arg0) {
|
|
5441
6559
|
let result;
|
|
5442
6560
|
try {
|
|
5443
6561
|
result = arg0 instanceof Window;
|
|
@@ -5448,73 +6566,83 @@ module.exports.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
|
5448
6566
|
return ret;
|
|
5449
6567
|
};
|
|
5450
6568
|
|
|
5451
|
-
|
|
6569
|
+
exports.__wbg_invoiceresponse_new = function(arg0) {
|
|
6570
|
+
const ret = InvoiceResponse.__wrap(arg0);
|
|
6571
|
+
return ret;
|
|
6572
|
+
};
|
|
6573
|
+
|
|
6574
|
+
exports.__wbg_isArray_030cce220591fb41 = function(arg0) {
|
|
5452
6575
|
const ret = Array.isArray(arg0);
|
|
5453
6576
|
return ret;
|
|
5454
6577
|
};
|
|
5455
6578
|
|
|
5456
|
-
|
|
6579
|
+
exports.__wbg_issuance_new = function(arg0) {
|
|
5457
6580
|
const ret = Issuance.__wrap(arg0);
|
|
5458
6581
|
return ret;
|
|
5459
6582
|
};
|
|
5460
6583
|
|
|
5461
|
-
|
|
6584
|
+
exports.__wbg_iterator_f370b34483c71a1c = function() {
|
|
5462
6585
|
const ret = Symbol.iterator;
|
|
5463
6586
|
return ret;
|
|
5464
6587
|
};
|
|
5465
6588
|
|
|
5466
|
-
|
|
6589
|
+
exports.__wbg_jade_new = function(arg0) {
|
|
5467
6590
|
const ret = Jade.__wrap(arg0);
|
|
5468
6591
|
return ret;
|
|
5469
6592
|
};
|
|
5470
6593
|
|
|
5471
|
-
|
|
6594
|
+
exports.__wbg_jadewebsocket_new = function(arg0) {
|
|
5472
6595
|
const ret = JadeWebSocket.__wrap(arg0);
|
|
5473
6596
|
return ret;
|
|
5474
6597
|
};
|
|
5475
6598
|
|
|
5476
|
-
|
|
6599
|
+
exports.__wbg_length_186546c51cd61acd = function(arg0) {
|
|
5477
6600
|
const ret = arg0.length;
|
|
5478
6601
|
return ret;
|
|
5479
6602
|
};
|
|
5480
6603
|
|
|
5481
|
-
|
|
6604
|
+
exports.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
5482
6605
|
const ret = arg0.length;
|
|
5483
6606
|
return ret;
|
|
5484
6607
|
};
|
|
5485
6608
|
|
|
5486
|
-
|
|
6609
|
+
exports.__wbg_log_98728cad0884ed72 = function(arg0, arg1) {
|
|
5487
6610
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5488
6611
|
};
|
|
5489
6612
|
|
|
5490
|
-
|
|
6613
|
+
exports.__wbg_magicroutinghint_new = function(arg0) {
|
|
6614
|
+
const ret = MagicRoutingHint.__wrap(arg0);
|
|
6615
|
+
return ret;
|
|
6616
|
+
};
|
|
6617
|
+
|
|
6618
|
+
exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
5491
6619
|
const ret = arg0.msCrypto;
|
|
5492
6620
|
return ret;
|
|
5493
6621
|
};
|
|
5494
6622
|
|
|
5495
|
-
|
|
6623
|
+
exports.__wbg_navigator_65d5ad763926b868 = function(arg0) {
|
|
5496
6624
|
const ret = arg0.navigator;
|
|
5497
6625
|
return ret;
|
|
5498
6626
|
};
|
|
5499
6627
|
|
|
5500
|
-
|
|
5501
|
-
const ret = new
|
|
6628
|
+
exports.__wbg_new_19c25a3f2fa63a02 = function() {
|
|
6629
|
+
const ret = new Object();
|
|
5502
6630
|
return ret;
|
|
5503
|
-
}
|
|
6631
|
+
};
|
|
5504
6632
|
|
|
5505
|
-
|
|
5506
|
-
const ret = new
|
|
6633
|
+
exports.__wbg_new_1f3a344cf3123716 = function() {
|
|
6634
|
+
const ret = new Array();
|
|
5507
6635
|
return ret;
|
|
5508
|
-
}
|
|
6636
|
+
};
|
|
5509
6637
|
|
|
5510
|
-
|
|
6638
|
+
exports.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
|
|
5511
6639
|
try {
|
|
5512
6640
|
var state0 = {a: arg0, b: arg1};
|
|
5513
6641
|
var cb0 = (arg0, arg1) => {
|
|
5514
6642
|
const a = state0.a;
|
|
5515
6643
|
state0.a = 0;
|
|
5516
6644
|
try {
|
|
5517
|
-
return
|
|
6645
|
+
return __wbg_adapter_632(a, state0.b, arg0, arg1);
|
|
5518
6646
|
} finally {
|
|
5519
6647
|
state0.a = a;
|
|
5520
6648
|
}
|
|
@@ -5526,367 +6654,434 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
|
5526
6654
|
}
|
|
5527
6655
|
};
|
|
5528
6656
|
|
|
5529
|
-
|
|
5530
|
-
const ret = new
|
|
6657
|
+
exports.__wbg_new_2ff1f68f3676ea53 = function() {
|
|
6658
|
+
const ret = new Map();
|
|
5531
6659
|
return ret;
|
|
5532
6660
|
};
|
|
5533
6661
|
|
|
5534
|
-
|
|
5535
|
-
const ret = new
|
|
6662
|
+
exports.__wbg_new_638ebfaedbf32a5e = function(arg0) {
|
|
6663
|
+
const ret = new Uint8Array(arg0);
|
|
5536
6664
|
return ret;
|
|
5537
6665
|
};
|
|
5538
6666
|
|
|
5539
|
-
|
|
5540
|
-
const ret = new
|
|
6667
|
+
exports.__wbg_new_66b9434b4e59b63e = function() { return handleError(function () {
|
|
6668
|
+
const ret = new AbortController();
|
|
5541
6669
|
return ret;
|
|
5542
|
-
};
|
|
6670
|
+
}, arguments) };
|
|
5543
6671
|
|
|
5544
|
-
|
|
5545
|
-
const ret = new
|
|
6672
|
+
exports.__wbg_new_9033836f0fffb971 = function() { return handleError(function (arg0) {
|
|
6673
|
+
const ret = new ReadableStreamDefaultReader(arg0);
|
|
5546
6674
|
return ret;
|
|
5547
6675
|
}, arguments) };
|
|
5548
6676
|
|
|
5549
|
-
|
|
5550
|
-
const ret = new
|
|
6677
|
+
exports.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
|
|
6678
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
5551
6679
|
return ret;
|
|
5552
6680
|
};
|
|
5553
6681
|
|
|
5554
|
-
|
|
5555
|
-
const ret = new
|
|
6682
|
+
exports.__wbg_new_e213f63d18b0de01 = function() { return handleError(function (arg0, arg1) {
|
|
6683
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
5556
6684
|
return ret;
|
|
5557
6685
|
}, arguments) };
|
|
5558
6686
|
|
|
5559
|
-
|
|
5560
|
-
const ret = new
|
|
6687
|
+
exports.__wbg_new_f6e53210afea8e45 = function() { return handleError(function () {
|
|
6688
|
+
const ret = new Headers();
|
|
6689
|
+
return ret;
|
|
6690
|
+
}, arguments) };
|
|
6691
|
+
|
|
6692
|
+
exports.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
|
|
6693
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
5561
6694
|
return ret;
|
|
5562
6695
|
};
|
|
5563
6696
|
|
|
5564
|
-
|
|
5565
|
-
const ret = new
|
|
6697
|
+
exports.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
|
|
6698
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
5566
6699
|
return ret;
|
|
5567
6700
|
};
|
|
5568
6701
|
|
|
5569
|
-
|
|
6702
|
+
exports.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
|
|
5570
6703
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
5571
6704
|
return ret;
|
|
5572
6705
|
};
|
|
5573
6706
|
|
|
5574
|
-
|
|
6707
|
+
exports.__wbg_newwithstr_4fbb4e3ba652aee4 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
6708
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
6709
|
+
return ret;
|
|
6710
|
+
}, arguments) };
|
|
6711
|
+
|
|
6712
|
+
exports.__wbg_newwithstrandinit_b5d168a29a3fd85f = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5575
6713
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
5576
6714
|
return ret;
|
|
5577
6715
|
}, arguments) };
|
|
5578
6716
|
|
|
5579
|
-
|
|
6717
|
+
exports.__wbg_newwithstrsequence_f7e2d4848dd49d98 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5580
6718
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
5581
6719
|
return ret;
|
|
5582
6720
|
}, arguments) };
|
|
5583
6721
|
|
|
5584
|
-
|
|
6722
|
+
exports.__wbg_next_5b3530e612fde77d = function(arg0) {
|
|
5585
6723
|
const ret = arg0.next;
|
|
5586
6724
|
return ret;
|
|
5587
6725
|
};
|
|
5588
6726
|
|
|
5589
|
-
|
|
6727
|
+
exports.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
|
|
5590
6728
|
const ret = arg0.next();
|
|
5591
6729
|
return ret;
|
|
5592
6730
|
}, arguments) };
|
|
5593
6731
|
|
|
5594
|
-
|
|
6732
|
+
exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
5595
6733
|
const ret = arg0.node;
|
|
5596
6734
|
return ret;
|
|
5597
6735
|
};
|
|
5598
6736
|
|
|
5599
|
-
|
|
6737
|
+
exports.__wbg_now_1e80617bcee43265 = function() {
|
|
5600
6738
|
const ret = Date.now();
|
|
5601
6739
|
return ret;
|
|
5602
6740
|
};
|
|
5603
6741
|
|
|
5604
|
-
|
|
6742
|
+
exports.__wbg_now_886b39d7ec380719 = function(arg0) {
|
|
5605
6743
|
const ret = arg0.now();
|
|
5606
6744
|
return ret;
|
|
5607
6745
|
};
|
|
5608
6746
|
|
|
5609
|
-
|
|
6747
|
+
exports.__wbg_open_28c0958dd0e03186 = function(arg0) {
|
|
5610
6748
|
const ret = arg0.open();
|
|
5611
6749
|
return ret;
|
|
5612
6750
|
};
|
|
5613
6751
|
|
|
5614
|
-
|
|
6752
|
+
exports.__wbg_open_65ec985b581cbed8 = function(arg0, arg1) {
|
|
5615
6753
|
const ret = arg0.open(arg1);
|
|
5616
6754
|
return ret;
|
|
5617
6755
|
};
|
|
5618
6756
|
|
|
5619
|
-
|
|
6757
|
+
exports.__wbg_opened_fc99ed1e3c1035f0 = function(arg0) {
|
|
5620
6758
|
const ret = arg0.opened;
|
|
5621
6759
|
return ret;
|
|
5622
6760
|
};
|
|
5623
6761
|
|
|
5624
|
-
|
|
6762
|
+
exports.__wbg_optionwallettxout_new = function(arg0) {
|
|
5625
6763
|
const ret = OptionWalletTxOut.__wrap(arg0);
|
|
5626
6764
|
return ret;
|
|
5627
6765
|
};
|
|
5628
6766
|
|
|
5629
|
-
|
|
6767
|
+
exports.__wbg_outpoint_unwrap = function(arg0) {
|
|
5630
6768
|
const ret = OutPoint.__unwrap(arg0);
|
|
5631
6769
|
return ret;
|
|
5632
6770
|
};
|
|
5633
6771
|
|
|
5634
|
-
|
|
6772
|
+
exports.__wbg_performance_a221af8decc752fb = function(arg0) {
|
|
5635
6773
|
const ret = arg0.performance;
|
|
5636
6774
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5637
6775
|
};
|
|
5638
6776
|
|
|
5639
|
-
|
|
6777
|
+
exports.__wbg_preparepayresponse_new = function(arg0) {
|
|
6778
|
+
const ret = PreparePayResponse.__wrap(arg0);
|
|
6779
|
+
return ret;
|
|
6780
|
+
};
|
|
6781
|
+
|
|
6782
|
+
exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
5640
6783
|
const ret = arg0.process;
|
|
5641
6784
|
return ret;
|
|
5642
6785
|
};
|
|
5643
6786
|
|
|
5644
|
-
|
|
6787
|
+
exports.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
|
|
6788
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
6789
|
+
};
|
|
6790
|
+
|
|
6791
|
+
exports.__wbg_pset_new = function(arg0) {
|
|
5645
6792
|
const ret = Pset.__wrap(arg0);
|
|
5646
6793
|
return ret;
|
|
5647
6794
|
};
|
|
5648
6795
|
|
|
5649
|
-
|
|
6796
|
+
exports.__wbg_psetinput_new = function(arg0) {
|
|
5650
6797
|
const ret = PsetInput.__wrap(arg0);
|
|
5651
6798
|
return ret;
|
|
5652
6799
|
};
|
|
5653
6800
|
|
|
5654
|
-
|
|
6801
|
+
exports.__wbg_psetoutput_new = function(arg0) {
|
|
5655
6802
|
const ret = PsetOutput.__wrap(arg0);
|
|
5656
6803
|
return ret;
|
|
5657
6804
|
};
|
|
5658
6805
|
|
|
5659
|
-
|
|
6806
|
+
exports.__wbg_psetsignatures_new = function(arg0) {
|
|
5660
6807
|
const ret = PsetSignatures.__wrap(arg0);
|
|
5661
6808
|
return ret;
|
|
5662
6809
|
};
|
|
5663
6810
|
|
|
5664
|
-
|
|
6811
|
+
exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
5665
6812
|
const ret = arg0.push(arg1);
|
|
5666
6813
|
return ret;
|
|
5667
6814
|
};
|
|
5668
6815
|
|
|
5669
|
-
|
|
6816
|
+
exports.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
|
|
5670
6817
|
queueMicrotask(arg0);
|
|
5671
6818
|
};
|
|
5672
6819
|
|
|
5673
|
-
|
|
6820
|
+
exports.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
|
|
5674
6821
|
const ret = arg0.queueMicrotask;
|
|
5675
6822
|
return ret;
|
|
5676
6823
|
};
|
|
5677
6824
|
|
|
5678
|
-
|
|
6825
|
+
exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
5679
6826
|
arg0.randomFillSync(arg1);
|
|
5680
6827
|
}, arguments) };
|
|
5681
6828
|
|
|
5682
|
-
|
|
6829
|
+
exports.__wbg_read_bc925c758aa4d897 = function(arg0) {
|
|
5683
6830
|
const ret = arg0.read();
|
|
5684
6831
|
return ret;
|
|
5685
6832
|
};
|
|
5686
6833
|
|
|
5687
|
-
|
|
6834
|
+
exports.__wbg_readable_d8d52c48b16a493f = function(arg0) {
|
|
5688
6835
|
const ret = arg0.readable;
|
|
5689
6836
|
return ret;
|
|
5690
6837
|
};
|
|
5691
6838
|
|
|
5692
|
-
|
|
6839
|
+
exports.__wbg_readyState_b0d20ca4531d3797 = function(arg0) {
|
|
6840
|
+
const ret = arg0.readyState;
|
|
6841
|
+
return ret;
|
|
6842
|
+
};
|
|
6843
|
+
|
|
6844
|
+
exports.__wbg_reason_97efd955be6394bd = function(arg0, arg1) {
|
|
6845
|
+
const ret = arg1.reason;
|
|
6846
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6847
|
+
const len1 = WASM_VECTOR_LEN;
|
|
6848
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
6849
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
6850
|
+
};
|
|
6851
|
+
|
|
6852
|
+
exports.__wbg_recipient_new = function(arg0) {
|
|
5693
6853
|
const ret = Recipient.__wrap(arg0);
|
|
5694
6854
|
return ret;
|
|
5695
6855
|
};
|
|
5696
6856
|
|
|
5697
|
-
|
|
6857
|
+
exports.__wbg_registry_new = function(arg0) {
|
|
5698
6858
|
const ret = Registry.__wrap(arg0);
|
|
5699
6859
|
return ret;
|
|
5700
6860
|
};
|
|
5701
6861
|
|
|
5702
|
-
|
|
6862
|
+
exports.__wbg_requestDevice_225891d9a80a7b19 = function(arg0, arg1) {
|
|
5703
6863
|
const ret = arg0.requestDevice(arg1);
|
|
5704
6864
|
return ret;
|
|
5705
6865
|
};
|
|
5706
6866
|
|
|
5707
|
-
|
|
6867
|
+
exports.__wbg_requestPort_07a56c2addedc9d1 = function(arg0) {
|
|
5708
6868
|
const ret = arg0.requestPort();
|
|
5709
6869
|
return ret;
|
|
5710
6870
|
};
|
|
5711
6871
|
|
|
5712
|
-
|
|
6872
|
+
exports.__wbg_requestPort_379ba5dd17575815 = function(arg0, arg1) {
|
|
5713
6873
|
const ret = arg0.requestPort(arg1);
|
|
5714
6874
|
return ret;
|
|
5715
6875
|
};
|
|
5716
6876
|
|
|
5717
|
-
|
|
6877
|
+
exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
5718
6878
|
const ret = module.require;
|
|
5719
6879
|
return ret;
|
|
5720
6880
|
}, arguments) };
|
|
5721
6881
|
|
|
5722
|
-
|
|
6882
|
+
exports.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
|
|
5723
6883
|
const ret = Promise.resolve(arg0);
|
|
5724
6884
|
return ret;
|
|
5725
6885
|
};
|
|
5726
6886
|
|
|
5727
|
-
|
|
6887
|
+
exports.__wbg_sendReport_c8d0c7c3c3abf30a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5728
6888
|
const ret = arg0.sendReport(arg1, getArrayU8FromWasm0(arg2, arg3));
|
|
5729
6889
|
return ret;
|
|
5730
6890
|
}, arguments) };
|
|
5731
6891
|
|
|
5732
|
-
|
|
5733
|
-
arg0.send(
|
|
6892
|
+
exports.__wbg_send_0f09f4487d932d86 = function() { return handleError(function (arg0, arg1) {
|
|
6893
|
+
arg0.send(arg1);
|
|
5734
6894
|
}, arguments) };
|
|
5735
6895
|
|
|
5736
|
-
|
|
5737
|
-
arg0.send(arg1);
|
|
6896
|
+
exports.__wbg_send_aa9cb445685f0fd0 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
6897
|
+
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
6898
|
+
}, arguments) };
|
|
6899
|
+
|
|
6900
|
+
exports.__wbg_send_bdda9fac7465e036 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
6901
|
+
arg0.send(getStringFromWasm0(arg1, arg2));
|
|
5738
6902
|
}, arguments) };
|
|
5739
6903
|
|
|
5740
|
-
|
|
6904
|
+
exports.__wbg_serial_a0dde47bbd77e1b3 = function(arg0) {
|
|
5741
6905
|
const ret = arg0.serial;
|
|
5742
6906
|
return ret;
|
|
5743
6907
|
};
|
|
5744
6908
|
|
|
5745
|
-
|
|
6909
|
+
exports.__wbg_setTimeout_2966518f28aef92e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5746
6910
|
const ret = arg0.setTimeout(arg1, arg2);
|
|
5747
6911
|
return ret;
|
|
5748
6912
|
}, arguments) };
|
|
5749
6913
|
|
|
5750
|
-
|
|
5751
|
-
|
|
6914
|
+
exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
|
|
6915
|
+
const ret = setTimeout(arg0, arg1);
|
|
6916
|
+
return ret;
|
|
6917
|
+
};
|
|
6918
|
+
|
|
6919
|
+
exports.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
6920
|
+
const ret = setTimeout(arg0, arg1);
|
|
6921
|
+
return ret;
|
|
6922
|
+
}, arguments) };
|
|
6923
|
+
|
|
6924
|
+
exports.__wbg_set_1353b2a5e96bc48c = function(arg0, arg1, arg2) {
|
|
6925
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
5752
6926
|
};
|
|
5753
6927
|
|
|
5754
|
-
|
|
6928
|
+
exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
5755
6929
|
arg0[arg1] = arg2;
|
|
5756
6930
|
};
|
|
5757
6931
|
|
|
5758
|
-
|
|
5759
|
-
|
|
6932
|
+
exports.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
6933
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
6934
|
+
return ret;
|
|
6935
|
+
}, arguments) };
|
|
6936
|
+
|
|
6937
|
+
exports.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
|
|
6938
|
+
arg0[arg1 >>> 0] = arg2;
|
|
5760
6939
|
};
|
|
5761
6940
|
|
|
5762
|
-
|
|
6941
|
+
exports.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
|
|
5763
6942
|
const ret = arg0.set(arg1, arg2);
|
|
5764
6943
|
return ret;
|
|
5765
6944
|
};
|
|
5766
6945
|
|
|
5767
|
-
|
|
6946
|
+
exports.__wbg_setbaudrate_88a136cc0a6d4b97 = function(arg0, arg1) {
|
|
5768
6947
|
arg0.baudRate = arg1 >>> 0;
|
|
5769
6948
|
};
|
|
5770
6949
|
|
|
5771
|
-
|
|
6950
|
+
exports.__wbg_setbinaryType_37f3cd35d7775a47 = function(arg0, arg1) {
|
|
5772
6951
|
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
5773
6952
|
};
|
|
5774
6953
|
|
|
5775
|
-
|
|
6954
|
+
exports.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
|
|
5776
6955
|
arg0.body = arg1;
|
|
5777
6956
|
};
|
|
5778
6957
|
|
|
5779
|
-
|
|
6958
|
+
exports.__wbg_setcache_90ca4ad8a8ad40d3 = function(arg0, arg1) {
|
|
6959
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
6960
|
+
};
|
|
6961
|
+
|
|
6962
|
+
exports.__wbg_setcredentials_9cd60d632c9d5dfc = function(arg0, arg1) {
|
|
5780
6963
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5781
6964
|
};
|
|
5782
6965
|
|
|
5783
|
-
|
|
6966
|
+
exports.__wbg_setfilters_58b1e783022cd737 = function(arg0, arg1) {
|
|
5784
6967
|
arg0.filters = arg1;
|
|
5785
6968
|
};
|
|
5786
6969
|
|
|
5787
|
-
|
|
6970
|
+
exports.__wbg_setfilters_a0bf46d04ea0dd78 = function(arg0, arg1) {
|
|
5788
6971
|
arg0.filters = arg1;
|
|
5789
6972
|
};
|
|
5790
6973
|
|
|
5791
|
-
|
|
6974
|
+
exports.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
|
|
5792
6975
|
arg0.headers = arg1;
|
|
5793
6976
|
};
|
|
5794
6977
|
|
|
5795
|
-
|
|
6978
|
+
exports.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
|
|
5796
6979
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
5797
6980
|
};
|
|
5798
6981
|
|
|
5799
|
-
|
|
6982
|
+
exports.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
|
|
5800
6983
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
5801
6984
|
};
|
|
5802
6985
|
|
|
5803
|
-
|
|
6986
|
+
exports.__wbg_setname_832b43d4602cb930 = function(arg0, arg1, arg2) {
|
|
6987
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
6988
|
+
};
|
|
6989
|
+
|
|
6990
|
+
exports.__wbg_setonclose_159c0332c2d91b09 = function(arg0, arg1) {
|
|
6991
|
+
arg0.onclose = arg1;
|
|
6992
|
+
};
|
|
6993
|
+
|
|
6994
|
+
exports.__wbg_setonerror_5d9bff045f909e89 = function(arg0, arg1) {
|
|
6995
|
+
arg0.onerror = arg1;
|
|
6996
|
+
};
|
|
6997
|
+
|
|
6998
|
+
exports.__wbg_setoninputreport_5d827d5c7285b78f = function(arg0, arg1) {
|
|
5804
6999
|
arg0.oninputreport = arg1;
|
|
5805
7000
|
};
|
|
5806
7001
|
|
|
5807
|
-
|
|
7002
|
+
exports.__wbg_setonmessage_5e486f326638a9da = function(arg0, arg1) {
|
|
5808
7003
|
arg0.onmessage = arg1;
|
|
5809
7004
|
};
|
|
5810
7005
|
|
|
5811
|
-
|
|
7006
|
+
exports.__wbg_setonopen_3e43af381c2901f8 = function(arg0, arg1) {
|
|
5812
7007
|
arg0.onopen = arg1;
|
|
5813
7008
|
};
|
|
5814
7009
|
|
|
5815
|
-
|
|
7010
|
+
exports.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
|
|
5816
7011
|
arg0.signal = arg1;
|
|
5817
7012
|
};
|
|
5818
7013
|
|
|
5819
|
-
|
|
7014
|
+
exports.__wbg_signal_da4d466ce86118b5 = function(arg0) {
|
|
5820
7015
|
const ret = arg0.signal;
|
|
5821
7016
|
return ret;
|
|
5822
7017
|
};
|
|
5823
7018
|
|
|
5824
|
-
|
|
7019
|
+
exports.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
|
|
5825
7020
|
const ret = typeof global === 'undefined' ? null : global;
|
|
5826
7021
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5827
7022
|
};
|
|
5828
7023
|
|
|
5829
|
-
|
|
7024
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
|
|
5830
7025
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
5831
7026
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5832
7027
|
};
|
|
5833
7028
|
|
|
5834
|
-
|
|
7029
|
+
exports.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
|
|
5835
7030
|
const ret = typeof self === 'undefined' ? null : self;
|
|
5836
7031
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5837
7032
|
};
|
|
5838
7033
|
|
|
5839
|
-
|
|
7034
|
+
exports.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
|
|
5840
7035
|
const ret = typeof window === 'undefined' ? null : window;
|
|
5841
7036
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5842
7037
|
};
|
|
5843
7038
|
|
|
5844
|
-
|
|
7039
|
+
exports.__wbg_status_3fea3036088621d6 = function(arg0) {
|
|
5845
7040
|
const ret = arg0.status;
|
|
5846
7041
|
return ret;
|
|
5847
7042
|
};
|
|
5848
7043
|
|
|
5849
|
-
|
|
7044
|
+
exports.__wbg_stringify_b98c93d0a190446a = function() { return handleError(function (arg0) {
|
|
5850
7045
|
const ret = JSON.stringify(arg0);
|
|
5851
7046
|
return ret;
|
|
5852
7047
|
}, arguments) };
|
|
5853
7048
|
|
|
5854
|
-
|
|
7049
|
+
exports.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
|
|
5855
7050
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
5856
7051
|
return ret;
|
|
5857
7052
|
};
|
|
5858
7053
|
|
|
5859
|
-
|
|
7054
|
+
exports.__wbg_text_0f69a215637b9b34 = function() { return handleError(function (arg0) {
|
|
5860
7055
|
const ret = arg0.text();
|
|
5861
7056
|
return ret;
|
|
5862
7057
|
}, arguments) };
|
|
5863
7058
|
|
|
5864
|
-
|
|
5865
|
-
const ret = arg0.then(arg1);
|
|
7059
|
+
exports.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
|
|
7060
|
+
const ret = arg0.then(arg1, arg2);
|
|
5866
7061
|
return ret;
|
|
5867
7062
|
};
|
|
5868
7063
|
|
|
5869
|
-
|
|
5870
|
-
const ret = arg0.then(arg1
|
|
7064
|
+
exports.__wbg_then_e22500defe16819f = function(arg0, arg1) {
|
|
7065
|
+
const ret = arg0.then(arg1);
|
|
5871
7066
|
return ret;
|
|
5872
7067
|
};
|
|
5873
7068
|
|
|
5874
|
-
|
|
7069
|
+
exports.__wbg_transaction_new = function(arg0) {
|
|
5875
7070
|
const ret = Transaction.__wrap(arg0);
|
|
5876
7071
|
return ret;
|
|
5877
7072
|
};
|
|
5878
7073
|
|
|
5879
|
-
|
|
7074
|
+
exports.__wbg_txid_new = function(arg0) {
|
|
5880
7075
|
const ret = Txid.__wrap(arg0);
|
|
5881
7076
|
return ret;
|
|
5882
7077
|
};
|
|
5883
7078
|
|
|
5884
|
-
|
|
7079
|
+
exports.__wbg_update_new = function(arg0) {
|
|
5885
7080
|
const ret = Update.__wrap(arg0);
|
|
5886
7081
|
return ret;
|
|
5887
7082
|
};
|
|
5888
7083
|
|
|
5889
|
-
|
|
7084
|
+
exports.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
|
|
5890
7085
|
const ret = arg1.url;
|
|
5891
7086
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5892
7087
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -5894,166 +7089,196 @@ module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
|
5894
7089
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
5895
7090
|
};
|
|
5896
7091
|
|
|
5897
|
-
|
|
7092
|
+
exports.__wbg_validatedliquidexproposal_unwrap = function(arg0) {
|
|
5898
7093
|
const ret = ValidatedLiquidexProposal.__unwrap(arg0);
|
|
5899
7094
|
return ret;
|
|
5900
7095
|
};
|
|
5901
7096
|
|
|
5902
|
-
|
|
7097
|
+
exports.__wbg_value_dd9372230531eade = function(arg0) {
|
|
5903
7098
|
const ret = arg0.value;
|
|
5904
7099
|
return ret;
|
|
5905
7100
|
};
|
|
5906
7101
|
|
|
5907
|
-
|
|
7102
|
+
exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
5908
7103
|
const ret = arg0.versions;
|
|
5909
7104
|
return ret;
|
|
5910
7105
|
};
|
|
5911
7106
|
|
|
5912
|
-
|
|
7107
|
+
exports.__wbg_wallettx_new = function(arg0) {
|
|
5913
7108
|
const ret = WalletTx.__wrap(arg0);
|
|
5914
7109
|
return ret;
|
|
5915
7110
|
};
|
|
5916
7111
|
|
|
5917
|
-
|
|
7112
|
+
exports.__wbg_wallettxout_new = function(arg0) {
|
|
5918
7113
|
const ret = WalletTxOut.__wrap(arg0);
|
|
5919
7114
|
return ret;
|
|
5920
7115
|
};
|
|
5921
7116
|
|
|
5922
|
-
|
|
5923
|
-
const
|
|
7117
|
+
exports.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
|
|
7118
|
+
const obj = arg0.original;
|
|
7119
|
+
if (obj.cnt-- == 1) {
|
|
7120
|
+
obj.a = 0;
|
|
7121
|
+
return true;
|
|
7122
|
+
}
|
|
7123
|
+
const ret = false;
|
|
5924
7124
|
return ret;
|
|
5925
7125
|
};
|
|
5926
7126
|
|
|
5927
|
-
|
|
5928
|
-
const ret =
|
|
7127
|
+
exports.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
|
|
7128
|
+
const ret = debugString(arg1);
|
|
7129
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7130
|
+
const len1 = WASM_VECTOR_LEN;
|
|
7131
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
7132
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7133
|
+
};
|
|
7134
|
+
|
|
7135
|
+
exports.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
|
|
7136
|
+
const ret = typeof(arg0) === 'function';
|
|
5929
7137
|
return ret;
|
|
5930
7138
|
};
|
|
5931
7139
|
|
|
5932
|
-
|
|
5933
|
-
const
|
|
7140
|
+
exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
7141
|
+
const val = arg0;
|
|
7142
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
5934
7143
|
return ret;
|
|
5935
7144
|
};
|
|
5936
7145
|
|
|
5937
|
-
|
|
5938
|
-
const ret =
|
|
7146
|
+
exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
|
|
7147
|
+
const ret = typeof(arg0) === 'string';
|
|
5939
7148
|
return ret;
|
|
5940
7149
|
};
|
|
5941
7150
|
|
|
5942
|
-
|
|
5943
|
-
const ret = arg0;
|
|
7151
|
+
exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
7152
|
+
const ret = arg0 === undefined;
|
|
5944
7153
|
return ret;
|
|
5945
7154
|
};
|
|
5946
7155
|
|
|
5947
|
-
|
|
5948
|
-
const obj =
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
7156
|
+
exports.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
|
|
7157
|
+
const obj = arg1;
|
|
7158
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
7159
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7160
|
+
var len1 = WASM_VECTOR_LEN;
|
|
7161
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
7162
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7163
|
+
};
|
|
7164
|
+
|
|
7165
|
+
exports.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
|
|
7166
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
7167
|
+
};
|
|
7168
|
+
|
|
7169
|
+
exports.__wbg_wolletdescriptor_new = function(arg0) {
|
|
7170
|
+
const ret = WolletDescriptor.__wrap(arg0);
|
|
5954
7171
|
return ret;
|
|
5955
7172
|
};
|
|
5956
7173
|
|
|
5957
|
-
|
|
5958
|
-
const ret =
|
|
7174
|
+
exports.__wbg_writable_3d863701c7ab161b = function(arg0) {
|
|
7175
|
+
const ret = arg0.writable;
|
|
5959
7176
|
return ret;
|
|
5960
7177
|
};
|
|
5961
7178
|
|
|
5962
|
-
|
|
5963
|
-
const ret =
|
|
7179
|
+
exports.__wbg_write_2e39e04a4c8c9e9d = function(arg0, arg1) {
|
|
7180
|
+
const ret = arg0.write(arg1);
|
|
5964
7181
|
return ret;
|
|
5965
7182
|
};
|
|
5966
7183
|
|
|
5967
|
-
|
|
5968
|
-
const ret =
|
|
7184
|
+
exports.__wbg_xpub_new = function(arg0) {
|
|
7185
|
+
const ret = Xpub.__wrap(arg0);
|
|
5969
7186
|
return ret;
|
|
5970
7187
|
};
|
|
5971
7188
|
|
|
5972
|
-
|
|
5973
|
-
|
|
7189
|
+
exports.__wbindgen_cast_085aac74eb5b1ae3 = function(arg0, arg1) {
|
|
7190
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1304, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7191
|
+
const ret = makeMutClosure(arg0, arg1, 1304, __wbg_adapter_9);
|
|
5974
7192
|
return ret;
|
|
5975
7193
|
};
|
|
5976
7194
|
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
const
|
|
5980
|
-
|
|
5981
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
5982
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7195
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
7196
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
7197
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
7198
|
+
return ret;
|
|
5983
7199
|
};
|
|
5984
7200
|
|
|
5985
|
-
|
|
5986
|
-
|
|
7201
|
+
exports.__wbindgen_cast_3a898675d43a4cee = function(arg0, arg1) {
|
|
7202
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1304, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7203
|
+
const ret = makeMutClosure(arg0, arg1, 1304, __wbg_adapter_9);
|
|
5987
7204
|
return ret;
|
|
5988
7205
|
};
|
|
5989
7206
|
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
const
|
|
5993
|
-
|
|
5994
|
-
table.set(offset + 0, undefined);
|
|
5995
|
-
table.set(offset + 1, null);
|
|
5996
|
-
table.set(offset + 2, true);
|
|
5997
|
-
table.set(offset + 3, false);
|
|
5998
|
-
;
|
|
7207
|
+
exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
7208
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
7209
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
7210
|
+
return ret;
|
|
5999
7211
|
};
|
|
6000
7212
|
|
|
6001
|
-
|
|
6002
|
-
|
|
7213
|
+
exports.__wbindgen_cast_491f832b43cae9d3 = function(arg0, arg1) {
|
|
7214
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1922, function: Function { arguments: [Externref], shim_idx: 1933, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7215
|
+
const ret = makeMutClosure(arg0, arg1, 1922, __wbg_adapter_12);
|
|
6003
7216
|
return ret;
|
|
6004
7217
|
};
|
|
6005
7218
|
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
const ret =
|
|
7219
|
+
exports.__wbindgen_cast_6d461bb7b7d7177d = function(arg0, arg1) {
|
|
7220
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 576, function: Function { arguments: [NamedExternref("HIDInputReportEvent")], shim_idx: 773, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7221
|
+
const ret = makeMutClosure(arg0, arg1, 576, __wbg_adapter_23);
|
|
6009
7222
|
return ret;
|
|
6010
7223
|
};
|
|
6011
7224
|
|
|
6012
|
-
|
|
6013
|
-
|
|
7225
|
+
exports.__wbindgen_cast_91897b7acd28f489 = function(arg0, arg1) {
|
|
7226
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1304, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7227
|
+
const ret = makeMutClosure(arg0, arg1, 1304, __wbg_adapter_9);
|
|
6014
7228
|
return ret;
|
|
6015
7229
|
};
|
|
6016
7230
|
|
|
6017
|
-
|
|
6018
|
-
|
|
7231
|
+
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
7232
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
7233
|
+
const ret = arg0;
|
|
6019
7234
|
return ret;
|
|
6020
7235
|
};
|
|
6021
7236
|
|
|
6022
|
-
|
|
6023
|
-
|
|
7237
|
+
exports.__wbindgen_cast_a7d16f2d8bd2063c = function(arg0, arg1) {
|
|
7238
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1304, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7239
|
+
const ret = makeMutClosure(arg0, arg1, 1304, __wbg_adapter_9);
|
|
6024
7240
|
return ret;
|
|
6025
7241
|
};
|
|
6026
7242
|
|
|
6027
|
-
|
|
6028
|
-
|
|
7243
|
+
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
7244
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
7245
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
6029
7246
|
return ret;
|
|
6030
7247
|
};
|
|
6031
7248
|
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
const ret =
|
|
6035
|
-
|
|
6036
|
-
var len1 = WASM_VECTOR_LEN;
|
|
6037
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
6038
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
7249
|
+
exports.__wbindgen_cast_cbe1d958a67e1e77 = function(arg0, arg1) {
|
|
7250
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1885, function: Function { arguments: [], shim_idx: 1886, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7251
|
+
const ret = makeMutClosure(arg0, arg1, 1885, __wbg_adapter_6);
|
|
7252
|
+
return ret;
|
|
6039
7253
|
};
|
|
6040
7254
|
|
|
6041
|
-
|
|
6042
|
-
|
|
7255
|
+
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
7256
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
7257
|
+
const ret = arg0;
|
|
6043
7258
|
return ret;
|
|
6044
7259
|
};
|
|
6045
7260
|
|
|
6046
|
-
|
|
6047
|
-
|
|
7261
|
+
exports.__wbindgen_cast_ea7c0ccf8adb80f9 = function(arg0, arg1) {
|
|
7262
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1441, function: Function { arguments: [], shim_idx: 1442, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
7263
|
+
const ret = makeMutClosure(arg0, arg1, 1441, __wbg_adapter_32);
|
|
7264
|
+
return ret;
|
|
6048
7265
|
};
|
|
6049
7266
|
|
|
6050
|
-
|
|
6051
|
-
const
|
|
7267
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
7268
|
+
const table = wasm.__wbindgen_export_4;
|
|
7269
|
+
const offset = table.grow(4);
|
|
7270
|
+
table.set(0, undefined);
|
|
7271
|
+
table.set(offset + 0, undefined);
|
|
7272
|
+
table.set(offset + 1, null);
|
|
7273
|
+
table.set(offset + 2, true);
|
|
7274
|
+
table.set(offset + 3, false);
|
|
7275
|
+
;
|
|
7276
|
+
};
|
|
6052
7277
|
|
|
6053
|
-
const
|
|
6054
|
-
const
|
|
6055
|
-
|
|
6056
|
-
|
|
7278
|
+
const wasmPath = `${__dirname}/lwk_wasm_bg.wasm`;
|
|
7279
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
7280
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
7281
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
6057
7282
|
|
|
6058
7283
|
wasm.__wbindgen_start();
|
|
6059
7284
|
|