lwk_node 0.12.1 → 0.13.1

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.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 cachedTextEncoder = new TextEncoder('utf-8');
14
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
15
+
16
+ cachedTextDecoder.decode();
19
17
 
20
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
21
- ? function (arg, view) {
22
- return cachedTextEncoder.encodeInto(arg, view);
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 = encodeString(arg, view);
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
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
115
- ? { register: () => {}, unregister: () => {} }
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,18 +176,46 @@ function debugString(val) {
207
176
  return className;
208
177
  }
209
178
 
179
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
180
+ ? { register: () => {}, unregister: () => {} }
181
+ : new FinalizationRegistry(
182
+ state => {
183
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
184
+ }
185
+ );
186
+
187
+ function makeMutClosure(arg0, arg1, dtor, f) {
188
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
189
+ const real = (...args) => {
190
+
191
+ // First up with a closure we increment the internal reference
192
+ // count. This ensures that the Rust closure environment won't
193
+ // be deallocated while we're invoking it.
194
+ state.cnt++;
195
+ const a = state.a;
196
+ state.a = 0;
197
+ try {
198
+ return f(a, state.b, ...args);
199
+ } finally {
200
+ if (--state.cnt === 0) {
201
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
202
+ CLOSURE_DTORS.unregister(state);
203
+ } else {
204
+ state.a = a;
205
+ }
206
+ }
207
+ };
208
+ real.original = state;
209
+ CLOSURE_DTORS.register(real, state, state);
210
+ return real;
211
+ }
212
+
210
213
  function takeFromExternrefTable0(idx) {
211
214
  const value = wasm.__wbindgen_export_4.get(idx);
212
215
  wasm.__externref_table_dealloc(idx);
213
216
  return value;
214
217
  }
215
218
 
216
- function _assertClass(instance, klass) {
217
- if (!(instance instanceof klass)) {
218
- throw new Error(`expected instance of ${klass.name}`);
219
- }
220
- }
221
-
222
219
  function passArrayJsValueToWasm0(array, malloc) {
223
220
  const ptr = malloc(array.length * 4, 4) >>> 0;
224
221
  for (let i = 0; i < array.length; i++) {
@@ -228,10 +225,64 @@ function passArrayJsValueToWasm0(array, malloc) {
228
225
  WASM_VECTOR_LEN = array.length;
229
226
  return ptr;
230
227
  }
228
+
229
+ function _assertClass(instance, klass) {
230
+ if (!(instance instanceof klass)) {
231
+ throw new Error(`expected instance of ${klass.name}`);
232
+ }
233
+ }
234
+
235
+ let cachedUint32ArrayMemory0 = null;
236
+
237
+ function getUint32ArrayMemory0() {
238
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
239
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
240
+ }
241
+ return cachedUint32ArrayMemory0;
242
+ }
243
+
244
+ function passArray32ToWasm0(arg, malloc) {
245
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
246
+ getUint32ArrayMemory0().set(arg, ptr / 4);
247
+ WASM_VECTOR_LEN = arg.length;
248
+ return ptr;
249
+ }
250
+ /**
251
+ * Convert the given string to a QR code image uri
252
+ *
253
+ * The image format is monocromatic bitmap, returned as an encoded in base64 uri.
254
+ *
255
+ * Without `pixel_per_module` the default is no border, and 1 pixel per module, to be used
256
+ * for example in html: `style="image-rendering: pixelated; border: 20px solid white;"`
257
+ * @param {string} str
258
+ * @param {number | null} [pixel_per_module]
259
+ * @returns {string}
260
+ */
261
+ exports.stringToQr = function(str, pixel_per_module) {
262
+ let deferred3_0;
263
+ let deferred3_1;
264
+ try {
265
+ const ptr0 = passStringToWasm0(str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
266
+ const len0 = WASM_VECTOR_LEN;
267
+ const ret = wasm.stringToQr(ptr0, len0, isLikeNone(pixel_per_module) ? 0xFFFFFF : pixel_per_module);
268
+ var ptr2 = ret[0];
269
+ var len2 = ret[1];
270
+ if (ret[3]) {
271
+ ptr2 = 0; len2 = 0;
272
+ throw takeFromExternrefTable0(ret[2]);
273
+ }
274
+ deferred3_0 = ptr2;
275
+ deferred3_1 = len2;
276
+ return getStringFromWasm0(ptr2, len2);
277
+ } finally {
278
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
279
+ }
280
+ };
281
+
231
282
  /**
232
283
  * @returns {Promise<HIDDevice>}
233
284
  */
234
- module.exports.searchLedgerDevice = function() {
285
+ exports.searchLedgerDevice = function() {
235
286
  const ret = wasm.searchLedgerDevice();
236
287
  return ret;
237
288
  };
@@ -254,43 +305,39 @@ function passArray8ToWasm0(arg, malloc) {
254
305
  return ptr;
255
306
  }
256
307
 
257
- let cachedUint32ArrayMemory0 = null;
258
-
259
- function getUint32ArrayMemory0() {
260
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
261
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
262
- }
263
- return cachedUint32ArrayMemory0;
264
- }
265
-
266
308
  function getArrayU32FromWasm0(ptr, len) {
267
309
  ptr = ptr >>> 0;
268
310
  return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
269
311
  }
312
+ function __wbg_adapter_8(arg0, arg1) {
313
+ wasm.wasm_bindgen__convert__closures_____invoke__h05232c3defb8be20(arg0, arg1);
314
+ }
270
315
 
271
- function passArray32ToWasm0(arg, malloc) {
272
- const ptr = malloc(arg.length * 4, 4) >>> 0;
273
- getUint32ArrayMemory0().set(arg, ptr / 4);
274
- WASM_VECTOR_LEN = arg.length;
275
- return ptr;
316
+ function __wbg_adapter_11(arg0, arg1, arg2) {
317
+ wasm.closure1298_externref_shim(arg0, arg1, arg2);
276
318
  }
277
- function __wbg_adapter_34(arg0, arg1, arg2) {
278
- wasm.closure444_externref_shim(arg0, arg1, arg2);
319
+
320
+ function __wbg_adapter_18(arg0, arg1, arg2) {
321
+ wasm.closure785_externref_shim(arg0, arg1, arg2);
322
+ }
323
+
324
+ function __wbg_adapter_27(arg0, arg1, arg2) {
325
+ wasm.closure1947_externref_shim(arg0, arg1, arg2);
279
326
  }
280
327
 
281
- function __wbg_adapter_41(arg0, arg1, arg2) {
282
- wasm.closure1370_externref_shim(arg0, arg1, arg2);
328
+ function __wbg_adapter_30(arg0, arg1) {
329
+ wasm.wasm_bindgen__convert__closures_____invoke__h912986096667d3cb(arg0, arg1);
283
330
  }
284
331
 
285
- function __wbg_adapter_544(arg0, arg1, arg2, arg3) {
286
- wasm.closure2130_externref_shim(arg0, arg1, arg2, arg3);
332
+ function __wbg_adapter_641(arg0, arg1, arg2, arg3) {
333
+ wasm.closure2721_externref_shim(arg0, arg1, arg2, arg3);
287
334
  }
288
335
 
289
336
  /**
290
337
  * Wallet chain
291
338
  * @enum {0 | 1}
292
339
  */
293
- module.exports.Chain = Object.freeze({
340
+ exports.Chain = Object.freeze({
294
341
  /**
295
342
  * External address, shown when asked for a payment.
296
343
  * Wallet having a single descriptor are considered External
@@ -304,6 +351,8 @@ module.exports.Chain = Object.freeze({
304
351
 
305
352
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
306
353
 
354
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
355
+
307
356
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
308
357
 
309
358
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
@@ -469,7 +518,9 @@ class Address {
469
518
  }
470
519
  }
471
520
  }
472
- module.exports.Address = Address;
521
+ if (Symbol.dispose) Address.prototype[Symbol.dispose] = Address.prototype.free;
522
+
523
+ exports.Address = Address;
473
524
 
474
525
  const AddressResultFinalization = (typeof FinalizationRegistry === 'undefined')
475
526
  ? { register: () => {}, unregister: () => {} }
@@ -517,7 +568,9 @@ class AddressResult {
517
568
  return ret >>> 0;
518
569
  }
519
570
  }
520
- module.exports.AddressResult = AddressResult;
571
+ if (Symbol.dispose) AddressResult.prototype[Symbol.dispose] = AddressResult.prototype.free;
572
+
573
+ exports.AddressResult = AddressResult;
521
574
 
522
575
  const Amp0Finalization = (typeof FinalizationRegistry === 'undefined')
523
576
  ? { register: () => {}, unregister: () => {} }
@@ -677,7 +730,9 @@ class Amp0 {
677
730
  return ret;
678
731
  }
679
732
  }
680
- module.exports.Amp0 = Amp0;
733
+ if (Symbol.dispose) Amp0.prototype[Symbol.dispose] = Amp0.prototype.free;
734
+
735
+ exports.Amp0 = Amp0;
681
736
 
682
737
  const Amp0ConnectedFinalization = (typeof FinalizationRegistry === 'undefined')
683
738
  ? { register: () => {}, unregister: () => {} }
@@ -743,7 +798,9 @@ class Amp0Connected {
743
798
  return ret;
744
799
  }
745
800
  }
746
- module.exports.Amp0Connected = Amp0Connected;
801
+ if (Symbol.dispose) Amp0Connected.prototype[Symbol.dispose] = Amp0Connected.prototype.free;
802
+
803
+ exports.Amp0Connected = Amp0Connected;
747
804
 
748
805
  const Amp0LoggedInFinalization = (typeof FinalizationRegistry === 'undefined')
749
806
  ? { register: () => {}, unregister: () => {} }
@@ -829,7 +886,9 @@ class Amp0LoggedIn {
829
886
  return ret;
830
887
  }
831
888
  }
832
- module.exports.Amp0LoggedIn = Amp0LoggedIn;
889
+ if (Symbol.dispose) Amp0LoggedIn.prototype[Symbol.dispose] = Amp0LoggedIn.prototype.free;
890
+
891
+ exports.Amp0LoggedIn = Amp0LoggedIn;
833
892
 
834
893
  const Amp0PsetFinalization = (typeof FinalizationRegistry === 'undefined')
835
894
  ? { register: () => {}, unregister: () => {} }
@@ -900,7 +959,9 @@ class Amp0Pset {
900
959
  return v1;
901
960
  }
902
961
  }
903
- module.exports.Amp0Pset = Amp0Pset;
962
+ if (Symbol.dispose) Amp0Pset.prototype[Symbol.dispose] = Amp0Pset.prototype.free;
963
+
964
+ exports.Amp0Pset = Amp0Pset;
904
965
 
905
966
  const Amp0SignerDataFinalization = (typeof FinalizationRegistry === 'undefined')
906
967
  ? { register: () => {}, unregister: () => {} }
@@ -928,7 +989,9 @@ class Amp0SignerData {
928
989
  wasm.__wbg_amp0signerdata_free(ptr, 0);
929
990
  }
930
991
  }
931
- module.exports.Amp0SignerData = Amp0SignerData;
992
+ if (Symbol.dispose) Amp0SignerData.prototype[Symbol.dispose] = Amp0SignerData.prototype.free;
993
+
994
+ exports.Amp0SignerData = Amp0SignerData;
932
995
 
933
996
  const Amp2Finalization = (typeof FinalizationRegistry === 'undefined')
934
997
  ? { register: () => {}, unregister: () => {} }
@@ -1000,7 +1063,9 @@ class Amp2 {
1000
1063
  return ret;
1001
1064
  }
1002
1065
  }
1003
- module.exports.Amp2 = Amp2;
1066
+ if (Symbol.dispose) Amp2.prototype[Symbol.dispose] = Amp2.prototype.free;
1067
+
1068
+ exports.Amp2 = Amp2;
1004
1069
 
1005
1070
  const Amp2DescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
1006
1071
  ? { register: () => {}, unregister: () => {} }
@@ -1054,7 +1119,9 @@ class Amp2Descriptor {
1054
1119
  }
1055
1120
  }
1056
1121
  }
1057
- module.exports.Amp2Descriptor = Amp2Descriptor;
1122
+ if (Symbol.dispose) Amp2Descriptor.prototype[Symbol.dispose] = Amp2Descriptor.prototype.free;
1123
+
1124
+ exports.Amp2Descriptor = Amp2Descriptor;
1058
1125
 
1059
1126
  const AssetAmountFinalization = (typeof FinalizationRegistry === 'undefined')
1060
1127
  ? { register: () => {}, unregister: () => {} }
@@ -1098,7 +1165,9 @@ class AssetAmount {
1098
1165
  return AssetId.__wrap(ret);
1099
1166
  }
1100
1167
  }
1101
- module.exports.AssetAmount = AssetAmount;
1168
+ if (Symbol.dispose) AssetAmount.prototype[Symbol.dispose] = AssetAmount.prototype.free;
1169
+
1170
+ exports.AssetAmount = AssetAmount;
1102
1171
 
1103
1172
  const AssetIdFinalization = (typeof FinalizationRegistry === 'undefined')
1104
1173
  ? { register: () => {}, unregister: () => {} }
@@ -1162,7 +1231,9 @@ class AssetId {
1162
1231
  }
1163
1232
  }
1164
1233
  }
1165
- module.exports.AssetId = AssetId;
1234
+ if (Symbol.dispose) AssetId.prototype[Symbol.dispose] = AssetId.prototype.free;
1235
+
1236
+ exports.AssetId = AssetId;
1166
1237
 
1167
1238
  const AssetIdsFinalization = (typeof FinalizationRegistry === 'undefined')
1168
1239
  ? { register: () => {}, unregister: () => {} }
@@ -1219,7 +1290,9 @@ class AssetIds {
1219
1290
  }
1220
1291
  }
1221
1292
  }
1222
- module.exports.AssetIds = AssetIds;
1293
+ if (Symbol.dispose) AssetIds.prototype[Symbol.dispose] = AssetIds.prototype.free;
1294
+
1295
+ exports.AssetIds = AssetIds;
1223
1296
 
1224
1297
  const AssetMetaFinalization = (typeof FinalizationRegistry === 'undefined')
1225
1298
  ? { register: () => {}, unregister: () => {} }
@@ -1267,7 +1340,9 @@ class AssetMeta {
1267
1340
  return Transaction.__wrap(ret);
1268
1341
  }
1269
1342
  }
1270
- module.exports.AssetMeta = AssetMeta;
1343
+ if (Symbol.dispose) AssetMeta.prototype[Symbol.dispose] = AssetMeta.prototype.free;
1344
+
1345
+ exports.AssetMeta = AssetMeta;
1271
1346
 
1272
1347
  const BalanceFinalization = (typeof FinalizationRegistry === 'undefined')
1273
1348
  ? { register: () => {}, unregister: () => {} }
@@ -1339,7 +1414,9 @@ class Balance {
1339
1414
  }
1340
1415
  }
1341
1416
  }
1342
- module.exports.Balance = Balance;
1417
+ if (Symbol.dispose) Balance.prototype[Symbol.dispose] = Balance.prototype.free;
1418
+
1419
+ exports.Balance = Balance;
1343
1420
 
1344
1421
  const BipFinalization = (typeof FinalizationRegistry === 'undefined')
1345
1422
  ? { register: () => {}, unregister: () => {} }
@@ -1409,108 +1486,464 @@ class Bip {
1409
1486
  }
1410
1487
  }
1411
1488
  }
1412
- module.exports.Bip = Bip;
1489
+ if (Symbol.dispose) Bip.prototype[Symbol.dispose] = Bip.prototype.free;
1413
1490
 
1414
- const ContractFinalization = (typeof FinalizationRegistry === 'undefined')
1491
+ exports.Bip = Bip;
1492
+
1493
+ const BoltzSessionFinalization = (typeof FinalizationRegistry === 'undefined')
1415
1494
  ? { register: () => {}, unregister: () => {} }
1416
- : new FinalizationRegistry(ptr => wasm.__wbg_contract_free(ptr >>> 0, 1));
1495
+ : new FinalizationRegistry(ptr => wasm.__wbg_boltzsession_free(ptr >>> 0, 1));
1417
1496
  /**
1418
- * A contract defining metadata of an asset such the name and the ticker
1497
+ * Wrapper over [`lwk_boltz::BoltzSession`]
1419
1498
  */
1420
- class Contract {
1499
+ class BoltzSession {
1421
1500
 
1422
1501
  static __wrap(ptr) {
1423
1502
  ptr = ptr >>> 0;
1424
- const obj = Object.create(Contract.prototype);
1503
+ const obj = Object.create(BoltzSession.prototype);
1425
1504
  obj.__wbg_ptr = ptr;
1426
- ContractFinalization.register(obj, obj.__wbg_ptr, obj);
1505
+ BoltzSessionFinalization.register(obj, obj.__wbg_ptr, obj);
1427
1506
  return obj;
1428
1507
  }
1429
1508
 
1430
1509
  __destroy_into_raw() {
1431
1510
  const ptr = this.__wbg_ptr;
1432
1511
  this.__wbg_ptr = 0;
1433
- ContractFinalization.unregister(this);
1512
+ BoltzSessionFinalization.unregister(this);
1434
1513
  return ptr;
1435
1514
  }
1436
1515
 
1437
1516
  free() {
1438
1517
  const ptr = this.__destroy_into_raw();
1439
- wasm.__wbg_contract_free(ptr, 0);
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;
1518
+ wasm.__wbg_boltzsession_free(ptr, 0);
1466
1519
  }
1467
1520
  /**
1468
- * Return the string representation of the contract.
1521
+ * Get the rescue file
1469
1522
  * @returns {string}
1470
1523
  */
1471
- toString() {
1472
- let deferred1_0;
1473
- let deferred1_1;
1524
+ rescueFile() {
1525
+ let deferred2_0;
1526
+ let deferred2_1;
1474
1527
  try {
1475
- const ret = wasm.contract_toString(this.__wbg_ptr);
1476
- deferred1_0 = ret[0];
1477
- deferred1_1 = ret[1];
1478
- return getStringFromWasm0(ret[0], ret[1]);
1528
+ const ret = wasm.boltzsession_rescueFile(this.__wbg_ptr);
1529
+ var ptr1 = ret[0];
1530
+ var len1 = ret[1];
1531
+ if (ret[3]) {
1532
+ ptr1 = 0; len1 = 0;
1533
+ throw takeFromExternrefTable0(ret[2]);
1534
+ }
1535
+ deferred2_0 = ptr1;
1536
+ deferred2_1 = len1;
1537
+ return getStringFromWasm0(ptr1, len1);
1479
1538
  } finally {
1480
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1539
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1481
1540
  }
1482
1541
  }
1483
1542
  /**
1484
- * Return the domain of the issuer of the contract.
1485
- * @returns {string}
1543
+ * Prepare a lightning invoice payment
1544
+ * @param {LightningPayment} lightning_payment
1545
+ * @param {Address} refund_address
1546
+ * @returns {Promise<PreparePayResponse>}
1486
1547
  */
1487
- domain() {
1488
- let deferred1_0;
1489
- let deferred1_1;
1490
- try {
1491
- const ret = wasm.contract_domain(this.__wbg_ptr);
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
- }
1548
+ preparePay(lightning_payment, refund_address) {
1549
+ _assertClass(lightning_payment, LightningPayment);
1550
+ _assertClass(refund_address, Address);
1551
+ const ret = wasm.boltzsession_preparePay(this.__wbg_ptr, lightning_payment.__wbg_ptr, refund_address.__wbg_ptr);
1552
+ return ret;
1498
1553
  }
1499
1554
  /**
1500
- * Make a copy of the contract.
1501
- *
1502
- * This is needed to pass it to a function that requires a `Contract` (without borrowing)
1503
- * but you need the same contract after that call.
1504
- * @returns {Contract}
1555
+ * Create a lightning invoice for receiving payment
1556
+ * @param {bigint} amount
1557
+ * @param {string | null | undefined} description
1558
+ * @param {Address} claim_address
1559
+ * @returns {Promise<InvoiceResponse>}
1505
1560
  */
1506
- clone() {
1507
- const ret = wasm.contract_clone(this.__wbg_ptr);
1508
- return Contract.__wrap(ret);
1561
+ invoice(amount, description, claim_address) {
1562
+ var ptr0 = isLikeNone(description) ? 0 : passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1563
+ var len0 = WASM_VECTOR_LEN;
1564
+ _assertClass(claim_address, Address);
1565
+ const ret = wasm.boltzsession_invoice(this.__wbg_ptr, amount, ptr0, len0, claim_address.__wbg_ptr);
1566
+ return ret;
1567
+ }
1568
+ /**
1569
+ * Restore a swap from its serialized data
1570
+ * @param {string} data
1571
+ * @returns {Promise<PreparePayResponse>}
1572
+ */
1573
+ restorePreparePay(data) {
1574
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1575
+ const len0 = WASM_VECTOR_LEN;
1576
+ const ret = wasm.boltzsession_restorePreparePay(this.__wbg_ptr, ptr0, len0);
1577
+ return ret;
1578
+ }
1579
+ /**
1580
+ * Restore a swap from its serialized data
1581
+ * @param {string} data
1582
+ * @returns {Promise<InvoiceResponse>}
1583
+ */
1584
+ restoreInvoice(data) {
1585
+ const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1586
+ const len0 = WASM_VECTOR_LEN;
1587
+ const ret = wasm.boltzsession_restoreInvoice(this.__wbg_ptr, ptr0, len0);
1588
+ return ret;
1509
1589
  }
1510
1590
  }
1511
- module.exports.Contract = Contract;
1591
+ if (Symbol.dispose) BoltzSession.prototype[Symbol.dispose] = BoltzSession.prototype.free;
1512
1592
 
1513
- const EsploraClientFinalization = (typeof FinalizationRegistry === 'undefined')
1593
+ exports.BoltzSession = BoltzSession;
1594
+
1595
+ const BoltzSessionBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
1596
+ ? { register: () => {}, unregister: () => {} }
1597
+ : new FinalizationRegistry(ptr => wasm.__wbg_boltzsessionbuilder_free(ptr >>> 0, 1));
1598
+ /**
1599
+ * Wrapper over [`lwk_boltz::BoltzSessionBuilder`]
1600
+ */
1601
+ class BoltzSessionBuilder {
1602
+
1603
+ static __wrap(ptr) {
1604
+ ptr = ptr >>> 0;
1605
+ const obj = Object.create(BoltzSessionBuilder.prototype);
1606
+ obj.__wbg_ptr = ptr;
1607
+ BoltzSessionBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
1608
+ return obj;
1609
+ }
1610
+
1611
+ __destroy_into_raw() {
1612
+ const ptr = this.__wbg_ptr;
1613
+ this.__wbg_ptr = 0;
1614
+ BoltzSessionBuilderFinalization.unregister(this);
1615
+ return ptr;
1616
+ }
1617
+
1618
+ free() {
1619
+ const ptr = this.__destroy_into_raw();
1620
+ wasm.__wbg_boltzsessionbuilder_free(ptr, 0);
1621
+ }
1622
+ /**
1623
+ * Create a new BoltzSessionBuilder with the given network
1624
+ *
1625
+ * This creates a builder with default Esplora client for the network.
1626
+ * @param {Network} network
1627
+ * @param {EsploraClient} esplora_client
1628
+ */
1629
+ constructor(network, esplora_client) {
1630
+ _assertClass(network, Network);
1631
+ _assertClass(esplora_client, EsploraClient);
1632
+ const ret = wasm.boltzsessionbuilder_new(network.__wbg_ptr, esplora_client.__wbg_ptr);
1633
+ if (ret[2]) {
1634
+ throw takeFromExternrefTable0(ret[1]);
1635
+ }
1636
+ this.__wbg_ptr = ret[0] >>> 0;
1637
+ BoltzSessionBuilderFinalization.register(this, this.__wbg_ptr, this);
1638
+ return this;
1639
+ }
1640
+ /**
1641
+ * Set the timeout for creating swaps
1642
+ *
1643
+ * If not set, the default timeout of 10 seconds is used.
1644
+ * @param {bigint} timeout_seconds
1645
+ * @returns {BoltzSessionBuilder}
1646
+ */
1647
+ createSwapTimeout(timeout_seconds) {
1648
+ const ptr = this.__destroy_into_raw();
1649
+ const ret = wasm.boltzsessionbuilder_createSwapTimeout(ptr, timeout_seconds);
1650
+ return BoltzSessionBuilder.__wrap(ret);
1651
+ }
1652
+ /**
1653
+ * Set the timeout for the advance call
1654
+ *
1655
+ * If not set, the default timeout of 3 minutes is used.
1656
+ * @param {bigint} timeout_seconds
1657
+ * @returns {BoltzSessionBuilder}
1658
+ */
1659
+ timeoutAdvance(timeout_seconds) {
1660
+ const ptr = this.__destroy_into_raw();
1661
+ const ret = wasm.boltzsessionbuilder_timeoutAdvance(ptr, timeout_seconds);
1662
+ return BoltzSessionBuilder.__wrap(ret);
1663
+ }
1664
+ /**
1665
+ * Set the mnemonic for deriving swap keys
1666
+ *
1667
+ * If not set, a new random mnemonic will be generated.
1668
+ * @param {Mnemonic} mnemonic
1669
+ * @returns {BoltzSessionBuilder}
1670
+ */
1671
+ mnemonic(mnemonic) {
1672
+ const ptr = this.__destroy_into_raw();
1673
+ _assertClass(mnemonic, Mnemonic);
1674
+ const ret = wasm.boltzsessionbuilder_mnemonic(ptr, mnemonic.__wbg_ptr);
1675
+ return BoltzSessionBuilder.__wrap(ret);
1676
+ }
1677
+ /**
1678
+ * Set the polling flag
1679
+ *
1680
+ * If true, the advance call will not await on the websocket connection returning immediately
1681
+ * even if there is no update, thus requiring the caller to poll for updates.
1682
+ *
1683
+ * If true, the timeout_advance will be ignored even if set.
1684
+ * @param {boolean} polling
1685
+ * @returns {BoltzSessionBuilder}
1686
+ */
1687
+ polling(polling) {
1688
+ const ptr = this.__destroy_into_raw();
1689
+ const ret = wasm.boltzsessionbuilder_polling(ptr, polling);
1690
+ return BoltzSessionBuilder.__wrap(ret);
1691
+ }
1692
+ /**
1693
+ * Set the next index to use for deriving keypairs
1694
+ *
1695
+ * Avoid a call to the boltz API to recover this information.
1696
+ *
1697
+ * When the mnemonic is not set, this is ignored.
1698
+ * @param {number} next_index_to_use
1699
+ * @returns {BoltzSessionBuilder}
1700
+ */
1701
+ nextIndexToUse(next_index_to_use) {
1702
+ const ptr = this.__destroy_into_raw();
1703
+ const ret = wasm.boltzsessionbuilder_nextIndexToUse(ptr, next_index_to_use);
1704
+ return BoltzSessionBuilder.__wrap(ret);
1705
+ }
1706
+ /**
1707
+ * Set the referral id for the BoltzSession
1708
+ * @param {string} referral_id
1709
+ * @returns {BoltzSessionBuilder}
1710
+ */
1711
+ referralId(referral_id) {
1712
+ const ptr = this.__destroy_into_raw();
1713
+ const ptr0 = passStringToWasm0(referral_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1714
+ const len0 = WASM_VECTOR_LEN;
1715
+ const ret = wasm.boltzsessionbuilder_referralId(ptr, ptr0, len0);
1716
+ return BoltzSessionBuilder.__wrap(ret);
1717
+ }
1718
+ /**
1719
+ * Set the url of the bitcoin electrum client
1720
+ * @param {string} bitcoin_electrum_client
1721
+ * @returns {BoltzSessionBuilder}
1722
+ */
1723
+ bitcoinElectrumClient(bitcoin_electrum_client) {
1724
+ const ptr = this.__destroy_into_raw();
1725
+ const ptr0 = passStringToWasm0(bitcoin_electrum_client, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1726
+ const len0 = WASM_VECTOR_LEN;
1727
+ const ret = wasm.boltzsessionbuilder_bitcoinElectrumClient(ptr, ptr0, len0);
1728
+ if (ret[2]) {
1729
+ throw takeFromExternrefTable0(ret[1]);
1730
+ }
1731
+ return BoltzSessionBuilder.__wrap(ret[0]);
1732
+ }
1733
+ /**
1734
+ * Set the random preimages flag
1735
+ *
1736
+ * The default is false, the preimages will be deterministic and the rescue file will be
1737
+ * compatible with the Boltz web app.
1738
+ * If true, the preimages will be random potentially allowing concurrent sessions with the same
1739
+ * mnemonic, but completing the swap will be possible only with the preimage data. For example
1740
+ * the boltz web app will be able only to refund the swap, not to bring it to completion.
1741
+ * If true, when serializing the swap data, the preimage will be saved in the data.
1742
+ * @param {boolean} random_preimages
1743
+ * @returns {BoltzSessionBuilder}
1744
+ */
1745
+ randomPreimages(random_preimages) {
1746
+ const ptr = this.__destroy_into_raw();
1747
+ const ret = wasm.boltzsessionbuilder_randomPreimages(ptr, random_preimages);
1748
+ return BoltzSessionBuilder.__wrap(ret);
1749
+ }
1750
+ /**
1751
+ * Build the BoltzSession
1752
+ * @returns {Promise<BoltzSession>}
1753
+ */
1754
+ build() {
1755
+ const ptr = this.__destroy_into_raw();
1756
+ const ret = wasm.boltzsessionbuilder_build(ptr);
1757
+ return ret;
1758
+ }
1759
+ }
1760
+ if (Symbol.dispose) BoltzSessionBuilder.prototype[Symbol.dispose] = BoltzSessionBuilder.prototype.free;
1761
+
1762
+ exports.BoltzSessionBuilder = BoltzSessionBuilder;
1763
+
1764
+ const ContractFinalization = (typeof FinalizationRegistry === 'undefined')
1765
+ ? { register: () => {}, unregister: () => {} }
1766
+ : new FinalizationRegistry(ptr => wasm.__wbg_contract_free(ptr >>> 0, 1));
1767
+ /**
1768
+ * A contract defining metadata of an asset such the name and the ticker
1769
+ */
1770
+ class Contract {
1771
+
1772
+ static __wrap(ptr) {
1773
+ ptr = ptr >>> 0;
1774
+ const obj = Object.create(Contract.prototype);
1775
+ obj.__wbg_ptr = ptr;
1776
+ ContractFinalization.register(obj, obj.__wbg_ptr, obj);
1777
+ return obj;
1778
+ }
1779
+
1780
+ __destroy_into_raw() {
1781
+ const ptr = this.__wbg_ptr;
1782
+ this.__wbg_ptr = 0;
1783
+ ContractFinalization.unregister(this);
1784
+ return ptr;
1785
+ }
1786
+
1787
+ free() {
1788
+ const ptr = this.__destroy_into_raw();
1789
+ wasm.__wbg_contract_free(ptr, 0);
1790
+ }
1791
+ /**
1792
+ * Creates a `Contract`
1793
+ * @param {string} domain
1794
+ * @param {string} issuer_pubkey
1795
+ * @param {string} name
1796
+ * @param {number} precision
1797
+ * @param {string} ticker
1798
+ * @param {number} version
1799
+ */
1800
+ constructor(domain, issuer_pubkey, name, precision, ticker, version) {
1801
+ const ptr0 = passStringToWasm0(domain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1802
+ const len0 = WASM_VECTOR_LEN;
1803
+ const ptr1 = passStringToWasm0(issuer_pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1804
+ const len1 = WASM_VECTOR_LEN;
1805
+ const ptr2 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1806
+ const len2 = WASM_VECTOR_LEN;
1807
+ const ptr3 = passStringToWasm0(ticker, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1808
+ const len3 = WASM_VECTOR_LEN;
1809
+ const ret = wasm.contract_new(ptr0, len0, ptr1, len1, ptr2, len2, precision, ptr3, len3, version);
1810
+ if (ret[2]) {
1811
+ throw takeFromExternrefTable0(ret[1]);
1812
+ }
1813
+ this.__wbg_ptr = ret[0] >>> 0;
1814
+ ContractFinalization.register(this, this.__wbg_ptr, this);
1815
+ return this;
1816
+ }
1817
+ /**
1818
+ * Return the string representation of the contract.
1819
+ * @returns {string}
1820
+ */
1821
+ toString() {
1822
+ let deferred1_0;
1823
+ let deferred1_1;
1824
+ try {
1825
+ const ret = wasm.contract_toString(this.__wbg_ptr);
1826
+ deferred1_0 = ret[0];
1827
+ deferred1_1 = ret[1];
1828
+ return getStringFromWasm0(ret[0], ret[1]);
1829
+ } finally {
1830
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1831
+ }
1832
+ }
1833
+ /**
1834
+ * Return the domain of the issuer of the contract.
1835
+ * @returns {string}
1836
+ */
1837
+ domain() {
1838
+ let deferred1_0;
1839
+ let deferred1_1;
1840
+ try {
1841
+ const ret = wasm.contract_domain(this.__wbg_ptr);
1842
+ deferred1_0 = ret[0];
1843
+ deferred1_1 = ret[1];
1844
+ return getStringFromWasm0(ret[0], ret[1]);
1845
+ } finally {
1846
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1847
+ }
1848
+ }
1849
+ /**
1850
+ * Make a copy of the contract.
1851
+ *
1852
+ * This is needed to pass it to a function that requires a `Contract` (without borrowing)
1853
+ * but you need the same contract after that call.
1854
+ * @returns {Contract}
1855
+ */
1856
+ clone() {
1857
+ const ret = wasm.contract_clone(this.__wbg_ptr);
1858
+ return Contract.__wrap(ret);
1859
+ }
1860
+ }
1861
+ if (Symbol.dispose) Contract.prototype[Symbol.dispose] = Contract.prototype.free;
1862
+
1863
+ exports.Contract = Contract;
1864
+
1865
+ const CurrencyCodeFinalization = (typeof FinalizationRegistry === 'undefined')
1866
+ ? { register: () => {}, unregister: () => {} }
1867
+ : new FinalizationRegistry(ptr => wasm.__wbg_currencycode_free(ptr >>> 0, 1));
1868
+
1869
+ class CurrencyCode {
1870
+
1871
+ static __wrap(ptr) {
1872
+ ptr = ptr >>> 0;
1873
+ const obj = Object.create(CurrencyCode.prototype);
1874
+ obj.__wbg_ptr = ptr;
1875
+ CurrencyCodeFinalization.register(obj, obj.__wbg_ptr, obj);
1876
+ return obj;
1877
+ }
1878
+
1879
+ __destroy_into_raw() {
1880
+ const ptr = this.__wbg_ptr;
1881
+ this.__wbg_ptr = 0;
1882
+ CurrencyCodeFinalization.unregister(this);
1883
+ return ptr;
1884
+ }
1885
+
1886
+ free() {
1887
+ const ptr = this.__destroy_into_raw();
1888
+ wasm.__wbg_currencycode_free(ptr, 0);
1889
+ }
1890
+ /**
1891
+ * @param {string} code
1892
+ */
1893
+ constructor(code) {
1894
+ const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1895
+ const len0 = WASM_VECTOR_LEN;
1896
+ const ret = wasm.currencycode_new(ptr0, len0);
1897
+ if (ret[2]) {
1898
+ throw takeFromExternrefTable0(ret[1]);
1899
+ }
1900
+ this.__wbg_ptr = ret[0] >>> 0;
1901
+ CurrencyCodeFinalization.register(this, this.__wbg_ptr, this);
1902
+ return this;
1903
+ }
1904
+ /**
1905
+ * @returns {string}
1906
+ */
1907
+ name() {
1908
+ let deferred1_0;
1909
+ let deferred1_1;
1910
+ try {
1911
+ const ret = wasm.currencycode_name(this.__wbg_ptr);
1912
+ deferred1_0 = ret[0];
1913
+ deferred1_1 = ret[1];
1914
+ return getStringFromWasm0(ret[0], ret[1]);
1915
+ } finally {
1916
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1917
+ }
1918
+ }
1919
+ /**
1920
+ * @returns {string}
1921
+ */
1922
+ alpha3() {
1923
+ let deferred1_0;
1924
+ let deferred1_1;
1925
+ try {
1926
+ const ret = wasm.currencycode_alpha3(this.__wbg_ptr);
1927
+ deferred1_0 = ret[0];
1928
+ deferred1_1 = ret[1];
1929
+ return getStringFromWasm0(ret[0], ret[1]);
1930
+ } finally {
1931
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1932
+ }
1933
+ }
1934
+ /**
1935
+ * @returns {number}
1936
+ */
1937
+ exp() {
1938
+ const ret = wasm.currencycode_exp(this.__wbg_ptr);
1939
+ return ret;
1940
+ }
1941
+ }
1942
+ if (Symbol.dispose) CurrencyCode.prototype[Symbol.dispose] = CurrencyCode.prototype.free;
1943
+
1944
+ exports.CurrencyCode = CurrencyCode;
1945
+
1946
+ const EsploraClientFinalization = (typeof FinalizationRegistry === 'undefined')
1514
1947
  ? { register: () => {}, unregister: () => {} }
1515
1948
  : new FinalizationRegistry(ptr => wasm.__wbg_esploraclient_free(ptr >>> 0, 1));
1516
1949
  /**
@@ -1635,7 +2068,198 @@ class EsploraClient {
1635
2068
  return ret;
1636
2069
  }
1637
2070
  }
1638
- module.exports.EsploraClient = EsploraClient;
2071
+ if (Symbol.dispose) EsploraClient.prototype[Symbol.dispose] = EsploraClient.prototype.free;
2072
+
2073
+ exports.EsploraClient = EsploraClient;
2074
+
2075
+ const ExchangeRatesFinalization = (typeof FinalizationRegistry === 'undefined')
2076
+ ? { register: () => {}, unregister: () => {} }
2077
+ : new FinalizationRegistry(ptr => wasm.__wbg_exchangerates_free(ptr >>> 0, 1));
2078
+ /**
2079
+ * Multiple exchange rates against BTC provided from various sources
2080
+ */
2081
+ class ExchangeRates {
2082
+
2083
+ static __wrap(ptr) {
2084
+ ptr = ptr >>> 0;
2085
+ const obj = Object.create(ExchangeRates.prototype);
2086
+ obj.__wbg_ptr = ptr;
2087
+ ExchangeRatesFinalization.register(obj, obj.__wbg_ptr, obj);
2088
+ return obj;
2089
+ }
2090
+
2091
+ __destroy_into_raw() {
2092
+ const ptr = this.__wbg_ptr;
2093
+ this.__wbg_ptr = 0;
2094
+ ExchangeRatesFinalization.unregister(this);
2095
+ return ptr;
2096
+ }
2097
+
2098
+ free() {
2099
+ const ptr = this.__destroy_into_raw();
2100
+ wasm.__wbg_exchangerates_free(ptr, 0);
2101
+ }
2102
+ /**
2103
+ * Get the median exchange rate
2104
+ * @returns {number}
2105
+ */
2106
+ median() {
2107
+ const ret = wasm.exchangerates_median(this.__wbg_ptr);
2108
+ return ret;
2109
+ }
2110
+ /**
2111
+ * Get the individual exchange rates as a JSON array
2112
+ *
2113
+ * Each rate contains: rate, currency, source, and timestamp
2114
+ * @returns {any}
2115
+ */
2116
+ results() {
2117
+ const ret = wasm.exchangerates_results(this.__wbg_ptr);
2118
+ if (ret[2]) {
2119
+ throw takeFromExternrefTable0(ret[1]);
2120
+ }
2121
+ return takeFromExternrefTable0(ret[0]);
2122
+ }
2123
+ /**
2124
+ * Get the number of sources that provided rates
2125
+ * @returns {number}
2126
+ */
2127
+ resultsCount() {
2128
+ const ret = wasm.exchangerates_resultsCount(this.__wbg_ptr);
2129
+ return ret >>> 0;
2130
+ }
2131
+ /**
2132
+ * Serialize the entire response to JSON string
2133
+ * @returns {string}
2134
+ */
2135
+ serialize() {
2136
+ let deferred2_0;
2137
+ let deferred2_1;
2138
+ try {
2139
+ const ret = wasm.exchangerates_serialize(this.__wbg_ptr);
2140
+ var ptr1 = ret[0];
2141
+ var len1 = ret[1];
2142
+ if (ret[3]) {
2143
+ ptr1 = 0; len1 = 0;
2144
+ throw takeFromExternrefTable0(ret[2]);
2145
+ }
2146
+ deferred2_0 = ptr1;
2147
+ deferred2_1 = len1;
2148
+ return getStringFromWasm0(ptr1, len1);
2149
+ } finally {
2150
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2151
+ }
2152
+ }
2153
+ }
2154
+ if (Symbol.dispose) ExchangeRates.prototype[Symbol.dispose] = ExchangeRates.prototype.free;
2155
+
2156
+ exports.ExchangeRates = ExchangeRates;
2157
+
2158
+ const InvoiceResponseFinalization = (typeof FinalizationRegistry === 'undefined')
2159
+ ? { register: () => {}, unregister: () => {} }
2160
+ : new FinalizationRegistry(ptr => wasm.__wbg_invoiceresponse_free(ptr >>> 0, 1));
2161
+ /**
2162
+ * Wrapper over [`lwk_boltz::InvoiceResponse`]
2163
+ */
2164
+ class InvoiceResponse {
2165
+
2166
+ static __wrap(ptr) {
2167
+ ptr = ptr >>> 0;
2168
+ const obj = Object.create(InvoiceResponse.prototype);
2169
+ obj.__wbg_ptr = ptr;
2170
+ InvoiceResponseFinalization.register(obj, obj.__wbg_ptr, obj);
2171
+ return obj;
2172
+ }
2173
+
2174
+ __destroy_into_raw() {
2175
+ const ptr = this.__wbg_ptr;
2176
+ this.__wbg_ptr = 0;
2177
+ InvoiceResponseFinalization.unregister(this);
2178
+ return ptr;
2179
+ }
2180
+
2181
+ free() {
2182
+ const ptr = this.__destroy_into_raw();
2183
+ wasm.__wbg_invoiceresponse_free(ptr, 0);
2184
+ }
2185
+ /**
2186
+ * Serialize the response to JSON string for JS interop
2187
+ * @returns {string}
2188
+ */
2189
+ serialize() {
2190
+ let deferred2_0;
2191
+ let deferred2_1;
2192
+ try {
2193
+ const ret = wasm.invoiceresponse_serialize(this.__wbg_ptr);
2194
+ var ptr1 = ret[0];
2195
+ var len1 = ret[1];
2196
+ if (ret[3]) {
2197
+ ptr1 = 0; len1 = 0;
2198
+ throw takeFromExternrefTable0(ret[2]);
2199
+ }
2200
+ deferred2_0 = ptr1;
2201
+ deferred2_1 = len1;
2202
+ return getStringFromWasm0(ptr1, len1);
2203
+ } finally {
2204
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2205
+ }
2206
+ }
2207
+ /**
2208
+ * Return the bolt11 invoice string
2209
+ * @returns {string}
2210
+ */
2211
+ bolt11Invoice() {
2212
+ let deferred1_0;
2213
+ let deferred1_1;
2214
+ try {
2215
+ const ret = wasm.invoiceresponse_bolt11Invoice(this.__wbg_ptr);
2216
+ deferred1_0 = ret[0];
2217
+ deferred1_1 = ret[1];
2218
+ return getStringFromWasm0(ret[0], ret[1]);
2219
+ } finally {
2220
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2221
+ }
2222
+ }
2223
+ /**
2224
+ * @returns {string}
2225
+ */
2226
+ swapId() {
2227
+ let deferred1_0;
2228
+ let deferred1_1;
2229
+ try {
2230
+ const ret = wasm.invoiceresponse_swapId(this.__wbg_ptr);
2231
+ deferred1_0 = ret[0];
2232
+ deferred1_1 = ret[1];
2233
+ return getStringFromWasm0(ret[0], ret[1]);
2234
+ } finally {
2235
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2236
+ }
2237
+ }
2238
+ /**
2239
+ * The fee of the swap provider
2240
+ *
2241
+ * It is equal to the amount of the invoice minus the amount of the onchain transaction.
2242
+ * Does not include the fee of the onchain transaction.
2243
+ * @returns {bigint | undefined}
2244
+ */
2245
+ fee() {
2246
+ const ret = wasm.invoiceresponse_fee(this.__wbg_ptr);
2247
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
2248
+ }
2249
+ /**
2250
+ * Complete the payment by advancing through the swap states until completion or failure
2251
+ * Consumes self as the inner method does
2252
+ * @returns {Promise<boolean>}
2253
+ */
2254
+ completePay() {
2255
+ const ptr = this.__destroy_into_raw();
2256
+ const ret = wasm.invoiceresponse_completePay(ptr);
2257
+ return ret;
2258
+ }
2259
+ }
2260
+ if (Symbol.dispose) InvoiceResponse.prototype[Symbol.dispose] = InvoiceResponse.prototype.free;
2261
+
2262
+ exports.InvoiceResponse = InvoiceResponse;
1639
2263
 
1640
2264
  const IssuanceFinalization = (typeof FinalizationRegistry === 'undefined')
1641
2265
  ? { register: () => {}, unregister: () => {} }
@@ -1713,7 +2337,9 @@ class Issuance {
1713
2337
  return ret !== 0;
1714
2338
  }
1715
2339
  }
1716
- module.exports.Issuance = Issuance;
2340
+ if (Symbol.dispose) Issuance.prototype[Symbol.dispose] = Issuance.prototype.free;
2341
+
2342
+ exports.Issuance = Issuance;
1717
2343
 
1718
2344
  const JadeFinalization = (typeof FinalizationRegistry === 'undefined')
1719
2345
  ? { register: () => {}, unregister: () => {} }
@@ -1866,7 +2492,9 @@ class Jade {
1866
2492
  return ret;
1867
2493
  }
1868
2494
  }
1869
- module.exports.Jade = Jade;
2495
+ if (Symbol.dispose) Jade.prototype[Symbol.dispose] = Jade.prototype.free;
2496
+
2497
+ exports.Jade = Jade;
1870
2498
 
1871
2499
  const JadeWebSocketFinalization = (typeof FinalizationRegistry === 'undefined')
1872
2500
  ? { register: () => {}, unregister: () => {} }
@@ -2020,7 +2648,9 @@ class JadeWebSocket {
2020
2648
  return ret;
2021
2649
  }
2022
2650
  }
2023
- module.exports.JadeWebSocket = JadeWebSocket;
2651
+ if (Symbol.dispose) JadeWebSocket.prototype[Symbol.dispose] = JadeWebSocket.prototype.free;
2652
+
2653
+ exports.JadeWebSocket = JadeWebSocket;
2024
2654
 
2025
2655
  const LedgerWebFinalization = (typeof FinalizationRegistry === 'undefined')
2026
2656
  ? { register: () => {}, unregister: () => {} }
@@ -2111,7 +2741,159 @@ class LedgerWeb {
2111
2741
  return ret;
2112
2742
  }
2113
2743
  }
2114
- module.exports.LedgerWeb = LedgerWeb;
2744
+ if (Symbol.dispose) LedgerWeb.prototype[Symbol.dispose] = LedgerWeb.prototype.free;
2745
+
2746
+ exports.LedgerWeb = LedgerWeb;
2747
+
2748
+ const LightningPaymentFinalization = (typeof FinalizationRegistry === 'undefined')
2749
+ ? { register: () => {}, unregister: () => {} }
2750
+ : new FinalizationRegistry(ptr => wasm.__wbg_lightningpayment_free(ptr >>> 0, 1));
2751
+ /**
2752
+ * Wrapper over [`lwk_boltz::LightningPayment`]
2753
+ */
2754
+ class LightningPayment {
2755
+
2756
+ __destroy_into_raw() {
2757
+ const ptr = this.__wbg_ptr;
2758
+ this.__wbg_ptr = 0;
2759
+ LightningPaymentFinalization.unregister(this);
2760
+ return ptr;
2761
+ }
2762
+
2763
+ free() {
2764
+ const ptr = this.__destroy_into_raw();
2765
+ wasm.__wbg_lightningpayment_free(ptr, 0);
2766
+ }
2767
+ /**
2768
+ * Create a LightningPayment from a bolt11 invoice string or a bolt12 offer
2769
+ * @param {string} invoice
2770
+ */
2771
+ constructor(invoice) {
2772
+ const ptr0 = passStringToWasm0(invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2773
+ const len0 = WASM_VECTOR_LEN;
2774
+ const ret = wasm.lightningpayment_new(ptr0, len0);
2775
+ if (ret[2]) {
2776
+ throw takeFromExternrefTable0(ret[1]);
2777
+ }
2778
+ this.__wbg_ptr = ret[0] >>> 0;
2779
+ LightningPaymentFinalization.register(this, this.__wbg_ptr, this);
2780
+ return this;
2781
+ }
2782
+ /**
2783
+ * Return a string representation of the LightningPayment
2784
+ * @returns {string}
2785
+ */
2786
+ toString() {
2787
+ let deferred1_0;
2788
+ let deferred1_1;
2789
+ try {
2790
+ const ret = wasm.lightningpayment_toString(this.__wbg_ptr);
2791
+ deferred1_0 = ret[0];
2792
+ deferred1_1 = ret[1];
2793
+ return getStringFromWasm0(ret[0], ret[1]);
2794
+ } finally {
2795
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2796
+ }
2797
+ }
2798
+ /**
2799
+ * Return a QR code image uri for the LightningPayment
2800
+ * @param {number | null} [pixel_per_module]
2801
+ * @returns {string}
2802
+ */
2803
+ toUriQr(pixel_per_module) {
2804
+ let deferred2_0;
2805
+ let deferred2_1;
2806
+ try {
2807
+ const ret = wasm.lightningpayment_toUriQr(this.__wbg_ptr, isLikeNone(pixel_per_module) ? 0xFFFFFF : pixel_per_module);
2808
+ var ptr1 = ret[0];
2809
+ var len1 = ret[1];
2810
+ if (ret[3]) {
2811
+ ptr1 = 0; len1 = 0;
2812
+ throw takeFromExternrefTable0(ret[2]);
2813
+ }
2814
+ deferred2_0 = ptr1;
2815
+ deferred2_1 = len1;
2816
+ return getStringFromWasm0(ptr1, len1);
2817
+ } finally {
2818
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
2819
+ }
2820
+ }
2821
+ }
2822
+ if (Symbol.dispose) LightningPayment.prototype[Symbol.dispose] = LightningPayment.prototype.free;
2823
+
2824
+ exports.LightningPayment = LightningPayment;
2825
+
2826
+ const MagicRoutingHintFinalization = (typeof FinalizationRegistry === 'undefined')
2827
+ ? { register: () => {}, unregister: () => {} }
2828
+ : new FinalizationRegistry(ptr => wasm.__wbg_magicroutinghint_free(ptr >>> 0, 1));
2829
+ /**
2830
+ * A struct representing a magic routing hint, with details on how to pay directly without using Boltz
2831
+ */
2832
+ class MagicRoutingHint {
2833
+
2834
+ static __wrap(ptr) {
2835
+ ptr = ptr >>> 0;
2836
+ const obj = Object.create(MagicRoutingHint.prototype);
2837
+ obj.__wbg_ptr = ptr;
2838
+ MagicRoutingHintFinalization.register(obj, obj.__wbg_ptr, obj);
2839
+ return obj;
2840
+ }
2841
+
2842
+ __destroy_into_raw() {
2843
+ const ptr = this.__wbg_ptr;
2844
+ this.__wbg_ptr = 0;
2845
+ MagicRoutingHintFinalization.unregister(this);
2846
+ return ptr;
2847
+ }
2848
+
2849
+ free() {
2850
+ const ptr = this.__destroy_into_raw();
2851
+ wasm.__wbg_magicroutinghint_free(ptr, 0);
2852
+ }
2853
+ /**
2854
+ * The address to pay directly to
2855
+ * @returns {string}
2856
+ */
2857
+ address() {
2858
+ let deferred1_0;
2859
+ let deferred1_1;
2860
+ try {
2861
+ const ret = wasm.magicroutinghint_address(this.__wbg_ptr);
2862
+ deferred1_0 = ret[0];
2863
+ deferred1_1 = ret[1];
2864
+ return getStringFromWasm0(ret[0], ret[1]);
2865
+ } finally {
2866
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2867
+ }
2868
+ }
2869
+ /**
2870
+ * The amount to pay directly to
2871
+ * @returns {bigint}
2872
+ */
2873
+ amount() {
2874
+ const ret = wasm.magicroutinghint_amount(this.__wbg_ptr);
2875
+ return BigInt.asUintN(64, ret);
2876
+ }
2877
+ /**
2878
+ * The URI to pay directly to
2879
+ * @returns {string}
2880
+ */
2881
+ uri() {
2882
+ let deferred1_0;
2883
+ let deferred1_1;
2884
+ try {
2885
+ const ret = wasm.magicroutinghint_uri(this.__wbg_ptr);
2886
+ deferred1_0 = ret[0];
2887
+ deferred1_1 = ret[1];
2888
+ return getStringFromWasm0(ret[0], ret[1]);
2889
+ } finally {
2890
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2891
+ }
2892
+ }
2893
+ }
2894
+ if (Symbol.dispose) MagicRoutingHint.prototype[Symbol.dispose] = MagicRoutingHint.prototype.free;
2895
+
2896
+ exports.MagicRoutingHint = MagicRoutingHint;
2115
2897
 
2116
2898
  const MnemonicFinalization = (typeof FinalizationRegistry === 'undefined')
2117
2899
  ? { register: () => {}, unregister: () => {} }
@@ -2203,7 +2985,9 @@ class Mnemonic {
2203
2985
  return Mnemonic.__wrap(ret[0]);
2204
2986
  }
2205
2987
  }
2206
- module.exports.Mnemonic = Mnemonic;
2988
+ if (Symbol.dispose) Mnemonic.prototype[Symbol.dispose] = Mnemonic.prototype.free;
2989
+
2990
+ exports.Mnemonic = Mnemonic;
2207
2991
 
2208
2992
  const NetworkFinalization = (typeof FinalizationRegistry === 'undefined')
2209
2993
  ? { register: () => {}, unregister: () => {} }
@@ -2347,7 +3131,9 @@ class Network {
2347
3131
  }
2348
3132
  }
2349
3133
  }
2350
- module.exports.Network = Network;
3134
+ if (Symbol.dispose) Network.prototype[Symbol.dispose] = Network.prototype.free;
3135
+
3136
+ exports.Network = Network;
2351
3137
 
2352
3138
  const OptionWalletTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
2353
3139
  ? { register: () => {}, unregister: () => {} }
@@ -2386,7 +3172,9 @@ class OptionWalletTxOut {
2386
3172
  return ret === 0 ? undefined : WalletTxOut.__wrap(ret);
2387
3173
  }
2388
3174
  }
2389
- module.exports.OptionWalletTxOut = OptionWalletTxOut;
3175
+ if (Symbol.dispose) OptionWalletTxOut.prototype[Symbol.dispose] = OptionWalletTxOut.prototype.free;
3176
+
3177
+ exports.OptionWalletTxOut = OptionWalletTxOut;
2390
3178
 
2391
3179
  const OutPointFinalization = (typeof FinalizationRegistry === 'undefined')
2392
3180
  ? { register: () => {}, unregister: () => {} }
@@ -2454,7 +3242,152 @@ class OutPoint {
2454
3242
  return ret >>> 0;
2455
3243
  }
2456
3244
  }
2457
- module.exports.OutPoint = OutPoint;
3245
+ if (Symbol.dispose) OutPoint.prototype[Symbol.dispose] = OutPoint.prototype.free;
3246
+
3247
+ exports.OutPoint = OutPoint;
3248
+
3249
+ const PosConfigFinalization = (typeof FinalizationRegistry === 'undefined')
3250
+ ? { register: () => {}, unregister: () => {} }
3251
+ : new FinalizationRegistry(ptr => wasm.__wbg_posconfig_free(ptr >>> 0, 1));
3252
+ /**
3253
+ * POS (Point of Sale) configuration for encoding/decoding
3254
+ */
3255
+ class PosConfig {
3256
+
3257
+ static __wrap(ptr) {
3258
+ ptr = ptr >>> 0;
3259
+ const obj = Object.create(PosConfig.prototype);
3260
+ obj.__wbg_ptr = ptr;
3261
+ PosConfigFinalization.register(obj, obj.__wbg_ptr, obj);
3262
+ return obj;
3263
+ }
3264
+
3265
+ __destroy_into_raw() {
3266
+ const ptr = this.__wbg_ptr;
3267
+ this.__wbg_ptr = 0;
3268
+ PosConfigFinalization.unregister(this);
3269
+ return ptr;
3270
+ }
3271
+
3272
+ free() {
3273
+ const ptr = this.__destroy_into_raw();
3274
+ wasm.__wbg_posconfig_free(ptr, 0);
3275
+ }
3276
+ /**
3277
+ * Create a new POS configuration
3278
+ * @param {WolletDescriptor} descriptor
3279
+ * @param {CurrencyCode} currency
3280
+ */
3281
+ constructor(descriptor, currency) {
3282
+ _assertClass(descriptor, WolletDescriptor);
3283
+ _assertClass(currency, CurrencyCode);
3284
+ const ret = wasm.posconfig_new(descriptor.__wbg_ptr, currency.__wbg_ptr);
3285
+ this.__wbg_ptr = ret >>> 0;
3286
+ PosConfigFinalization.register(this, this.__wbg_ptr, this);
3287
+ return this;
3288
+ }
3289
+ /**
3290
+ * Create a POS configuration with all options
3291
+ * @param {WolletDescriptor} descriptor
3292
+ * @param {CurrencyCode} currency
3293
+ * @param {boolean | null} [show_gear]
3294
+ * @param {boolean | null} [show_description]
3295
+ * @returns {PosConfig}
3296
+ */
3297
+ static withOptions(descriptor, currency, show_gear, show_description) {
3298
+ _assertClass(descriptor, WolletDescriptor);
3299
+ _assertClass(currency, CurrencyCode);
3300
+ const ret = wasm.posconfig_withOptions(descriptor.__wbg_ptr, currency.__wbg_ptr, isLikeNone(show_gear) ? 0xFFFFFF : show_gear ? 1 : 0, isLikeNone(show_description) ? 0xFFFFFF : show_description ? 1 : 0);
3301
+ return PosConfig.__wrap(ret);
3302
+ }
3303
+ /**
3304
+ * Decode a POS configuration from a URL-safe base64 encoded string
3305
+ * @param {string} encoded
3306
+ * @returns {PosConfig}
3307
+ */
3308
+ static decode(encoded) {
3309
+ const ptr0 = passStringToWasm0(encoded, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3310
+ const len0 = WASM_VECTOR_LEN;
3311
+ const ret = wasm.posconfig_decode(ptr0, len0);
3312
+ if (ret[2]) {
3313
+ throw takeFromExternrefTable0(ret[1]);
3314
+ }
3315
+ return PosConfig.__wrap(ret[0]);
3316
+ }
3317
+ /**
3318
+ * Encode the POS configuration to a URL-safe base64 string
3319
+ * @returns {string}
3320
+ */
3321
+ encode() {
3322
+ let deferred2_0;
3323
+ let deferred2_1;
3324
+ try {
3325
+ const ret = wasm.posconfig_encode(this.__wbg_ptr);
3326
+ var ptr1 = ret[0];
3327
+ var len1 = ret[1];
3328
+ if (ret[3]) {
3329
+ ptr1 = 0; len1 = 0;
3330
+ throw takeFromExternrefTable0(ret[2]);
3331
+ }
3332
+ deferred2_0 = ptr1;
3333
+ deferred2_1 = len1;
3334
+ return getStringFromWasm0(ptr1, len1);
3335
+ } finally {
3336
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3337
+ }
3338
+ }
3339
+ /**
3340
+ * Get the wallet descriptor
3341
+ * @returns {WolletDescriptor}
3342
+ */
3343
+ get descriptor() {
3344
+ const ret = wasm.posconfig_descriptor(this.__wbg_ptr);
3345
+ return WolletDescriptor.__wrap(ret);
3346
+ }
3347
+ /**
3348
+ * Get the currency code
3349
+ * @returns {CurrencyCode}
3350
+ */
3351
+ get currency() {
3352
+ const ret = wasm.posconfig_currency(this.__wbg_ptr);
3353
+ return CurrencyCode.__wrap(ret);
3354
+ }
3355
+ /**
3356
+ * Get whether to show the gear/settings button
3357
+ * @returns {boolean | undefined}
3358
+ */
3359
+ get showGear() {
3360
+ const ret = wasm.posconfig_show_gear(this.__wbg_ptr);
3361
+ return ret === 0xFFFFFF ? undefined : ret !== 0;
3362
+ }
3363
+ /**
3364
+ * Get whether to show the description/note field
3365
+ * @returns {boolean | undefined}
3366
+ */
3367
+ get showDescription() {
3368
+ const ret = wasm.posconfig_show_description(this.__wbg_ptr);
3369
+ return ret === 0xFFFFFF ? undefined : ret !== 0;
3370
+ }
3371
+ /**
3372
+ * Return a string representation of the POS configuration
3373
+ * @returns {string}
3374
+ */
3375
+ toString() {
3376
+ let deferred1_0;
3377
+ let deferred1_1;
3378
+ try {
3379
+ const ret = wasm.posconfig_toString(this.__wbg_ptr);
3380
+ deferred1_0 = ret[0];
3381
+ deferred1_1 = ret[1];
3382
+ return getStringFromWasm0(ret[0], ret[1]);
3383
+ } finally {
3384
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3385
+ }
3386
+ }
3387
+ }
3388
+ if (Symbol.dispose) PosConfig.prototype[Symbol.dispose] = PosConfig.prototype.free;
3389
+
3390
+ exports.PosConfig = PosConfig;
2458
3391
 
2459
3392
  const PrecisionFinalization = (typeof FinalizationRegistry === 'undefined')
2460
3393
  ? { register: () => {}, unregister: () => {} }
@@ -2527,7 +3460,199 @@ class Precision {
2527
3460
  return ret[0];
2528
3461
  }
2529
3462
  }
2530
- module.exports.Precision = Precision;
3463
+ if (Symbol.dispose) Precision.prototype[Symbol.dispose] = Precision.prototype.free;
3464
+
3465
+ exports.Precision = Precision;
3466
+
3467
+ const PreparePayResponseFinalization = (typeof FinalizationRegistry === 'undefined')
3468
+ ? { register: () => {}, unregister: () => {} }
3469
+ : new FinalizationRegistry(ptr => wasm.__wbg_preparepayresponse_free(ptr >>> 0, 1));
3470
+
3471
+ class PreparePayResponse {
3472
+
3473
+ static __wrap(ptr) {
3474
+ ptr = ptr >>> 0;
3475
+ const obj = Object.create(PreparePayResponse.prototype);
3476
+ obj.__wbg_ptr = ptr;
3477
+ PreparePayResponseFinalization.register(obj, obj.__wbg_ptr, obj);
3478
+ return obj;
3479
+ }
3480
+
3481
+ __destroy_into_raw() {
3482
+ const ptr = this.__wbg_ptr;
3483
+ this.__wbg_ptr = 0;
3484
+ PreparePayResponseFinalization.unregister(this);
3485
+ return ptr;
3486
+ }
3487
+
3488
+ free() {
3489
+ const ptr = this.__destroy_into_raw();
3490
+ wasm.__wbg_preparepayresponse_free(ptr, 0);
3491
+ }
3492
+ /**
3493
+ * Serialize the response to JSON string for JS interop
3494
+ * @returns {string}
3495
+ */
3496
+ serialize() {
3497
+ let deferred2_0;
3498
+ let deferred2_1;
3499
+ try {
3500
+ const ret = wasm.preparepayresponse_serialize(this.__wbg_ptr);
3501
+ var ptr1 = ret[0];
3502
+ var len1 = ret[1];
3503
+ if (ret[3]) {
3504
+ ptr1 = 0; len1 = 0;
3505
+ throw takeFromExternrefTable0(ret[2]);
3506
+ }
3507
+ deferred2_0 = ptr1;
3508
+ deferred2_1 = len1;
3509
+ return getStringFromWasm0(ptr1, len1);
3510
+ } finally {
3511
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3512
+ }
3513
+ }
3514
+ /**
3515
+ * @returns {string}
3516
+ */
3517
+ swapId() {
3518
+ let deferred1_0;
3519
+ let deferred1_1;
3520
+ try {
3521
+ const ret = wasm.preparepayresponse_swapId(this.__wbg_ptr);
3522
+ deferred1_0 = ret[0];
3523
+ deferred1_1 = ret[1];
3524
+ return getStringFromWasm0(ret[0], ret[1]);
3525
+ } finally {
3526
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3527
+ }
3528
+ }
3529
+ /**
3530
+ * @returns {string}
3531
+ */
3532
+ uri() {
3533
+ let deferred1_0;
3534
+ let deferred1_1;
3535
+ try {
3536
+ const ret = wasm.preparepayresponse_uri(this.__wbg_ptr);
3537
+ deferred1_0 = ret[0];
3538
+ deferred1_1 = ret[1];
3539
+ return getStringFromWasm0(ret[0], ret[1]);
3540
+ } finally {
3541
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3542
+ }
3543
+ }
3544
+ /**
3545
+ * @returns {Address}
3546
+ */
3547
+ uriAddress() {
3548
+ const ret = wasm.preparepayresponse_uriAddress(this.__wbg_ptr);
3549
+ if (ret[2]) {
3550
+ throw takeFromExternrefTable0(ret[1]);
3551
+ }
3552
+ return Address.__wrap(ret[0]);
3553
+ }
3554
+ /**
3555
+ * @returns {bigint}
3556
+ */
3557
+ uriAmount() {
3558
+ const ret = wasm.preparepayresponse_uriAmount(this.__wbg_ptr);
3559
+ return BigInt.asUintN(64, ret);
3560
+ }
3561
+ /**
3562
+ * The fee of the swap provider
3563
+ *
3564
+ * It is equal to the amount requested onchain minus the amount of the bolt11 invoice
3565
+ * Does not include the fee of the onchain transaction.
3566
+ * @returns {bigint | undefined}
3567
+ */
3568
+ fee() {
3569
+ const ret = wasm.preparepayresponse_fee(this.__wbg_ptr);
3570
+ return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
3571
+ }
3572
+ /**
3573
+ * @returns {Promise<boolean>}
3574
+ */
3575
+ completePay() {
3576
+ const ptr = this.__destroy_into_raw();
3577
+ const ret = wasm.preparepayresponse_completePay(ptr);
3578
+ return ret;
3579
+ }
3580
+ }
3581
+ if (Symbol.dispose) PreparePayResponse.prototype[Symbol.dispose] = PreparePayResponse.prototype.free;
3582
+
3583
+ exports.PreparePayResponse = PreparePayResponse;
3584
+
3585
+ const PricesFetcherFinalization = (typeof FinalizationRegistry === 'undefined')
3586
+ ? { register: () => {}, unregister: () => {} }
3587
+ : new FinalizationRegistry(ptr => wasm.__wbg_pricesfetcher_free(ptr >>> 0, 1));
3588
+ /**
3589
+ * Wrapper over [`lwk_wollet::PricesFetcher`]
3590
+ */
3591
+ class PricesFetcher {
3592
+
3593
+ __destroy_into_raw() {
3594
+ const ptr = this.__wbg_ptr;
3595
+ this.__wbg_ptr = 0;
3596
+ PricesFetcherFinalization.unregister(this);
3597
+ return ptr;
3598
+ }
3599
+
3600
+ free() {
3601
+ const ptr = this.__destroy_into_raw();
3602
+ wasm.__wbg_pricesfetcher_free(ptr, 0);
3603
+ }
3604
+ /**
3605
+ * Create a new PricesFetcher with default settings
3606
+ */
3607
+ constructor() {
3608
+ const ret = wasm.pricesfetcher_new();
3609
+ if (ret[2]) {
3610
+ throw takeFromExternrefTable0(ret[1]);
3611
+ }
3612
+ this.__wbg_ptr = ret[0] >>> 0;
3613
+ PricesFetcherFinalization.register(this, this.__wbg_ptr, this);
3614
+ return this;
3615
+ }
3616
+ /**
3617
+ * Fetch exchange rates for the given currency (e.g., "USD", "EUR", "CHF")
3618
+ *
3619
+ * Returns an ExchangeRates object containing rates from multiple sources and the median
3620
+ * @param {CurrencyCode} currency
3621
+ * @returns {Promise<ExchangeRates>}
3622
+ */
3623
+ rates(currency) {
3624
+ _assertClass(currency, CurrencyCode);
3625
+ const ret = wasm.pricesfetcher_rates(this.__wbg_ptr, currency.__wbg_ptr);
3626
+ return ret;
3627
+ }
3628
+ }
3629
+ if (Symbol.dispose) PricesFetcher.prototype[Symbol.dispose] = PricesFetcher.prototype.free;
3630
+
3631
+ exports.PricesFetcher = PricesFetcher;
3632
+
3633
+ const PricesFetcherBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
3634
+ ? { register: () => {}, unregister: () => {} }
3635
+ : new FinalizationRegistry(ptr => wasm.__wbg_pricesfetcherbuilder_free(ptr >>> 0, 1));
3636
+ /**
3637
+ * Wrapper over [`lwk_wollet::PricesFetcherBuilder`]
3638
+ */
3639
+ class PricesFetcherBuilder {
3640
+
3641
+ __destroy_into_raw() {
3642
+ const ptr = this.__wbg_ptr;
3643
+ this.__wbg_ptr = 0;
3644
+ PricesFetcherBuilderFinalization.unregister(this);
3645
+ return ptr;
3646
+ }
3647
+
3648
+ free() {
3649
+ const ptr = this.__destroy_into_raw();
3650
+ wasm.__wbg_pricesfetcherbuilder_free(ptr, 0);
3651
+ }
3652
+ }
3653
+ if (Symbol.dispose) PricesFetcherBuilder.prototype[Symbol.dispose] = PricesFetcherBuilder.prototype.free;
3654
+
3655
+ exports.PricesFetcherBuilder = PricesFetcherBuilder;
2531
3656
 
2532
3657
  const PsetFinalization = (typeof FinalizationRegistry === 'undefined')
2533
3658
  ? { register: () => {}, unregister: () => {} }
@@ -2633,7 +3758,9 @@ class Pset {
2633
3758
  return v1;
2634
3759
  }
2635
3760
  }
2636
- module.exports.Pset = Pset;
3761
+ if (Symbol.dispose) Pset.prototype[Symbol.dispose] = Pset.prototype.free;
3762
+
3763
+ exports.Pset = Pset;
2637
3764
 
2638
3765
  const PsetBalanceFinalization = (typeof FinalizationRegistry === 'undefined')
2639
3766
  ? { register: () => {}, unregister: () => {} }
@@ -2691,7 +3818,9 @@ class PsetBalance {
2691
3818
  return v1;
2692
3819
  }
2693
3820
  }
2694
- module.exports.PsetBalance = PsetBalance;
3821
+ if (Symbol.dispose) PsetBalance.prototype[Symbol.dispose] = PsetBalance.prototype.free;
3822
+
3823
+ exports.PsetBalance = PsetBalance;
2695
3824
 
2696
3825
  const PsetDetailsFinalization = (typeof FinalizationRegistry === 'undefined')
2697
3826
  ? { register: () => {}, unregister: () => {} }
@@ -2774,7 +3903,9 @@ class PsetDetails {
2774
3903
  return v1;
2775
3904
  }
2776
3905
  }
2777
- module.exports.PsetDetails = PsetDetails;
3906
+ if (Symbol.dispose) PsetDetails.prototype[Symbol.dispose] = PsetDetails.prototype.free;
3907
+
3908
+ exports.PsetDetails = PsetDetails;
2778
3909
 
2779
3910
  const PsetInputFinalization = (typeof FinalizationRegistry === 'undefined')
2780
3911
  ? { register: () => {}, unregister: () => {} }
@@ -2836,7 +3967,9 @@ class PsetInput {
2836
3967
  return ret === 0 ? undefined : AssetId.__wrap(ret);
2837
3968
  }
2838
3969
  }
2839
- module.exports.PsetInput = PsetInput;
3970
+ if (Symbol.dispose) PsetInput.prototype[Symbol.dispose] = PsetInput.prototype.free;
3971
+
3972
+ exports.PsetInput = PsetInput;
2840
3973
 
2841
3974
  const PsetOutputFinalization = (typeof FinalizationRegistry === 'undefined')
2842
3975
  ? { register: () => {}, unregister: () => {} }
@@ -2873,7 +4006,9 @@ class PsetOutput {
2873
4006
  return Script.__wrap(ret);
2874
4007
  }
2875
4008
  }
2876
- module.exports.PsetOutput = PsetOutput;
4009
+ if (Symbol.dispose) PsetOutput.prototype[Symbol.dispose] = PsetOutput.prototype.free;
4010
+
4011
+ exports.PsetOutput = PsetOutput;
2877
4012
 
2878
4013
  const PsetSignaturesFinalization = (typeof FinalizationRegistry === 'undefined')
2879
4014
  ? { register: () => {}, unregister: () => {} }
@@ -2918,7 +4053,9 @@ class PsetSignatures {
2918
4053
  return ret;
2919
4054
  }
2920
4055
  }
2921
- module.exports.PsetSignatures = PsetSignatures;
4056
+ if (Symbol.dispose) PsetSignatures.prototype[Symbol.dispose] = PsetSignatures.prototype.free;
4057
+
4058
+ exports.PsetSignatures = PsetSignatures;
2922
4059
 
2923
4060
  const RecipientFinalization = (typeof FinalizationRegistry === 'undefined')
2924
4061
  ? { register: () => {}, unregister: () => {} }
@@ -2976,7 +4113,9 @@ class Recipient {
2976
4113
  return ret >>> 0;
2977
4114
  }
2978
4115
  }
2979
- module.exports.Recipient = Recipient;
4116
+ if (Symbol.dispose) Recipient.prototype[Symbol.dispose] = Recipient.prototype.free;
4117
+
4118
+ exports.Recipient = Recipient;
2980
4119
 
2981
4120
  const RegistryFinalization = (typeof FinalizationRegistry === 'undefined')
2982
4121
  ? { register: () => {}, unregister: () => {} }
@@ -3110,7 +4249,9 @@ class Registry {
3110
4249
  return Pset.__wrap(ret[0]);
3111
4250
  }
3112
4251
  }
3113
- module.exports.Registry = Registry;
4252
+ if (Symbol.dispose) Registry.prototype[Symbol.dispose] = Registry.prototype.free;
4253
+
4254
+ exports.Registry = Registry;
3114
4255
 
3115
4256
  const RegistryDataFinalization = (typeof FinalizationRegistry === 'undefined')
3116
4257
  ? { register: () => {}, unregister: () => {} }
@@ -3190,7 +4331,9 @@ class RegistryData {
3190
4331
  }
3191
4332
  }
3192
4333
  }
3193
- module.exports.RegistryData = RegistryData;
4334
+ if (Symbol.dispose) RegistryData.prototype[Symbol.dispose] = RegistryData.prototype.free;
4335
+
4336
+ exports.RegistryData = RegistryData;
3194
4337
 
3195
4338
  const RegistryPostFinalization = (typeof FinalizationRegistry === 'undefined')
3196
4339
  ? { register: () => {}, unregister: () => {} }
@@ -3243,7 +4386,9 @@ class RegistryPost {
3243
4386
  }
3244
4387
  }
3245
4388
  }
