@agicash/breez-sdk-spark 0.12.2-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.
Files changed (49) hide show
  1. package/README.md +126 -0
  2. package/bundler/breez_sdk_spark_wasm.d.ts +1537 -0
  3. package/bundler/breez_sdk_spark_wasm.js +5 -0
  4. package/bundler/breez_sdk_spark_wasm_bg.js +3028 -0
  5. package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
  6. package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +134 -0
  7. package/bundler/index.d.ts +3 -0
  8. package/bundler/index.js +33 -0
  9. package/bundler/package.json +29 -0
  10. package/bundler/storage/index.js +2331 -0
  11. package/bundler/storage/package.json +12 -0
  12. package/deno/breez_sdk_spark_wasm.d.ts +1537 -0
  13. package/deno/breez_sdk_spark_wasm.js +2782 -0
  14. package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
  15. package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +134 -0
  16. package/nodejs/breez_sdk_spark_wasm.d.ts +1537 -0
  17. package/nodejs/breez_sdk_spark_wasm.js +3042 -0
  18. package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
  19. package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +134 -0
  20. package/nodejs/index.d.ts +1 -0
  21. package/nodejs/index.js +52 -0
  22. package/nodejs/index.mjs +24 -0
  23. package/nodejs/package.json +16 -0
  24. package/nodejs/postgres-storage/errors.cjs +19 -0
  25. package/nodejs/postgres-storage/index.cjs +1390 -0
  26. package/nodejs/postgres-storage/migrations.cjs +265 -0
  27. package/nodejs/postgres-storage/package.json +9 -0
  28. package/nodejs/postgres-token-store/errors.cjs +13 -0
  29. package/nodejs/postgres-token-store/index.cjs +857 -0
  30. package/nodejs/postgres-token-store/migrations.cjs +163 -0
  31. package/nodejs/postgres-token-store/package.json +9 -0
  32. package/nodejs/postgres-tree-store/errors.cjs +13 -0
  33. package/nodejs/postgres-tree-store/index.cjs +808 -0
  34. package/nodejs/postgres-tree-store/migrations.cjs +150 -0
  35. package/nodejs/postgres-tree-store/package.json +9 -0
  36. package/nodejs/storage/errors.cjs +19 -0
  37. package/nodejs/storage/index.cjs +1343 -0
  38. package/nodejs/storage/migrations.cjs +417 -0
  39. package/nodejs/storage/package.json +9 -0
  40. package/package.json +45 -0
  41. package/web/breez_sdk_spark_wasm.d.ts +1695 -0
  42. package/web/breez_sdk_spark_wasm.js +2873 -0
  43. package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
  44. package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +134 -0
  45. package/web/index.d.ts +3 -0
  46. package/web/index.js +33 -0
  47. package/web/package.json +28 -0
  48. package/web/storage/index.js +2331 -0
  49. package/web/storage/package.json +12 -0
