lwk_node 0.12.0 → 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 +329 -5
- package/lwk_wasm.js +1735 -488
- 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,10 +176,38 @@ function debugString(val) {
|
|
|
207
176
|
return className;
|
|
208
177
|
}
|
|
209
178
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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;
|
|
214
211
|
}
|
|
215
212
|
|
|
216
213
|
function takeFromExternrefTable0(idx) {
|
|
@@ -219,6 +216,12 @@ function takeFromExternrefTable0(idx) {
|
|
|
219
216
|
return value;
|
|
220
217
|
}
|
|
221
218
|
|
|
219
|
+
function _assertClass(instance, klass) {
|
|
220
|
+
if (!(instance instanceof klass)) {
|
|
221
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
222
225
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
223
226
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
224
227
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -228,6 +231,13 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
228
231
|
WASM_VECTOR_LEN = array.length;
|
|
229
232
|
return ptr;
|
|
230
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* @returns {Promise<HIDDevice>}
|
|
236
|
+
*/
|
|
237
|
+
exports.searchLedgerDevice = function() {
|
|
238
|
+
const ret = wasm.searchLedgerDevice();
|
|
239
|
+
return ret;
|
|
240
|
+
};
|
|
231
241
|
|
|
232
242
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
233
243
|
ptr = ptr >>> 0;
|
|
@@ -246,13 +256,6 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
246
256
|
WASM_VECTOR_LEN = arg.length;
|
|
247
257
|
return ptr;
|
|
248
258
|
}
|
|
249
|
-
/**
|
|
250
|
-
* @returns {Promise<HIDDevice>}
|
|
251
|
-
*/
|
|
252
|
-
module.exports.searchLedgerDevice = function() {
|
|
253
|
-
const ret = wasm.searchLedgerDevice();
|
|
254
|
-
return ret;
|
|
255
|
-
};
|
|
256
259
|
|
|
257
260
|
let cachedUint32ArrayMemory0 = null;
|
|
258
261
|
|
|
@@ -269,28 +272,71 @@ function passArray32ToWasm0(arg, malloc) {
|
|
|
269
272
|
WASM_VECTOR_LEN = arg.length;
|
|
270
273
|
return ptr;
|
|
271
274
|
}
|
|
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
|
+
};
|
|
272
306
|
|
|
273
307
|
function getArrayU32FromWasm0(ptr, len) {
|
|
274
308
|
ptr = ptr >>> 0;
|
|
275
309
|
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
276
310
|
}
|
|
277
|
-
function
|
|
278
|
-
wasm.
|
|
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: () => {} }
|
|
@@ -723,8 +777,8 @@ class Amp0Connected {
|
|
|
723
777
|
* This must be signed with [`amp0_sign_challenge()`].
|
|
724
778
|
* @returns {Promise<string>}
|
|
725
779
|
*/
|
|
726
|
-
|
|
727
|
-
const ret = wasm.
|
|
780
|
+
getChallenge() {
|
|
781
|
+
const ret = wasm.amp0connected_getChallenge(this.__wbg_ptr);
|
|
728
782
|
return ret;
|
|
729
783
|
}
|
|
730
784
|
/**
|
|
@@ -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: () => {} }
|
|
@@ -776,8 +832,8 @@ class Amp0LoggedIn {
|
|
|
776
832
|
* List of AMP IDs.
|
|
777
833
|
* @returns {string[]}
|
|
778
834
|
*/
|
|
779
|
-
|
|
780
|
-
const ret = wasm.
|
|
835
|
+
getAmpIds() {
|
|
836
|
+
const ret = wasm.amp0loggedin_getAmpIds(this.__wbg_ptr);
|
|
781
837
|
if (ret[3]) {
|
|
782
838
|
throw takeFromExternrefTable0(ret[2]);
|
|
783
839
|
}
|
|
@@ -792,8 +848,8 @@ class Amp0LoggedIn {
|
|
|
792
848
|
* [`Amp0LoggedIn::create_amp0_account()`]
|
|
793
849
|
* @returns {number}
|
|
794
850
|
*/
|
|
795
|
-
|
|
796
|
-
const ret = wasm.
|
|
851
|
+
nextAccount() {
|
|
852
|
+
const ret = wasm.amp0loggedin_nextAccount(this.__wbg_ptr);
|
|
797
853
|
if (ret[2]) {
|
|
798
854
|
throw takeFromExternrefTable0(ret[1]);
|
|
799
855
|
}
|
|
@@ -808,10 +864,10 @@ class Amp0LoggedIn {
|
|
|
808
864
|
* @param {string} account_xpub
|
|
809
865
|
* @returns {Promise<string>}
|
|
810
866
|
*/
|
|
811
|
-
|
|
867
|
+
createAmp0Account(pointer, account_xpub) {
|
|
812
868
|
const ptr0 = passStringToWasm0(account_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
813
869
|
const len0 = WASM_VECTOR_LEN;
|
|
814
|
-
const ret = wasm.
|
|
870
|
+
const ret = wasm.amp0loggedin_createAmp0Account(this.__wbg_ptr, pointer, ptr0, len0);
|
|
815
871
|
return ret;
|
|
816
872
|
}
|
|
817
873
|
/**
|
|
@@ -820,16 +876,18 @@ class Amp0LoggedIn {
|
|
|
820
876
|
* @param {string} password
|
|
821
877
|
* @returns {Promise<void>}
|
|
822
878
|
*/
|
|
823
|
-
|
|
879
|
+
createWatchOnly(username, password) {
|
|
824
880
|
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
825
881
|
const len0 = WASM_VECTOR_LEN;
|
|
826
882
|
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
827
883
|
const len1 = WASM_VECTOR_LEN;
|
|
828
|
-
const ret = wasm.
|
|
884
|
+
const ret = wasm.amp0loggedin_createWatchOnly(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
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,150 +1485,498 @@ 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
|
-
|
|
1630
|
+
_assertClass(esplora_client, EsploraClient);
|
|
1631
|
+
const ret = wasm.boltzsessionbuilder_new(network.__wbg_ptr, esplora_client.__wbg_ptr);
|
|
1632
|
+
if (ret[2]) {
|
|
1633
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1634
|
+
}
|
|
1635
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
1636
|
+
BoltzSessionBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
1637
|
+
return this;
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* Set the timeout for creating swaps
|
|
1641
|
+
*
|
|
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
|
|
1653
|
+
*
|
|
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);
|
|
1556
1980
|
if (ret[2]) {
|
|
1557
1981
|
throw takeFromExternrefTable0(ret[1]);
|
|
1558
1982
|
}
|
|
@@ -1635,7 +2059,198 @@ class EsploraClient {
|
|
|
1635
2059
|
return ret;
|
|
1636
2060
|
}
|
|
1637
2061
|
}
|
|
1638
|
-
|
|
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
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
/**
|
|
2199
|
+
* Return the bolt11 invoice string
|
|
2200
|
+
* @returns {string}
|
|
2201
|
+
*/
|
|
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
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
/**
|
|
2215
|
+
* @returns {string}
|
|
2216
|
+
*/
|
|
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
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
/**
|
|
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}
|
|
2235
|
+
*/
|
|
2236
|
+
fee() {
|
|
2237
|
+
const ret = wasm.invoiceresponse_fee(this.__wbg_ptr);
|
|
2238
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
|
2239
|
+
}
|
|
2240
|
+
/**
|
|
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>}
|
|
2244
|
+
*/
|
|
2245
|
+
completePay() {
|
|
2246
|
+
const ptr = this.__destroy_into_raw();
|
|
2247
|
+
const ret = wasm.invoiceresponse_completePay(ptr);
|
|
2248
|
+
return ret;
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
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: () => {} }
|
|
@@ -2068,50 +2689,202 @@ class LedgerWeb {
|
|
|
2068
2689
|
const ret = wasm.ledgerweb_deriveXpub(this.__wbg_ptr, ptr0, len0);
|
|
2069
2690
|
return ret;
|
|
2070
2691
|
}
|
|
2071
|
-
/**
|
|
2072
|
-
* @returns {Promise<string>}
|
|
2073
|
-
*/
|
|
2074
|
-
slip77MasterBlindingKey() {
|
|
2075
|
-
const ret = wasm.ledgerweb_slip77MasterBlindingKey(this.__wbg_ptr);
|
|
2076
|
-
return ret;
|
|
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);
|
|
2837
|
+
return ptr;
|
|
2077
2838
|
}
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
const ret = wasm.ledgerweb_fingerprint(this.__wbg_ptr);
|
|
2083
|
-
return ret;
|
|
2839
|
+
|
|
2840
|
+
free() {
|
|
2841
|
+
const ptr = this.__destroy_into_raw();
|
|
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: () => {} }
|
|
@@ -3514,16 +4509,53 @@ class Signer {
|
|
|
3514
4509
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
3515
4510
|
}
|
|
3516
4511
|
}
|
|
4512
|
+
/**
|
|
4513
|
+
* Return the signer fingerprint
|
|
4514
|
+
* @returns {string}
|
|
4515
|
+
*/
|
|
4516
|
+
fingerprint() {
|
|
4517
|
+
let deferred2_0;
|
|
4518
|
+
let deferred2_1;
|
|
4519
|
+
try {
|
|
4520
|
+
const ret = wasm.signer_fingerprint(this.__wbg_ptr);
|
|
4521
|
+
var ptr1 = ret[0];
|
|
4522
|
+
var len1 = ret[1];
|
|
4523
|
+
if (ret[3]) {
|
|
4524
|
+
ptr1 = 0; len1 = 0;
|
|
4525
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
4526
|
+
}
|
|
4527
|
+
deferred2_0 = ptr1;
|
|
4528
|
+
deferred2_1 = len1;
|
|
4529
|
+
return getStringFromWasm0(ptr1, len1);
|
|
4530
|
+
} finally {
|
|
4531
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
4532
|
+
}
|
|
4533
|
+
}
|
|
3517
4534
|
/**
|
|
3518
4535
|
* Return the mnemonic of the signer
|
|
3519
4536
|
* @returns {Mnemonic}
|
|
3520
4537
|
*/
|
|
3521
|
-
mnemonic() {
|
|
3522
|
-
const ret = wasm.signer_mnemonic(this.__wbg_ptr);
|
|
3523
|
-
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]);
|
|
3524
4554
|
}
|
|
3525
4555
|
}
|
|
3526
|
-
|
|
4556
|
+
if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
|
|
4557
|
+
|
|
4558
|
+
exports.Signer = Signer;
|
|
3527
4559
|
|
|
3528
4560
|
const SinglesigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3529
4561
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3564,7 +4596,9 @@ class Singlesig {
|
|
|
3564
4596
|
return Singlesig.__wrap(ret[0]);
|
|
3565
4597
|
}
|
|
3566
4598
|
}
|
|
3567
|
-
|
|
4599
|
+
if (Symbol.dispose) Singlesig.prototype[Symbol.dispose] = Singlesig.prototype.free;
|
|
4600
|
+
|
|
4601
|
+
exports.Singlesig = Singlesig;
|
|
3568
4602
|
|
|
3569
4603
|
const TipFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3570
4604
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3623,7 +4657,9 @@ class Tip {
|
|
|
3623
4657
|
return ret === 0x100000001 ? undefined : ret;
|
|
3624
4658
|
}
|
|
3625
4659
|
}
|
|
3626
|
-
|
|
4660
|
+
if (Symbol.dispose) Tip.prototype[Symbol.dispose] = Tip.prototype.free;
|
|
4661
|
+
|
|
4662
|
+
exports.Tip = Tip;
|
|
3627
4663
|
|
|
3628
4664
|
const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3629
4665
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3716,7 +4752,9 @@ class Transaction {
|
|
|
3716
4752
|
}
|
|
3717
4753
|
}
|
|
3718
4754
|
}
|
|
3719
|
-
|
|
4755
|
+
if (Symbol.dispose) Transaction.prototype[Symbol.dispose] = Transaction.prototype.free;
|
|
4756
|
+
|
|
4757
|
+
exports.Transaction = Transaction;
|
|
3720
4758
|
|
|
3721
4759
|
const TxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3722
4760
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3751,7 +4789,7 @@ class TxBuilder {
|
|
|
3751
4789
|
*/
|
|
3752
4790
|
constructor(network) {
|
|
3753
4791
|
_assertClass(network, Network);
|
|
3754
|
-
const ret = wasm.
|
|
4792
|
+
const ret = wasm.txbuilder_new(network.__wbg_ptr);
|
|
3755
4793
|
this.__wbg_ptr = ret >>> 0;
|
|
3756
4794
|
TxBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
3757
4795
|
return this;
|
|
@@ -4038,8 +5076,20 @@ class TxBuilder {
|
|
|
4038
5076
|
}
|
|
4039
5077
|
return TxBuilder.__wrap(ret[0]);
|
|
4040
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
|
+
}
|
|
4041
5089
|
}
|
|
4042
|
-
|
|
5090
|
+
if (Symbol.dispose) TxBuilder.prototype[Symbol.dispose] = TxBuilder.prototype.free;
|
|
5091
|
+
|
|
5092
|
+
exports.TxBuilder = TxBuilder;
|
|
4043
5093
|
|
|
4044
5094
|
const TxOutSecretsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4045
5095
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4161,7 +5211,9 @@ class TxOutSecrets {
|
|
|
4161
5211
|
}
|
|
4162
5212
|
}
|
|
4163
5213
|
}
|
|
4164
|
-
|
|
5214
|
+
if (Symbol.dispose) TxOutSecrets.prototype[Symbol.dispose] = TxOutSecrets.prototype.free;
|
|
5215
|
+
|
|
5216
|
+
exports.TxOutSecrets = TxOutSecrets;
|
|
4165
5217
|
|
|
4166
5218
|
const TxidFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4167
5219
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4225,7 +5277,9 @@ class Txid {
|
|
|
4225
5277
|
}
|
|
4226
5278
|
}
|
|
4227
5279
|
}
|
|
4228
|
-
|
|
5280
|
+
if (Symbol.dispose) Txid.prototype[Symbol.dispose] = Txid.prototype.free;
|
|
5281
|
+
|
|
5282
|
+
exports.Txid = Txid;
|
|
4229
5283
|
|
|
4230
5284
|
const UnvalidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4231
5285
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4330,7 +5384,9 @@ class UnvalidatedLiquidexProposal {
|
|
|
4330
5384
|
}
|
|
4331
5385
|
}
|
|
4332
5386
|
}
|
|
4333
|
-
|
|
5387
|
+
if (Symbol.dispose) UnvalidatedLiquidexProposal.prototype[Symbol.dispose] = UnvalidatedLiquidexProposal.prototype.free;
|
|
5388
|
+
|
|
5389
|
+
exports.UnvalidatedLiquidexProposal = UnvalidatedLiquidexProposal;
|
|
4334
5390
|
|
|
4335
5391
|
const UpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4336
5392
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4449,7 +5505,9 @@ class Update {
|
|
|
4449
5505
|
wasm.update_prune(this.__wbg_ptr, wollet.__wbg_ptr);
|
|
4450
5506
|
}
|
|
4451
5507
|
}
|
|
4452
|
-
|
|
5508
|
+
if (Symbol.dispose) Update.prototype[Symbol.dispose] = Update.prototype.free;
|
|
5509
|
+
|
|
5510
|
+
exports.Update = Update;
|
|
4453
5511
|
|
|
4454
5512
|
const ValidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4455
5513
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4515,7 +5573,9 @@ class ValidatedLiquidexProposal {
|
|
|
4515
5573
|
}
|
|
4516
5574
|
}
|
|
4517
5575
|
}
|
|
4518
|
-
|
|
5576
|
+
if (Symbol.dispose) ValidatedLiquidexProposal.prototype[Symbol.dispose] = ValidatedLiquidexProposal.prototype.free;
|
|
5577
|
+
|
|
5578
|
+
exports.ValidatedLiquidexProposal = ValidatedLiquidexProposal;
|
|
4519
5579
|
|
|
4520
5580
|
const WalletTxFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4521
5581
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4655,7 +5715,9 @@ class WalletTx {
|
|
|
4655
5715
|
}
|
|
4656
5716
|
}
|
|
4657
5717
|
}
|
|
4658
|
-
|
|
5718
|
+
if (Symbol.dispose) WalletTx.prototype[Symbol.dispose] = WalletTx.prototype.free;
|
|
5719
|
+
|
|
5720
|
+
exports.WalletTx = WalletTx;
|
|
4659
5721
|
|
|
4660
5722
|
const WalletTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4661
5723
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4741,7 +5803,9 @@ class WalletTxOut {
|
|
|
4741
5803
|
return Address.__wrap(ret);
|
|
4742
5804
|
}
|
|
4743
5805
|
}
|
|
4744
|
-
|
|
5806
|
+
if (Symbol.dispose) WalletTxOut.prototype[Symbol.dispose] = WalletTxOut.prototype.free;
|
|
5807
|
+
|
|
5808
|
+
exports.WalletTxOut = WalletTxOut;
|
|
4745
5809
|
|
|
4746
5810
|
const WolletFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4747
5811
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4801,6 +5865,28 @@ class Wollet {
|
|
|
4801
5865
|
}
|
|
4802
5866
|
return AddressResult.__wrap(ret[0]);
|
|
4803
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
|
+
}
|
|
4804
5890
|
/**
|
|
4805
5891
|
* Get the full derivation path for an address
|
|
4806
5892
|
*
|
|
@@ -5006,7 +6092,9 @@ class Wollet {
|
|
|
5006
6092
|
return ret !== 0;
|
|
5007
6093
|
}
|
|
5008
6094
|
}
|
|
5009
|
-
|
|
6095
|
+
if (Symbol.dispose) Wollet.prototype[Symbol.dispose] = Wollet.prototype.free;
|
|
6096
|
+
|
|
6097
|
+
exports.Wollet = Wollet;
|
|
5010
6098
|
|
|
5011
6099
|
const WolletDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5012
6100
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5101,7 +6189,9 @@ class WolletDescriptor {
|
|
|
5101
6189
|
return ret !== 0;
|
|
5102
6190
|
}
|
|
5103
6191
|
}
|
|
5104
|
-
|
|
6192
|
+
if (Symbol.dispose) WolletDescriptor.prototype[Symbol.dispose] = WolletDescriptor.prototype.free;
|
|
6193
|
+
|
|
6194
|
+
exports.WolletDescriptor = WolletDescriptor;
|
|
5105
6195
|
|
|
5106
6196
|
const XpubFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5107
6197
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -5209,9 +6299,16 @@ class Xpub {
|
|
|
5209
6299
|
return ret !== 0;
|
|
5210
6300
|
}
|
|
5211
6301
|
}
|
|
5212
|
-
|
|
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
|
+
};
|
|
5213
6310
|
|
|
5214
|
-
|
|
6311
|
+
exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
5215
6312
|
const ret = String(arg1);
|
|
5216
6313
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5217
6314
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -5219,159 +6316,191 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
|
5219
6316
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
5220
6317
|
};
|
|
5221
6318
|
|
|
5222
|
-
|
|
6319
|
+
exports.__wbg_abort_67e1b49bf6614565 = function(arg0) {
|
|
5223
6320
|
arg0.abort();
|
|
5224
6321
|
};
|
|
5225
6322
|
|
|
5226
|
-
|
|
6323
|
+
exports.__wbg_abort_d830bf2e9aa6ec5b = function(arg0, arg1) {
|
|
6324
|
+
arg0.abort(arg1);
|
|
6325
|
+
};
|
|
6326
|
+
|
|
6327
|
+
exports.__wbg_addressresult_new = function(arg0) {
|
|
5227
6328
|
const ret = AddressResult.__wrap(arg0);
|
|
5228
6329
|
return ret;
|
|
5229
6330
|
};
|
|
5230
6331
|
|
|
5231
|
-
|
|
6332
|
+
exports.__wbg_amp0_new = function(arg0) {
|
|
5232
6333
|
const ret = Amp0.__wrap(arg0);
|
|
5233
6334
|
return ret;
|
|
5234
6335
|
};
|
|
5235
6336
|
|
|
5236
|
-
|
|
6337
|
+
exports.__wbg_amp0connected_new = function(arg0) {
|
|
5237
6338
|
const ret = Amp0Connected.__wrap(arg0);
|
|
5238
6339
|
return ret;
|
|
5239
6340
|
};
|
|
5240
6341
|
|
|
5241
|
-
|
|
6342
|
+
exports.__wbg_amp0loggedin_new = function(arg0) {
|
|
5242
6343
|
const ret = Amp0LoggedIn.__wrap(arg0);
|
|
5243
6344
|
return ret;
|
|
5244
6345
|
};
|
|
5245
6346
|
|
|
5246
|
-
|
|
6347
|
+
exports.__wbg_append_72a3c0addd2bce38 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
5247
6348
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
5248
6349
|
}, arguments) };
|
|
5249
6350
|
|
|
5250
|
-
|
|
6351
|
+
exports.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() { return handleError(function (arg0) {
|
|
5251
6352
|
const ret = arg0.arrayBuffer();
|
|
5252
6353
|
return ret;
|
|
5253
6354
|
}, arguments) };
|
|
5254
6355
|
|
|
5255
|
-
|
|
6356
|
+
exports.__wbg_assetmeta_new = function(arg0) {
|
|
5256
6357
|
const ret = AssetMeta.__wrap(arg0);
|
|
5257
6358
|
return ret;
|
|
5258
6359
|
};
|
|
5259
6360
|
|
|
5260
|
-
|
|
5261
|
-
const ret = arg0
|
|
6361
|
+
exports.__wbg_boltzsession_new = function(arg0) {
|
|
6362
|
+
const ret = BoltzSession.__wrap(arg0);
|
|
5262
6363
|
return ret;
|
|
5263
6364
|
};
|
|
5264
6365
|
|
|
5265
|
-
|
|
6366
|
+
exports.__wbg_buffer_8d40b1d762fb3c66 = function(arg0) {
|
|
5266
6367
|
const ret = arg0.buffer;
|
|
5267
6368
|
return ret;
|
|
5268
6369
|
};
|
|
5269
6370
|
|
|
5270
|
-
|
|
6371
|
+
exports.__wbg_byteLength_8ccf68e3ac59ff5e = function(arg0) {
|
|
5271
6372
|
const ret = arg0.byteLength;
|
|
5272
6373
|
return ret;
|
|
5273
6374
|
};
|
|
5274
6375
|
|
|
5275
|
-
|
|
6376
|
+
exports.__wbg_byteOffset_673c717c222fef8e = function(arg0) {
|
|
5276
6377
|
const ret = arg0.byteOffset;
|
|
5277
6378
|
return ret;
|
|
5278
6379
|
};
|
|
5279
6380
|
|
|
5280
|
-
|
|
6381
|
+
exports.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
|
|
5281
6382
|
const ret = arg0.call(arg1);
|
|
5282
6383
|
return ret;
|
|
5283
6384
|
}, arguments) };
|
|
5284
6385
|
|
|
5285
|
-
|
|
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) {
|
|
5286
6392
|
const ret = arg0.call(arg1, arg2);
|
|
5287
6393
|
return ret;
|
|
5288
6394
|
}, arguments) };
|
|
5289
6395
|
|
|
5290
|
-
|
|
5291
|
-
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);
|
|
5292
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));
|
|
5293
6412
|
}, arguments) };
|
|
5294
6413
|
|
|
5295
|
-
|
|
6414
|
+
exports.__wbg_code_177e3bed72688e58 = function(arg0) {
|
|
6415
|
+
const ret = arg0.code;
|
|
6416
|
+
return ret;
|
|
6417
|
+
};
|
|
6418
|
+
|
|
6419
|
+
exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
5296
6420
|
const ret = arg0.crypto;
|
|
5297
6421
|
return ret;
|
|
5298
6422
|
};
|
|
5299
6423
|
|
|
5300
|
-
|
|
6424
|
+
exports.__wbg_data_8cd553c9786c9361 = function(arg0) {
|
|
5301
6425
|
const ret = arg0.data;
|
|
5302
6426
|
return ret;
|
|
5303
6427
|
};
|
|
5304
6428
|
|
|
5305
|
-
|
|
6429
|
+
exports.__wbg_data_9ab529722bcc4e6c = function(arg0) {
|
|
5306
6430
|
const ret = arg0.data;
|
|
5307
6431
|
return ret;
|
|
5308
6432
|
};
|
|
5309
6433
|
|
|
5310
|
-
|
|
6434
|
+
exports.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
|
|
5311
6435
|
const ret = arg0.done;
|
|
5312
6436
|
return ret;
|
|
5313
6437
|
};
|
|
5314
6438
|
|
|
5315
|
-
|
|
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) {
|
|
5316
6445
|
const ret = fetch(arg0);
|
|
5317
6446
|
return ret;
|
|
5318
6447
|
};
|
|
5319
6448
|
|
|
5320
|
-
|
|
6449
|
+
exports.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
|
|
5321
6450
|
const ret = arg0.fetch(arg1);
|
|
5322
6451
|
return ret;
|
|
5323
6452
|
};
|
|
5324
6453
|
|
|
5325
|
-
|
|
6454
|
+
exports.__wbg_getDevices_abebcc7be30632a7 = function(arg0) {
|
|
5326
6455
|
const ret = arg0.getDevices();
|
|
5327
6456
|
return ret;
|
|
5328
6457
|
};
|
|
5329
6458
|
|
|
5330
|
-
|
|
6459
|
+
exports.__wbg_getPorts_3a0fce782d01e063 = function(arg0) {
|
|
5331
6460
|
const ret = arg0.getPorts();
|
|
5332
6461
|
return ret;
|
|
5333
6462
|
};
|
|
5334
6463
|
|
|
5335
|
-
|
|
6464
|
+
exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
5336
6465
|
arg0.getRandomValues(arg1);
|
|
5337
6466
|
}, arguments) };
|
|
5338
6467
|
|
|
5339
|
-
|
|
6468
|
+
exports.__wbg_getUint8_083c6ed87b45a86a = function(arg0, arg1) {
|
|
5340
6469
|
const ret = arg0.getUint8(arg1 >>> 0);
|
|
5341
6470
|
return ret;
|
|
5342
6471
|
};
|
|
5343
6472
|
|
|
5344
|
-
|
|
6473
|
+
exports.__wbg_getWriter_03d7689e275ac6a4 = function() { return handleError(function (arg0) {
|
|
5345
6474
|
const ret = arg0.getWriter();
|
|
5346
6475
|
return ret;
|
|
5347
6476
|
}, arguments) };
|
|
5348
6477
|
|
|
5349
|
-
|
|
5350
|
-
const ret = Reflect.get(arg0, arg1);
|
|
5351
|
-
return ret;
|
|
5352
|
-
}, arguments) };
|
|
5353
|
-
|
|
5354
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
6478
|
+
exports.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
|
|
5355
6479
|
const ret = arg0[arg1 >>> 0];
|
|
5356
6480
|
return ret;
|
|
5357
6481
|
};
|
|
5358
6482
|
|
|
5359
|
-
|
|
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) {
|
|
5360
6489
|
const ret = Reflect.has(arg0, arg1);
|
|
5361
6490
|
return ret;
|
|
5362
6491
|
}, arguments) };
|
|
5363
6492
|
|
|
5364
|
-
|
|
6493
|
+
exports.__wbg_headers_29fec3c72865cd75 = function(arg0) {
|
|
5365
6494
|
const ret = arg0.headers;
|
|
5366
6495
|
return ret;
|
|
5367
6496
|
};
|
|
5368
6497
|
|
|
5369
|
-
|
|
6498
|
+
exports.__wbg_hid_fc50a7126d53c63c = function(arg0) {
|
|
5370
6499
|
const ret = arg0.hid;
|
|
5371
6500
|
return ret;
|
|
5372
6501
|
};
|
|
5373
6502
|
|
|
5374
|
-
|
|
6503
|
+
exports.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
|
|
5375
6504
|
let result;
|
|
5376
6505
|
try {
|
|
5377
6506
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -5382,7 +6511,18 @@ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
|
5382
6511
|
return ret;
|
|
5383
6512
|
};
|
|
5384
6513
|
|
|
5385
|
-
|
|
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) {
|
|
5386
6526
|
let result;
|
|
5387
6527
|
try {
|
|
5388
6528
|
result = arg0 instanceof HIDDevice;
|
|
@@ -5393,7 +6533,7 @@ module.exports.__wbg_instanceof_HidDevice_281d00db95a533c6 = function(arg0) {
|
|
|
5393
6533
|
return ret;
|
|
5394
6534
|
};
|
|
5395
6535
|
|
|
5396
|
-
|
|
6536
|
+
exports.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
|
|
5397
6537
|
let result;
|
|
5398
6538
|
try {
|
|
5399
6539
|
result = arg0 instanceof Response;
|
|
@@ -5404,7 +6544,7 @@ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
|
5404
6544
|
return ret;
|
|
5405
6545
|
};
|
|
5406
6546
|
|
|
5407
|
-
|
|
6547
|
+
exports.__wbg_instanceof_SerialPort_5f6213e35dce8b2a = function(arg0) {
|
|
5408
6548
|
let result;
|
|
5409
6549
|
try {
|
|
5410
6550
|
result = arg0 instanceof SerialPort;
|
|
@@ -5415,7 +6555,7 @@ module.exports.__wbg_instanceof_SerialPort_cb6aa528c64488f2 = function(arg0) {
|
|
|
5415
6555
|
return ret;
|
|
5416
6556
|
};
|
|
5417
6557
|
|
|
5418
|
-
|
|
6558
|
+
exports.__wbg_instanceof_Window_12d20d558ef92592 = function(arg0) {
|
|
5419
6559
|
let result;
|
|
5420
6560
|
try {
|
|
5421
6561
|
result = arg0 instanceof Window;
|
|
@@ -5426,73 +6566,83 @@ module.exports.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
|
5426
6566
|
return ret;
|
|
5427
6567
|
};
|
|
5428
6568
|
|
|
5429
|
-
|
|
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) {
|
|
5430
6575
|
const ret = Array.isArray(arg0);
|
|
5431
6576
|
return ret;
|
|
5432
6577
|
};
|
|
5433
6578
|
|
|
5434
|
-
|
|
6579
|
+
exports.__wbg_issuance_new = function(arg0) {
|
|
5435
6580
|
const ret = Issuance.__wrap(arg0);
|
|
5436
6581
|
return ret;
|
|
5437
6582
|
};
|
|
5438
6583
|
|
|
5439
|
-
|
|
6584
|
+
exports.__wbg_iterator_f370b34483c71a1c = function() {
|
|
5440
6585
|
const ret = Symbol.iterator;
|
|
5441
6586
|
return ret;
|
|
5442
6587
|
};
|
|
5443
6588
|
|
|
5444
|
-
|
|
6589
|
+
exports.__wbg_jade_new = function(arg0) {
|
|
5445
6590
|
const ret = Jade.__wrap(arg0);
|
|
5446
6591
|
return ret;
|
|
5447
6592
|
};
|
|
5448
6593
|
|
|
5449
|
-
|
|
6594
|
+
exports.__wbg_jadewebsocket_new = function(arg0) {
|
|
5450
6595
|
const ret = JadeWebSocket.__wrap(arg0);
|
|
5451
6596
|
return ret;
|
|
5452
6597
|
};
|
|
5453
6598
|
|
|
5454
|
-
|
|
6599
|
+
exports.__wbg_length_186546c51cd61acd = function(arg0) {
|
|
5455
6600
|
const ret = arg0.length;
|
|
5456
6601
|
return ret;
|
|
5457
6602
|
};
|
|
5458
6603
|
|
|
5459
|
-
|
|
6604
|
+
exports.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
|
|
5460
6605
|
const ret = arg0.length;
|
|
5461
6606
|
return ret;
|
|
5462
6607
|
};
|
|
5463
6608
|
|
|
5464
|
-
|
|
6609
|
+
exports.__wbg_log_98728cad0884ed72 = function(arg0, arg1) {
|
|
5465
6610
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5466
6611
|
};
|
|
5467
6612
|
|
|
5468
|
-
|
|
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) {
|
|
5469
6619
|
const ret = arg0.msCrypto;
|
|
5470
6620
|
return ret;
|
|
5471
6621
|
};
|
|
5472
6622
|
|
|
5473
|
-
|
|
6623
|
+
exports.__wbg_navigator_65d5ad763926b868 = function(arg0) {
|
|
5474
6624
|
const ret = arg0.navigator;
|
|
5475
6625
|
return ret;
|
|
5476
6626
|
};
|
|
5477
6627
|
|
|
5478
|
-
|
|
5479
|
-
const ret = new
|
|
6628
|
+
exports.__wbg_new_19c25a3f2fa63a02 = function() {
|
|
6629
|
+
const ret = new Object();
|
|
5480
6630
|
return ret;
|
|
5481
|
-
}
|
|
6631
|
+
};
|
|
5482
6632
|
|
|
5483
|
-
|
|
5484
|
-
const ret = new
|
|
6633
|
+
exports.__wbg_new_1f3a344cf3123716 = function() {
|
|
6634
|
+
const ret = new Array();
|
|
5485
6635
|
return ret;
|
|
5486
|
-
}
|
|
6636
|
+
};
|
|
5487
6637
|
|
|
5488
|
-
|
|
6638
|
+
exports.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
|
|
5489
6639
|
try {
|
|
5490
6640
|
var state0 = {a: arg0, b: arg1};
|
|
5491
6641
|
var cb0 = (arg0, arg1) => {
|
|
5492
6642
|
const a = state0.a;
|
|
5493
6643
|
state0.a = 0;
|
|
5494
6644
|
try {
|
|
5495
|
-
return
|
|
6645
|
+
return __wbg_adapter_632(a, state0.b, arg0, arg1);
|
|
5496
6646
|
} finally {
|
|
5497
6647
|
state0.a = a;
|
|
5498
6648
|
}
|
|
@@ -5504,367 +6654,434 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
|
5504
6654
|
}
|
|
5505
6655
|
};
|
|
5506
6656
|
|
|
5507
|
-
|
|
5508
|
-
const ret = new
|
|
6657
|
+
exports.__wbg_new_2ff1f68f3676ea53 = function() {
|
|
6658
|
+
const ret = new Map();
|
|
5509
6659
|
return ret;
|
|
5510
6660
|
};
|
|
5511
6661
|
|
|
5512
|
-
|
|
5513
|
-
const ret = new
|
|
6662
|
+
exports.__wbg_new_638ebfaedbf32a5e = function(arg0) {
|
|
6663
|
+
const ret = new Uint8Array(arg0);
|
|
5514
6664
|
return ret;
|
|
5515
6665
|
};
|
|
5516
6666
|
|
|
5517
|
-
|
|
5518
|
-
const ret = new
|
|
6667
|
+
exports.__wbg_new_66b9434b4e59b63e = function() { return handleError(function () {
|
|
6668
|
+
const ret = new AbortController();
|
|
5519
6669
|
return ret;
|
|
5520
|
-
};
|
|
6670
|
+
}, arguments) };
|
|
5521
6671
|
|
|
5522
|
-
|
|
5523
|
-
const ret = new
|
|
6672
|
+
exports.__wbg_new_9033836f0fffb971 = function() { return handleError(function (arg0) {
|
|
6673
|
+
const ret = new ReadableStreamDefaultReader(arg0);
|
|
5524
6674
|
return ret;
|
|
5525
6675
|
}, arguments) };
|
|
5526
6676
|
|
|
5527
|
-
|
|
5528
|
-
const ret = new
|
|
6677
|
+
exports.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
|
|
6678
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
5529
6679
|
return ret;
|
|
5530
6680
|
};
|
|
5531
6681
|
|
|
5532
|
-
|
|
5533
|
-
const ret = new
|
|
6682
|
+
exports.__wbg_new_e213f63d18b0de01 = function() { return handleError(function (arg0, arg1) {
|
|
6683
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
|
|
5534
6684
|
return ret;
|
|
5535
6685
|
}, arguments) };
|
|
5536
6686
|
|
|
5537
|
-
|
|
5538
|
-
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));
|
|
5539
6694
|
return ret;
|
|
5540
6695
|
};
|
|
5541
6696
|
|
|
5542
|
-
|
|
5543
|
-
const ret = new
|
|
6697
|
+
exports.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
|
|
6698
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
5544
6699
|
return ret;
|
|
5545
6700
|
};
|
|
5546
6701
|
|
|
5547
|
-
|
|
6702
|
+
exports.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
|
|
5548
6703
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
5549
6704
|
return ret;
|
|
5550
6705
|
};
|
|
5551
6706
|
|
|
5552
|
-
|
|
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) {
|
|
5553
6713
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
5554
6714
|
return ret;
|
|
5555
6715
|
}, arguments) };
|
|
5556
6716
|
|
|
5557
|
-
|
|
6717
|
+
exports.__wbg_newwithstrsequence_f7e2d4848dd49d98 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5558
6718
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
5559
6719
|
return ret;
|
|
5560
6720
|
}, arguments) };
|
|
5561
6721
|
|
|
5562
|
-
|
|
6722
|
+
exports.__wbg_next_5b3530e612fde77d = function(arg0) {
|
|
5563
6723
|
const ret = arg0.next;
|
|
5564
6724
|
return ret;
|
|
5565
6725
|
};
|
|
5566
6726
|
|
|
5567
|
-
|
|
6727
|
+
exports.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
|
|
5568
6728
|
const ret = arg0.next();
|
|
5569
6729
|
return ret;
|
|
5570
6730
|
}, arguments) };
|
|
5571
6731
|
|
|
5572
|
-
|
|
6732
|
+
exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
5573
6733
|
const ret = arg0.node;
|
|
5574
6734
|
return ret;
|
|
5575
6735
|
};
|
|
5576
6736
|
|
|
5577
|
-
|
|
6737
|
+
exports.__wbg_now_1e80617bcee43265 = function() {
|
|
5578
6738
|
const ret = Date.now();
|
|
5579
6739
|
return ret;
|
|
5580
6740
|
};
|
|
5581
6741
|
|
|
5582
|
-
|
|
6742
|
+
exports.__wbg_now_886b39d7ec380719 = function(arg0) {
|
|
5583
6743
|
const ret = arg0.now();
|
|
5584
6744
|
return ret;
|
|
5585
6745
|
};
|
|
5586
6746
|
|
|
5587
|
-
|
|
6747
|
+
exports.__wbg_open_28c0958dd0e03186 = function(arg0) {
|
|
5588
6748
|
const ret = arg0.open();
|
|
5589
6749
|
return ret;
|
|
5590
6750
|
};
|
|
5591
6751
|
|
|
5592
|
-
|
|
6752
|
+
exports.__wbg_open_65ec985b581cbed8 = function(arg0, arg1) {
|
|
5593
6753
|
const ret = arg0.open(arg1);
|
|
5594
6754
|
return ret;
|
|
5595
6755
|
};
|
|
5596
6756
|
|
|
5597
|
-
|
|
6757
|
+
exports.__wbg_opened_fc99ed1e3c1035f0 = function(arg0) {
|
|
5598
6758
|
const ret = arg0.opened;
|
|
5599
6759
|
return ret;
|
|
5600
6760
|
};
|
|
5601
6761
|
|
|
5602
|
-
|
|
6762
|
+
exports.__wbg_optionwallettxout_new = function(arg0) {
|
|
5603
6763
|
const ret = OptionWalletTxOut.__wrap(arg0);
|
|
5604
6764
|
return ret;
|
|
5605
6765
|
};
|
|
5606
6766
|
|
|
5607
|
-
|
|
6767
|
+
exports.__wbg_outpoint_unwrap = function(arg0) {
|
|
5608
6768
|
const ret = OutPoint.__unwrap(arg0);
|
|
5609
6769
|
return ret;
|
|
5610
6770
|
};
|
|
5611
6771
|
|
|
5612
|
-
|
|
6772
|
+
exports.__wbg_performance_a221af8decc752fb = function(arg0) {
|
|
5613
6773
|
const ret = arg0.performance;
|
|
5614
6774
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5615
6775
|
};
|
|
5616
6776
|
|
|
5617
|
-
|
|
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) {
|
|
5618
6783
|
const ret = arg0.process;
|
|
5619
6784
|
return ret;
|
|
5620
6785
|
};
|
|
5621
6786
|
|
|
5622
|
-
|
|
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) {
|
|
5623
6792
|
const ret = Pset.__wrap(arg0);
|
|
5624
6793
|
return ret;
|
|
5625
6794
|
};
|
|
5626
6795
|
|
|
5627
|
-
|
|
6796
|
+
exports.__wbg_psetinput_new = function(arg0) {
|
|
5628
6797
|
const ret = PsetInput.__wrap(arg0);
|
|
5629
6798
|
return ret;
|
|
5630
6799
|
};
|
|
5631
6800
|
|
|
5632
|
-
|
|
6801
|
+
exports.__wbg_psetoutput_new = function(arg0) {
|
|
5633
6802
|
const ret = PsetOutput.__wrap(arg0);
|
|
5634
6803
|
return ret;
|
|
5635
6804
|
};
|
|
5636
6805
|
|
|
5637
|
-
|
|
6806
|
+
exports.__wbg_psetsignatures_new = function(arg0) {
|
|
5638
6807
|
const ret = PsetSignatures.__wrap(arg0);
|
|
5639
6808
|
return ret;
|
|
5640
6809
|
};
|
|
5641
6810
|
|
|
5642
|
-
|
|
6811
|
+
exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
|
|
5643
6812
|
const ret = arg0.push(arg1);
|
|
5644
6813
|
return ret;
|
|
5645
6814
|
};
|
|
5646
6815
|
|
|
5647
|
-
|
|
6816
|
+
exports.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
|
|
5648
6817
|
queueMicrotask(arg0);
|
|
5649
6818
|
};
|
|
5650
6819
|
|
|
5651
|
-
|
|
6820
|
+
exports.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
|
|
5652
6821
|
const ret = arg0.queueMicrotask;
|
|
5653
6822
|
return ret;
|
|
5654
6823
|
};
|
|
5655
6824
|
|
|
5656
|
-
|
|
6825
|
+
exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
5657
6826
|
arg0.randomFillSync(arg1);
|
|
5658
6827
|
}, arguments) };
|
|
5659
6828
|
|
|
5660
|
-
|
|
6829
|
+
exports.__wbg_read_bc925c758aa4d897 = function(arg0) {
|
|
5661
6830
|
const ret = arg0.read();
|
|
5662
6831
|
return ret;
|
|
5663
6832
|
};
|
|
5664
6833
|
|
|
5665
|
-
|
|
6834
|
+
exports.__wbg_readable_d8d52c48b16a493f = function(arg0) {
|
|
5666
6835
|
const ret = arg0.readable;
|
|
5667
6836
|
return ret;
|
|
5668
6837
|
};
|
|
5669
6838
|
|
|
5670
|
-
|
|
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) {
|
|
5671
6853
|
const ret = Recipient.__wrap(arg0);
|
|
5672
6854
|
return ret;
|
|
5673
6855
|
};
|
|
5674
6856
|
|
|
5675
|
-
|
|
6857
|
+
exports.__wbg_registry_new = function(arg0) {
|
|
5676
6858
|
const ret = Registry.__wrap(arg0);
|
|
5677
6859
|
return ret;
|
|
5678
6860
|
};
|
|
5679
6861
|
|
|
5680
|
-
|
|
6862
|
+
exports.__wbg_requestDevice_225891d9a80a7b19 = function(arg0, arg1) {
|
|
5681
6863
|
const ret = arg0.requestDevice(arg1);
|
|
5682
6864
|
return ret;
|
|
5683
6865
|
};
|
|
5684
6866
|
|
|
5685
|
-
|
|
6867
|
+
exports.__wbg_requestPort_07a56c2addedc9d1 = function(arg0) {
|
|
5686
6868
|
const ret = arg0.requestPort();
|
|
5687
6869
|
return ret;
|
|
5688
6870
|
};
|
|
5689
6871
|
|
|
5690
|
-
|
|
6872
|
+
exports.__wbg_requestPort_379ba5dd17575815 = function(arg0, arg1) {
|
|
5691
6873
|
const ret = arg0.requestPort(arg1);
|
|
5692
6874
|
return ret;
|
|
5693
6875
|
};
|
|
5694
6876
|
|
|
5695
|
-
|
|
6877
|
+
exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
5696
6878
|
const ret = module.require;
|
|
5697
6879
|
return ret;
|
|
5698
6880
|
}, arguments) };
|
|
5699
6881
|
|
|
5700
|
-
|
|
6882
|
+
exports.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
|
|
5701
6883
|
const ret = Promise.resolve(arg0);
|
|
5702
6884
|
return ret;
|
|
5703
6885
|
};
|
|
5704
6886
|
|
|
5705
|
-
|
|
6887
|
+
exports.__wbg_sendReport_c8d0c7c3c3abf30a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5706
6888
|
const ret = arg0.sendReport(arg1, getArrayU8FromWasm0(arg2, arg3));
|
|
5707
6889
|
return ret;
|
|
5708
6890
|
}, arguments) };
|
|
5709
6891
|
|
|
5710
|
-
|
|
5711
|
-
arg0.send(
|
|
6892
|
+
exports.__wbg_send_0f09f4487d932d86 = function() { return handleError(function (arg0, arg1) {
|
|
6893
|
+
arg0.send(arg1);
|
|
5712
6894
|
}, arguments) };
|
|
5713
6895
|
|
|
5714
|
-
|
|
5715
|
-
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));
|
|
5716
6902
|
}, arguments) };
|
|
5717
6903
|
|
|
5718
|
-
|
|
6904
|
+
exports.__wbg_serial_a0dde47bbd77e1b3 = function(arg0) {
|
|
5719
6905
|
const ret = arg0.serial;
|
|
5720
6906
|
return ret;
|
|
5721
6907
|
};
|
|
5722
6908
|
|
|
5723
|
-
|
|
6909
|
+
exports.__wbg_setTimeout_2966518f28aef92e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
5724
6910
|
const ret = arg0.setTimeout(arg1, arg2);
|
|
5725
6911
|
return ret;
|
|
5726
6912
|
}, arguments) };
|
|
5727
6913
|
|
|
5728
|
-
|
|
5729
|
-
|
|
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));
|
|
5730
6926
|
};
|
|
5731
6927
|
|
|
5732
|
-
|
|
6928
|
+
exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
5733
6929
|
arg0[arg1] = arg2;
|
|
5734
6930
|
};
|
|
5735
6931
|
|
|
5736
|
-
|
|
5737
|
-
|
|
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;
|
|
5738
6939
|
};
|
|
5739
6940
|
|
|
5740
|
-
|
|
6941
|
+
exports.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
|
|
5741
6942
|
const ret = arg0.set(arg1, arg2);
|
|
5742
6943
|
return ret;
|
|
5743
6944
|
};
|
|
5744
6945
|
|
|
5745
|
-
|
|
6946
|
+
exports.__wbg_setbaudrate_88a136cc0a6d4b97 = function(arg0, arg1) {
|
|
5746
6947
|
arg0.baudRate = arg1 >>> 0;
|
|
5747
6948
|
};
|
|
5748
6949
|
|
|
5749
|
-
|
|
6950
|
+
exports.__wbg_setbinaryType_37f3cd35d7775a47 = function(arg0, arg1) {
|
|
5750
6951
|
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
5751
6952
|
};
|
|
5752
6953
|
|
|
5753
|
-
|
|
6954
|
+
exports.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
|
|
5754
6955
|
arg0.body = arg1;
|
|
5755
6956
|
};
|
|
5756
6957
|
|
|
5757
|
-
|
|
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) {
|
|
5758
6963
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5759
6964
|
};
|
|
5760
6965
|
|
|
5761
|
-
|
|
6966
|
+
exports.__wbg_setfilters_58b1e783022cd737 = function(arg0, arg1) {
|
|
5762
6967
|
arg0.filters = arg1;
|
|
5763
6968
|
};
|
|
5764
6969
|
|
|
5765
|
-
|
|
6970
|
+
exports.__wbg_setfilters_a0bf46d04ea0dd78 = function(arg0, arg1) {
|
|
5766
6971
|
arg0.filters = arg1;
|
|
5767
6972
|
};
|
|
5768
6973
|
|
|
5769
|
-
|
|
6974
|
+
exports.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
|
|
5770
6975
|
arg0.headers = arg1;
|
|
5771
6976
|
};
|
|
5772
6977
|
|
|
5773
|
-
|
|
6978
|
+
exports.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
|
|
5774
6979
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
5775
6980
|
};
|
|
5776
6981
|
|
|
5777
|
-
|
|
6982
|
+
exports.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
|
|
5778
6983
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
5779
6984
|
};
|
|
5780
6985
|
|
|
5781
|
-
|
|
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) {
|
|
5782
6999
|
arg0.oninputreport = arg1;
|
|
5783
7000
|
};
|
|
5784
7001
|
|
|
5785
|
-
|
|
7002
|
+
exports.__wbg_setonmessage_5e486f326638a9da = function(arg0, arg1) {
|
|
5786
7003
|
arg0.onmessage = arg1;
|
|
5787
7004
|
};
|
|
5788
7005
|
|
|
5789
|
-
|
|
7006
|
+
exports.__wbg_setonopen_3e43af381c2901f8 = function(arg0, arg1) {
|
|
5790
7007
|
arg0.onopen = arg1;
|
|
5791
7008
|
};
|
|
5792
7009
|
|
|
5793
|
-
|
|
7010
|
+
exports.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
|
|
5794
7011
|
arg0.signal = arg1;
|
|
5795
7012
|
};
|
|
5796
7013
|
|
|
5797
|
-
|
|
7014
|
+
exports.__wbg_signal_da4d466ce86118b5 = function(arg0) {
|
|
5798
7015
|
const ret = arg0.signal;
|
|
5799
7016
|
return ret;
|
|
5800
7017
|
};
|
|
5801
7018
|
|
|
5802
|
-
|
|
7019
|
+
exports.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
|
|
5803
7020
|
const ret = typeof global === 'undefined' ? null : global;
|
|
5804
7021
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5805
7022
|
};
|
|
5806
7023
|
|
|
5807
|
-
|
|
7024
|
+
exports.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
|
|
5808
7025
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
5809
7026
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5810
7027
|
};
|
|
5811
7028
|
|
|
5812
|
-
|
|
7029
|
+
exports.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
|
|
5813
7030
|
const ret = typeof self === 'undefined' ? null : self;
|
|
5814
7031
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5815
7032
|
};
|
|
5816
7033
|
|
|
5817
|
-
|
|
7034
|
+
exports.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
|
|
5818
7035
|
const ret = typeof window === 'undefined' ? null : window;
|
|
5819
7036
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
5820
7037
|
};
|
|
5821
7038
|
|
|
5822
|
-
|
|
7039
|
+
exports.__wbg_status_3fea3036088621d6 = function(arg0) {
|
|
5823
7040
|
const ret = arg0.status;
|
|
5824
7041
|
return ret;
|
|
5825
7042
|
};
|
|
5826
7043
|
|
|
5827
|
-
|
|
7044
|
+
exports.__wbg_stringify_b98c93d0a190446a = function() { return handleError(function (arg0) {
|
|
5828
7045
|
const ret = JSON.stringify(arg0);
|
|
5829
7046
|
return ret;
|
|
5830
7047
|
}, arguments) };
|
|
5831
7048
|
|
|
5832
|
-
|
|
7049
|
+
exports.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
|
|
5833
7050
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
5834
7051
|
return ret;
|
|
5835
7052
|
};
|
|
5836
7053
|
|
|
5837
|
-
|
|
7054
|
+
exports.__wbg_text_0f69a215637b9b34 = function() { return handleError(function (arg0) {
|
|
5838
7055
|
const ret = arg0.text();
|
|
5839
7056
|
return ret;
|
|
5840
7057
|
}, arguments) };
|
|
5841
7058
|
|
|
5842
|
-
|
|
5843
|
-
const ret = arg0.then(arg1);
|
|
7059
|
+
exports.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
|
|
7060
|
+
const ret = arg0.then(arg1, arg2);
|
|
5844
7061
|
return ret;
|
|
5845
7062
|
};
|
|
5846
7063
|
|
|
5847
|
-
|
|
5848
|
-
const ret = arg0.then(arg1
|
|
7064
|
+
exports.__wbg_then_e22500defe16819f = function(arg0, arg1) {
|
|
7065
|
+
const ret = arg0.then(arg1);
|
|
5849
7066
|
return ret;
|
|
5850
7067
|
};
|
|
5851
7068
|
|
|
5852
|
-
|
|
7069
|
+
exports.__wbg_transaction_new = function(arg0) {
|
|
5853
7070
|
const ret = Transaction.__wrap(arg0);
|
|
5854
7071
|
return ret;
|
|
5855
7072
|
};
|
|
5856
7073
|
|
|
5857
|
-
|
|
7074
|
+
exports.__wbg_txid_new = function(arg0) {
|
|
5858
7075
|
const ret = Txid.__wrap(arg0);
|
|
5859
7076
|
return ret;
|
|
5860
7077
|
};
|
|
5861
7078
|
|
|
5862
|
-
|
|
7079
|
+
exports.__wbg_update_new = function(arg0) {
|
|
5863
7080
|
const ret = Update.__wrap(arg0);
|
|
5864
7081
|
return ret;
|
|
5865
7082
|
};
|
|
5866
7083
|
|
|
5867
|
-
|
|
7084
|
+
exports.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
|
|
5868
7085
|
const ret = arg1.url;
|
|
5869
7086
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5870
7087
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -5872,166 +7089,196 @@ module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
|
5872
7089
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
5873
7090
|
};
|
|
5874
7091
|
|
|
5875
|
-
|
|
7092
|
+
exports.__wbg_validatedliquidexproposal_unwrap = function(arg0) {
|
|
5876
7093
|
const ret = ValidatedLiquidexProposal.__unwrap(arg0);
|
|
5877
7094
|
return ret;
|
|
5878
7095
|
};
|
|
5879
7096
|
|
|
5880
|
-
|
|
7097
|
+
exports.__wbg_value_dd9372230531eade = function(arg0) {
|
|
5881
7098
|
const ret = arg0.value;
|
|
5882
7099
|
return ret;
|
|
5883
7100
|
};
|
|
5884
7101
|
|
|
5885
|
-
|
|
7102
|
+
exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
5886
7103
|
const ret = arg0.versions;
|
|
5887
7104
|
return ret;
|
|
5888
7105
|
};
|
|
5889
7106
|
|
|
5890
|
-
|
|
7107
|
+
exports.__wbg_wallettx_new = function(arg0) {
|
|
5891
7108
|
const ret = WalletTx.__wrap(arg0);
|
|
5892
7109
|
return ret;
|
|
5893
7110
|
};
|
|
5894
7111
|
|
|
5895
|
-
|
|
7112
|
+
exports.__wbg_wallettxout_new = function(arg0) {
|
|
5896
7113
|
const ret = WalletTxOut.__wrap(arg0);
|
|
5897
7114
|
return ret;
|
|
5898
7115
|
};
|
|
5899
7116
|
|
|
5900
|
-
|
|
5901
|
-
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;
|
|
5902
7124
|
return ret;
|
|
5903
7125
|
};
|
|
5904
7126
|
|
|
5905
|
-
|
|
5906
|
-
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';
|
|
5907
7137
|
return ret;
|
|
5908
7138
|
};
|
|
5909
7139
|
|
|
5910
|
-
|
|
5911
|
-
const
|
|
7140
|
+
exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
|
|
7141
|
+
const val = arg0;
|
|
7142
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
5912
7143
|
return ret;
|
|
5913
7144
|
};
|
|
5914
7145
|
|
|
5915
|
-
|
|
5916
|
-
const ret =
|
|
7146
|
+
exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
|
|
7147
|
+
const ret = typeof(arg0) === 'string';
|
|
5917
7148
|
return ret;
|
|
5918
7149
|
};
|
|
5919
7150
|
|
|
5920
|
-
|
|
5921
|
-
const ret = arg0;
|
|
7151
|
+
exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
|
|
7152
|
+
const ret = arg0 === undefined;
|
|
5922
7153
|
return ret;
|
|
5923
7154
|
};
|
|
5924
7155
|
|
|
5925
|
-
|
|
5926
|
-
const obj =
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
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);
|
|
5932
7171
|
return ret;
|
|
5933
7172
|
};
|
|
5934
7173
|
|
|
5935
|
-
|
|
5936
|
-
const ret =
|
|
7174
|
+
exports.__wbg_writable_3d863701c7ab161b = function(arg0) {
|
|
7175
|
+
const ret = arg0.writable;
|
|
5937
7176
|
return ret;
|
|
5938
7177
|
};
|
|
5939
7178
|
|
|
5940
|
-
|
|
5941
|
-
const ret =
|
|
7179
|
+
exports.__wbg_write_2e39e04a4c8c9e9d = function(arg0, arg1) {
|
|
7180
|
+
const ret = arg0.write(arg1);
|
|
5942
7181
|
return ret;
|
|
5943
7182
|
};
|
|
5944
7183
|
|
|
5945
|
-
|
|
5946
|
-
const ret =
|
|
7184
|
+
exports.__wbg_xpub_new = function(arg0) {
|
|
7185
|
+
const ret = Xpub.__wrap(arg0);
|
|
5947
7186
|
return ret;
|
|
5948
7187
|
};
|
|
5949
7188
|
|
|
5950
|
-
|
|
5951
|
-
|
|
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);
|
|
5952
7192
|
return ret;
|
|
5953
7193
|
};
|
|
5954
7194
|
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
const
|
|
5958
|
-
|
|
5959
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
5960
|
-
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;
|
|
5961
7199
|
};
|
|
5962
7200
|
|
|
5963
|
-
|
|
5964
|
-
|
|
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);
|
|
5965
7204
|
return ret;
|
|
5966
7205
|
};
|
|
5967
7206
|
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
const
|
|
5971
|
-
|
|
5972
|
-
table.set(offset + 0, undefined);
|
|
5973
|
-
table.set(offset + 1, null);
|
|
5974
|
-
table.set(offset + 2, true);
|
|
5975
|
-
table.set(offset + 3, false);
|
|
5976
|
-
;
|
|
7207
|
+
exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
7208
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
7209
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
7210
|
+
return ret;
|
|
5977
7211
|
};
|
|
5978
7212
|
|
|
5979
|
-
|
|
5980
|
-
|
|
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);
|
|
5981
7216
|
return ret;
|
|
5982
7217
|
};
|
|
5983
7218
|
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
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);
|
|
5987
7222
|
return ret;
|
|
5988
7223
|
};
|
|
5989
7224
|
|
|
5990
|
-
|
|
5991
|
-
|
|
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);
|
|
5992
7228
|
return ret;
|
|
5993
7229
|
};
|
|
5994
7230
|
|
|
5995
|
-
|
|
5996
|
-
|
|
7231
|
+
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
7232
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
7233
|
+
const ret = arg0;
|
|
5997
7234
|
return ret;
|
|
5998
7235
|
};
|
|
5999
7236
|
|
|
6000
|
-
|
|
6001
|
-
|
|
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);
|
|
6002
7240
|
return ret;
|
|
6003
7241
|
};
|
|
6004
7242
|
|
|
6005
|
-
|
|
6006
|
-
|
|
7243
|
+
exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
7244
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
7245
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
6007
7246
|
return ret;
|
|
6008
7247
|
};
|
|
6009
7248
|
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
const ret =
|
|
6013
|
-
|
|
6014
|
-
var len1 = WASM_VECTOR_LEN;
|
|
6015
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
6016
|
-
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;
|
|
6017
7253
|
};
|
|
6018
7254
|
|
|
6019
|
-
|
|
6020
|
-
|
|
7255
|
+
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
7256
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
7257
|
+
const ret = arg0;
|
|
6021
7258
|
return ret;
|
|
6022
7259
|
};
|
|
6023
7260
|
|
|
6024
|
-
|
|
6025
|
-
|
|
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;
|
|
6026
7265
|
};
|
|
6027
7266
|
|
|
6028
|
-
|
|
6029
|
-
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
|
+
};
|
|
6030
7277
|
|
|
6031
|
-
const
|
|
6032
|
-
const
|
|
6033
|
-
|
|
6034
|
-
|
|
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;
|
|
6035
7282
|
|
|
6036
7283
|
wasm.__wbindgen_start();
|
|
6037
7284
|
|