3246
- module.exports.RegistryPost = RegistryPost;
4389
+ if (Symbol.dispose) RegistryPost.prototype[Symbol.dispose] = RegistryPost.prototype.free;
4390
+
4391
+ exports.RegistryPost = RegistryPost;
3247
4392
 
3248
4393
  const ScriptFinalization = (typeof FinalizationRegistry === 'undefined')
3249
4394
  ? { register: () => {}, unregister: () => {} }
@@ -3333,7 +4478,9 @@ class Script {
3333
4478
  }
3334
4479
  }
3335
4480
  }
3336
- module.exports.Script = Script;
4481
+ if (Symbol.dispose) Script.prototype[Symbol.dispose] = Script.prototype.free;
4482
+
4483
+ exports.Script = Script;
3337
4484
 
3338
4485
  const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
3339
4486
  ? { register: () => {}, unregister: () => {} }
@@ -3540,12 +4687,27 @@ class Signer {
3540
4687
  * Return the mnemonic of the signer
3541
4688
  * @returns {Mnemonic}
3542
4689
  */
3543
- mnemonic() {
3544
- const ret = wasm.signer_mnemonic(this.__wbg_ptr);
3545
- return Mnemonic.__wrap(ret);
4690
+ mnemonic() {
4691
+ const ret = wasm.signer_mnemonic(this.__wbg_ptr);
4692
+ return Mnemonic.__wrap(ret);
4693
+ }
4694
+ /**
4695
+ * Return the derived BIP85 mnemonic
4696
+ * @param {number} index
4697
+ * @param {number} word_count
4698
+ * @returns {Mnemonic}
4699
+ */
4700
+ derive_bip85_mnemonic(index, word_count) {
4701
+ const ret = wasm.signer_derive_bip85_mnemonic(this.__wbg_ptr, index, word_count);
4702
+ if (ret[2]) {
4703
+ throw takeFromExternrefTable0(ret[1]);
4704
+ }
4705
+ return Mnemonic.__wrap(ret[0]);
3546
4706
  }
3547
4707
  }
3548
- module.exports.Signer = Signer;
4708
+ if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
4709
+
4710
+ exports.Signer = Signer;
3549
4711
 
3550
4712
  const SinglesigFinalization = (typeof FinalizationRegistry === 'undefined')
3551
4713
  ? { register: () => {}, unregister: () => {} }
@@ -3586,7 +4748,9 @@ class Singlesig {
3586
4748
  return Singlesig.__wrap(ret[0]);
3587
4749
  }
3588
4750
  }