@@ -0,0 +1,2873 @@
1
+ let wasm;
2
+
3
+ let WASM_VECTOR_LEN = 0;
4
+
5
+ let cachedUint8ArrayMemory0 = null;
6
+
7
+ function getUint8ArrayMemory0() {
8
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
10
+ }
11
+ return cachedUint8ArrayMemory0;
12
+ }
13
+
14
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
15
+
16
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
17
+ ? function (arg, view) {
18
+ return cachedTextEncoder.encodeInto(arg, view);
19
+ }
20
+ : function (arg, view) {
21
+ const buf = cachedTextEncoder.encode(arg);
22
+ view.set(buf);
23
+ return {
24
+ read: arg.length,
25
+ written: buf.length
26
+ };
27
+ });
28
+
29
+ function passStringToWasm0(arg, malloc, realloc) {
30
+
31
+ if (realloc === undefined) {
32
+ const buf = cachedTextEncoder.encode(arg);
33
+ const ptr = malloc(buf.length, 1) >>> 0;
34
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
35
+ WASM_VECTOR_LEN = buf.length;
36
+ return ptr;
37
+ }
38
+
39
+ let len = arg.length;
40
+ let ptr = malloc(len, 1) >>> 0;
41
+
42
+ const mem = getUint8ArrayMemory0();
43
+
44
+ let offset = 0;
45
+
46
+ for (; offset < len; offset++) {
47
+ const code = arg.charCodeAt(offset);
48
+ if (code > 0x7F) break;
49
+ mem[ptr + offset] = code;
50
+ }
51
+
52
+ if (offset !== len) {
53
+ if (offset !== 0) {
54
+ arg = arg.slice(offset);
55
+ }
56
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
57
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
58
+ const ret = encodeString(arg, view);
59
+
60
+ offset += ret.written;
61
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
62
+ }
63
+
64
+ WASM_VECTOR_LEN = offset;
65
+ return ptr;
66
+ }
67
+
68
+ let cachedDataViewMemory0 = null;
69
+
70
+ function getDataViewMemory0() {
71
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
72
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
73
+ }
74
+ return cachedDataViewMemory0;
75
+ }
76
+
77
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
78
+
79
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
80
+
81
+ function getStringFromWasm0(ptr, len) {
82
+ ptr = ptr >>> 0;
83
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
84
+ }
85
+
86
+ function addToExternrefTable0(obj) {
87
+ const idx = wasm.__externref_table_alloc();
88
+ wasm.__wbindgen_export_5.set(idx, obj);
89
+ return idx;
90
+ }
91
+
92
+ function handleError(f, args) {
93
+ try {
94
+ return f.apply(this, args);
95
+ } catch (e) {
96
+ const idx = addToExternrefTable0(e);
97
+ wasm.__wbindgen_exn_store(idx);
98
+ }
99
+ }
100
+
101
+ function getArrayJsValueFromWasm0(ptr, len) {
102
+ ptr = ptr >>> 0;
103
+ const mem = getDataViewMemory0();
104
+ const result = [];
105
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
106
+ result.push(wasm.__wbindgen_export_5.get(mem.getUint32(i, true)));
107
+ }
108
+ wasm.__externref_drop_slice(ptr, len);
109
+ return result;
110
+ }
111
+
112
+ function isLikeNone(x) {
113
+ return x === undefined || x === null;
114
+ }
115
+
116
+ function getArrayU8FromWasm0(ptr, len) {
117
+ ptr = ptr >>> 0;
118
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
119
+ }
120
+
121
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
122
+ ? { register: () => {}, unregister: () => {} }
123
+ : new FinalizationRegistry(state => {
124
+ wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b)
125
+ });
126
+
127
+ function makeMutClosure(arg0, arg1, dtor, f) {
128
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
129
+ const real = (...args) => {
130
+ // First up with a closure we increment the internal reference
131
+ // count. This ensures that the Rust closure environment won't
132
+ // be deallocated while we're invoking it.
133
+ state.cnt++;
134
+ const a = state.a;
135
+ state.a = 0;
136
+ try {
137
+ return f(a, state.b, ...args);
138
+ } finally {
139
+ if (--state.cnt === 0) {
140
+ wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
141
+ CLOSURE_DTORS.unregister(state);
142
+ } else {
143
+ state.a = a;
144
+ }
145
+ }
146
+ };
147
+ real.original = state;
148
+ CLOSURE_DTORS.register(real, state, state);
149
+ return real;
150
+ }
151
+
152
+ function debugString(val) {
153
+ // primitive types
154
+ const type = typeof val;
155
+ if (type == 'number' || type == 'boolean' || val == null) {
156
+ return `${val}`;
157
+ }
158
+ if (type == 'string') {
159
+ return `"${val}"`;
160
+ }
161
+ if (type == 'symbol') {
162
+ const description = val.description;
163
+ if (description == null) {
164
+ return 'Symbol';
165
+ } else {
166
+ return `Symbol(${description})`;
167
+ }
168
+ }
169
+ if (type == 'function') {
170
+ const name = val.name;
171
+ if (typeof name == 'string' && name.length > 0) {
172
+ return `Function(${name})`;
173
+ } else {
174
+ return 'Function';
175
+ }
176
+ }
177
+ // objects
178
+ if (Array.isArray(val)) {
179
+ const length = val.length;
180
+ let debug = '[';
181
+ if (length > 0) {
182
+ debug += debugString(val[0]);
183
+ }
184
+ for(let i = 1; i < length; i++) {
185
+ debug += ', ' + debugString(val[i]);
186
+ }
187
+ debug += ']';
188
+ return debug;
189
+ }
190
+ // Test for built-in
191
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
192
+ let className;
193
+ if (builtInMatches && builtInMatches.length > 1) {
194
+ className = builtInMatches[1];
195
+ } else {
196
+ // Failed to match the standard '[object ClassName]'
197
+ return toString.call(val);
198
+ }
199
+ if (className == 'Object') {
200
+ // we're a user defined class or Object
201
+ // JSON.stringify avoids problems with cycles, and is generally much
202
+ // easier than looping through ownProperties of `val`.
203
+ try {
204
+ return 'Object(' + JSON.stringify(val) + ')';
205
+ } catch (_) {
206
+ return 'Object';
207
+ }
208
+ }
209
+ // errors
210
+ if (val instanceof Error) {
211
+ return `${val.name}: ${val.message}\n${val.stack}`;
212
+ }
213
+ // TODO we could test for more things here, like `Set`s and `Map`s.
214
+ return className;
215
+ }
216
+ /**
217
+ * Creates a default PostgreSQL storage configuration with sensible defaults.
218
+ *
219
+ * Default values (from pg.Pool):
220
+ * - `maxPoolSize`: 10
221
+ * - `createTimeoutSecs`: 0 (no timeout)
222
+ * - `recycleTimeoutSecs`: 10 (10 seconds idle before disconnect)
223
+ * @param {string} connection_string
224
+ * @returns {PostgresStorageConfig}
225
+ */
226
+ export function defaultPostgresStorageConfig(connection_string) {
227
+ const ptr0 = passStringToWasm0(connection_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
228
+ const len0 = WASM_VECTOR_LEN;
229
+ const ret = wasm.defaultPostgresStorageConfig(ptr0, len0);
230
+ return ret;
231
+ }
232
+
233
+ function takeFromExternrefTable0(idx) {
234
+ const value = wasm.__wbindgen_export_5.get(idx);
235
+ wasm.__externref_table_dealloc(idx);
236
+ return value;
237
+ }
238
+ /**
239
+ * @param {string} mnemonic
240
+ * @param {string | null | undefined} passphrase
241
+ * @param {Network} network
242
+ * @param {KeySetConfig | null} [key_set_config]
243
+ * @returns {DefaultSigner}
244
+ */
245
+ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
246
+ const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
247
+ const len0 = WASM_VECTOR_LEN;
248
+ var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
249
+ var len1 = WASM_VECTOR_LEN;
250
+ const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
251
+ if (ret[2]) {
252
+ throw takeFromExternrefTable0(ret[1]);
253
+ }
254
+ return DefaultSigner.__wrap(ret[0]);
255
+ }
256
+
257
+ /**
258
+ * @param {Network} network
259
+ * @returns {Config}
260
+ */
261
+ export function defaultConfig(network) {
262
+ const ret = wasm.defaultConfig(network);
263
+ return ret;
264
+ }
265
+
266
+ /**
267
+ * Creates a default external signer from a mnemonic phrase.
268
+ *
269
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
270
+ * @returns {Promise<SparkStatus>}
271
+ */
272
+ export function getSparkStatus() {
273
+ const ret = wasm.getSparkStatus();
274
+ return ret;
275
+ }
276
+
277
+ /**
278
+ * @param {Logger} logger
279
+ * @param {string | null} [filter]
280
+ * @returns {Promise<void>}
281
+ */
282
+ export function initLogging(logger, filter) {
283
+ var ptr0 = isLikeNone(filter) ? 0 : passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
284
+ var len0 = WASM_VECTOR_LEN;
285
+ const ret = wasm.initLogging(logger, ptr0, len0);
286
+ return ret;
287
+ }
288
+
289
+ /**
290
+ * @param {ConnectRequest} request
291
+ * @returns {Promise<BreezSdk>}
292
+ */
293
+ export function connect(request) {
294
+ const ret = wasm.connect(request);
295
+ return ret;
296
+ }
297
+
298
+ /**
299
+ * @param {Config} config
300
+ * @param {ExternalSigner} signer
301
+ * @param {string} storage_dir
302
+ * @returns {Promise<BreezSdk>}
303
+ */
304
+ export function connectWithSigner(config, signer, storage_dir) {
305
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
+ const len0 = WASM_VECTOR_LEN;
307
+ const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
308
+ return ret;
309
+ }
310
+
311
+ function passArray8ToWasm0(arg, malloc) {
312
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
313
+ getUint8ArrayMemory0().set(arg, ptr / 1);
314
+ WASM_VECTOR_LEN = arg.length;
315
+ return ptr;
316
+ }
317
+ /**
318
+ * Entry point invoked by JavaScript in a worker.
319
+ * @param {number} ptr
320
+ */
321
+ export function task_worker_entry_point(ptr) {
322
+ const ret = wasm.task_worker_entry_point(ptr);
323
+ if (ret[1]) {
324
+ throw takeFromExternrefTable0(ret[0]);
325
+ }
326
+ }
327
+
328
+ function __wbg_adapter_64(arg0, arg1, arg2) {
329
+ wasm.closure385_externref_shim(arg0, arg1, arg2);
330
+ }
331
+
332
+ function __wbg_adapter_69(arg0, arg1) {
333
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4e01f3b5b423f0fd(arg0, arg1);
334
+ }
335
+
336
+ function __wbg_adapter_391(arg0, arg1, arg2, arg3) {
337
+ wasm.closure656_externref_shim(arg0, arg1, arg2, arg3);
338
+ }
339
+
340
+ const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
341
+
342
+ const __wbindgen_enum_ReadableStreamType = ["bytes"];
343
+
344
+ const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
345
+
346
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
347
+
348
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
349
+
350
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
351
+
352
+ const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
353
+
354
+ const BreezSdkFinalization = (typeof FinalizationRegistry === 'undefined')
355
+ ? { register: () => {}, unregister: () => {} }
356
+ : new FinalizationRegistry(ptr => wasm.__wbg_breezsdk_free(ptr >>> 0, 1));
357
+
358
+ export class BreezSdk {
359
+
360
+ static __wrap(ptr) {
361
+ ptr = ptr >>> 0;
362
+ const obj = Object.create(BreezSdk.prototype);
363
+ obj.__wbg_ptr = ptr;
364
+ BreezSdkFinalization.register(obj, obj.__wbg_ptr, obj);
365
+ return obj;
366
+ }
367
+
368
+ __destroy_into_raw() {
369
+ const ptr = this.__wbg_ptr;
370
+ this.__wbg_ptr = 0;
371
+ BreezSdkFinalization.unregister(this);
372
+ return ptr;
373
+ }
374
+
375
+ free() {
376
+ const ptr = this.__destroy_into_raw();
377
+ wasm.__wbg_breezsdk_free(ptr, 0);
378
+ }
379
+ /**
380
+ * @returns {Promise<void>}
381
+ */
382
+ disconnect() {
383
+ const ret = wasm.breezsdk_disconnect(this.__wbg_ptr);
384
+ return ret;
385
+ }
386
+ /**
387
+ * @param {LnurlAuthRequestDetails} request_data
388
+ * @returns {Promise<LnurlCallbackStatus>}
389
+ */
390
+ lnurlAuth(request_data) {
391
+ const ret = wasm.breezsdk_lnurlAuth(this.__wbg_ptr, request_data);
392
+ return ret;
393
+ }
394
+ /**
395
+ * @param {AddContactRequest} request
396
+ * @returns {Promise<Contact>}
397
+ */
398
+ addContact(request) {
399
+ const ret = wasm.breezsdk_addContact(this.__wbg_ptr, request);
400
+ return ret;
401
+ }
402
+ /**
403
+ * @param {BuyBitcoinRequest} request
404
+ * @returns {Promise<BuyBitcoinResponse>}
405
+ */
406
+ buyBitcoin(request) {
407
+ const ret = wasm.breezsdk_buyBitcoin(this.__wbg_ptr, request);
408
+ return ret;
409
+ }
410
+ /**
411
+ * @param {GetPaymentRequest} request
412
+ * @returns {Promise<GetPaymentResponse>}
413
+ */
414
+ getPayment(request) {
415
+ const ret = wasm.breezsdk_getPayment(this.__wbg_ptr, request);
416
+ return ret;
417
+ }
418
+ /**
419
+ * @param {SyncWalletRequest} request
420
+ * @returns {Promise<SyncWalletResponse>}
421
+ */
422
+ syncWallet(request) {
423
+ const ret = wasm.breezsdk_syncWallet(this.__wbg_ptr, request);
424
+ return ret;
425
+ }
426
+ /**
427
+ * @param {SendPaymentRequest} request
428
+ * @returns {Promise<SendPaymentResponse>}
429
+ */
430
+ sendPayment(request) {
431
+ const ret = wasm.breezsdk_sendPayment(this.__wbg_ptr, request);
432
+ return ret;
433
+ }
434
+ /**
435
+ * @param {SignMessageRequest} request
436
+ * @returns {Promise<SignMessageResponse>}
437
+ */
438
+ signMessage(request) {
439
+ const ret = wasm.breezsdk_signMessage(this.__wbg_ptr, request);
440
+ return ret;
441
+ }
442
+ /**
443
+ * @param {CheckMessageRequest} request
444
+ * @returns {Promise<CheckMessageResponse>}
445
+ */
446
+ checkMessage(request) {
447
+ const ret = wasm.breezsdk_checkMessage(this.__wbg_ptr, request);
448
+ return ret;
449
+ }
450
+ /**
451
+ * @param {ClaimDepositRequest} request
452
+ * @returns {Promise<ClaimDepositResponse>}
453
+ */
454
+ claimDeposit(request) {
455
+ const ret = wasm.breezsdk_claimDeposit(this.__wbg_ptr, request);
456
+ return ret;
457
+ }
458
+ /**
459
+ * @param {ListContactsRequest} request
460
+ * @returns {Promise<Contact[]>}
461
+ */
462
+ listContacts(request) {
463
+ const ret = wasm.breezsdk_listContacts(this.__wbg_ptr, request);
464
+ return ret;
465
+ }
466
+ /**
467
+ * @param {ListPaymentsRequest} request
468
+ * @returns {Promise<ListPaymentsResponse>}
469
+ */
470
+ listPayments(request) {
471
+ const ret = wasm.breezsdk_listPayments(this.__wbg_ptr, request);
472
+ return ret;
473
+ }
474
+ /**
475
+ * @returns {Promise<Webhook[]>}
476
+ */
477
+ listWebhooks() {
478
+ const ret = wasm.breezsdk_listWebhooks(this.__wbg_ptr);
479
+ return ret;
480
+ }
481
+ /**
482
+ * @param {string} id
483
+ * @returns {Promise<void>}
484
+ */
485
+ deleteContact(id) {
486
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
+ const len0 = WASM_VECTOR_LEN;
488
+ const ret = wasm.breezsdk_deleteContact(this.__wbg_ptr, ptr0, len0);
489
+ return ret;
490
+ }
491
+ /**
492
+ * @param {LnurlWithdrawRequest} request
493
+ * @returns {Promise<LnurlWithdrawResponse>}
494
+ */
495
+ lnurlWithdraw(request) {
496
+ const ret = wasm.breezsdk_lnurlWithdraw(this.__wbg_ptr, request);
497
+ return ret;
498
+ }
499
+ /**
500
+ * @param {RefundDepositRequest} request
501
+ * @returns {Promise<RefundDepositResponse>}
502
+ */
503
+ refundDeposit(request) {
504
+ const ret = wasm.breezsdk_refundDeposit(this.__wbg_ptr, request);
505
+ return ret;
506
+ }
507
+ /**
508
+ * @param {UpdateContactRequest} request
509
+ * @returns {Promise<Contact>}
510
+ */
511
+ updateContact(request) {
512
+ const ret = wasm.breezsdk_updateContact(this.__wbg_ptr, request);
513
+ return ret;
514
+ }
515
+ /**
516
+ * @returns {Promise<ListFiatRatesResponse>}
517
+ */
518
+ listFiatRates() {
519
+ const ret = wasm.breezsdk_listFiatRates(this.__wbg_ptr);
520
+ return ret;
521
+ }
522
+ /**
523
+ * @param {ReceivePaymentRequest} request
524
+ * @returns {Promise<ReceivePaymentResponse>}
525
+ */
526
+ receivePayment(request) {
527
+ const ret = wasm.breezsdk_receivePayment(this.__wbg_ptr, request);
528
+ return ret;
529
+ }
530
+ /**
531
+ * @returns {TokenIssuer}
532
+ */
533
+ getTokenIssuer() {
534
+ const ret = wasm.breezsdk_getTokenIssuer(this.__wbg_ptr);
535
+ return TokenIssuer.__wrap(ret);
536
+ }
537
+ /**
538
+ * @returns {Promise<RecommendedFees>}
539
+ */
540
+ recommendedFees() {
541
+ const ret = wasm.breezsdk_recommendedFees(this.__wbg_ptr);
542
+ return ret;
543
+ }
544
+ /**
545
+ * @param {RegisterWebhookRequest} request
546
+ * @returns {Promise<RegisterWebhookResponse>}
547
+ */
548
+ registerWebhook(request) {
549
+ const ret = wasm.breezsdk_registerWebhook(this.__wbg_ptr, request);
550
+ return ret;
551
+ }
552
+ /**
553
+ * @returns {Promise<UserSettings>}
554
+ */
555
+ getUserSettings() {
556
+ const ret = wasm.breezsdk_getUserSettings(this.__wbg_ptr);
557
+ return ret;
558
+ }
559
+ /**
560
+ * @param {PrepareLnurlPayRequest} request
561
+ * @returns {Promise<PrepareLnurlPayResponse>}
562
+ */
563
+ prepareLnurlPay(request) {
564
+ const ret = wasm.breezsdk_prepareLnurlPay(this.__wbg_ptr, request);
565
+ return ret;
566
+ }
567
+ /**
568
+ * @param {EventListener} listener
569
+ * @returns {Promise<string>}
570
+ */
571
+ addEventListener(listener) {
572
+ const ret = wasm.breezsdk_addEventListener(this.__wbg_ptr, listener);
573
+ return ret;
574
+ }
575
+ /**
576
+ * @param {ClaimHtlcPaymentRequest} request
577
+ * @returns {Promise<ClaimHtlcPaymentResponse>}
578
+ */
579
+ claimHtlcPayment(request) {
580
+ const ret = wasm.breezsdk_claimHtlcPayment(this.__wbg_ptr, request);
581
+ return ret;
582
+ }
583
+ /**
584
+ * @param {UnregisterWebhookRequest} request
585
+ * @returns {Promise<void>}
586
+ */
587
+ unregisterWebhook(request) {
588
+ const ret = wasm.breezsdk_unregisterWebhook(this.__wbg_ptr, request);
589
+ return ret;
590
+ }
591
+ /**
592
+ * @param {GetTokensMetadataRequest} request
593
+ * @returns {Promise<GetTokensMetadataResponse>}
594
+ */
595
+ getTokensMetadata(request) {
596
+ const ret = wasm.breezsdk_getTokensMetadata(this.__wbg_ptr, request);
597
+ return ret;
598
+ }
599
+ /**
600
+ * @returns {Promise<ListFiatCurrenciesResponse>}
601
+ */
602
+ listFiatCurrencies() {
603
+ const ret = wasm.breezsdk_listFiatCurrencies(this.__wbg_ptr);
604
+ return ret;
605
+ }
606
+ /**
607
+ * @param {PrepareSendPaymentRequest} request
608
+ * @returns {Promise<PrepareSendPaymentResponse>}
609
+ */
610
+ prepareSendPayment(request) {
611
+ const ret = wasm.breezsdk_prepareSendPayment(this.__wbg_ptr, request);
612
+ return ret;
613
+ }
614
+ /**
615
+ * @param {UpdateUserSettingsRequest} request
616
+ * @returns {Promise<void>}
617
+ */
618
+ updateUserSettings(request) {
619
+ const ret = wasm.breezsdk_updateUserSettings(this.__wbg_ptr, request);
620
+ return ret;
621
+ }
622
+ /**
623
+ * @returns {Promise<LightningAddressInfo | undefined>}
624
+ */
625
+ getLightningAddress() {
626
+ const ret = wasm.breezsdk_getLightningAddress(this.__wbg_ptr);
627
+ return ret;
628
+ }
629
+ /**
630
+ * @param {string} id
631
+ * @returns {Promise<boolean>}
632
+ */
633
+ removeEventListener(id) {
634
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
635
+ const len0 = WASM_VECTOR_LEN;
636
+ const ret = wasm.breezsdk_removeEventListener(this.__wbg_ptr, ptr0, len0);
637
+ return ret;
638
+ }
639
+ /**
640
+ * @param {FetchConversionLimitsRequest} request
641
+ * @returns {Promise<FetchConversionLimitsResponse>}
642
+ */
643
+ fetchConversionLimits(request) {
644
+ const ret = wasm.breezsdk_fetchConversionLimits(this.__wbg_ptr, request);
645
+ return ret;
646
+ }
647
+ /**
648
+ * @param {ListUnclaimedDepositsRequest} request
649
+ * @returns {Promise<ListUnclaimedDepositsResponse>}
650
+ */
651
+ listUnclaimedDeposits(request) {
652
+ const ret = wasm.breezsdk_listUnclaimedDeposits(this.__wbg_ptr, request);
653
+ return ret;
654
+ }
655
+ /**
656
+ * @returns {Promise<void>}
657
+ */
658
+ startLeafOptimization() {
659
+ const ret = wasm.breezsdk_startLeafOptimization(this.__wbg_ptr);
660
+ return ret;
661
+ }
662
+ /**
663
+ * @returns {Promise<void>}
664
+ */
665
+ cancelLeafOptimization() {
666
+ const ret = wasm.breezsdk_cancelLeafOptimization(this.__wbg_ptr);
667
+ return ret;
668
+ }
669
+ /**
670
+ * @returns {Promise<void>}
671
+ */
672
+ deleteLightningAddress() {
673
+ const ret = wasm.breezsdk_deleteLightningAddress(this.__wbg_ptr);
674
+ return ret;
675
+ }
676
+ /**
677
+ * @param {RegisterLightningAddressRequest} request
678
+ * @returns {Promise<LightningAddressInfo>}
679
+ */
680
+ registerLightningAddress(request) {
681
+ const ret = wasm.breezsdk_registerLightningAddress(this.__wbg_ptr, request);
682
+ return ret;
683
+ }
684
+ /**
685
+ * @returns {OptimizationProgress}
686
+ */
687
+ getLeafOptimizationProgress() {
688
+ const ret = wasm.breezsdk_getLeafOptimizationProgress(this.__wbg_ptr);
689
+ return ret;
690
+ }
691
+ /**
692
+ * @param {CheckLightningAddressRequest} request
693
+ * @returns {Promise<boolean>}
694
+ */
695
+ checkLightningAddressAvailable(request) {
696
+ const ret = wasm.breezsdk_checkLightningAddressAvailable(this.__wbg_ptr, request);
697
+ return ret;
698
+ }
699
+ /**
700
+ * @param {string} input
701
+ * @returns {Promise<InputType>}
702
+ */
703
+ parse(input) {
704
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
705
+ const len0 = WASM_VECTOR_LEN;
706
+ const ret = wasm.breezsdk_parse(this.__wbg_ptr, ptr0, len0);
707
+ return ret;
708
+ }
709
+ /**
710
+ * @param {GetInfoRequest} request
711
+ * @returns {Promise<GetInfoResponse>}
712
+ */
713
+ getInfo(request) {
714
+ const ret = wasm.breezsdk_getInfo(this.__wbg_ptr, request);
715
+ return ret;
716
+ }
717
+ /**
718
+ * @param {LnurlPayRequest} request
719
+ * @returns {Promise<LnurlPayResponse>}
720
+ */
721
+ lnurlPay(request) {
722
+ const ret = wasm.breezsdk_lnurlPay(this.__wbg_ptr, request);
723
+ return ret;
724
+ }
725
+ }
726
+
727
+ const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
728
+ ? { register: () => {}, unregister: () => {} }
729
+ : new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr >>> 0, 1));
730
+ /**
731
+ * A default signer implementation that wraps the core SDK's ExternalSigner.
732
+ * This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
733
+ */
734
+ export class DefaultSigner {
735
+
736
+ static __wrap(ptr) {
737
+ ptr = ptr >>> 0;
738
+ const obj = Object.create(DefaultSigner.prototype);
739
+ obj.__wbg_ptr = ptr;
740
+ DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
741
+ return obj;
742
+ }
743
+
744
+ __destroy_into_raw() {
745
+ const ptr = this.__wbg_ptr;
746
+ this.__wbg_ptr = 0;
747
+ DefaultSignerFinalization.unregister(this);
748
+ return ptr;
749
+ }
750
+
751
+ free() {
752
+ const ptr = this.__destroy_into_raw();
753
+ wasm.__wbg_defaultsigner_free(ptr, 0);
754
+ }
755
+ /**
756
+ * @param {MessageBytes} message
757
+ * @param {string} path
758
+ * @returns {Promise<EcdsaSignatureBytes>}
759
+ */
760
+ signEcdsa(message, path) {
761
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
762
+ const len0 = WASM_VECTOR_LEN;
763
+ const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, message, ptr0, len0);
764
+ return ret;
765
+ }
766
+ /**
767
+ * @param {ExternalSignFrostRequest} request
768
+ * @returns {Promise<ExternalFrostSignatureShare>}
769
+ */
770
+ signFrost(request) {
771
+ const ret = wasm.defaultsigner_signFrost(this.__wbg_ptr, request);
772
+ return ret;
773
+ }
774
+ /**
775
+ * @param {Uint8Array} message
776
+ * @param {string} path
777
+ * @returns {Promise<HashedMessageBytes>}
778
+ */
779
+ hmacSha256(message, path) {
780
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
781
+ const len0 = WASM_VECTOR_LEN;
782
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
783
+ const len1 = WASM_VECTOR_LEN;
784
+ const ret = wasm.defaultsigner_hmacSha256(this.__wbg_ptr, ptr0, len0, ptr1, len1);
785
+ return ret;
786
+ }
787
+ /**
788
+ * @param {Uint8Array} message
789
+ * @param {string} path
790
+ * @returns {Promise<Uint8Array>}
791
+ */
792
+ decryptEcies(message, path) {
793
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
794
+ const len0 = WASM_VECTOR_LEN;
795
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
796
+ const len1 = WASM_VECTOR_LEN;
797
+ const ret = wasm.defaultsigner_decryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
798
+ return ret;
799
+ }
800
+ /**
801
+ * @param {Uint8Array} message
802
+ * @param {string} path
803
+ * @returns {Promise<Uint8Array>}
804
+ */
805
+ encryptEcies(message, path) {
806
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
807
+ const len0 = WASM_VECTOR_LEN;
808
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
809
+ const len1 = WASM_VECTOR_LEN;
810
+ const ret = wasm.defaultsigner_encryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
811
+ return ret;
812
+ }
813
+ /**
814
+ * @param {ExternalAggregateFrostRequest} request
815
+ * @returns {Promise<ExternalFrostSignature>}
816
+ */
817
+ aggregateFrost(request) {
818
+ const ret = wasm.defaultsigner_aggregateFrost(this.__wbg_ptr, request);
819
+ return ret;
820
+ }
821
+ /**
822
+ * @param {ExternalSecretSource} signing_key
823
+ * @param {ExternalSecretSource} new_signing_key
824
+ * @returns {Promise<ExternalSecretSource>}
825
+ */
826
+ subtractSecrets(signing_key, new_signing_key) {
827
+ const ret = wasm.defaultsigner_subtractSecrets(this.__wbg_ptr, signing_key, new_signing_key);
828
+ return ret;
829
+ }
830
+ /**
831
+ * @param {string} path
832
+ * @returns {Promise<PublicKeyBytes>}
833
+ */
834
+ derivePublicKey(path) {
835
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
836
+ const len0 = WASM_VECTOR_LEN;
837
+ const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
838
+ return ret;
839
+ }
840
+ /**
841
+ * @param {Uint8Array} hash
842
+ * @param {string} path
843
+ * @returns {Promise<SchnorrSignatureBytes>}
844
+ */
845
+ signHashSchnorr(hash, path) {
846
+ const ptr0 = passArray8ToWasm0(hash, wasm.__wbindgen_malloc);
847
+ const len0 = WASM_VECTOR_LEN;
848
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
849
+ const len1 = WASM_VECTOR_LEN;
850
+ const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
851
+ return ret;
852
+ }
853
+ /**
854
+ * @returns {PublicKeyBytes}
855
+ */
856
+ identityPublicKey() {
857
+ const ret = wasm.defaultsigner_identityPublicKey(this.__wbg_ptr);
858
+ if (ret[2]) {
859
+ throw takeFromExternrefTable0(ret[1]);
860
+ }
861
+ return takeFromExternrefTable0(ret[0]);
862
+ }
863
+ /**
864
+ * @param {number} index
865
+ * @returns {Promise<SecretBytes>}
866
+ */
867
+ staticDepositSecret(index) {
868
+ const ret = wasm.defaultsigner_staticDepositSecret(this.__wbg_ptr, index);
869
+ return ret;
870
+ }
871
+ /**
872
+ * @returns {Promise<ExternalEncryptedSecret>}
873
+ */
874
+ generateRandomSecret() {
875
+ const ret = wasm.defaultsigner_generateRandomSecret(this.__wbg_ptr);
876
+ return ret;
877
+ }
878
+ /**
879
+ * @param {ExternalSecretSource} private_key
880
+ * @returns {Promise<PublicKeyBytes>}
881
+ */
882
+ publicKeyFromSecret(private_key) {
883
+ const ret = wasm.defaultsigner_publicKeyFromSecret(this.__wbg_ptr, private_key);
884
+ return ret;
885
+ }
886
+ /**
887
+ * @param {MessageBytes} message
888
+ * @param {string} path
889
+ * @returns {Promise<RecoverableEcdsaSignatureBytes>}
890
+ */
891
+ signEcdsaRecoverable(message, path) {
892
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
893
+ const len0 = WASM_VECTOR_LEN;
894
+ const ret = wasm.defaultsigner_signEcdsaRecoverable(this.__wbg_ptr, message, ptr0, len0);
895
+ return ret;
896
+ }
897
+ /**
898
+ * @param {ExternalTreeNodeId} id
899
+ * @returns {Promise<PublicKeyBytes>}
900
+ */
901
+ getPublicKeyForNode(id) {
902
+ const ret = wasm.defaultsigner_getPublicKeyForNode(this.__wbg_ptr, id);
903
+ return ret;
904
+ }
905
+ /**
906
+ * @param {ExternalSecretToSplit} secret
907
+ * @param {number} threshold
908
+ * @param {number} num_shares
909
+ * @returns {Promise<ExternalVerifiableSecretShare[]>}
910
+ */
911
+ splitSecretWithProofs(secret, threshold, num_shares) {
912
+ const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
913
+ return ret;
914
+ }
915
+ /**
916
+ * @param {number} index
917
+ * @returns {Promise<PublicKeyBytes>}
918
+ */
919
+ staticDepositSigningKey(index) {
920
+ const ret = wasm.defaultsigner_staticDepositSigningKey(this.__wbg_ptr, index);
921
+ return ret;
922
+ }
923
+ /**
924
+ * @param {ExternalEncryptedSecret} private_key
925
+ * @param {PublicKeyBytes} receiver_public_key
926
+ * @returns {Promise<Uint8Array>}
927
+ */
928
+ encryptPrivateKeyForReceiver(private_key, receiver_public_key) {
929
+ const ret = wasm.defaultsigner_encryptPrivateKeyForReceiver(this.__wbg_ptr, private_key, receiver_public_key);
930
+ return ret;
931
+ }
932
+ /**
933
+ * @param {number} index
934
+ * @returns {Promise<ExternalSecretSource>}
935
+ */
936
+ staticDepositSecretEncrypted(index) {
937
+ const ret = wasm.defaultsigner_staticDepositSecretEncrypted(this.__wbg_ptr, index);
938
+ return ret;
939
+ }
940
+ /**
941
+ * @returns {Promise<ExternalFrostCommitments>}
942
+ */
943
+ generateRandomSigningCommitment() {
944
+ const ret = wasm.defaultsigner_generateRandomSigningCommitment(this.__wbg_ptr);
945
+ return ret;
946
+ }
947
+ }
948
+
949
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
950
+ ? { register: () => {}, unregister: () => {} }
951
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
952
+
953
+ export class IntoUnderlyingByteSource {
954
+
955
+ __destroy_into_raw() {
956
+ const ptr = this.__wbg_ptr;
957
+ this.__wbg_ptr = 0;
958
+ IntoUnderlyingByteSourceFinalization.unregister(this);
959
+ return ptr;
960
+ }
961
+
962
+ free() {
963
+ const ptr = this.__destroy_into_raw();
964
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
965
+ }
966
+ /**
967
+ * @returns {number}
968
+ */
969
+ get autoAllocateChunkSize() {
970
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
971
+ return ret >>> 0;
972
+ }
973
+ /**
974
+ * @param {ReadableByteStreamController} controller
975
+ * @returns {Promise<any>}
976
+ */
977
+ pull(controller) {
978
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
979
+ return ret;
980
+ }
981
+ /**
982
+ * @param {ReadableByteStreamController} controller
983
+ */
984
+ start(controller) {
985
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
986
+ }
987
+ /**
988
+ * @returns {ReadableStreamType}
989
+ */
990
+ get type() {
991
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
992
+ return __wbindgen_enum_ReadableStreamType[ret];
993
+ }
994
+ cancel() {
995
+ const ptr = this.__destroy_into_raw();
996
+ wasm.intounderlyingbytesource_cancel(ptr);
997
+ }
998
+ }
999
+
1000
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
1001
+ ? { register: () => {}, unregister: () => {} }
1002
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
1003
+
1004
+ export class IntoUnderlyingSink {
1005
+
1006
+ __destroy_into_raw() {
1007
+ const ptr = this.__wbg_ptr;
1008
+ this.__wbg_ptr = 0;
1009
+ IntoUnderlyingSinkFinalization.unregister(this);
1010
+ return ptr;
1011
+ }
1012
+
1013
+ free() {
1014
+ const ptr = this.__destroy_into_raw();
1015
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
1016
+ }
1017
+ /**
1018
+ * @param {any} reason
1019
+ * @returns {Promise<any>}
1020
+ */
1021
+ abort(reason) {
1022
+ const ptr = this.__destroy_into_raw();
1023
+ const ret = wasm.intounderlyingsink_abort(ptr, reason);
1024
+ return ret;
1025
+ }
1026
+ /**
1027
+ * @returns {Promise<any>}
1028
+ */
1029
+ close() {
1030
+ const ptr = this.__destroy_into_raw();
1031
+ const ret = wasm.intounderlyingsink_close(ptr);
1032
+ return ret;
1033
+ }
1034
+ /**
1035
+ * @param {any} chunk
1036
+ * @returns {Promise<any>}
1037
+ */
1038
+ write(chunk) {
1039
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
1040
+ return ret;
1041
+ }
1042
+ }
1043
+
1044
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
1045
+ ? { register: () => {}, unregister: () => {} }
1046
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
1047
+
1048
+ export class IntoUnderlyingSource {
1049
+
1050
+ __destroy_into_raw() {
1051
+ const ptr = this.__wbg_ptr;
1052
+ this.__wbg_ptr = 0;
1053
+ IntoUnderlyingSourceFinalization.unregister(this);
1054
+ return ptr;
1055
+ }
1056
+
1057
+ free() {
1058
+ const ptr = this.__destroy_into_raw();
1059
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
1060
+ }
1061
+ /**
1062
+ * @param {ReadableStreamDefaultController} controller
1063
+ * @returns {Promise<any>}
1064
+ */
1065
+ pull(controller) {
1066
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
1067
+ return ret;
1068
+ }
1069
+ cancel() {
1070
+ const ptr = this.__destroy_into_raw();
1071
+ wasm.intounderlyingsource_cancel(ptr);
1072
+ }
1073
+ }
1074
+
1075
+ const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
1076
+ ? { register: () => {}, unregister: () => {} }
1077
+ : new FinalizationRegistry(ptr => wasm.__wbg_passkey_free(ptr >>> 0, 1));
1078
+ /**
1079
+ * Passkey-based wallet operations using WebAuthn PRF extension.
1080
+ *
1081
+ * Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
1082
+ * wallet derivation and label management via Nostr relays.
1083
+ */
1084
+ export class Passkey {
1085
+
1086
+ __destroy_into_raw() {
1087
+ const ptr = this.__wbg_ptr;
1088
+ this.__wbg_ptr = 0;
1089
+ PasskeyFinalization.unregister(this);
1090
+ return ptr;
1091
+ }
1092
+
1093
+ free() {
1094
+ const ptr = this.__destroy_into_raw();
1095
+ wasm.__wbg_passkey_free(ptr, 0);
1096
+ }
1097
+ /**
1098
+ * Derive a wallet for a given label.
1099
+ *
1100
+ * Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
1101
+ *
1102
+ * @param label - Optional label string (defaults to "Default")
1103
+ * @param {string | null} [label]
1104
+ * @returns {Promise<Wallet>}
1105
+ */
1106
+ getWallet(label) {
1107
+ var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1108
+ var len0 = WASM_VECTOR_LEN;
1109
+ const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
1110
+ return ret;
1111
+ }
1112
+ /**
1113
+ * List all labels published to Nostr for this passkey's identity.
1114
+ *
1115
+ * Requires 1 PRF call (for Nostr identity derivation).
1116
+ * @returns {Promise<string[]>}
1117
+ */
1118
+ listLabels() {
1119
+ const ret = wasm.passkey_listLabels(this.__wbg_ptr);
1120
+ return ret;
1121
+ }
1122
+ /**
1123
+ * Publish a label to Nostr relays for this passkey's identity.
1124
+ *
1125
+ * Idempotent: if the label already exists, it is not published again.
1126
+ * Requires 1 PRF call.
1127
+ * @param {string} label
1128
+ * @returns {Promise<void>}
1129
+ */
1130
+ storeLabel(label) {
1131
+ const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1132
+ const len0 = WASM_VECTOR_LEN;
1133
+ const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
1134
+ return ret;
1135
+ }
1136
+ /**
1137
+ * Check if passkey PRF is available on this device.
1138
+ * @returns {Promise<boolean>}
1139
+ */
1140
+ isAvailable() {
1141
+ const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
1142
+ return ret;
1143
+ }
1144
+ /**
1145
+ * Create a new `Passkey` instance.
1146
+ *
1147
+ * @param prfProvider - Platform implementation of passkey PRF operations
1148
+ * @param relayConfig - Optional configuration for Nostr relay connections
1149
+ * @param {PasskeyPrfProvider} prf_provider
1150
+ * @param {NostrRelayConfig | null} [relay_config]
1151
+ */
1152
+ constructor(prf_provider, relay_config) {
1153
+ const ret = wasm.passkey_new(prf_provider, isLikeNone(relay_config) ? 0 : addToExternrefTable0(relay_config));
1154
+ this.__wbg_ptr = ret >>> 0;
1155
+ PasskeyFinalization.register(this, this.__wbg_ptr, this);
1156
+ return this;
1157
+ }
1158
+ }
1159
+
1160
+ const SdkBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
1161
+ ? { register: () => {}, unregister: () => {} }
1162
+ : new FinalizationRegistry(ptr => wasm.__wbg_sdkbuilder_free(ptr >>> 0, 1));
1163
+
1164
+ export class SdkBuilder {
1165
+
1166
+ static __wrap(ptr) {
1167
+ ptr = ptr >>> 0;
1168
+ const obj = Object.create(SdkBuilder.prototype);
1169
+ obj.__wbg_ptr = ptr;
1170
+ SdkBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
1171
+ return obj;
1172
+ }
1173
+
1174
+ __destroy_into_raw() {
1175
+ const ptr = this.__wbg_ptr;
1176
+ this.__wbg_ptr = 0;
1177
+ SdkBuilderFinalization.unregister(this);
1178
+ return ptr;
1179
+ }
1180
+
1181
+ free() {
1182
+ const ptr = this.__destroy_into_raw();
1183
+ wasm.__wbg_sdkbuilder_free(ptr, 0);
1184
+ }
1185
+ /**
1186
+ * @param {KeySetConfig} config
1187
+ * @returns {SdkBuilder}
1188
+ */
1189
+ withKeySet(config) {
1190
+ const ptr = this.__destroy_into_raw();
1191
+ const ret = wasm.sdkbuilder_withKeySet(ptr, config);
1192
+ return SdkBuilder.__wrap(ret);
1193
+ }
1194
+ /**
1195
+ * @param {Storage} storage
1196
+ * @returns {SdkBuilder}
1197
+ */
1198
+ withStorage(storage) {
1199
+ const ptr = this.__destroy_into_raw();
1200
+ const ret = wasm.sdkbuilder_withStorage(ptr, storage);
1201
+ return SdkBuilder.__wrap(ret);
1202
+ }
1203
+ /**
1204
+ * @param {Config} config
1205
+ * @param {ExternalSigner} signer
1206
+ * @returns {SdkBuilder}
1207
+ */
1208
+ static newWithSigner(config, signer) {
1209
+ const ret = wasm.sdkbuilder_newWithSigner(config, signer);
1210
+ return SdkBuilder.__wrap(ret);
1211
+ }
1212
+ /**
1213
+ * @param {FiatService} fiat_service
1214
+ * @returns {SdkBuilder}
1215
+ */
1216
+ withFiatService(fiat_service) {
1217
+ const ptr = this.__destroy_into_raw();
1218
+ const ret = wasm.sdkbuilder_withFiatService(ptr, fiat_service);
1219
+ return SdkBuilder.__wrap(ret);
1220
+ }
1221
+ /**
1222
+ * @param {RestClient} lnurl_client
1223
+ * @returns {SdkBuilder}
1224
+ */
1225
+ withLnurlClient(lnurl_client) {
1226
+ const ptr = this.__destroy_into_raw();
1227
+ const ret = wasm.sdkbuilder_withLnurlClient(ptr, lnurl_client);
1228
+ return SdkBuilder.__wrap(ret);
1229
+ }
1230
+ /**
1231
+ * @param {BitcoinChainService} chain_service
1232
+ * @returns {SdkBuilder}
1233
+ */
1234
+ withChainService(chain_service) {
1235
+ const ptr = this.__destroy_into_raw();
1236
+ const ret = wasm.sdkbuilder_withChainService(ptr, chain_service);
1237
+ return SdkBuilder.__wrap(ret);
1238
+ }
1239
+ /**
1240
+ * @param {string} storage_dir
1241
+ * @returns {Promise<SdkBuilder>}
1242
+ */
1243
+ withDefaultStorage(storage_dir) {
1244
+ const ptr = this.__destroy_into_raw();
1245
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1246
+ const len0 = WASM_VECTOR_LEN;
1247
+ const ret = wasm.sdkbuilder_withDefaultStorage(ptr, ptr0, len0);
1248
+ return ret;
1249
+ }
1250
+ /**
1251
+ * @param {PaymentObserver} payment_observer
1252
+ * @returns {SdkBuilder}
1253
+ */
1254
+ withPaymentObserver(payment_observer) {
1255
+ const ptr = this.__destroy_into_raw();
1256
+ const ret = wasm.sdkbuilder_withPaymentObserver(ptr, payment_observer);
1257
+ return SdkBuilder.__wrap(ret);
1258
+ }
1259
+ /**
1260
+ * @param {PostgresStorageConfig} config
1261
+ * @returns {SdkBuilder}
1262
+ */
1263
+ withPostgresBackend(config) {
1264
+ const ptr = this.__destroy_into_raw();
1265
+ const ret = wasm.sdkbuilder_withPostgresBackend(ptr, config);
1266
+ return SdkBuilder.__wrap(ret);
1267
+ }
1268
+ /**
1269
+ * @param {string} url
1270
+ * @param {ChainApiType} api_type
1271
+ * @param {Credentials | null} [credentials]
1272
+ * @returns {SdkBuilder}
1273
+ */
1274
+ withRestChainService(url, api_type, credentials) {
1275
+ const ptr = this.__destroy_into_raw();
1276
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1277
+ const len0 = WASM_VECTOR_LEN;
1278
+ const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
1279
+ return SdkBuilder.__wrap(ret);
1280
+ }
1281
+ /**
1282
+ * @param {Config} config
1283
+ * @param {Seed} seed
1284
+ * @returns {SdkBuilder}
1285
+ */
1286
+ static new(config, seed) {
1287
+ const ret = wasm.sdkbuilder_new(config, seed);
1288
+ return SdkBuilder.__wrap(ret);
1289
+ }
1290
+ /**
1291
+ * @returns {Promise<BreezSdk>}
1292
+ */
1293
+ build() {
1294
+ const ptr = this.__destroy_into_raw();
1295
+ const ret = wasm.sdkbuilder_build(ptr);
1296
+ return ret;
1297
+ }
1298
+ }
1299
+
1300
+ const TokenIssuerFinalization = (typeof FinalizationRegistry === 'undefined')
1301
+ ? { register: () => {}, unregister: () => {} }
1302
+ : new FinalizationRegistry(ptr => wasm.__wbg_tokenissuer_free(ptr >>> 0, 1));
1303
+
1304
+ export class TokenIssuer {
1305
+
1306
+ static __wrap(ptr) {
1307
+ ptr = ptr >>> 0;
1308
+ const obj = Object.create(TokenIssuer.prototype);
1309
+ obj.__wbg_ptr = ptr;
1310
+ TokenIssuerFinalization.register(obj, obj.__wbg_ptr, obj);
1311
+ return obj;
1312
+ }
1313
+
1314
+ __destroy_into_raw() {
1315
+ const ptr = this.__wbg_ptr;
1316
+ this.__wbg_ptr = 0;
1317
+ TokenIssuerFinalization.unregister(this);
1318
+ return ptr;
1319
+ }
1320
+
1321
+ free() {
1322
+ const ptr = this.__destroy_into_raw();
1323
+ wasm.__wbg_tokenissuer_free(ptr, 0);
1324
+ }
1325
+ /**
1326
+ * @param {BurnIssuerTokenRequest} request
1327
+ * @returns {Promise<Payment>}
1328
+ */
1329
+ burnIssuerToken(request) {
1330
+ const ret = wasm.tokenissuer_burnIssuerToken(this.__wbg_ptr, request);
1331
+ return ret;
1332
+ }
1333
+ /**
1334
+ * @param {MintIssuerTokenRequest} request
1335
+ * @returns {Promise<Payment>}
1336
+ */
1337
+ mintIssuerToken(request) {
1338
+ const ret = wasm.tokenissuer_mintIssuerToken(this.__wbg_ptr, request);
1339
+ return ret;
1340
+ }
1341
+ /**
1342
+ * @param {CreateIssuerTokenRequest} request
1343
+ * @returns {Promise<TokenMetadata>}
1344
+ */
1345
+ createIssuerToken(request) {
1346
+ const ret = wasm.tokenissuer_createIssuerToken(this.__wbg_ptr, request);
1347
+ return ret;
1348
+ }
1349
+ /**
1350
+ * @param {FreezeIssuerTokenRequest} request
1351
+ * @returns {Promise<FreezeIssuerTokenResponse>}
1352
+ */
1353
+ freezeIssuerToken(request) {
1354
+ const ret = wasm.tokenissuer_freezeIssuerToken(this.__wbg_ptr, request);
1355
+ return ret;
1356
+ }
1357
+ /**
1358
+ * @param {UnfreezeIssuerTokenRequest} request
1359
+ * @returns {Promise<UnfreezeIssuerTokenResponse>}
1360
+ */
1361
+ unfreezeIssuerToken(request) {
1362
+ const ret = wasm.tokenissuer_unfreezeIssuerToken(this.__wbg_ptr, request);
1363
+ return ret;
1364
+ }
1365
+ /**
1366
+ * @returns {Promise<TokenBalance>}
1367
+ */
1368
+ getIssuerTokenBalance() {
1369
+ const ret = wasm.tokenissuer_getIssuerTokenBalance(this.__wbg_ptr);
1370
+ return ret;
1371
+ }
1372
+ /**
1373
+ * @returns {Promise<TokenMetadata>}
1374
+ */
1375
+ getIssuerTokenMetadata() {
1376
+ const ret = wasm.tokenissuer_getIssuerTokenMetadata(this.__wbg_ptr);
1377
+ return ret;
1378
+ }
1379
+ }
1380
+
1381
+ async function __wbg_load(module, imports) {
1382
+ if (typeof Response === 'function' && module instanceof Response) {
1383
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1384
+ try {
1385
+ return await WebAssembly.instantiateStreaming(module, imports);
1386
+
1387
+ } catch (e) {
1388
+ if (module.headers.get('Content-Type') != 'application/wasm') {
1389
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
1390
+
1391
+ } else {
1392
+ throw e;
1393
+ }
1394
+ }
1395
+ }
1396
+
1397
+ const bytes = await module.arrayBuffer();
1398
+ return await WebAssembly.instantiate(bytes, imports);
1399
+
1400
+ } else {
1401
+ const instance = await WebAssembly.instantiate(module, imports);
1402
+
1403
+ if (instance instanceof WebAssembly.Instance) {
1404
+ return { instance, module };
1405
+
1406
+ } else {
1407
+ return instance;
1408
+ }
1409
+ }
1410
+ }
1411
+
1412
+ function __wbg_get_imports() {
1413
+ const imports = {};
1414
+ imports.wbg = {};
1415
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1416
+ const ret = String(arg1);
1417
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1418
+ const len1 = WASM_VECTOR_LEN;
1419
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1420
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1421
+ };
1422
+ imports.wbg.__wbg_abort_410ec47a64ac6117 = function(arg0, arg1) {
1423
+ arg0.abort(arg1);
1424
+ };
1425
+ imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
1426
+ arg0.abort();
1427
+ };
1428
+ imports.wbg.__wbg_addDeposit_42b1593db58de120 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1429
+ let deferred0_0;
1430
+ let deferred0_1;
1431
+ try {
1432
+ deferred0_0 = arg1;
1433
+ deferred0_1 = arg2;
1434
+ const ret = arg0.addDeposit(getStringFromWasm0(arg1, arg2), arg3 >>> 0, BigInt.asUintN(64, arg4), arg5 !== 0);
1435
+ return ret;
1436
+ } finally {
1437
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1438
+ }
1439
+ }, arguments) };
1440
+ imports.wbg.__wbg_addLeaves_226f98499cdaa66d = function() { return handleError(function (arg0, arg1) {
1441
+ const ret = arg0.addLeaves(arg1);
1442
+ return ret;
1443
+ }, arguments) };
1444
+ imports.wbg.__wbg_aggregateFrost_053f2d54394422d5 = function() { return handleError(function (arg0, arg1) {
1445
+ const ret = arg0.aggregateFrost(arg1);
1446
+ return ret;
1447
+ }, arguments) };
1448
+ imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1449
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1450
+ }, arguments) };
1451
+ imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {
1452
+ const ret = arg0.arrayBuffer();
1453
+ return ret;
1454
+ }, arguments) };
1455
+ imports.wbg.__wbg_beforeSend_57747b03876e1d28 = function() { return handleError(function (arg0, arg1, arg2) {
1456
+ var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
1457
+ wasm.__wbindgen_free(arg1, arg2 * 4, 4);
1458
+ const ret = arg0.beforeSend(v0);
1459
+ return ret;
1460
+ }, arguments) };
1461
+ imports.wbg.__wbg_body_0b8fd1fe671660df = function(arg0) {
1462
+ const ret = arg0.body;
1463
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1464
+ };
1465
+ imports.wbg.__wbg_breezsdk_new = function(arg0) {
1466
+ const ret = BreezSdk.__wrap(arg0);
1467
+ return ret;
1468
+ };
1469
+ imports.wbg.__wbg_broadcastTransaction_67533cdbfe67273e = function() { return handleError(function (arg0, arg1, arg2) {
1470
+ let deferred0_0;
1471
+ let deferred0_1;
1472
+ try {
1473
+ deferred0_0 = arg1;
1474
+ deferred0_1 = arg2;
1475
+ const ret = arg0.broadcastTransaction(getStringFromWasm0(arg1, arg2));
1476
+ return ret;
1477
+ } finally {
1478
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1479
+ }
1480
+ }, arguments) };
1481
+ imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
1482
+ const ret = arg0.buffer;
1483
+ return ret;
1484
+ };
1485
+ imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
1486
+ const ret = arg0.buffer;
1487
+ return ret;
1488
+ };
1489
+ imports.wbg.__wbg_byobRequest_77d9adf63337edfb = function(arg0) {
1490
+ const ret = arg0.byobRequest;
1491
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1492
+ };
1493
+ imports.wbg.__wbg_byteLength_e674b853d9c77e1d = function(arg0) {
1494
+ const ret = arg0.byteLength;
1495
+ return ret;
1496
+ };
1497
+ imports.wbg.__wbg_byteOffset_fd862df290ef848d = function(arg0) {
1498
+ const ret = arg0.byteOffset;
1499
+ return ret;
1500
+ };
1501
+ imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
1502
+ const ret = arg0.call(arg1);
1503
+ return ret;
1504
+ }, arguments) };
1505
+ imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
1506
+ const ret = arg0.call(arg1, arg2);
1507
+ return ret;
1508
+ }, arguments) };
1509
+ imports.wbg.__wbg_cancelReservation_d85a13db3e8e3c7b = function() { return handleError(function (arg0, arg1, arg2) {
1510
+ let deferred0_0;
1511
+ let deferred0_1;
1512
+ try {
1513
+ deferred0_0 = arg1;
1514
+ deferred0_1 = arg2;
1515
+ const ret = arg0.cancelReservation(getStringFromWasm0(arg1, arg2));
1516
+ return ret;
1517
+ } finally {
1518
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1519
+ }
1520
+ }, arguments) };
1521
+ imports.wbg.__wbg_cancelReservation_fd3065607b457424 = function() { return handleError(function (arg0, arg1, arg2) {
1522
+ let deferred0_0;
1523
+ let deferred0_1;
1524
+ try {
1525
+ deferred0_0 = arg1;
1526
+ deferred0_1 = arg2;
1527
+ const ret = arg0.cancelReservation(getStringFromWasm0(arg1, arg2));
1528
+ return ret;
1529
+ } finally {
1530
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1531
+ }
1532
+ }, arguments) };
1533
+ imports.wbg.__wbg_cancel_8a308660caa6cadf = function(arg0) {
1534
+ const ret = arg0.cancel();
1535
+ return ret;
1536
+ };
1537
+ imports.wbg.__wbg_catch_a6e601879b2610e9 = function(arg0, arg1) {
1538
+ const ret = arg0.catch(arg1);
1539
+ return ret;
1540
+ };
1541
+ imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
1542
+ const ret = clearTimeout(arg0);
1543
+ return ret;
1544
+ };
1545
+ imports.wbg.__wbg_clearTimeout_6222fede17abcb1a = function(arg0) {
1546
+ const ret = clearTimeout(arg0);
1547
+ return ret;
1548
+ };
1549
+ imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
1550
+ arg0.close();
1551
+ }, arguments) };
1552
+ imports.wbg.__wbg_close_304cc1fef3466669 = function() { return handleError(function (arg0) {
1553
+ arg0.close();
1554
+ }, arguments) };
1555
+ imports.wbg.__wbg_close_5ce03e29be453811 = function() { return handleError(function (arg0) {
1556
+ arg0.close();
1557
+ }, arguments) };
1558
+ imports.wbg.__wbg_code_cfd8f6868bdaed9b = function(arg0) {
1559
+ const ret = arg0.code;
1560
+ return ret;
1561
+ };
1562
+ imports.wbg.__wbg_code_f4ec1e6e2e1b0417 = function(arg0) {
1563
+ const ret = arg0.code;
1564
+ return ret;
1565
+ };
1566
+ imports.wbg.__wbg_createDefaultStorage_458aa01b5eaead27 = function() { return handleError(function (arg0, arg1, arg2) {
1567
+ const ret = createDefaultStorage(getStringFromWasm0(arg0, arg1), arg2);
1568
+ return ret;
1569
+ }, arguments) };
1570
+ imports.wbg.__wbg_createPostgresPool_8b4003e9db8e9432 = function() { return handleError(function (arg0) {
1571
+ const ret = createPostgresPool(arg0);
1572
+ return ret;
1573
+ }, arguments) };
1574
+ imports.wbg.__wbg_createPostgresStorageWithPool_77aa64bddd7440db = function() { return handleError(function (arg0, arg1) {
1575
+ const ret = createPostgresStorageWithPool(arg0, arg1);
1576
+ return ret;
1577
+ }, arguments) };
1578
+ imports.wbg.__wbg_createPostgresTokenStoreWithPool_5e7b75f5975d8b94 = function() { return handleError(function (arg0, arg1) {
1579
+ const ret = createPostgresTokenStoreWithPool(arg0, arg1);
1580
+ return ret;
1581
+ }, arguments) };
1582
+ imports.wbg.__wbg_createPostgresTreeStoreWithPool_55e19122e69fb9e3 = function() { return handleError(function (arg0, arg1) {
1583
+ const ret = createPostgresTreeStoreWithPool(arg0, arg1);
1584
+ return ret;
1585
+ }, arguments) };
1586
+ imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1587
+ const ret = arg0.crypto;
1588
+ return ret;
1589
+ };
1590
+ imports.wbg.__wbg_data_432d9c3df2630942 = function(arg0) {
1591
+ const ret = arg0.data;
1592
+ return ret;
1593
+ };
1594
+ imports.wbg.__wbg_deleteCachedItem_ff3c84380e94360b = function() { return handleError(function (arg0, arg1, arg2) {
1595
+ let deferred0_0;
1596
+ let deferred0_1;
1597
+ try {
1598
+ deferred0_0 = arg1;
1599
+ deferred0_1 = arg2;
1600
+ const ret = arg0.deleteCachedItem(getStringFromWasm0(arg1, arg2));
1601
+ return ret;
1602
+ } finally {
1603
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1604
+ }
1605
+ }, arguments) };
1606
+ imports.wbg.__wbg_deleteContact_04d635b32c469d83 = function() { return handleError(function (arg0, arg1, arg2) {
1607
+ let deferred0_0;
1608
+ let deferred0_1;
1609
+ try {
1610
+ deferred0_0 = arg1;
1611
+ deferred0_1 = arg2;
1612
+ const ret = arg0.deleteContact(getStringFromWasm0(arg1, arg2));
1613
+ return ret;
1614
+ } finally {
1615
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1616
+ }
1617
+ }, arguments) };
1618
+ imports.wbg.__wbg_deleteDeposit_72ec826e7c3c3ccf = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1619
+ let deferred0_0;
1620
+ let deferred0_1;
1621
+ try {
1622
+ deferred0_0 = arg1;
1623
+ deferred0_1 = arg2;
1624
+ const ret = arg0.deleteDeposit(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
1625
+ return ret;
1626
+ } finally {
1627
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1628
+ }
1629
+ }, arguments) };
1630
+ imports.wbg.__wbg_deleteRequest_7be0a74a10deac70 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1631
+ let deferred0_0;
1632
+ let deferred0_1;
1633
+ try {
1634
+ deferred0_0 = arg1;
1635
+ deferred0_1 = arg2;
1636
+ let v1;
1637
+ if (arg4 !== 0) {
1638
+ v1 = getStringFromWasm0(arg4, arg5).slice();
1639
+ wasm.__wbindgen_free(arg4, arg5 * 1, 1);
1640
+ }
1641
+ const ret = arg0.deleteRequest(getStringFromWasm0(arg1, arg2), arg3, v1);
1642
+ return ret;
1643
+ } finally {
1644
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1645
+ }
1646
+ }, arguments) };
1647
+ imports.wbg.__wbg_derivePrfSeed_8584c0fcf554b593 = function() { return handleError(function (arg0, arg1, arg2) {
1648
+ let deferred0_0;
1649
+ let deferred0_1;
1650
+ try {
1651
+ deferred0_0 = arg1;
1652
+ deferred0_1 = arg2;
1653
+ const ret = arg0.derivePrfSeed(getStringFromWasm0(arg1, arg2));
1654
+ return ret;
1655
+ } finally {
1656
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1657
+ }
1658
+ }, arguments) };
1659
+ imports.wbg.__wbg_derivePublicKey_736fb57b6852f201 = function() { return handleError(function (arg0, arg1, arg2) {
1660
+ let deferred0_0;
1661
+ let deferred0_1;
1662
+ try {
1663
+ deferred0_0 = arg1;
1664
+ deferred0_1 = arg2;
1665
+ const ret = arg0.derivePublicKey(getStringFromWasm0(arg1, arg2));
1666
+ return ret;
1667
+ } finally {
1668
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1669
+ }
1670
+ }, arguments) };
1671
+ imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
1672
+ const ret = arg0.done;
1673
+ return ret;
1674
+ };
1675
+ imports.wbg.__wbg_eciesDecrypt_f54e495a0988c2cc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1676
+ let deferred1_0;
1677
+ let deferred1_1;
1678
+ try {
1679
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1680
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1681
+ deferred1_0 = arg3;
1682
+ deferred1_1 = arg4;
1683
+ const ret = arg0.eciesDecrypt(v0, getStringFromWasm0(arg3, arg4));
1684
+ return ret;
1685
+ } finally {
1686
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1687
+ }
1688
+ }, arguments) };
1689
+ imports.wbg.__wbg_eciesEncrypt_d1c5b3c6a4602a28 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1690
+ let deferred1_0;
1691
+ let deferred1_1;
1692
+ try {
1693
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1694
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1695
+ deferred1_0 = arg3;
1696
+ deferred1_1 = arg4;
1697
+ const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
1698
+ return ret;
1699
+ } finally {
1700
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1701
+ }
1702
+ }, arguments) };
1703
+ imports.wbg.__wbg_encryptPrivateKeyForReceiver_346eec1080ebe04c = function() { return handleError(function (arg0, arg1, arg2) {
1704
+ const ret = arg0.encryptPrivateKeyForReceiver(arg1, arg2);
1705
+ return ret;
1706
+ }, arguments) };
1707
+ imports.wbg.__wbg_enqueue_bb16ba72f537dc9e = function() { return handleError(function (arg0, arg1) {
1708
+ arg0.enqueue(arg1);
1709
+ }, arguments) };
1710
+ imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
1711
+ const ret = Object.entries(arg0);
1712
+ return ret;
1713
+ };
1714
+ imports.wbg.__wbg_error_e98c298703cffa97 = function(arg0, arg1) {
1715
+ console.error(getStringFromWasm0(arg0, arg1));
1716
+ };
1717
+ imports.wbg.__wbg_fetchFiatCurrencies_d11be091c7fac943 = function() { return handleError(function (arg0) {
1718
+ const ret = arg0.fetchFiatCurrencies();
1719
+ return ret;
1720
+ }, arguments) };
1721
+ imports.wbg.__wbg_fetchFiatRates_a5bc2d1be56de4a7 = function() { return handleError(function (arg0) {
1722
+ const ret = arg0.fetchFiatRates();
1723
+ return ret;
1724
+ }, arguments) };
1725
+ imports.wbg.__wbg_fetch_07cd86dd296a5a63 = function(arg0, arg1, arg2) {
1726
+ const ret = arg0.fetch(arg1, arg2);
1727
+ return ret;
1728
+ };
1729
+ imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
1730
+ const ret = arg0.fetch(arg1);
1731
+ return ret;
1732
+ };
1733
+ imports.wbg.__wbg_fetch_769f3df592e37b75 = function(arg0, arg1) {
1734
+ const ret = fetch(arg0, arg1);
1735
+ return ret;
1736
+ };
1737
+ imports.wbg.__wbg_fetch_f156d10be9a5c88a = function(arg0) {
1738
+ const ret = fetch(arg0);
1739
+ return ret;
1740
+ };
1741
+ imports.wbg.__wbg_finalizeReservation_86ee8385c17e015b = function() { return handleError(function (arg0, arg1, arg2) {
1742
+ let deferred0_0;
1743
+ let deferred0_1;
1744
+ try {
1745
+ deferred0_0 = arg1;
1746
+ deferred0_1 = arg2;
1747
+ const ret = arg0.finalizeReservation(getStringFromWasm0(arg1, arg2));
1748
+ return ret;
1749
+ } finally {
1750
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1751
+ }
1752
+ }, arguments) };
1753
+ imports.wbg.__wbg_finalizeReservation_a8fad570b7fe5185 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1754
+ let deferred0_0;
1755
+ let deferred0_1;
1756
+ try {
1757
+ deferred0_0 = arg1;
1758
+ deferred0_1 = arg2;
1759
+ const ret = arg0.finalizeReservation(getStringFromWasm0(arg1, arg2), arg3);
1760
+ return ret;
1761
+ } finally {
1762
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1763
+ }
1764
+ }, arguments) };
1765
+ imports.wbg.__wbg_generateFrostSigningCommitments_0630bbabc5b72b42 = function() { return handleError(function (arg0) {
1766
+ const ret = arg0.generateFrostSigningCommitments();
1767
+ return ret;
1768
+ }, arguments) };
1769
+ imports.wbg.__wbg_generateRandomSecret_3dcc7ca4a61a1d4d = function() { return handleError(function (arg0) {
1770
+ const ret = arg0.generateRandomSecret();
1771
+ return ret;
1772
+ }, arguments) };
1773
+ imports.wbg.__wbg_getAddressUtxos_328ceb8b4a63a6da = function() { return handleError(function (arg0, arg1, arg2) {
1774
+ let deferred0_0;
1775
+ let deferred0_1;
1776
+ try {
1777
+ deferred0_0 = arg1;
1778
+ deferred0_1 = arg2;
1779
+ const ret = arg0.getAddressUtxos(getStringFromWasm0(arg1, arg2));
1780
+ return ret;
1781
+ } finally {
1782
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1783
+ }
1784
+ }, arguments) };
1785
+ imports.wbg.__wbg_getCachedItem_de40d6348815c7b9 = function() { return handleError(function (arg0, arg1, arg2) {
1786
+ let deferred0_0;
1787
+ let deferred0_1;
1788
+ try {
1789
+ deferred0_0 = arg1;
1790
+ deferred0_1 = arg2;
1791
+ const ret = arg0.getCachedItem(getStringFromWasm0(arg1, arg2));
1792
+ return ret;
1793
+ } finally {
1794
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1795
+ }
1796
+ }, arguments) };
1797
+ imports.wbg.__wbg_getContact_b7300737e5dee01b = function() { return handleError(function (arg0, arg1, arg2) {
1798
+ let deferred0_0;
1799
+ let deferred0_1;
1800
+ try {
1801
+ deferred0_0 = arg1;
1802
+ deferred0_1 = arg2;
1803
+ const ret = arg0.getContact(getStringFromWasm0(arg1, arg2));
1804
+ return ret;
1805
+ } finally {
1806
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1807
+ }
1808
+ }, arguments) };
1809
+ imports.wbg.__wbg_getLeaves_c94a1c927d239738 = function() { return handleError(function (arg0) {
1810
+ const ret = arg0.getLeaves();
1811
+ return ret;
1812
+ }, arguments) };
1813
+ imports.wbg.__wbg_getPaymentById_c23144bfc404b2fc = function() { return handleError(function (arg0, arg1, arg2) {
1814
+ let deferred0_0;
1815
+ let deferred0_1;
1816
+ try {
1817
+ deferred0_0 = arg1;
1818
+ deferred0_1 = arg2;
1819
+ const ret = arg0.getPaymentById(getStringFromWasm0(arg1, arg2));
1820
+ return ret;
1821
+ } finally {
1822
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1823
+ }
1824
+ }, arguments) };
1825
+ imports.wbg.__wbg_getPaymentByInvoice_afddfcbefa5508b0 = function() { return handleError(function (arg0, arg1, arg2) {
1826
+ let deferred0_0;
1827
+ let deferred0_1;
1828
+ try {
1829
+ deferred0_0 = arg1;
1830
+ deferred0_1 = arg2;
1831
+ const ret = arg0.getPaymentByInvoice(getStringFromWasm0(arg1, arg2));
1832
+ return ret;
1833
+ } finally {
1834
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1835
+ }
1836
+ }, arguments) };
1837
+ imports.wbg.__wbg_getPaymentsByParentIds_0f8f8e0097a07321 = function() { return handleError(function (arg0, arg1, arg2) {
1838
+ var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
1839
+ wasm.__wbindgen_free(arg1, arg2 * 4, 4);
1840
+ const ret = arg0.getPaymentsByParentIds(v0);
1841
+ return ret;
1842
+ }, arguments) };
1843
+ imports.wbg.__wbg_getPublicKeyForNode_5ddb3378904e4ad4 = function() { return handleError(function (arg0, arg1) {
1844
+ const ret = arg0.getPublicKeyForNode(arg1);
1845
+ return ret;
1846
+ }, arguments) };
1847
+ imports.wbg.__wbg_getPublicKeyFromSecretSource_9e324c0b205a9f99 = function() { return handleError(function (arg0, arg1) {
1848
+ const ret = arg0.getPublicKeyFromSecretSource(arg1);
1849
+ return ret;
1850
+ }, arguments) };
1851
+ imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1852
+ arg0.getRandomValues(arg1);
1853
+ }, arguments) };
1854
+ imports.wbg.__wbg_getRandomValues_e14bd3de0db61032 = function() { return handleError(function (arg0, arg1) {
1855
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1856
+ }, arguments) };
1857
+ imports.wbg.__wbg_getReader_48e00749fe3f6089 = function() { return handleError(function (arg0) {
1858
+ const ret = arg0.getReader();
1859
+ return ret;
1860
+ }, arguments) };
1861
+ imports.wbg.__wbg_getRequest_4ab87a8cbe18fa22 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1862
+ let deferred0_0;
1863
+ let deferred0_1;
1864
+ try {
1865
+ deferred0_0 = arg1;
1866
+ deferred0_1 = arg2;
1867
+ const ret = arg0.getRequest(getStringFromWasm0(arg1, arg2), arg3);
1868
+ return ret;
1869
+ } finally {
1870
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1871
+ }
1872
+ }, arguments) };
1873
+ imports.wbg.__wbg_getStaticDepositPrivateKey_203e6f4eb4116ce0 = function() { return handleError(function (arg0, arg1) {
1874
+ const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
1875
+ return ret;
1876
+ }, arguments) };
1877
+ imports.wbg.__wbg_getStaticDepositPublicKey_4551dec44c20efe6 = function() { return handleError(function (arg0, arg1) {
1878
+ const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
1879
+ return ret;
1880
+ }, arguments) };
1881
+ imports.wbg.__wbg_getStaticDepositSecretSource_8e310c718339e400 = function() { return handleError(function (arg0, arg1) {
1882
+ const ret = arg0.getStaticDepositSecretSource(arg1 >>> 0);
1883
+ return ret;
1884
+ }, arguments) };
1885
+ imports.wbg.__wbg_getTokenOutputs_f51d6f5d47330273 = function() { return handleError(function (arg0, arg1) {
1886
+ const ret = arg0.getTokenOutputs(arg1);
1887
+ return ret;
1888
+ }, arguments) };
1889
+ imports.wbg.__wbg_getTransactionHex_973b8d0555c60f99 = function() { return handleError(function (arg0, arg1, arg2) {
1890
+ let deferred0_0;
1891
+ let deferred0_1;
1892
+ try {
1893
+ deferred0_0 = arg1;
1894
+ deferred0_1 = arg2;
1895
+ const ret = arg0.getTransactionHex(getStringFromWasm0(arg1, arg2));
1896
+ return ret;
1897
+ } finally {
1898
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1899
+ }
1900
+ }, arguments) };
1901
+ imports.wbg.__wbg_getTransactionStatus_731f0ef840c27f99 = function() { return handleError(function (arg0, arg1, arg2) {
1902
+ let deferred0_0;
1903
+ let deferred0_1;
1904
+ try {
1905
+ deferred0_0 = arg1;
1906
+ deferred0_1 = arg2;
1907
+ const ret = arg0.getTransactionStatus(getStringFromWasm0(arg1, arg2));
1908
+ return ret;
1909
+ } finally {
1910
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1911
+ }
1912
+ }, arguments) };
1913
+ imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
1914
+ const ret = Reflect.get(arg0, arg1);
1915
+ return ret;
1916
+ }, arguments) };
1917
+ imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
1918
+ const ret = arg0[arg1 >>> 0];
1919
+ return ret;
1920
+ };
1921
+ imports.wbg.__wbg_getdone_d47073731acd3e74 = function(arg0) {
1922
+ const ret = arg0.done;
1923
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1924
+ };
1925
+ imports.wbg.__wbg_getvalue_009dcd63692bee1f = function(arg0) {
1926
+ const ret = arg0.value;
1927
+ return ret;
1928
+ };
1929
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
1930
+ const ret = arg0[arg1];
1931
+ return ret;
1932
+ };
1933
+ imports.wbg.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
1934
+ const ret = Reflect.has(arg0, arg1);
1935
+ return ret;
1936
+ }, arguments) };
1937
+ imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
1938
+ const ret = arg0.headers;
1939
+ return ret;
1940
+ };
1941
+ imports.wbg.__wbg_hmacSha256_c6633de6089f686f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1942
+ let deferred1_0;
1943
+ let deferred1_1;
1944
+ try {
1945
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1946
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1947
+ deferred1_0 = arg3;
1948
+ deferred1_1 = arg4;
1949
+ const ret = arg0.hmacSha256(v0, getStringFromWasm0(arg3, arg4));
1950
+ return ret;
1951
+ } finally {
1952
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1953
+ }
1954
+ }, arguments) };
1955
+ imports.wbg.__wbg_identityPublicKey_c8b35005055a3df0 = function() { return handleError(function (arg0) {
1956
+ const ret = arg0.identityPublicKey();
1957
+ return ret;
1958
+ }, arguments) };
1959
+ imports.wbg.__wbg_insertContact_33c214012213409d = function() { return handleError(function (arg0, arg1) {
1960
+ const ret = arg0.insertContact(arg1);
1961
+ return ret;
1962
+ }, arguments) };
1963
+ imports.wbg.__wbg_insertPaymentMetadata_0c4ebdcde694d29b = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1964
+ let deferred0_0;
1965
+ let deferred0_1;
1966
+ try {
1967
+ deferred0_0 = arg1;
1968
+ deferred0_1 = arg2;
1969
+ const ret = arg0.insertPaymentMetadata(getStringFromWasm0(arg1, arg2), arg3);
1970
+ return ret;
1971
+ } finally {
1972
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1973
+ }
1974
+ }, arguments) };
1975
+ imports.wbg.__wbg_insertPayment_2afe3300c5f86ccf = function() { return handleError(function (arg0, arg1) {
1976
+ const ret = arg0.insertPayment(arg1);
1977
+ return ret;
1978
+ }, arguments) };
1979
+ imports.wbg.__wbg_insertTokenOutputs_043ceea065ff8f65 = function() { return handleError(function (arg0, arg1) {
1980
+ const ret = arg0.insertTokenOutputs(arg1);
1981
+ return ret;
1982
+ }, arguments) };
1983
+ imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
1984
+ let result;
1985
+ try {
1986
+ result = arg0 instanceof ArrayBuffer;
1987
+ } catch (_) {
1988
+ result = false;
1989
+ }
1990
+ const ret = result;
1991
+ return ret;
1992
+ };
1993
+ imports.wbg.__wbg_instanceof_Blob_ca721ef3bdab15d1 = function(arg0) {
1994
+ let result;
1995
+ try {
1996
+ result = arg0 instanceof Blob;
1997
+ } catch (_) {
1998
+ result = false;
1999
+ }
2000
+ const ret = result;
2001
+ return ret;
2002
+ };
2003
+ imports.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function(arg0) {
2004
+ let result;
2005
+ try {
2006
+ result = arg0 instanceof DOMException;
2007
+ } catch (_) {
2008
+ result = false;
2009
+ }
2010
+ const ret = result;
2011
+ return ret;
2012
+ };
2013
+ imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
2014
+ let result;
2015
+ try {
2016
+ result = arg0 instanceof Error;
2017
+ } catch (_) {
2018
+ result = false;
2019
+ }
2020
+ const ret = result;
2021
+ return ret;
2022
+ };
2023
+ imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
2024
+ let result;
2025
+ try {
2026
+ result = arg0 instanceof Map;
2027
+ } catch (_) {
2028
+ result = false;
2029
+ }
2030
+ const ret = result;
2031
+ return ret;
2032
+ };
2033
+ imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
2034
+ let result;
2035
+ try {
2036
+ result = arg0 instanceof Object;
2037
+ } catch (_) {
2038
+ result = false;
2039
+ }
2040
+ const ret = result;
2041
+ return ret;
2042
+ };
2043
+ imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
2044
+ let result;
2045
+ try {
2046
+ result = arg0 instanceof Response;
2047
+ } catch (_) {
2048
+ result = false;
2049
+ }
2050
+ const ret = result;
2051
+ return ret;
2052
+ };
2053
+ imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
2054
+ let result;
2055
+ try {
2056
+ result = arg0 instanceof Uint8Array;
2057
+ } catch (_) {
2058
+ result = false;
2059
+ }
2060
+ const ret = result;
2061
+ return ret;
2062
+ };
2063
+ imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
2064
+ const ret = Array.isArray(arg0);
2065
+ return ret;
2066
+ };
2067
+ imports.wbg.__wbg_isPrfAvailable_c13e727932109c6e = function() { return handleError(function (arg0) {
2068
+ const ret = arg0.isPrfAvailable();
2069
+ return ret;
2070
+ }, arguments) };
2071
+ imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
2072
+ const ret = Number.isSafeInteger(arg0);
2073
+ return ret;
2074
+ };
2075
+ imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
2076
+ const ret = Symbol.iterator;
2077
+ return ret;
2078
+ };
2079
+ imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
2080
+ const ret = arg0.length;
2081
+ return ret;
2082
+ };
2083
+ imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
2084
+ const ret = arg0.length;
2085
+ return ret;
2086
+ };
2087
+ imports.wbg.__wbg_listContacts_5b4d38a57743b713 = function() { return handleError(function (arg0, arg1) {
2088
+ const ret = arg0.listContacts(arg1);
2089
+ return ret;
2090
+ }, arguments) };
2091
+ imports.wbg.__wbg_listDeposits_7ca6e22afc06d560 = function() { return handleError(function (arg0) {
2092
+ const ret = arg0.listDeposits();
2093
+ return ret;
2094
+ }, arguments) };
2095
+ imports.wbg.__wbg_listPayments_d8c53ab09ffc756b = function() { return handleError(function (arg0, arg1) {
2096
+ const ret = arg0.listPayments(arg1);
2097
+ return ret;
2098
+ }, arguments) };
2099
+ imports.wbg.__wbg_listTokensOutputs_4b4500bd5aca2c88 = function() { return handleError(function (arg0) {
2100
+ const ret = arg0.listTokensOutputs();
2101
+ return ret;
2102
+ }, arguments) };
2103
+ imports.wbg.__wbg_log_62b3ddcc89229688 = function(arg0, arg1) {
2104
+ arg0.log(arg1);
2105
+ };
2106
+ imports.wbg.__wbg_message_5c5d919204d42400 = function(arg0, arg1) {
2107
+ const ret = arg1.message;
2108
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2109
+ const len1 = WASM_VECTOR_LEN;
2110
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2111
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2112
+ };
2113
+ imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
2114
+ const ret = arg0.message;
2115
+ return ret;
2116
+ };
2117
+ imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
2118
+ const ret = arg0.msCrypto;
2119
+ return ret;
2120
+ };
2121
+ imports.wbg.__wbg_name_0b327d569f00ebee = function(arg0) {
2122
+ const ret = arg0.name;
2123
+ return ret;
2124
+ };
2125
+ imports.wbg.__wbg_name_f2d27098bfd843e7 = function(arg0, arg1) {
2126
+ const ret = arg1.name;
2127
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2128
+ const len1 = WASM_VECTOR_LEN;
2129
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2130
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2131
+ };
2132
+ imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {
2133
+ const ret = new Headers();
2134
+ return ret;
2135
+ }, arguments) };
2136
+ imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
2137
+ try {
2138
+ var state0 = {a: arg0, b: arg1};
2139
+ var cb0 = (arg0, arg1) => {
2140
+ const a = state0.a;
2141
+ state0.a = 0;
2142
+ try {
2143
+ return __wbg_adapter_391(a, state0.b, arg0, arg1);
2144
+ } finally {
2145
+ state0.a = a;
2146
+ }
2147
+ };
2148
+ const ret = new Promise(cb0);
2149
+ return ret;
2150
+ } finally {
2151
+ state0.a = state0.b = 0;
2152
+ }
2153
+ };
2154
+ imports.wbg.__wbg_new_405e22f390576ce2 = function() {
2155
+ const ret = new Object();
2156
+ return ret;
2157
+ };
2158
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
2159
+ const ret = new Map();
2160
+ return ret;
2161
+ };
2162
+ imports.wbg.__wbg_new_78feb108b6472713 = function() {
2163
+ const ret = new Array();
2164
+ return ret;
2165
+ };
2166
+ imports.wbg.__wbg_new_92c54fc74574ef55 = function() { return handleError(function (arg0, arg1) {
2167
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
2168
+ return ret;
2169
+ }, arguments) };
2170
+ imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
2171
+ const ret = new Uint8Array(arg0);
2172
+ return ret;
2173
+ };
2174
+ imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
2175
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2176
+ return ret;
2177
+ };
2178
+ imports.wbg.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {
2179
+ const ret = new AbortController();
2180
+ return ret;
2181
+ }, arguments) };
2182
+ imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
2183
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
2184
+ return ret;
2185
+ };
2186
+ imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
2187
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
2188
+ return ret;
2189
+ };
2190
+ imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
2191
+ const ret = new Uint8Array(arg0 >>> 0);
2192
+ return ret;
2193
+ };
2194
+ imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {
2195
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
2196
+ return ret;
2197
+ }, arguments) };
2198
+ imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
2199
+ const ret = arg0.next;
2200
+ return ret;
2201
+ };
2202
+ imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
2203
+ const ret = arg0.next();
2204
+ return ret;
2205
+ }, arguments) };
2206
+ imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
2207
+ const ret = arg0.node;
2208
+ return ret;
2209
+ };
2210
+ imports.wbg.__wbg_now_063c1184182e178a = function() { return handleError(function (arg0) {
2211
+ const ret = arg0.now();
2212
+ return ret;
2213
+ }, arguments) };
2214
+ imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
2215
+ const ret = arg0.now();
2216
+ return ret;
2217
+ };
2218
+ imports.wbg.__wbg_now_6af59e24f5a53ad4 = function() { return handleError(function () {
2219
+ const ret = Date.now();
2220
+ return ret;
2221
+ }, arguments) };
2222
+ imports.wbg.__wbg_now_79892f24f17d010a = function() { return handleError(function (arg0) {
2223
+ const ret = arg0.now();
2224
+ return ret;
2225
+ }, arguments) };
2226
+ imports.wbg.__wbg_now_807e54c39636c349 = function() {
2227
+ const ret = Date.now();
2228
+ return ret;
2229
+ };
2230
+ imports.wbg.__wbg_onEvent_3a18bdd7cfd911cb = function(arg0, arg1) {
2231
+ arg0.onEvent(arg1);
2232
+ };
2233
+ imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
2234
+ const ret = arg0.performance;
2235
+ return ret;
2236
+ };
2237
+ imports.wbg.__wbg_postMessage_83a8d58d3fcb6c13 = function() { return handleError(function (arg0, arg1) {
2238
+ arg0.postMessage(arg1);
2239
+ }, arguments) };
2240
+ imports.wbg.__wbg_postRequest_678f7531153ace01 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2241
+ let deferred0_0;
2242
+ let deferred0_1;
2243
+ try {
2244
+ deferred0_0 = arg1;
2245
+ deferred0_1 = arg2;
2246
+ let v1;
2247
+ if (arg4 !== 0) {
2248
+ v1 = getStringFromWasm0(arg4, arg5).slice();
2249
+ wasm.__wbindgen_free(arg4, arg5 * 1, 1);
2250
+ }
2251
+ const ret = arg0.postRequest(getStringFromWasm0(arg1, arg2), arg3, v1);
2252
+ return ret;
2253
+ } finally {
2254
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2255
+ }
2256
+ }, arguments) };
2257
+ imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
2258
+ const ret = arg0.process;
2259
+ return ret;
2260
+ };
2261
+ imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
2262
+ queueMicrotask(arg0);
2263
+ };
2264
+ imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
2265
+ const ret = arg0.queueMicrotask;
2266
+ return ret;
2267
+ };
2268
+ imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
2269
+ arg0.randomFillSync(arg1);
2270
+ }, arguments) };
2271
+ imports.wbg.__wbg_read_a2434af1186cb56c = function(arg0) {
2272
+ const ret = arg0.read();
2273
+ return ret;
2274
+ };
2275
+ imports.wbg.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
2276
+ const ret = arg0.readyState;
2277
+ return ret;
2278
+ };
2279
+ imports.wbg.__wbg_reason_49f1cede8bcf23dd = function(arg0, arg1) {
2280
+ const ret = arg1.reason;
2281
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2282
+ const len1 = WASM_VECTOR_LEN;
2283
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2284
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2285
+ };
2286
+ imports.wbg.__wbg_recommendedFees_a61f331fce46523e = function() { return handleError(function (arg0) {
2287
+ const ret = arg0.recommendedFees();
2288
+ return ret;
2289
+ }, arguments) };
2290
+ imports.wbg.__wbg_releaseLock_091899af97991d2e = function(arg0) {
2291
+ arg0.releaseLock();
2292
+ };
2293
+ imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
2294
+ const ret = module.require;
2295
+ return ret;
2296
+ }, arguments) };
2297
+ imports.wbg.__wbg_reserveTokenOutputs_6a190cf797e7d196 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
2298
+ let deferred0_0;
2299
+ let deferred0_1;
2300
+ let deferred1_0;
2301
+ let deferred1_1;
2302
+ try {
2303
+ deferred0_0 = arg1;
2304
+ deferred0_1 = arg2;
2305
+ deferred1_0 = arg4;
2306
+ deferred1_1 = arg5;
2307
+ const ret = arg0.reserveTokenOutputs(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5), arg6, arg7);
2308
+ return ret;
2309
+ } finally {
2310
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2311
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2312
+ }
2313
+ }, arguments) };
2314
+ imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
2315
+ const ret = Promise.resolve(arg0);
2316
+ return ret;
2317
+ };
2318
+ imports.wbg.__wbg_respond_1f279fa9f8edcb1c = function() { return handleError(function (arg0, arg1) {
2319
+ arg0.respond(arg1 >>> 0);
2320
+ }, arguments) };
2321
+ imports.wbg.__wbg_sdkbuilder_new = function(arg0) {
2322
+ const ret = SdkBuilder.__wrap(arg0);
2323
+ return ret;
2324
+ };
2325
+ imports.wbg.__wbg_send_0293179ba074ffb4 = function() { return handleError(function (arg0, arg1, arg2) {
2326
+ arg0.send(getStringFromWasm0(arg1, arg2));
2327
+ }, arguments) };
2328
+ imports.wbg.__wbg_send_fc0c204e8a1757f4 = function() { return handleError(function (arg0, arg1, arg2) {
2329
+ arg0.send(getArrayU8FromWasm0(arg1, arg2));
2330
+ }, arguments) };
2331
+ imports.wbg.__wbg_setCachedItem_91b03741dfb0b4c2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2332
+ let deferred0_0;
2333
+ let deferred0_1;
2334
+ let deferred1_0;
2335
+ let deferred1_1;
2336
+ try {
2337
+ deferred0_0 = arg1;
2338
+ deferred0_1 = arg2;
2339
+ deferred1_0 = arg3;
2340
+ deferred1_1 = arg4;
2341
+ const ret = arg0.setCachedItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2342
+ return ret;
2343
+ } finally {
2344
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2345
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2346
+ }
2347
+ }, arguments) };
2348
+ imports.wbg.__wbg_setLeaves_d1c338c6d7d2ef28 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2349
+ const ret = arg0.setLeaves(arg1, arg2, arg3);
2350
+ return ret;
2351
+ }, arguments) };
2352
+ imports.wbg.__wbg_setLnurlMetadata_0bf15cc7efb6cc11 = function() { return handleError(function (arg0, arg1, arg2) {
2353
+ var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
2354
+ wasm.__wbindgen_free(arg1, arg2 * 4, 4);
2355
+ const ret = arg0.setLnurlMetadata(v0);
2356
+ return ret;
2357
+ }, arguments) };
2358
+ imports.wbg.__wbg_setTimeout_2b339866a2aa3789 = function(arg0, arg1) {
2359
+ const ret = setTimeout(arg0, arg1);
2360
+ return ret;
2361
+ };
2362
+ imports.wbg.__wbg_setTimeout_8f06012fba12034e = function(arg0, arg1) {
2363
+ globalThis.setTimeout(arg0, arg1);
2364
+ };
2365
+ imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
2366
+ const ret = setTimeout(arg0, arg1);
2367
+ return ret;
2368
+ }, arguments) };
2369
+ imports.wbg.__wbg_setTokensOutputs_5b8449721027f347 = function() { return handleError(function (arg0, arg1, arg2) {
2370
+ const ret = arg0.setTokensOutputs(arg1, arg2);
2371
+ return ret;
2372
+ }, arguments) };
2373
+ imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
2374
+ arg0[arg1 >>> 0] = arg2;
2375
+ };
2376
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2377
+ arg0[arg1] = arg2;
2378
+ };
2379
+ imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
2380
+ arg0.set(arg1, arg2 >>> 0);
2381
+ };
2382
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
2383
+ const ret = arg0.set(arg1, arg2);
2384
+ return ret;
2385
+ };
2386
+ imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
2387
+ const ret = Reflect.set(arg0, arg1, arg2);
2388
+ return ret;
2389
+ }, arguments) };
2390
+ imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
2391
+ arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
2392
+ };
2393
+ imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
2394
+ arg0.body = arg1;
2395
+ };
2396
+ imports.wbg.__wbg_setcache_12f17c3a980650e4 = function(arg0, arg1) {
2397
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
2398
+ };
2399
+ imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
2400
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
2401
+ };
2402
+ imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
2403
+ arg0.headers = arg1;
2404
+ };
2405
+ imports.wbg.__wbg_setintegrity_564a2397cf837760 = function(arg0, arg1, arg2) {
2406
+ arg0.integrity = getStringFromWasm0(arg1, arg2);
2407
+ };
2408
+ imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
2409
+ arg0.method = getStringFromWasm0(arg1, arg2);
2410
+ };
2411
+ imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
2412
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
2413
+ };
2414
+ imports.wbg.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
2415
+ arg0.onclose = arg1;
2416
+ };
2417
+ imports.wbg.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
2418
+ arg0.onerror = arg1;
2419
+ };
2420
+ imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
2421
+ arg0.onmessage = arg1;
2422
+ };
2423
+ imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
2424
+ arg0.onopen = arg1;
2425
+ };
2426
+ imports.wbg.__wbg_setredirect_40e6a7f717a2f86a = function(arg0, arg1) {
2427
+ arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
2428
+ };
2429
+ imports.wbg.__wbg_setreferrer_fea46c1230e5e29a = function(arg0, arg1, arg2) {
2430
+ arg0.referrer = getStringFromWasm0(arg1, arg2);
2431
+ };
2432
+ imports.wbg.__wbg_setreferrerpolicy_b73612479f761b6f = function(arg0, arg1) {
2433
+ arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
2434
+ };
2435
+ imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
2436
+ arg0.signal = arg1;
2437
+ };
2438
+ imports.wbg.__wbg_signEcdsaRecoverable_756dd79f08e5ed39 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2439
+ let deferred0_0;
2440
+ let deferred0_1;
2441
+ try {
2442
+ deferred0_0 = arg2;
2443
+ deferred0_1 = arg3;
2444
+ const ret = arg0.signEcdsaRecoverable(arg1, getStringFromWasm0(arg2, arg3));
2445
+ return ret;
2446
+ } finally {
2447
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2448
+ }
2449
+ }, arguments) };
2450
+ imports.wbg.__wbg_signEcdsa_0ebea9dfc3b7c28f = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2451
+ let deferred0_0;
2452
+ let deferred0_1;
2453
+ try {
2454
+ deferred0_0 = arg2;
2455
+ deferred0_1 = arg3;
2456
+ const ret = arg0.signEcdsa(arg1, getStringFromWasm0(arg2, arg3));
2457
+ return ret;
2458
+ } finally {
2459
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2460
+ }
2461
+ }, arguments) };
2462
+ imports.wbg.__wbg_signFrost_06ac652135c4e862 = function() { return handleError(function (arg0, arg1) {
2463
+ const ret = arg0.signFrost(arg1);
2464
+ return ret;
2465
+ }, arguments) };
2466
+ imports.wbg.__wbg_signHashSchnorr_390c51f0bbb70a7a = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2467
+ let deferred1_0;
2468
+ let deferred1_1;
2469
+ try {
2470
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2471
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2472
+ deferred1_0 = arg3;
2473
+ deferred1_1 = arg4;
2474
+ const ret = arg0.signHashSchnorr(v0, getStringFromWasm0(arg3, arg4));
2475
+ return ret;
2476
+ } finally {
2477
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2478
+ }
2479
+ }, arguments) };
2480
+ imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
2481
+ const ret = arg0.signal;
2482
+ return ret;
2483
+ };
2484
+ imports.wbg.__wbg_splitSecretWithProofs_1aba146de2c5eb0a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2485
+ const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
2486
+ return ret;
2487
+ }, arguments) };
2488
+ imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
2489
+ const ret = typeof global === 'undefined' ? null : global;
2490
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2491
+ };
2492
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
2493
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2494
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2495
+ };
2496
+ imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
2497
+ const ret = typeof self === 'undefined' ? null : self;
2498
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2499
+ };
2500
+ imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
2501
+ const ret = typeof window === 'undefined' ? null : window;
2502
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2503
+ };
2504
+ imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {
2505
+ const ret = arg0.status;
2506
+ return ret;
2507
+ };
2508
+ imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
2509
+ const ret = JSON.stringify(arg0);
2510
+ return ret;
2511
+ }, arguments) };
2512
+ imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
2513
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2514
+ return ret;
2515
+ };
2516
+ imports.wbg.__wbg_subtractPrivateKeys_2d63747d9fa64d4f = function() { return handleError(function (arg0, arg1, arg2) {
2517
+ const ret = arg0.subtractPrivateKeys(arg1, arg2);
2518
+ return ret;
2519
+ }, arguments) };
2520
+ imports.wbg.__wbg_syncAddOutgoingChange_9d94d35ba215d3c9 = function() { return handleError(function (arg0, arg1) {
2521
+ const ret = arg0.syncAddOutgoingChange(arg1);
2522
+ return ret;
2523
+ }, arguments) };
2524
+ imports.wbg.__wbg_syncCompleteOutgoingSync_959431da825d4042 = function() { return handleError(function (arg0, arg1, arg2) {
2525
+ const ret = arg0.syncCompleteOutgoingSync(arg1, BigInt.asUintN(64, arg2));
2526
+ return ret;
2527
+ }, arguments) };
2528
+ imports.wbg.__wbg_syncDeleteIncomingRecord_ff76566691e4d7ca = function() { return handleError(function (arg0, arg1) {
2529
+ const ret = arg0.syncDeleteIncomingRecord(arg1);
2530
+ return ret;
2531
+ }, arguments) };
2532
+ imports.wbg.__wbg_syncGetIncomingRecords_a47bcdbce33f391b = function() { return handleError(function (arg0, arg1) {
2533
+ const ret = arg0.syncGetIncomingRecords(arg1 >>> 0);
2534
+ return ret;
2535
+ }, arguments) };
2536
+ imports.wbg.__wbg_syncGetLastRevision_3c8cdf9b9d5acbc9 = function() { return handleError(function (arg0) {
2537
+ const ret = arg0.syncGetLastRevision();
2538
+ return ret;
2539
+ }, arguments) };
2540
+ imports.wbg.__wbg_syncGetLatestOutgoingChange_1a359277ba2618e6 = function() { return handleError(function (arg0) {
2541
+ const ret = arg0.syncGetLatestOutgoingChange();
2542
+ return ret;
2543
+ }, arguments) };
2544
+ imports.wbg.__wbg_syncGetPendingOutgoingChanges_d2f9a942e5bbaa06 = function() { return handleError(function (arg0, arg1) {
2545
+ const ret = arg0.syncGetPendingOutgoingChanges(arg1 >>> 0);
2546
+ return ret;
2547
+ }, arguments) };
2548
+ imports.wbg.__wbg_syncInsertIncomingRecords_dde4039dbc9cb38f = function() { return handleError(function (arg0, arg1, arg2) {
2549
+ var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
2550
+ wasm.__wbindgen_free(arg1, arg2 * 4, 4);
2551
+ const ret = arg0.syncInsertIncomingRecords(v0);
2552
+ return ret;
2553
+ }, arguments) };
2554
+ imports.wbg.__wbg_syncUpdateRecordFromIncoming_a76ad82592bfdcb3 = function() { return handleError(function (arg0, arg1) {
2555
+ const ret = arg0.syncUpdateRecordFromIncoming(arg1);
2556
+ return ret;
2557
+ }, arguments) };
2558
+ imports.wbg.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
2559
+ const ret = arg0.text();
2560
+ return ret;
2561
+ }, arguments) };
2562
+ imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
2563
+ const ret = arg0.then(arg1);
2564
+ return ret;
2565
+ };
2566
+ imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
2567
+ const ret = arg0.then(arg1, arg2);
2568
+ return ret;
2569
+ };
2570
+ imports.wbg.__wbg_toString_5285597960676b7b = function(arg0) {
2571
+ const ret = arg0.toString();
2572
+ return ret;
2573
+ };
2574
+ imports.wbg.__wbg_tryReserveLeaves_9aacd30c9750a9df = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2575
+ let deferred0_0;
2576
+ let deferred0_1;
2577
+ try {
2578
+ deferred0_0 = arg3;
2579
+ deferred0_1 = arg4;
2580
+ const ret = arg0.tryReserveLeaves(arg1, arg2 !== 0, getStringFromWasm0(arg3, arg4));
2581
+ return ret;
2582
+ } finally {
2583
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2584
+ }
2585
+ }, arguments) };
2586
+ imports.wbg.__wbg_updateDeposit_87746090235ed235 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2587
+ let deferred0_0;
2588
+ let deferred0_1;
2589
+ try {
2590
+ deferred0_0 = arg1;
2591
+ deferred0_1 = arg2;
2592
+ const ret = arg0.updateDeposit(getStringFromWasm0(arg1, arg2), arg3 >>> 0, arg4);
2593
+ return ret;
2594
+ } finally {
2595
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2596
+ }
2597
+ }, arguments) };
2598
+ imports.wbg.__wbg_updateReservation_7641cd63d1a894b8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2599
+ let deferred0_0;
2600
+ let deferred0_1;
2601
+ try {
2602
+ deferred0_0 = arg1;
2603
+ deferred0_1 = arg2;
2604
+ const ret = arg0.updateReservation(getStringFromWasm0(arg1, arg2), arg3, arg4);
2605
+ return ret;
2606
+ } finally {
2607
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2608
+ }
2609
+ }, arguments) };
2610
+ imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
2611
+ const ret = arg1.url;
2612
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2613
+ const len1 = WASM_VECTOR_LEN;
2614
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2615
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2616
+ };
2617
+ imports.wbg.__wbg_url_ce9ab75bf9627ae4 = function(arg0, arg1) {
2618
+ const ret = arg1.url;
2619
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2620
+ const len1 = WASM_VECTOR_LEN;
2621
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2622
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2623
+ };
2624
+ imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
2625
+ const ret = arg0.value;
2626
+ return ret;
2627
+ };
2628
+ imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
2629
+ const ret = arg0.versions;
2630
+ return ret;
2631
+ };
2632
+ imports.wbg.__wbg_view_fd8a56e8983f448d = function(arg0) {
2633
+ const ret = arg0.view;
2634
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2635
+ };
2636
+ imports.wbg.__wbg_wasClean_605b4fd66d44354a = function(arg0) {
2637
+ const ret = arg0.wasClean;
2638
+ return ret;
2639
+ };
2640
+ imports.wbg.__wbindgen_array_new = function() {
2641
+ const ret = [];
2642
+ return ret;
2643
+ };
2644
+ imports.wbg.__wbindgen_array_push = function(arg0, arg1) {
2645
+ arg0.push(arg1);
2646
+ };
2647
+ imports.wbg.__wbindgen_as_number = function(arg0) {
2648
+ const ret = +arg0;
2649
+ return ret;
2650
+ };
2651
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
2652
+ const ret = arg0;
2653
+ return ret;
2654
+ };
2655
+ imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
2656
+ const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
2657
+ return ret;
2658
+ };
2659
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2660
+ const ret = BigInt.asUintN(64, arg0);
2661
+ return ret;
2662
+ };
2663
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
2664
+ const v = arg1;
2665
+ const ret = typeof(v) === 'bigint' ? v : undefined;
2666
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
2667
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2668
+ };
2669
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
2670
+ const v = arg0;
2671
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
2672
+ return ret;
2673
+ };
2674
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
2675
+ const obj = arg0.original;
2676
+ if (obj.cnt-- == 1) {
2677
+ obj.a = 0;
2678
+ return true;
2679
+ }
2680
+ const ret = false;
2681
+ return ret;
2682
+ };
2683
+ imports.wbg.__wbindgen_closure_wrapper13362 = function(arg0, arg1, arg2) {
2684
+ const ret = makeMutClosure(arg0, arg1, 865, __wbg_adapter_69);
2685
+ return ret;
2686
+ };
2687
+ imports.wbg.__wbindgen_closure_wrapper15313 = function(arg0, arg1, arg2) {
2688
+ const ret = makeMutClosure(arg0, arg1, 386, __wbg_adapter_64);
2689
+ return ret;
2690
+ };
2691
+ imports.wbg.__wbindgen_closure_wrapper5938 = function(arg0, arg1, arg2) {
2692
+ const ret = makeMutClosure(arg0, arg1, 386, __wbg_adapter_64);
2693
+ return ret;
2694
+ };
2695
+ imports.wbg.__wbindgen_closure_wrapper5945 = function(arg0, arg1, arg2) {
2696
+ const ret = makeMutClosure(arg0, arg1, 386, __wbg_adapter_64);
2697
+ return ret;
2698
+ };
2699
+ imports.wbg.__wbindgen_closure_wrapper7541 = function(arg0, arg1, arg2) {
2700
+ const ret = makeMutClosure(arg0, arg1, 386, __wbg_adapter_69);
2701
+ return ret;
2702
+ };
2703
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
2704
+ const ret = debugString(arg1);
2705
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2706
+ const len1 = WASM_VECTOR_LEN;
2707
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2708
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2709
+ };
2710
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2711
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2712
+ return ret;
2713
+ };
2714
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
2715
+ const ret = arg0 in arg1;
2716
+ return ret;
2717
+ };
2718
+ imports.wbg.__wbindgen_init_externref_table = function() {
2719
+ const table = wasm.__wbindgen_export_5;
2720
+ const offset = table.grow(4);
2721
+ table.set(0, undefined);
2722
+ table.set(offset + 0, undefined);
2723
+ table.set(offset + 1, null);
2724
+ table.set(offset + 2, true);
2725
+ table.set(offset + 3, false);
2726
+ ;
2727
+ };
2728
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
2729
+ const ret = typeof(arg0) === 'bigint';
2730
+ return ret;
2731
+ };
2732
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2733
+ const ret = typeof(arg0) === 'function';
2734
+ return ret;
2735
+ };
2736
+ imports.wbg.__wbindgen_is_null = function(arg0) {
2737
+ const ret = arg0 === null;
2738
+ return ret;
2739
+ };
2740
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2741
+ const val = arg0;
2742
+ const ret = typeof(val) === 'object' && val !== null;
2743
+ return ret;
2744
+ };
2745
+ imports.wbg.__wbindgen_is_string = function(arg0) {
2746
+ const ret = typeof(arg0) === 'string';
2747
+ return ret;
2748
+ };
2749
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2750
+ const ret = arg0 === undefined;
2751
+ return ret;
2752
+ };
2753
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
2754
+ const ret = arg0 === arg1;
2755
+ return ret;
2756
+ };
2757
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2758
+ const ret = arg0 == arg1;
2759
+ return ret;
2760
+ };
2761
+ imports.wbg.__wbindgen_memory = function() {
2762
+ const ret = wasm.memory;
2763
+ return ret;
2764
+ };
2765
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2766
+ const obj = arg1;
2767
+ const ret = typeof(obj) === 'number' ? obj : undefined;
2768
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2769
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2770
+ };
2771
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2772
+ const ret = arg0;
2773
+ return ret;
2774
+ };
2775
+ imports.wbg.__wbindgen_shr = function(arg0, arg1) {
2776
+ const ret = arg0 >> arg1;
2777
+ return ret;
2778
+ };
2779
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2780
+ const obj = arg1;
2781
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2782
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2783
+ var len1 = WASM_VECTOR_LEN;
2784
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2785
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2786
+ };
2787
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2788
+ const ret = getStringFromWasm0(arg0, arg1);
2789
+ return ret;
2790
+ };
2791
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
2792
+ throw new Error(getStringFromWasm0(arg0, arg1));
2793
+ };
2794
+ imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
2795
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2796
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2797
+ const ret = v0;
2798
+ return ret;
2799
+ };
2800
+
2801
+ return imports;
2802
+ }
2803
+
2804
+ function __wbg_init_memory(imports, memory) {
2805
+
2806
+ }
2807
+
2808
+ function __wbg_finalize_init(instance, module) {
2809
+ wasm = instance.exports;
2810
+ __wbg_init.__wbindgen_wasm_module = module;
2811
+ cachedDataViewMemory0 = null;
2812
+ cachedUint8ArrayMemory0 = null;
2813
+
2814
+
2815
+ wasm.__wbindgen_start();
2816
+ return wasm;
2817
+ }
2818
+
2819
+ function initSync(module) {
2820
+ if (wasm !== undefined) return wasm;
2821
+
2822
+
2823
+ if (typeof module !== 'undefined') {
2824
+ if (Object.getPrototypeOf(module) === Object.prototype) {
2825
+ ({module} = module)
2826
+ } else {
2827
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
2828
+ }
2829
+ }
2830
+
2831
+ const imports = __wbg_get_imports();
2832
+
2833
+ __wbg_init_memory(imports);
2834
+
2835
+ if (!(module instanceof WebAssembly.Module)) {
2836
+ module = new WebAssembly.Module(module);
2837
+ }
2838
+
2839
+ const instance = new WebAssembly.Instance(module, imports);
2840
+
2841
+ return __wbg_finalize_init(instance, module);
2842
+ }
2843
+
2844
+ async function __wbg_init(module_or_path) {
2845
+ if (wasm !== undefined) return wasm;
2846
+
2847
+
2848
+ if (typeof module_or_path !== 'undefined') {
2849
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2850
+ ({module_or_path} = module_or_path)
2851
+ } else {
2852
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
2853
+ }
2854
+ }
2855
+
2856
+ if (typeof module_or_path === 'undefined') {
2857
+ module_or_path = new URL('breez_sdk_spark_wasm_bg.wasm', import.meta.url);
2858
+ }
2859
+ const imports = __wbg_get_imports();
2860
+
2861
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
2862
+ module_or_path = fetch(module_or_path);
2863
+ }
2864
+
2865
+ __wbg_init_memory(imports);
2866
+
2867
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
2868
+
2869
+ return __wbg_finalize_init(instance, module);
2870
+ }
2871
+
2872
+ export { initSync };
2873
+ export default __wbg_init;