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