3589
- module.exports.Singlesig = Singlesig;
4751
+ if (Symbol.dispose) Singlesig.prototype[Symbol.dispose] = Singlesig.prototype.free;
4752
+
4753
+ exports.Singlesig = Singlesig;
3590
4754
 
3591
4755
  const TipFinalization = (typeof FinalizationRegistry === 'undefined')
3592
4756
  ? { register: () => {}, unregister: () => {} }
@@ -3645,7 +4809,9 @@ class Tip {
3645
4809
  return ret === 0x100000001 ? undefined : ret;
3646
4810
  }
3647
4811
  }
3648
- module.exports.Tip = Tip;
4812
+ if (Symbol.dispose) Tip.prototype[Symbol.dispose] = Tip.prototype.free;
4813
+
4814
+ exports.Tip = Tip;
3649
4815
 
3650
4816
  const TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
3651
4817
  ? { register: () => {}, unregister: () => {} }
@@ -3738,7 +4904,9 @@ class Transaction {
3738
4904
  }
3739
4905
  }
3740
4906
  }
3741
- module.exports.Transaction = Transaction;
4907
+ if (Symbol.dispose) Transaction.prototype[Symbol.dispose] = Transaction.prototype.free;
4908
+
4909
+ exports.Transaction = Transaction;
3742
4910
 
3743
4911
  const TxBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
3744
4912
  ? { register: () => {}, unregister: () => {} }
@@ -3773,7 +4941,7 @@ class TxBuilder {
3773
4941
  */
3774
4942
  constructor(network) {
3775
4943
  _assertClass(network, Network);
3776
- const ret = wasm.network_txBuilder(network.__wbg_ptr);
4944
+ const ret = wasm.txbuilder_new(network.__wbg_ptr);
3777
4945
  this.__wbg_ptr = ret >>> 0;
3778
4946
  TxBuilderFinalization.register(this, this.__wbg_ptr, this);
3779
4947
  return this;
@@ -4060,8 +5228,20 @@ class TxBuilder {
4060
5228
  }
4061
5229
  return TxBuilder.__wrap(ret[0]);
4062
5230
  }
5231
+ /**
5232
+ * Add input rangeproofs
5233
+ * @param {boolean} add_rangeproofs
5234
+ * @returns {TxBuilder}
5235
+ */
5236
+ addInputRangeproofs(add_rangeproofs) {
5237
+ const ptr = this.__destroy_into_raw();
5238
+ const ret = wasm.txbuilder_addInputRangeproofs(ptr, add_rangeproofs);
5239
+ return TxBuilder.__wrap(ret);
5240
+ }
4063
5241
  }
4064
- module.exports.TxBuilder = TxBuilder;
5242
+ if (Symbol.dispose) TxBuilder.prototype[Symbol.dispose] = TxBuilder.prototype.free;
5243
+
5244
+ exports.TxBuilder = TxBuilder;
4065
5245
 
4066
5246
  const TxOutSecretsFinalization = (typeof FinalizationRegistry === 'undefined')
4067
5247
  ? { register: () => {}, unregister: () => {} }
@@ -4183,7 +5363,9 @@ class TxOutSecrets {
4183
5363
  }
4184
5364
  }
4185
5365
  }
4186
- module.exports.TxOutSecrets = TxOutSecrets;
5366
+ if (Symbol.dispose) TxOutSecrets.prototype[Symbol.dispose] = TxOutSecrets.prototype.free;
5367
+
5368
+ exports.TxOutSecrets = TxOutSecrets;
4187
5369
 
4188
5370
  const TxidFinalization = (typeof FinalizationRegistry === 'undefined')
4189
5371
  ? { register: () => {}, unregister: () => {} }
@@ -4247,7 +5429,9 @@ class Txid {
4247
5429
  }
4248
5430
  }
4249
5431
  }
4250
- module.exports.Txid = Txid;
5432
+ if (Symbol.dispose) Txid.prototype[Symbol.dispose] = Txid.prototype.free;
5433
+
5434
+ exports.Txid = Txid;
4251
5435
 
4252
5436
  const UnvalidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
4253
5437
  ? { register: () => {}, unregister: () => {} }
@@ -4352,7 +5536,9 @@ class UnvalidatedLiquidexProposal {
4352
5536
  }
4353
5537
  }
4354
5538
  }
4355
- module.exports.UnvalidatedLiquidexProposal = UnvalidatedLiquidexProposal;
5539
+ if (Symbol.dispose) UnvalidatedLiquidexProposal.prototype[Symbol.dispose] = UnvalidatedLiquidexProposal.prototype.free;
5540
+
5541
+ exports.UnvalidatedLiquidexProposal = UnvalidatedLiquidexProposal;
4356
5542
 
4357
5543
  const UpdateFinalization = (typeof FinalizationRegistry === 'undefined')
4358
5544
  ? { register: () => {}, unregister: () => {} }
@@ -4471,7 +5657,9 @@ class Update {
4471
5657
  wasm.update_prune(this.__wbg_ptr, wollet.__wbg_ptr);
4472
5658
  }
4473
5659
  }
4474
- module.exports.Update = Update;
5660
+ if (Symbol.dispose) Update.prototype[Symbol.dispose] = Update.prototype.free;
5661
+
5662
+ exports.Update = Update;
4475
5663
 
4476
5664
  const ValidatedLiquidexProposalFinalization = (typeof FinalizationRegistry === 'undefined')
4477
5665
  ? { register: () => {}, unregister: () => {} }
@@ -4537,7 +5725,9 @@ class ValidatedLiquidexProposal {
4537
5725
  }
4538
5726
  }
4539
5727
  }
4540
- module.exports.ValidatedLiquidexProposal = ValidatedLiquidexProposal;
5728
+ if (Symbol.dispose) ValidatedLiquidexProposal.prototype[Symbol.dispose] = ValidatedLiquidexProposal.prototype.free;
5729
+
5730
+ exports.ValidatedLiquidexProposal = ValidatedLiquidexProposal;
4541
5731
 
4542
5732
  const WalletTxFinalization = (typeof FinalizationRegistry === 'undefined')
4543
5733
  ? { register: () => {}, unregister: () => {} }
@@ -4677,7 +5867,9 @@ class WalletTx {
4677
5867
  }
4678
5868
  }
4679
5869
  }
4680
- module.exports.WalletTx = WalletTx;
5870
+ if (Symbol.dispose) WalletTx.prototype[Symbol.dispose] = WalletTx.prototype.free;
5871
+
5872
+ exports.WalletTx = WalletTx;
4681
5873
 
4682
5874
  const WalletTxOutFinalization = (typeof FinalizationRegistry === 'undefined')
4683
5875
  ? { register: () => {}, unregister: () => {} }
@@ -4763,7 +5955,9 @@ class WalletTxOut {
4763
5955
  return Address.__wrap(ret);
4764
5956
  }
4765
5957
  }
4766
- module.exports.WalletTxOut = WalletTxOut;
5958
+ if (Symbol.dispose) WalletTxOut.prototype[Symbol.dispose] = WalletTxOut.prototype.free;
5959
+
5960
+ exports.WalletTxOut = WalletTxOut;
4767
5961
 
4768
5962
  const WolletFinalization = (typeof FinalizationRegistry === 'undefined')
4769
5963
  ? { register: () => {}, unregister: () => {} }
@@ -4823,6 +6017,28 @@ class Wollet {
4823
6017
  }
4824
6018
  return AddressResult.__wrap(ret[0]);
4825
6019
  }
6020
+ /**
6021
+ * Return the [ELIP152](https://github.com/ElementsProject/ELIPs/blob/main/elip-0152.mediawiki) deterministic wallet identifier.
6022
+ * @returns {string}
6023
+ */
6024
+ dwid() {
6025
+ let deferred2_0;
6026
+ let deferred2_1;
6027
+ try {
6028
+ const ret = wasm.wollet_dwid(this.__wbg_ptr);
6029
+ var ptr1 = ret[0];
6030
+ var len1 = ret[1];
6031
+ if (ret[3]) {
6032
+ ptr1 = 0; len1 = 0;
6033
+ throw takeFromExternrefTable0(ret[2]);
6034
+ }
6035
+ deferred2_0 = ptr1;
6036
+ deferred2_1 = len1;
6037
+ return getStringFromWasm0(ptr1, len1);
6038
+ } finally {
6039
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
6040
+ }
6041
+ }
4826
6042
  /**
4827
6043
  * Get the full derivation path for an address
4828
6044
  *
@@ -5028,7 +6244,9 @@ class Wollet {
5028
6244
  return ret !== 0;
5029
6245
  }
5030
6246
  }
5031
- module.exports.Wollet = Wollet;
6247
+ if (Symbol.dispose) Wollet.prototype[Symbol.dispose] = Wollet.prototype.free;
6248
+
6249
+ exports.Wollet = Wollet;
5032
6250
 
5033
6251
  const WolletDescriptorFinalization = (typeof FinalizationRegistry === 'undefined')
5034
6252
  ? { register: () => {}, unregister: () => {} }
@@ -5123,7 +6341,9 @@ class WolletDescriptor {
5123
6341
  return ret !== 0;
5124
6342
  }
5125
6343
  }
5126
- module.exports.WolletDescriptor = WolletDescriptor;
6344
+ if (Symbol.dispose) WolletDescriptor.prototype[Symbol.dispose] = WolletDescriptor.prototype.free;
6345
+
6346
+ exports.WolletDescriptor = WolletDescriptor;
5127
6347
 
5128
6348
  const XpubFinalization = (typeof FinalizationRegistry === 'undefined')
5129
6349
  ? { register: () => {}, unregister: () => {} }
@@ -5231,9 +6451,16 @@ class Xpub {
5231
6451
  return ret !== 0;
5232
6452
  }
5233
6453
  }
5234
- module.exports.Xpub = Xpub;
6454
+ if (Symbol.dispose) Xpub.prototype[Symbol.dispose] = Xpub.prototype.free;
6455
+
6456
+ exports.Xpub = Xpub;
6457
+
6458
+ exports.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
6459
+ const ret = Error(getStringFromWasm0(arg0, arg1));
6460
+ return ret;
6461
+ };
5235
6462
 
5236
- module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
6463
+ exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
5237
6464
  const ret = String(arg1);
5238
6465
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5239
6466
  const len1 = WASM_VECTOR_LEN;
@@ -5241,159 +6468,191 @@ module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
5241
6468
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5242
6469
  };
5243
6470
 
5244
- module.exports.__wbg_abort_775ef1d17fc65868 = function(arg0) {
6471
+ exports.__wbg_abort_67e1b49bf6614565 = function(arg0) {
5245
6472
  arg0.abort();
5246
6473
  };
5247
6474
 
5248
- module.exports.__wbg_addressresult_new = function(arg0) {
6475
+ exports.__wbg_abort_d830bf2e9aa6ec5b = function(arg0, arg1) {
6476
+ arg0.abort(arg1);
6477
+ };
6478
+
6479
+ exports.__wbg_addressresult_new = function(arg0) {
5249
6480
  const ret = AddressResult.__wrap(arg0);
5250
6481
  return ret;
5251
6482
  };
5252
6483
 
5253
- module.exports.__wbg_amp0_new = function(arg0) {
6484
+ exports.__wbg_amp0_new = function(arg0) {
5254
6485
  const ret = Amp0.__wrap(arg0);
5255
6486
  return ret;
5256
6487
  };
5257
6488
 
5258
- module.exports.__wbg_amp0connected_new = function(arg0) {
6489
+ exports.__wbg_amp0connected_new = function(arg0) {
5259
6490
  const ret = Amp0Connected.__wrap(arg0);
5260
6491
  return ret;
5261
6492
  };
5262
6493
 
5263
- module.exports.__wbg_amp0loggedin_new = function(arg0) {
6494
+ exports.__wbg_amp0loggedin_new = function(arg0) {
5264
6495
  const ret = Amp0LoggedIn.__wrap(arg0);
5265
6496
  return ret;
5266
6497
  };
5267
6498
 
5268
- module.exports.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
6499
+ exports.__wbg_append_72a3c0addd2bce38 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5269
6500
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
5270
6501
  }, arguments) };
5271
6502
 
5272
- module.exports.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {
6503
+ exports.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() { return handleError(function (arg0) {
5273
6504
  const ret = arg0.arrayBuffer();
5274
6505
  return ret;
5275
6506
  }, arguments) };
5276
6507
 
5277
- module.exports.__wbg_assetmeta_new = function(arg0) {
6508
+ exports.__wbg_assetmeta_new = function(arg0) {
5278
6509
  const ret = AssetMeta.__wrap(arg0);
5279
6510
  return ret;
5280
6511
  };
5281
6512
 
5282
- module.exports.__wbg_buffer_09165b52af8c5237 = function(arg0) {
5283
- const ret = arg0.buffer;
6513
+ exports.__wbg_boltzsession_new = function(arg0) {
6514
+ const ret = BoltzSession.__wrap(arg0);
5284
6515
  return ret;
5285
6516
  };
5286
6517
 
5287
- module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
6518
+ exports.__wbg_buffer_8d40b1d762fb3c66 = function(arg0) {
5288
6519
  const ret = arg0.buffer;
5289
6520
  return ret;
5290
6521
  };
5291
6522
 
5292
- module.exports.__wbg_byteLength_1bdb96d98ab0d871 = function(arg0) {
6523
+ exports.__wbg_byteLength_8ccf68e3ac59ff5e = function(arg0) {
5293
6524
  const ret = arg0.byteLength;
5294
6525
  return ret;
5295
6526
  };
5296
6527
 
5297
- module.exports.__wbg_byteOffset_d7656012e66edc5f = function(arg0) {
6528
+ exports.__wbg_byteOffset_673c717c222fef8e = function(arg0) {
5298
6529
  const ret = arg0.byteOffset;
5299
6530
  return ret;
5300
6531
  };
5301
6532
 
5302
- module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
6533
+ exports.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
5303
6534
  const ret = arg0.call(arg1);
5304
6535
  return ret;
5305
6536
  }, arguments) };
5306
6537
 
5307
- module.exports.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
6538
+ exports.__wbg_call_641db1bb5db5a579 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
6539
+ const ret = arg0.call(arg1, arg2, arg3);
6540
+ return ret;
6541
+ }, arguments) };
6542
+
6543
+ exports.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
5308
6544
  const ret = arg0.call(arg1, arg2);
5309
6545
  return ret;
5310
6546
  }, arguments) };
5311
6547
 
5312
- module.exports.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5313
- const ret = arg0.call(arg1, arg2, arg3);
6548
+ exports.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
6549
+ const ret = clearTimeout(arg0);
6550
+ return ret;
6551
+ };
6552
+
6553
+ exports.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
6554
+ const ret = clearTimeout(arg0);
5314
6555
  return ret;
6556
+ };
6557
+
6558
+ exports.__wbg_close_6437264570d2d37f = function() { return handleError(function (arg0) {
6559
+ arg0.close();
6560
+ }, arguments) };
6561
+
6562
+ exports.__wbg_close_dadc273a120c03ec = function() { return handleError(function (arg0, arg1, arg2, arg3) {
6563
+ arg0.close(arg1, getStringFromWasm0(arg2, arg3));
5315
6564
  }, arguments) };
5316
6565
 
5317
- module.exports.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
6566
+ exports.__wbg_code_177e3bed72688e58 = function(arg0) {
6567
+ const ret = arg0.code;
6568
+ return ret;
6569
+ };
6570
+
6571
+ exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
5318
6572
  const ret = arg0.crypto;
5319
6573
  return ret;
5320
6574
  };
5321
6575
 
5322
- module.exports.__wbg_data_432d9c3df2630942 = function(arg0) {
6576
+ exports.__wbg_data_8cd553c9786c9361 = function(arg0) {
5323
6577
  const ret = arg0.data;
5324
6578
  return ret;
5325
6579
  };
5326
6580
 
5327
- module.exports.__wbg_data_abeb242764125124 = function(arg0) {
6581
+ exports.__wbg_data_9ab529722bcc4e6c = function(arg0) {
5328
6582
  const ret = arg0.data;
5329
6583
  return ret;
5330
6584
  };
5331
6585
 
5332
- module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
6586
+ exports.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
5333
6587
  const ret = arg0.done;
5334
6588
  return ret;
5335
6589
  };
5336
6590
 
5337
- module.exports.__wbg_fetch_4465c2b10f21a927 = function(arg0) {
6591
+ exports.__wbg_exchangerates_new = function(arg0) {
6592
+ const ret = ExchangeRates.__wrap(arg0);
6593
+ return ret;
6594
+ };
6595
+
6596
+ exports.__wbg_fetch_74a3e84ebd2c9a0e = function(arg0) {
5338
6597
  const ret = fetch(arg0);
5339
6598
  return ret;
5340
6599
  };
5341
6600
 
5342
- module.exports.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
6601
+ exports.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
5343
6602
  const ret = arg0.fetch(arg1);
5344
6603
  return ret;
5345
6604
  };
5346
6605
 
5347
- module.exports.__wbg_getDevices_916883032bafc9b1 = function(arg0) {
6606
+ exports.__wbg_getDevices_abebcc7be30632a7 = function(arg0) {
5348
6607
  const ret = arg0.getDevices();
5349
6608
  return ret;
5350
6609
  };
5351
6610
 
5352
- module.exports.__wbg_getPorts_5e6efecc826b1a6f = function(arg0) {
6611
+ exports.__wbg_getPorts_3a0fce782d01e063 = function(arg0) {
5353
6612
  const ret = arg0.getPorts();
5354
6613
  return ret;
5355
6614
  };
5356
6615
 
5357
- module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
6616
+ exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
5358
6617
  arg0.getRandomValues(arg1);
5359
6618
  }, arguments) };
5360
6619
 
5361
- module.exports.__wbg_getUint8_749a77380c219f58 = function(arg0, arg1) {
6620
+ exports.__wbg_getUint8_083c6ed87b45a86a = function(arg0, arg1) {
5362
6621
  const ret = arg0.getUint8(arg1 >>> 0);
5363
6622
  return ret;
5364
6623
  };
5365
6624
 
5366
- module.exports.__wbg_getWriter_6ce182d0adc3f96b = function() { return handleError(function (arg0) {
6625
+ exports.__wbg_getWriter_03d7689e275ac6a4 = function() { return handleError(function (arg0) {
5367
6626
  const ret = arg0.getWriter();
5368
6627
  return ret;
5369
6628
  }, arguments) };
5370
6629
 
5371
- module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
5372
- const ret = Reflect.get(arg0, arg1);
5373
- return ret;
5374
- }, arguments) };
5375
-
5376
- module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
6630
+ exports.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
5377
6631
  const ret = arg0[arg1 >>> 0];
5378
6632
  return ret;
5379
6633
  };
5380
6634
 
5381
- module.exports.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
6635
+ exports.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
6636
+ const ret = Reflect.get(arg0, arg1);
6637
+ return ret;
6638
+ }, arguments) };
6639
+
6640
+ exports.__wbg_has_b89e451f638123e3 = function() { return handleError(function (arg0, arg1) {
5382
6641
  const ret = Reflect.has(arg0, arg1);
5383
6642
  return ret;
5384
6643
  }, arguments) };
5385
6644
 
5386
- module.exports.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
6645
+ exports.__wbg_headers_29fec3c72865cd75 = function(arg0) {
5387
6646
  const ret = arg0.headers;
5388
6647
  return ret;
5389
6648
  };
5390
6649
 
5391
- module.exports.__wbg_hid_890a1b64f4c510a6 = function(arg0) {
6650
+ exports.__wbg_hid_fc50a7126d53c63c = function(arg0) {
5392
6651
  const ret = arg0.hid;
5393
6652
  return ret;
5394
6653
  };
5395
6654
 
5396
- module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
6655
+ exports.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
5397
6656
  let result;
5398
6657
  try {
5399
6658
  result = arg0 instanceof ArrayBuffer;
@@ -5404,7 +6663,18 @@ module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
5404
6663
  return ret;
5405
6664
  };
5406
6665
 
5407
- module.exports.__wbg_instanceof_HidDevice_281d00db95a533c6 = function(arg0) {
6666
+ exports.__wbg_instanceof_Blob_3db67efd3f1b960f = function(arg0) {
6667
+ let result;
6668
+ try {
6669
+ result = arg0 instanceof Blob;
6670
+ } catch (_) {
6671
+ result = false;
6672
+ }
6673
+ const ret = result;
6674
+ return ret;
6675
+ };
6676
+
6677
+ exports.__wbg_instanceof_HidDevice_ab5b9b1c208f5539 = function(arg0) {
5408
6678
  let result;
5409
6679
  try {
5410
6680
  result = arg0 instanceof HIDDevice;
@@ -5415,7 +6685,7 @@ module.exports.__wbg_instanceof_HidDevice_281d00db95a533c6 = function(arg0) {
5415
6685
  return ret;
5416
6686
  };
5417
6687
 
5418
- module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
6688
+ exports.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
5419
6689
  let result;
5420
6690
  try {
5421
6691
  result = arg0 instanceof Response;
@@ -5426,7 +6696,7 @@ module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
5426
6696
  return ret;
5427
6697
  };
5428
6698
 
5429
- module.exports.__wbg_instanceof_SerialPort_cb6aa528c64488f2 = function(arg0) {
6699
+ exports.__wbg_instanceof_SerialPort_5f6213e35dce8b2a = function(arg0) {
5430
6700
  let result;
5431
6701
  try {
5432
6702
  result = arg0 instanceof SerialPort;
@@ -5437,7 +6707,7 @@ module.exports.__wbg_instanceof_SerialPort_cb6aa528c64488f2 = function(arg0) {
5437
6707
  return ret;
5438
6708
  };
5439
6709
 
5440
- module.exports.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
6710
+ exports.__wbg_instanceof_Window_12d20d558ef92592 = function(arg0) {
5441
6711
  let result;
5442
6712
  try {
5443
6713
  result = arg0 instanceof Window;
@@ -5448,73 +6718,83 @@ module.exports.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
5448
6718
  return ret;
5449
6719
  };
5450
6720
 
5451
- module.exports.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
6721
+ exports.__wbg_invoiceresponse_new = function(arg0) {
6722
+ const ret = InvoiceResponse.__wrap(arg0);
6723
+ return ret;
6724
+ };
6725
+
6726
+ exports.__wbg_isArray_030cce220591fb41 = function(arg0) {
5452
6727
  const ret = Array.isArray(arg0);
5453
6728
  return ret;
5454
6729
  };
5455
6730
 
5456
- module.exports.__wbg_issuance_new = function(arg0) {
6731
+ exports.__wbg_issuance_new = function(arg0) {
5457
6732
  const ret = Issuance.__wrap(arg0);
5458
6733
  return ret;
5459
6734
  };
5460
6735
 
5461
- module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
6736
+ exports.__wbg_iterator_f370b34483c71a1c = function() {
5462
6737
  const ret = Symbol.iterator;
5463
6738
  return ret;
5464
6739
  };
5465
6740
 
5466
- module.exports.__wbg_jade_new = function(arg0) {
6741
+ exports.__wbg_jade_new = function(arg0) {
5467
6742
  const ret = Jade.__wrap(arg0);
5468
6743
  return ret;
5469
6744
  };
5470
6745
 
5471
- module.exports.__wbg_jadewebsocket_new = function(arg0) {
6746
+ exports.__wbg_jadewebsocket_new = function(arg0) {
5472
6747
  const ret = JadeWebSocket.__wrap(arg0);
5473
6748
  return ret;
5474
6749
  };
5475
6750
 
5476
- module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
6751
+ exports.__wbg_length_186546c51cd61acd = function(arg0) {
5477
6752
  const ret = arg0.length;
5478
6753
  return ret;
5479
6754
  };
5480
6755
 
5481
- module.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) {
6756
+ exports.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
5482
6757
  const ret = arg0.length;
5483
6758
  return ret;
5484
6759
  };
5485
6760
 
5486
- module.exports.__wbg_log_4dd7615accd2b3e2 = function(arg0, arg1) {
6761
+ exports.__wbg_log_2368cdd9f0fe2010 = function(arg0, arg1) {
5487
6762
  console.log(getStringFromWasm0(arg0, arg1));
5488
6763
  };
5489
6764
 
5490
- module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
6765
+ exports.__wbg_magicroutinghint_new = function(arg0) {
6766
+ const ret = MagicRoutingHint.__wrap(arg0);
6767
+ return ret;
6768
+ };
6769
+
6770
+ exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
5491
6771
  const ret = arg0.msCrypto;
5492
6772
  return ret;
5493
6773
  };
5494
6774
 
5495
- module.exports.__wbg_navigator_1577371c070c8947 = function(arg0) {
6775
+ exports.__wbg_navigator_65d5ad763926b868 = function(arg0) {
5496
6776
  const ret = arg0.navigator;
5497
6777
  return ret;
5498
6778
  };
5499
6779
 
5500
- module.exports.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {
5501
- const ret = new Headers();
6780
+ exports.__wbg_new_19c25a3f2fa63a02 = function() {
6781
+ const ret = new Object();
5502
6782
  return ret;
5503
- }, arguments) };
6783
+ };
5504
6784
 
5505
- module.exports.__wbg_new_22a36452a23e0e6f = function() { return handleError(function (arg0) {
5506
- const ret = new ReadableStreamDefaultReader(arg0);
6785
+ exports.__wbg_new_1f3a344cf3123716 = function() {
6786
+ const ret = new Array();
5507
6787
  return ret;
5508
- }, arguments) };
6788
+ };
5509
6789
 
5510
- module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
6790
+ exports.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
5511
6791
  try {
5512
6792
  var state0 = {a: arg0, b: arg1};
5513
6793
  var cb0 = (arg0, arg1) => {
5514
6794
  const a = state0.a;
5515
6795
  state0.a = 0;
5516
6796
  try {
5517
- return __wbg_adapter_544(a, state0.b, arg0, arg1);
6797
+ return __wbg_adapter_641(a, state0.b, arg0, arg1);
5518
6798
  } finally {
5519
6799
  state0.a = a;
5520
6800
  }
@@ -5526,367 +6806,434 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
5526
6806
  }
5527
6807
  };
5528
6808
 
5529
- module.exports.__wbg_new_405e22f390576ce2 = function() {
5530
- const ret = new Object();
6809
+ exports.__wbg_new_2ff1f68f3676ea53 = function() {
6810
+ const ret = new Map();
5531
6811
  return ret;
5532
6812
  };
5533
6813
 
5534
- module.exports.__wbg_new_5e0be73521bc8c17 = function() {
5535
- const ret = new Map();
6814
+ exports.__wbg_new_638ebfaedbf32a5e = function(arg0) {
6815
+ const ret = new Uint8Array(arg0);
5536
6816
  return ret;
5537
6817
  };
5538
6818
 
5539
- module.exports.__wbg_new_78feb108b6472713 = function() {
5540
- const ret = new Array();
6819
+ exports.__wbg_new_66b9434b4e59b63e = function() { return handleError(function () {
6820
+ const ret = new AbortController();
5541
6821
  return ret;
5542
- };
6822
+ }, arguments) };
5543
6823
 
5544
- module.exports.__wbg_new_92c54fc74574ef55 = function() { return handleError(function (arg0, arg1) {
5545
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
6824
+ exports.__wbg_new_9033836f0fffb971 = function() { return handleError(function (arg0) {
6825
+ const ret = new ReadableStreamDefaultReader(arg0);
5546
6826
  return ret;
5547
6827
  }, arguments) };
5548
6828
 
5549
- module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
5550
- const ret = new Uint8Array(arg0);
6829
+ exports.__wbg_new_da9dc54c5db29dfa = function(arg0, arg1) {
6830
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
5551
6831
  return ret;
5552
6832
  };
5553
6833
 
5554
- module.exports.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {
5555
- const ret = new AbortController();
6834
+ exports.__wbg_new_e213f63d18b0de01 = function() { return handleError(function (arg0, arg1) {
6835
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
5556
6836
  return ret;
5557
6837
  }, arguments) };
5558
6838
 
5559
- module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
5560
- const ret = new Function(getStringFromWasm0(arg0, arg1));
6839
+ exports.__wbg_new_f6e53210afea8e45 = function() { return handleError(function () {
6840
+ const ret = new Headers();
6841
+ return ret;
6842
+ }, arguments) };
6843
+
6844
+ exports.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
6845
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
5561
6846
  return ret;
5562
6847
  };
5563
6848
 
5564
- module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
5565
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
6849
+ exports.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
6850
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
5566
6851
  return ret;
5567
6852
  };
5568
6853
 
5569
- module.exports.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
6854
+ exports.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
5570
6855
  const ret = new Uint8Array(arg0 >>> 0);
5571
6856
  return ret;
5572
6857
  };
5573
6858
 
5574
- module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {
6859
+ exports.__wbg_newwithstr_4fbb4e3ba652aee4 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
6860
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
6861
+ return ret;
6862
+ }, arguments) };
6863
+
6864
+ exports.__wbg_newwithstrandinit_b5d168a29a3fd85f = function() { return handleError(function (arg0, arg1, arg2) {
5575
6865
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
5576
6866
  return ret;
5577
6867
  }, arguments) };
5578
6868
 
5579
- module.exports.__wbg_newwithstrsequence_6e9d6479e1cf978d = function() { return handleError(function (arg0, arg1, arg2) {
6869
+ exports.__wbg_newwithstrsequence_f7e2d4848dd49d98 = function() { return handleError(function (arg0, arg1, arg2) {
5580
6870
  const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
5581
6871
  return ret;
5582
6872
  }, arguments) };
5583
6873
 
5584
- module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
6874
+ exports.__wbg_next_5b3530e612fde77d = function(arg0) {
5585
6875
  const ret = arg0.next;
5586
6876
  return ret;
5587
6877
  };
5588
6878
 
5589
- module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
6879
+ exports.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
5590
6880
  const ret = arg0.next();
5591
6881
  return ret;
5592
6882
  }, arguments) };
5593
6883
 
5594
- module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
6884
+ exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
5595
6885
  const ret = arg0.node;
5596
6886
  return ret;
5597
6887
  };
5598
6888
 
5599
- module.exports.__wbg_now_807e54c39636c349 = function() {
6889
+ exports.__wbg_now_1e80617bcee43265 = function() {
5600
6890
  const ret = Date.now();
5601
6891
  return ret;
5602
6892
  };
5603
6893
 
5604
- module.exports.__wbg_now_d18023d54d4e5500 = function(arg0) {
6894
+ exports.__wbg_now_886b39d7ec380719 = function(arg0) {
5605
6895
  const ret = arg0.now();
5606
6896
  return ret;
5607
6897
  };
5608
6898
 
5609
- module.exports.__wbg_open_a95fae7936477724 = function(arg0) {
6899
+ exports.__wbg_open_28c0958dd0e03186 = function(arg0) {
5610
6900
  const ret = arg0.open();
5611
6901
  return ret;
5612
6902
  };
5613
6903
 
5614
- module.exports.__wbg_open_cdb62e879602b6c4 = function(arg0, arg1) {
6904
+ exports.__wbg_open_65ec985b581cbed8 = function(arg0, arg1) {
5615
6905
  const ret = arg0.open(arg1);
5616
6906
  return ret;
5617
6907
  };
5618
6908
 
5619
- module.exports.__wbg_opened_1fee39ed52b14681 = function(arg0) {
6909
+ exports.__wbg_opened_fc99ed1e3c1035f0 = function(arg0) {
5620
6910
  const ret = arg0.opened;
5621
6911
  return ret;
5622
6912
  };
5623
6913
 
5624
- module.exports.__wbg_optionwallettxout_new = function(arg0) {
6914
+ exports.__wbg_optionwallettxout_new = function(arg0) {
5625
6915
  const ret = OptionWalletTxOut.__wrap(arg0);
5626
6916
  return ret;
5627
6917
  };
5628
6918
 
5629
- module.exports.__wbg_outpoint_unwrap = function(arg0) {
6919
+ exports.__wbg_outpoint_unwrap = function(arg0) {
5630
6920
  const ret = OutPoint.__unwrap(arg0);
5631
6921
  return ret;
5632
6922
  };
5633
6923
 
5634
- module.exports.__wbg_performance_c185c0cdc2766575 = function(arg0) {
6924
+ exports.__wbg_performance_a221af8decc752fb = function(arg0) {
5635
6925
  const ret = arg0.performance;
5636
6926
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5637
6927
  };
5638
6928
 
5639
- module.exports.__wbg_process_5c1d670bc53614b8 = function(arg0) {
6929
+ exports.__wbg_preparepayresponse_new = function(arg0) {
6930
+ const ret = PreparePayResponse.__wrap(arg0);
6931
+ return ret;
6932
+ };
6933
+
6934
+ exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
5640
6935
  const ret = arg0.process;
5641
6936
  return ret;
5642
6937
  };
5643
6938
 
5644
- module.exports.__wbg_pset_new = function(arg0) {
6939
+ exports.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
6940
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
6941
+ };
6942
+
6943
+ exports.__wbg_pset_new = function(arg0) {
5645
6944
  const ret = Pset.__wrap(arg0);
5646
6945
  return ret;
5647
6946
  };
5648
6947
 
5649
- module.exports.__wbg_psetinput_new = function(arg0) {
6948
+ exports.__wbg_psetinput_new = function(arg0) {
5650
6949
  const ret = PsetInput.__wrap(arg0);
5651
6950
  return ret;
5652
6951
  };
5653
6952
 
5654
- module.exports.__wbg_psetoutput_new = function(arg0) {
6953
+ exports.__wbg_psetoutput_new = function(arg0) {
5655
6954
  const ret = PsetOutput.__wrap(arg0);
5656
6955
  return ret;
5657
6956
  };
5658
6957
 
5659
- module.exports.__wbg_psetsignatures_new = function(arg0) {
6958
+ exports.__wbg_psetsignatures_new = function(arg0) {
5660
6959
  const ret = PsetSignatures.__wrap(arg0);
5661
6960
  return ret;
5662
6961
  };
5663
6962
 
5664
- module.exports.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
6963
+ exports.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
5665
6964
  const ret = arg0.push(arg1);
5666
6965
  return ret;
5667
6966
  };
5668
6967
 
5669
- module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
6968
+ exports.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
5670
6969
  queueMicrotask(arg0);
5671
6970
  };
5672
6971
 
5673
- module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
6972
+ exports.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
5674
6973
  const ret = arg0.queueMicrotask;
5675
6974
  return ret;
5676
6975
  };
5677
6976
 
5678
- module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handleError(function (arg0, arg1) {
6977
+ exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
5679
6978
  arg0.randomFillSync(arg1);
5680
6979
  }, arguments) };
5681
6980
 
5682
- module.exports.__wbg_read_a2434af1186cb56c = function(arg0) {
6981
+ exports.__wbg_read_bc925c758aa4d897 = function(arg0) {
5683
6982
  const ret = arg0.read();
5684
6983
  return ret;
5685
6984
  };
5686
6985
 
5687
- module.exports.__wbg_readable_dbb91ee91d979f24 = function(arg0) {
6986
+ exports.__wbg_readable_d8d52c48b16a493f = function(arg0) {
5688
6987
  const ret = arg0.readable;
5689
6988
  return ret;
5690
6989
  };
5691
6990
 
5692
- module.exports.__wbg_recipient_new = function(arg0) {
6991
+ exports.__wbg_readyState_b0d20ca4531d3797 = function(arg0) {
6992
+ const ret = arg0.readyState;
6993
+ return ret;
6994
+ };
6995
+
6996
+ exports.__wbg_reason_97efd955be6394bd = function(arg0, arg1) {
6997
+ const ret = arg1.reason;
6998
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6999
+ const len1 = WASM_VECTOR_LEN;
7000
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
7001
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7002
+ };
7003
+
7004
+ exports.__wbg_recipient_new = function(arg0) {
5693
7005
  const ret = Recipient.__wrap(arg0);
5694
7006
  return ret;
5695
7007
  };
5696
7008
 
5697
- module.exports.__wbg_registry_new = function(arg0) {
7009
+ exports.__wbg_registry_new = function(arg0) {
5698
7010
  const ret = Registry.__wrap(arg0);
5699
7011
  return ret;
5700
7012
  };
5701
7013
 
5702
- module.exports.__wbg_requestDevice_b9904d52d001d64d = function(arg0, arg1) {
7014
+ exports.__wbg_requestDevice_225891d9a80a7b19 = function(arg0, arg1) {
5703
7015
  const ret = arg0.requestDevice(arg1);
5704
7016
  return ret;
5705
7017
  };
5706
7018
 
5707
- module.exports.__wbg_requestPort_1f87c6573d65b9ff = function(arg0) {
7019
+ exports.__wbg_requestPort_07a56c2addedc9d1 = function(arg0) {
5708
7020
  const ret = arg0.requestPort();
5709
7021
  return ret;
5710
7022
  };
5711
7023
 
5712
- module.exports.__wbg_requestPort_f3ef84a64a129f42 = function(arg0, arg1) {
7024
+ exports.__wbg_requestPort_379ba5dd17575815 = function(arg0, arg1) {
5713
7025
  const ret = arg0.requestPort(arg1);
5714
7026
  return ret;
5715
7027
  };
5716
7028
 
5717
- module.exports.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () {
7029
+ exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
5718
7030
  const ret = module.require;
5719
7031
  return ret;
5720
7032
  }, arguments) };
5721
7033
 
5722
- module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
7034
+ exports.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
5723
7035
  const ret = Promise.resolve(arg0);
5724
7036
  return ret;
5725
7037
  };
5726
7038
 
5727
- module.exports.__wbg_sendReport_4d1024566077f413 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
7039
+ exports.__wbg_sendReport_c8d0c7c3c3abf30a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5728
7040
  const ret = arg0.sendReport(arg1, getArrayU8FromWasm0(arg2, arg3));
5729
7041
  return ret;
5730
7042
  }, arguments) };
5731
7043
 
5732
- module.exports.__wbg_send_0293179ba074ffb4 = function() { return handleError(function (arg0, arg1, arg2) {
5733
- arg0.send(getStringFromWasm0(arg1, arg2));
7044
+ exports.__wbg_send_0f09f4487d932d86 = function() { return handleError(function (arg0, arg1) {
7045
+ arg0.send(arg1);
5734
7046
  }, arguments) };
5735
7047
 
5736
- module.exports.__wbg_send_7c4769e24cf1d784 = function() { return handleError(function (arg0, arg1) {
5737
- arg0.send(arg1);
7048
+ exports.__wbg_send_aa9cb445685f0fd0 = function() { return handleError(function (arg0, arg1, arg2) {
7049
+ arg0.send(getArrayU8FromWasm0(arg1, arg2));
7050
+ }, arguments) };
7051
+
7052
+ exports.__wbg_send_bdda9fac7465e036 = function() { return handleError(function (arg0, arg1, arg2) {
7053
+ arg0.send(getStringFromWasm0(arg1, arg2));
5738
7054
  }, arguments) };
5739
7055
 
5740
- module.exports.__wbg_serial_a5487140b2fdb38f = function(arg0) {
7056
+ exports.__wbg_serial_a0dde47bbd77e1b3 = function(arg0) {
5741
7057
  const ret = arg0.serial;
5742
7058
  return ret;
5743
7059
  };
5744
7060
 
5745
- module.exports.__wbg_setTimeout_f2fe5af8e3debeb3 = function() { return handleError(function (arg0, arg1, arg2) {
7061
+ exports.__wbg_setTimeout_2966518f28aef92e = function() { return handleError(function (arg0, arg1, arg2) {
5746
7062
  const ret = arg0.setTimeout(arg1, arg2);
5747
7063
  return ret;
5748
7064
  }, arguments) };
5749
7065
 
5750
- module.exports.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
5751
- arg0[arg1 >>> 0] = arg2;
7066
+ exports.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
7067
+ const ret = setTimeout(arg0, arg1);
7068
+ return ret;
7069
+ };
7070
+
7071
+ exports.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
7072
+ const ret = setTimeout(arg0, arg1);
7073
+ return ret;
7074
+ }, arguments) };
7075
+
7076
+ exports.__wbg_set_1353b2a5e96bc48c = function(arg0, arg1, arg2) {
7077
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
5752
7078
  };
5753
7079
 
5754
- module.exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
7080
+ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5755
7081
  arg0[arg1] = arg2;
5756
7082
  };
5757
7083
 
5758
- module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
5759
- arg0.set(arg1, arg2 >>> 0);
7084
+ exports.__wbg_set_453345bcda80b89a = function() { return handleError(function (arg0, arg1, arg2) {
7085
+ const ret = Reflect.set(arg0, arg1, arg2);
7086
+ return ret;
7087
+ }, arguments) };
7088
+
7089
+ exports.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
7090
+ arg0[arg1 >>> 0] = arg2;
5760
7091
  };
5761
7092
 
5762
- module.exports.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
7093
+ exports.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
5763
7094
  const ret = arg0.set(arg1, arg2);
5764
7095
  return ret;
5765
7096
  };
5766
7097
 
5767
- module.exports.__wbg_setbaudrate_fe58f64af51588e8 = function(arg0, arg1) {
7098
+ exports.__wbg_setbaudrate_88a136cc0a6d4b97 = function(arg0, arg1) {
5768
7099
  arg0.baudRate = arg1 >>> 0;
5769
7100
  };
5770
7101
 
5771
- module.exports.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
7102
+ exports.__wbg_setbinaryType_37f3cd35d7775a47 = function(arg0, arg1) {
5772
7103
  arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
5773
7104
  };
5774
7105
 
5775
- module.exports.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
7106
+ exports.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
5776
7107
  arg0.body = arg1;
5777
7108
  };
5778
7109
 
5779
- module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
7110
+ exports.__wbg_setcache_90ca4ad8a8ad40d3 = function(arg0, arg1) {
7111
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
7112
+ };
7113
+
7114
+ exports.__wbg_setcredentials_9cd60d632c9d5dfc = function(arg0, arg1) {
5780
7115
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
5781
7116
  };
5782
7117
 
5783
- module.exports.__wbg_setfilters_35abbff30813c430 = function(arg0, arg1) {
7118
+ exports.__wbg_setfilters_58b1e783022cd737 = function(arg0, arg1) {
5784
7119
  arg0.filters = arg1;
5785
7120
  };
5786
7121
 
5787
- module.exports.__wbg_setfilters_a1e596125ae8f487 = function(arg0, arg1) {
7122
+ exports.__wbg_setfilters_a0bf46d04ea0dd78 = function(arg0, arg1) {
5788
7123
  arg0.filters = arg1;
5789
7124
  };
5790
7125
 
5791
- module.exports.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
7126
+ exports.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
5792
7127
  arg0.headers = arg1;
5793
7128
  };
5794
7129
 
5795
- module.exports.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
7130
+ exports.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
5796
7131
  arg0.method = getStringFromWasm0(arg1, arg2);
5797
7132
  };
5798
7133
 
5799
- module.exports.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
7134
+ exports.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
5800
7135
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
5801
7136
  };
5802
7137
 
5803
- module.exports.__wbg_setoninputreport_de1916af49f98e5f = function(arg0, arg1) {
7138
+ exports.__wbg_setname_832b43d4602cb930 = function(arg0, arg1, arg2) {
7139
+ arg0.name = getStringFromWasm0(arg1, arg2);
7140
+ };
7141
+
7142
+ exports.__wbg_setonclose_159c0332c2d91b09 = function(arg0, arg1) {
7143
+ arg0.onclose = arg1;
7144
+ };
7145
+
7146
+ exports.__wbg_setonerror_5d9bff045f909e89 = function(arg0, arg1) {
7147
+ arg0.onerror = arg1;
7148
+ };
7149
+
7150
+ exports.__wbg_setoninputreport_5d827d5c7285b78f = function(arg0, arg1) {
5804
7151
  arg0.oninputreport = arg1;
5805
7152
  };
5806
7153
 
5807
- module.exports.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
7154
+ exports.__wbg_setonmessage_5e486f326638a9da = function(arg0, arg1) {
5808
7155
  arg0.onmessage = arg1;
5809
7156
  };
5810
7157
 
5811
- module.exports.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
7158
+ exports.__wbg_setonopen_3e43af381c2901f8 = function(arg0, arg1) {
5812
7159
  arg0.onopen = arg1;
5813
7160
  };
5814
7161
 
5815
- module.exports.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
7162
+ exports.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
5816
7163
  arg0.signal = arg1;
5817
7164
  };
5818
7165
 
5819
- module.exports.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
7166
+ exports.__wbg_signal_da4d466ce86118b5 = function(arg0) {
5820
7167
  const ret = arg0.signal;
5821
7168
  return ret;
5822
7169
  };
5823
7170
 
5824
- module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
7171
+ exports.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
5825
7172
  const ret = typeof global === 'undefined' ? null : global;
5826
7173
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5827
7174
  };
5828
7175
 
5829
- module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
7176
+ exports.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
5830
7177
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
5831
7178
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5832
7179
  };
5833
7180
 
5834
- module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
7181
+ exports.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
5835
7182
  const ret = typeof self === 'undefined' ? null : self;
5836
7183
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5837
7184
  };
5838
7185
 
5839
- module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
7186
+ exports.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
5840
7187
  const ret = typeof window === 'undefined' ? null : window;
5841
7188
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5842
7189
  };
5843
7190
 
5844
- module.exports.__wbg_status_f6360336ca686bf0 = function(arg0) {
7191
+ exports.__wbg_status_3fea3036088621d6 = function(arg0) {
5845
7192
  const ret = arg0.status;
5846
7193
  return ret;
5847
7194
  };
5848
7195
 
5849
- module.exports.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
7196
+ exports.__wbg_stringify_b98c93d0a190446a = function() { return handleError(function (arg0) {
5850
7197
  const ret = JSON.stringify(arg0);
5851
7198
  return ret;
5852
7199
  }, arguments) };
5853
7200
 
5854
- module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
7201
+ exports.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
5855
7202
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
5856
7203
  return ret;
5857
7204
  };
5858
7205
 
5859
- module.exports.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
7206
+ exports.__wbg_text_0f69a215637b9b34 = function() { return handleError(function (arg0) {
5860
7207
  const ret = arg0.text();
5861
7208
  return ret;
5862
7209
  }, arguments) };
5863
7210
 
5864
- module.exports.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
5865
- const ret = arg0.then(arg1);
7211
+ exports.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
7212
+ const ret = arg0.then(arg1, arg2);
5866
7213
  return ret;
5867
7214
  };
5868
7215
 
5869
- module.exports.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
5870
- const ret = arg0.then(arg1, arg2);
7216
+ exports.__wbg_then_e22500defe16819f = function(arg0, arg1) {
7217
+ const ret = arg0.then(arg1);
5871
7218
  return ret;
5872
7219
  };
5873
7220
 
5874
- module.exports.__wbg_transaction_new = function(arg0) {
7221
+ exports.__wbg_transaction_new = function(arg0) {
5875
7222
  const ret = Transaction.__wrap(arg0);
5876
7223
  return ret;
5877
7224
  };
5878
7225
 
5879
- module.exports.__wbg_txid_new = function(arg0) {
7226
+ exports.__wbg_txid_new = function(arg0) {
5880
7227
  const ret = Txid.__wrap(arg0);
5881
7228
  return ret;
5882
7229
  };
5883
7230
 
5884
- module.exports.__wbg_update_new = function(arg0) {
7231
+ exports.__wbg_update_new = function(arg0) {
5885
7232
  const ret = Update.__wrap(arg0);
5886
7233
  return ret;
5887
7234
  };
5888
7235
 
5889
- module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
7236
+ exports.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
5890
7237
  const ret = arg1.url;
5891
7238
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5892
7239
  const len1 = WASM_VECTOR_LEN;
@@ -5894,166 +7241,196 @@ module.exports.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
5894
7241
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5895
7242
  };
5896
7243
 
5897
- module.exports.__wbg_validatedliquidexproposal_unwrap = function(arg0) {
7244
+ exports.__wbg_validatedliquidexproposal_unwrap = function(arg0) {
5898
7245
  const ret = ValidatedLiquidexProposal.__unwrap(arg0);
5899
7246
  return ret;
5900
7247
  };
5901
7248
 
5902
- module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
7249
+ exports.__wbg_value_dd9372230531eade = function(arg0) {
5903
7250
  const ret = arg0.value;
5904
7251
  return ret;
5905
7252
  };
5906
7253
 
5907
- module.exports.__wbg_versions_c71aa1626a93e0a1 = function(arg0) {
7254
+ exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
5908
7255
  const ret = arg0.versions;
5909
7256
  return ret;
5910
7257
  };
5911
7258
 
5912
- module.exports.__wbg_wallettx_new = function(arg0) {
7259
+ exports.__wbg_wallettx_new = function(arg0) {
5913
7260
  const ret = WalletTx.__wrap(arg0);
5914
7261
  return ret;
5915
7262
  };
5916
7263
 
5917
- module.exports.__wbg_wallettxout_new = function(arg0) {
7264
+ exports.__wbg_wallettxout_new = function(arg0) {
5918
7265
  const ret = WalletTxOut.__wrap(arg0);
5919
7266
  return ret;
5920
7267
  };
5921
7268
 
5922
- module.exports.__wbg_wolletdescriptor_new = function(arg0) {
5923
- const ret = WolletDescriptor.__wrap(arg0);
7269
+ exports.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
7270
+ const obj = arg0.original;
7271
+ if (obj.cnt-- == 1) {
7272
+ obj.a = 0;
7273
+ return true;
7274
+ }
7275
+ const ret = false;
5924
7276
  return ret;
5925
7277
  };
5926
7278
 
5927
- module.exports.__wbg_writable_169515f8aae06da5 = function(arg0) {
5928
- const ret = arg0.writable;
7279
+ exports.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
7280
+ const ret = debugString(arg1);
7281
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
7282
+ const len1 = WASM_VECTOR_LEN;
7283
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
7284
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7285
+ };
7286
+
7287
+ exports.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
7288
+ const ret = typeof(arg0) === 'function';
5929
7289
  return ret;
5930
7290
  };
5931
7291
 
5932
- module.exports.__wbg_write_311434e30ee214e5 = function(arg0, arg1) {
5933
- const ret = arg0.write(arg1);
7292
+ exports.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
7293
+ const val = arg0;
7294
+ const ret = typeof(val) === 'object' && val !== null;
5934
7295
  return ret;
5935
7296
  };
5936
7297
 
5937
- module.exports.__wbg_xpub_new = function(arg0) {
5938
- const ret = Xpub.__wrap(arg0);
7298
+ exports.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
7299
+ const ret = typeof(arg0) === 'string';
5939
7300
  return ret;
5940
7301
  };
5941
7302
 
5942
- module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
5943
- const ret = arg0;
7303
+ exports.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
7304
+ const ret = arg0 === undefined;
5944
7305
  return ret;
5945
7306
  };
5946
7307
 
5947
- module.exports.__wbindgen_cb_drop = function(arg0) {
5948
- const obj = arg0.original;
5949
- if (obj.cnt-- == 1) {
5950
- obj.a = 0;
5951
- return true;
5952
- }
5953
- const ret = false;
7308
+ exports.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
7309
+ const obj = arg1;
7310
+ const ret = typeof(obj) === 'string' ? obj : undefined;
7311
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
7312
+ var len1 = WASM_VECTOR_LEN;
7313
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
7314
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7315
+ };
7316
+
7317
+ exports.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
7318
+ throw new Error(getStringFromWasm0(arg0, arg1));
7319
+ };
7320
+
7321
+ exports.__wbg_wolletdescriptor_new = function(arg0) {
7322
+ const ret = WolletDescriptor.__wrap(arg0);
5954
7323
  return ret;
5955
7324
  };
5956
7325
 
5957
- module.exports.__wbindgen_closure_wrapper12924 = function(arg0, arg1, arg2) {
5958
- const ret = makeMutClosure(arg0, arg1, 1371, __wbg_adapter_41);
7326
+ exports.__wbg_writable_3d863701c7ab161b = function(arg0) {
7327
+ const ret = arg0.writable;
5959
7328
  return ret;
5960
7329
  };
5961
7330
 
5962
- module.exports.__wbindgen_closure_wrapper6187 = function(arg0, arg1, arg2) {
5963
- const ret = makeMutClosure(arg0, arg1, 445, __wbg_adapter_34);
7331
+ exports.__wbg_write_2e39e04a4c8c9e9d = function(arg0, arg1) {
7332
+ const ret = arg0.write(arg1);
5964
7333
  return ret;
5965
7334
  };
5966
7335
 
5967
- module.exports.__wbindgen_closure_wrapper6189 = function(arg0, arg1, arg2) {
5968
- const ret = makeMutClosure(arg0, arg1, 446, __wbg_adapter_34);
7336
+ exports.__wbg_xpub_new = function(arg0) {
7337
+ const ret = Xpub.__wrap(arg0);
5969
7338
  return ret;
5970
7339
  };
5971
7340
 
5972
- module.exports.__wbindgen_closure_wrapper6191 = function(arg0, arg1, arg2) {
5973
- const ret = makeMutClosure(arg0, arg1, 446, __wbg_adapter_34);
7341
+ exports.__wbindgen_cast_0e6df167c5e3a9bf = function(arg0, arg1) {
7342
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1297, function: Function { arguments: [NamedExternref("Event")], shim_idx: 1298, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7343
+ const ret = makeMutClosure(arg0, arg1, 1297, __wbg_adapter_11);
5974
7344
  return ret;
5975
7345
  };
5976
7346
 
5977
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
5978
- const ret = debugString(arg1);
5979
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5980
- const len1 = WASM_VECTOR_LEN;
5981
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5982
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7347
+ exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
7348
+ // Cast intrinsic for `Ref(String) -> Externref`.
7349
+ const ret = getStringFromWasm0(arg0, arg1);
7350
+ return ret;
5983
7351
  };
5984
7352
 
5985
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
5986
- const ret = new Error(getStringFromWasm0(arg0, arg1));
7353
+ exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
7354
+ // Cast intrinsic for `U64 -> Externref`.
7355
+ const ret = BigInt.asUintN(64, arg0);
5987
7356
  return ret;
5988
7357
  };
5989
7358
 
5990
- module.exports.__wbindgen_init_externref_table = function() {
5991
- const table = wasm.__wbindgen_export_4;
5992
- const offset = table.grow(4);
5993
- table.set(0, undefined);
5994
- table.set(offset + 0, undefined);
5995
- table.set(offset + 1, null);
5996
- table.set(offset + 2, true);
5997
- table.set(offset + 3, false);
5998
- ;
7359
+ exports.__wbindgen_cast_8b268ed6c7d18412 = function(arg0, arg1) {
7360
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1297, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1298, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7361
+ const ret = makeMutClosure(arg0, arg1, 1297, __wbg_adapter_11);
7362
+ return ret;
5999
7363
  };
6000
7364
 
6001
- module.exports.__wbindgen_is_function = function(arg0) {
6002
- const ret = typeof(arg0) === 'function';
7365
+ exports.__wbindgen_cast_8b4b61caa2e0a23d = function(arg0, arg1) {
7366
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1899, function: Function { arguments: [], shim_idx: 1900, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7367
+ const ret = makeMutClosure(arg0, arg1, 1899, __wbg_adapter_8);
6003
7368
  return ret;
6004
7369
  };
6005
7370
 
6006
- module.exports.__wbindgen_is_object = function(arg0) {
6007
- const val = arg0;
6008
- const ret = typeof(val) === 'object' && val !== null;
7371
+ exports.__wbindgen_cast_8f9558e6f0ce3420 = function(arg0, arg1) {
7372
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1936, function: Function { arguments: [Externref], shim_idx: 1947, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7373
+ const ret = makeMutClosure(arg0, arg1, 1936, __wbg_adapter_27);
6009
7374
  return ret;
6010
7375
  };
6011
7376
 
6012
- module.exports.__wbindgen_is_string = function(arg0) {
6013
- const ret = typeof(arg0) === 'string';
7377
+ exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
7378
+ // Cast intrinsic for `I64 -> Externref`.
7379
+ const ret = arg0;
6014
7380
  return ret;
6015
7381
  };
6016
7382
 
6017
- module.exports.__wbindgen_is_undefined = function(arg0) {
6018
- const ret = arg0 === undefined;
7383
+ exports.__wbindgen_cast_9b2feb467ff52527 = function(arg0, arg1) {
7384
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1297, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1298, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7385
+ const ret = makeMutClosure(arg0, arg1, 1297, __wbg_adapter_11);
6019
7386
  return ret;
6020
7387
  };
6021
7388
 
6022
- module.exports.__wbindgen_memory = function() {
6023
- const ret = wasm.memory;
7389
+ exports.__wbindgen_cast_c5ee62b4aaae9530 = function(arg0, arg1) {
7390
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1445, function: Function { arguments: [], shim_idx: 1446, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7391
+ const ret = makeMutClosure(arg0, arg1, 1445, __wbg_adapter_30);
6024
7392
  return ret;
6025
7393
  };
6026
7394
 
6027
- module.exports.__wbindgen_number_new = function(arg0) {
6028
- const ret = arg0;
7395
+ exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
7396
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
7397
+ const ret = getArrayU8FromWasm0(arg0, arg1);
6029
7398
  return ret;
6030
7399
  };
6031
7400
 
6032
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
6033
- const obj = arg1;
6034
- const ret = typeof(obj) === 'string' ? obj : undefined;
6035
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6036
- var len1 = WASM_VECTOR_LEN;
6037
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
6038
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7401
+ exports.__wbindgen_cast_cde02bc75695ac01 = function(arg0, arg1) {
7402
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 617, function: Function { arguments: [NamedExternref("HIDInputReportEvent")], shim_idx: 785, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7403
+ const ret = makeMutClosure(arg0, arg1, 617, __wbg_adapter_18);
7404
+ return ret;
6039
7405
  };
6040
7406
 
6041
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
6042
- const ret = getStringFromWasm0(arg0, arg1);
7407
+ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
7408
+ // Cast intrinsic for `F64 -> Externref`.
7409
+ const ret = arg0;
6043
7410
  return ret;
6044
7411
  };
6045
7412
 
6046
- module.exports.__wbindgen_throw = function(arg0, arg1) {
6047
- throw new Error(getStringFromWasm0(arg0, arg1));
7413
+ exports.__wbindgen_cast_ff1a743c233958d7 = function(arg0, arg1) {
7414
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1297, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1298, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
7415
+ const ret = makeMutClosure(arg0, arg1, 1297, __wbg_adapter_11);
7416
+ return ret;
6048
7417
  };
6049
7418
 
6050
- const path = require('path').join(__dirname, 'lwk_wasm_bg.wasm');
6051
- const bytes = require('fs').readFileSync(path);
7419
+ exports.__wbindgen_init_externref_table = function() {
7420
+ const table = wasm.__wbindgen_export_4;
7421
+ const offset = table.grow(4);
7422
+ table.set(0, undefined);
7423
+ table.set(offset + 0, undefined);
7424
+ table.set(offset + 1, null);
7425
+ table.set(offset + 2, true);
7426
+ table.set(offset + 3, false);
7427
+ ;
7428
+ };
6052
7429
 
6053
- const wasmModule = new WebAssembly.Module(bytes);
6054
- const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
6055
- wasm = wasmInstance.exports;
6056
- module.exports.__wasm = wasm;
7430
+ const wasmPath = `${__dirname}/lwk_wasm_bg.wasm`;
7431
+ const wasmBytes = require('fs').readFileSync(wasmPath);
7432
+ const wasmModule = new WebAssembly.Module(wasmBytes);
7433
+ const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
6057
7434
 
6058
7435
  wasm.__wbindgen_start();
6059
7436