@breeztech/breez-sdk-spark 0.15.1 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/breez-sdk-spark.tgz +0 -0
  2. package/bundler/breez_sdk_spark_wasm.d.ts +604 -237
  3. package/bundler/breez_sdk_spark_wasm.js +1 -1
  4. package/bundler/breez_sdk_spark_wasm_bg.js +729 -434
  5. package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
  6. package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +63 -49
  7. package/bundler/storage/index.js +356 -34
  8. package/deno/breez_sdk_spark_wasm.d.ts +604 -237
  9. package/deno/breez_sdk_spark_wasm.js +729 -434
  10. package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
  11. package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +63 -49
  12. package/nodejs/breez_sdk_spark_wasm.d.ts +604 -237
  13. package/nodejs/breez_sdk_spark_wasm.js +741 -441
  14. package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
  15. package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +63 -49
  16. package/nodejs/index.js +10 -10
  17. package/nodejs/index.mjs +13 -8
  18. package/nodejs/mysql-session-store/errors.cjs +13 -0
  19. package/nodejs/{mysql-session-manager → mysql-session-store}/index.cjs +24 -21
  20. package/nodejs/{mysql-session-manager → mysql-session-store}/migrations.cjs +17 -11
  21. package/nodejs/mysql-session-store/package.json +9 -0
  22. package/nodejs/mysql-storage/index.cjs +358 -125
  23. package/nodejs/mysql-storage/migrations.cjs +67 -2
  24. package/nodejs/mysql-token-store/index.cjs +99 -79
  25. package/nodejs/mysql-token-store/migrations.cjs +59 -2
  26. package/nodejs/mysql-tree-store/index.cjs +15 -9
  27. package/nodejs/mysql-tree-store/migrations.cjs +16 -2
  28. package/nodejs/package.json +2 -2
  29. package/nodejs/postgres-session-store/errors.cjs +13 -0
  30. package/nodejs/{postgres-session-manager → postgres-session-store}/index.cjs +23 -23
  31. package/nodejs/{postgres-session-manager → postgres-session-store}/migrations.cjs +14 -14
  32. package/nodejs/postgres-session-store/package.json +9 -0
  33. package/nodejs/postgres-storage/index.cjs +296 -119
  34. package/nodejs/postgres-storage/migrations.cjs +51 -0
  35. package/nodejs/postgres-token-store/index.cjs +89 -64
  36. package/nodejs/postgres-token-store/migrations.cjs +44 -0
  37. package/nodejs/storage/index.cjs +285 -125
  38. package/nodejs/storage/migrations.cjs +47 -0
  39. package/package.json +6 -1
  40. package/ssr/index.js +57 -28
  41. package/web/breez_sdk_spark_wasm.d.ts +667 -286
  42. package/web/breez_sdk_spark_wasm.js +729 -434
  43. package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
  44. package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +63 -49
  45. package/web/passkey-prf-provider/index.d.ts +203 -0
  46. package/web/passkey-prf-provider/index.js +733 -0
  47. package/web/storage/index.js +356 -34
  48. package/nodejs/mysql-session-manager/errors.cjs +0 -13
  49. package/nodejs/mysql-session-manager/package.json +0 -9
  50. package/nodejs/postgres-session-manager/errors.cjs +0 -13
  51. package/nodejs/postgres-session-manager/package.json +0 -9
@@ -109,18 +109,19 @@ export class BreezSdk {
109
109
  return ret;
110
110
  }
111
111
  /**
112
- * @param {BuyBitcoinRequest} request
113
- * @returns {Promise<BuyBitcoinResponse>}
112
+ * @param {AuthorizeTransferRequest} request
113
+ * @returns {Promise<TransferAuthorization>}
114
114
  */
115
- buyBitcoin(request) {
116
- const ret = wasm.breezsdk_buyBitcoin(this.__wbg_ptr, request);
115
+ authorizeLightningAddressTransfer(request) {
116
+ const ret = wasm.breezsdk_authorizeLightningAddressTransfer(this.__wbg_ptr, request);
117
117
  return ret;
118
118
  }
119
119
  /**
120
- * @returns {Promise<void>}
120
+ * @param {BuyBitcoinRequest} request
121
+ * @returns {Promise<BuyBitcoinResponse>}
121
122
  */
122
- cancelLeafOptimization() {
123
- const ret = wasm.breezsdk_cancelLeafOptimization(this.__wbg_ptr);
123
+ buyBitcoin(request) {
124
+ const ret = wasm.breezsdk_buyBitcoin(this.__wbg_ptr, request);
124
125
  return ret;
125
126
  }
126
127
  /**
@@ -155,6 +156,14 @@ export class BreezSdk {
155
156
  const ret = wasm.breezsdk_claimHtlcPayment(this.__wbg_ptr, request);
156
157
  return ret;
157
158
  }
159
+ /**
160
+ * @param {ClaimTransferRequest} request
161
+ * @returns {Promise<LightningAddressInfo>}
162
+ */
163
+ claimLightningAddressTransfer(request) {
164
+ const ret = wasm.breezsdk_claimLightningAddressTransfer(this.__wbg_ptr, request);
165
+ return ret;
166
+ }
158
167
  /**
159
168
  * @param {string} id
160
169
  * @returns {Promise<void>}
@@ -188,18 +197,19 @@ export class BreezSdk {
188
197
  return ret;
189
198
  }
190
199
  /**
191
- * @param {GetInfoRequest} request
192
- * @returns {Promise<GetInfoResponse>}
200
+ * @param {CrossChainRouteFilter} filter
201
+ * @returns {Promise<CrossChainRoutePair[]>}
193
202
  */
194
- getInfo(request) {
195
- const ret = wasm.breezsdk_getInfo(this.__wbg_ptr, request);
203
+ getCrossChainRoutes(filter) {
204
+ const ret = wasm.breezsdk_getCrossChainRoutes(this.__wbg_ptr, filter);
196
205
  return ret;
197
206
  }
198
207
  /**
199
- * @returns {OptimizationProgress}
208
+ * @param {GetInfoRequest} request
209
+ * @returns {Promise<GetInfoResponse>}
200
210
  */
201
- getLeafOptimizationProgress() {
202
- const ret = wasm.breezsdk_getLeafOptimizationProgress(this.__wbg_ptr);
211
+ getInfo(request) {
212
+ const ret = wasm.breezsdk_getInfo(this.__wbg_ptr, request);
203
213
  return ret;
204
214
  }
205
215
  /**
@@ -308,6 +318,14 @@ export class BreezSdk {
308
318
  const ret = wasm.breezsdk_lnurlWithdraw(this.__wbg_ptr, request);
309
319
  return ret;
310
320
  }
321
+ /**
322
+ * @param {OptimizeLeavesRequest} request
323
+ * @returns {Promise<OptimizeLeavesResponse>}
324
+ */
325
+ optimizeLeaves(request) {
326
+ const ret = wasm.breezsdk_optimizeLeaves(this.__wbg_ptr, request);
327
+ return ret;
328
+ }
311
329
  /**
312
330
  * @param {string} input
313
331
  * @returns {Promise<InputType>}
@@ -406,13 +424,6 @@ export class BreezSdk {
406
424
  const ret = wasm.breezsdk_signMessage(this.__wbg_ptr, request);
407
425
  return ret;
408
426
  }
409
- /**
410
- * @returns {Promise<void>}
411
- */
412
- startLeafOptimization() {
413
- const ret = wasm.breezsdk_startLeafOptimization(this.__wbg_ptr);
414
- return ret;
415
- }
416
427
  /**
417
428
  * @param {SyncWalletRequest} request
418
429
  * @returns {Promise<SyncWalletResponse>}
@@ -449,33 +460,28 @@ export class BreezSdk {
449
460
  if (Symbol.dispose) BreezSdk.prototype[Symbol.dispose] = BreezSdk.prototype.free;
450
461
 
451
462
  /**
452
- * A default signer implementation that wraps the core SDK's ExternalSigner.
453
- * This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
463
+ * A Rust-backed [`ExternalBreezSigner`] surfaced to JS as a signer object that
464
+ * can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
465
+ * by `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey).
466
+ *
467
+ * [`ExternalBreezSigner`]: breez_sdk_spark::signer::ExternalBreezSigner
454
468
  */
455
- export class DefaultSigner {
469
+ export class ExternalBreezSignerHandle {
456
470
  static __wrap(ptr) {
457
- const obj = Object.create(DefaultSigner.prototype);
471
+ const obj = Object.create(ExternalBreezSignerHandle.prototype);
458
472
  obj.__wbg_ptr = ptr;
459
- DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
473
+ ExternalBreezSignerHandleFinalization.register(obj, obj.__wbg_ptr, obj);
460
474
  return obj;
461
475
  }
462
476
  __destroy_into_raw() {
463
477
  const ptr = this.__wbg_ptr;
464
478
  this.__wbg_ptr = 0;
465
- DefaultSignerFinalization.unregister(this);
479
+ ExternalBreezSignerHandleFinalization.unregister(this);
466
480
  return ptr;
467
481
  }
468
482
  free() {
469
483
  const ptr = this.__destroy_into_raw();
470
- wasm.__wbg_defaultsigner_free(ptr, 0);
471
- }
472
- /**
473
- * @param {ExternalAggregateFrostRequest} request
474
- * @returns {Promise<ExternalFrostSignature>}
475
- */
476
- aggregateFrost(request) {
477
- const ret = wasm.defaultsigner_aggregateFrost(this.__wbg_ptr, request);
478
- return ret;
484
+ wasm.__wbg_externalbreezsignerhandle_free(ptr, 0);
479
485
  }
480
486
  /**
481
487
  * @param {Uint8Array} message
@@ -487,7 +493,7 @@ export class DefaultSigner {
487
493
  const len0 = WASM_VECTOR_LEN;
488
494
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
489
495
  const len1 = WASM_VECTOR_LEN;
490
- const ret = wasm.defaultsigner_decryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
496
+ const ret = wasm.externalbreezsignerhandle_decryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
491
497
  return ret;
492
498
  }
493
499
  /**
@@ -497,7 +503,7 @@ export class DefaultSigner {
497
503
  derivePublicKey(path) {
498
504
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
499
505
  const len0 = WASM_VECTOR_LEN;
500
- const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
506
+ const ret = wasm.externalbreezsignerhandle_derivePublicKey(this.__wbg_ptr, ptr0, len0);
501
507
  return ret;
502
508
  }
503
509
  /**
@@ -510,38 +516,7 @@ export class DefaultSigner {
510
516
  const len0 = WASM_VECTOR_LEN;
511
517
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
512
518
  const len1 = WASM_VECTOR_LEN;
513
- const ret = wasm.defaultsigner_encryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
514
- return ret;
515
- }
516
- /**
517
- * @param {ExternalEncryptedSecret} private_key
518
- * @param {PublicKeyBytes} receiver_public_key
519
- * @returns {Promise<Uint8Array>}
520
- */
521
- encryptPrivateKeyForReceiver(private_key, receiver_public_key) {
522
- const ret = wasm.defaultsigner_encryptPrivateKeyForReceiver(this.__wbg_ptr, private_key, receiver_public_key);
523
- return ret;
524
- }
525
- /**
526
- * @returns {Promise<ExternalEncryptedSecret>}
527
- */
528
- generateRandomSecret() {
529
- const ret = wasm.defaultsigner_generateRandomSecret(this.__wbg_ptr);
530
- return ret;
531
- }
532
- /**
533
- * @returns {Promise<ExternalFrostCommitments>}
534
- */
535
- generateRandomSigningCommitment() {
536
- const ret = wasm.defaultsigner_generateRandomSigningCommitment(this.__wbg_ptr);
537
- return ret;
538
- }
539
- /**
540
- * @param {ExternalTreeNodeId} id
541
- * @returns {Promise<PublicKeyBytes>}
542
- */
543
- getPublicKeyForNode(id) {
544
- const ret = wasm.defaultsigner_getPublicKeyForNode(this.__wbg_ptr, id);
519
+ const ret = wasm.externalbreezsignerhandle_encryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
545
520
  return ret;
546
521
  }
547
522
  /**
@@ -554,25 +529,7 @@ export class DefaultSigner {
554
529
  const len0 = WASM_VECTOR_LEN;
555
530
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
556
531
  const len1 = WASM_VECTOR_LEN;
557
- const ret = wasm.defaultsigner_hmacSha256(this.__wbg_ptr, ptr0, len0, ptr1, len1);
558
- return ret;
559
- }
560
- /**
561
- * @returns {PublicKeyBytes}
562
- */
563
- identityPublicKey() {
564
- const ret = wasm.defaultsigner_identityPublicKey(this.__wbg_ptr);
565
- if (ret[2]) {
566
- throw takeFromExternrefTable0(ret[1]);
567
- }
568
- return takeFromExternrefTable0(ret[0]);
569
- }
570
- /**
571
- * @param {ExternalSecretSource} private_key
572
- * @returns {Promise<PublicKeyBytes>}
573
- */
574
- publicKeyFromSecret(private_key) {
575
- const ret = wasm.defaultsigner_publicKeyFromSecret(this.__wbg_ptr, private_key);
532
+ const ret = wasm.externalbreezsignerhandle_hmacSha256(this.__wbg_ptr, ptr0, len0, ptr1, len1);
576
533
  return ret;
577
534
  }
578
535
  /**
@@ -583,7 +540,7 @@ export class DefaultSigner {
583
540
  signEcdsa(message, path) {
584
541
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
585
542
  const len0 = WASM_VECTOR_LEN;
586
- const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, message, ptr0, len0);
543
+ const ret = wasm.externalbreezsignerhandle_signEcdsa(this.__wbg_ptr, message, ptr0, len0);
587
544
  return ret;
588
545
  }
589
546
  /**
@@ -594,15 +551,7 @@ export class DefaultSigner {
594
551
  signEcdsaRecoverable(message, path) {
595
552
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
596
553
  const len0 = WASM_VECTOR_LEN;
597
- const ret = wasm.defaultsigner_signEcdsaRecoverable(this.__wbg_ptr, message, ptr0, len0);
598
- return ret;
599
- }
600
- /**
601
- * @param {ExternalSignFrostRequest} request
602
- * @returns {Promise<ExternalFrostSignatureShare>}
603
- */
604
- signFrost(request) {
605
- const ret = wasm.defaultsigner_signFrost(this.__wbg_ptr, request);
554
+ const ret = wasm.externalbreezsignerhandle_signEcdsaRecoverable(this.__wbg_ptr, message, ptr0, len0);
606
555
  return ret;
607
556
  }
608
557
  /**
@@ -615,54 +564,205 @@ export class DefaultSigner {
615
564
  const len0 = WASM_VECTOR_LEN;
616
565
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
617
566
  const len1 = WASM_VECTOR_LEN;
618
- const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
567
+ const ret = wasm.externalbreezsignerhandle_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
619
568
  return ret;
620
569
  }
570
+ }
571
+ if (Symbol.dispose) ExternalBreezSignerHandle.prototype[Symbol.dispose] = ExternalBreezSignerHandle.prototype.free;
572
+
573
+ /**
574
+ * The two external signers for the SDK's signer-based connect. Returned by
575
+ * `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey); pass
576
+ * both halves to `connectWithSigner` or `SdkBuilder.newWithSigner`.
577
+ */
578
+ export class ExternalSigners {
579
+ static __wrap(ptr) {
580
+ const obj = Object.create(ExternalSigners.prototype);
581
+ obj.__wbg_ptr = ptr;
582
+ ExternalSignersFinalization.register(obj, obj.__wbg_ptr, obj);
583
+ return obj;
584
+ }
585
+ __destroy_into_raw() {
586
+ const ptr = this.__wbg_ptr;
587
+ this.__wbg_ptr = 0;
588
+ ExternalSignersFinalization.unregister(this);
589
+ return ptr;
590
+ }
591
+ free() {
592
+ const ptr = this.__destroy_into_raw();
593
+ wasm.__wbg_externalsigners_free(ptr, 0);
594
+ }
621
595
  /**
622
- * @param {ExternalSecretToSplit} secret
623
- * @param {number} threshold
624
- * @param {number} num_shares
625
- * @returns {Promise<ExternalVerifiableSecretShare[]>}
596
+ * External signer for non-Spark SDK signing (LNURL-auth, sync, message
597
+ * signing, ECIES).
598
+ * @returns {ExternalBreezSignerHandle}
626
599
  */
627
- splitSecretWithProofs(secret, threshold, num_shares) {
628
- const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
629
- return ret;
600
+ get breezSigner() {
601
+ const ret = wasm.externalsigners_breezSigner(this.__wbg_ptr);
602
+ return ExternalBreezSignerHandle.__wrap(ret);
630
603
  }
631
604
  /**
632
- * @param {number} index
633
- * @returns {Promise<SecretBytes>}
605
+ * External high-level Spark signer for the Spark wallet flows.
606
+ * @returns {ExternalSparkSignerHandle}
607
+ */
608
+ get sparkSigner() {
609
+ const ret = wasm.externalsigners_sparkSigner(this.__wbg_ptr);
610
+ return ExternalSparkSignerHandle.__wrap(ret);
611
+ }
612
+ }
613
+ if (Symbol.dispose) ExternalSigners.prototype[Symbol.dispose] = ExternalSigners.prototype.free;
614
+
615
+ /**
616
+ * A Rust-backed [`ExternalSparkSigner`] surfaced to JS as a signer object that
617
+ * can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
618
+ * by `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey).
619
+ *
620
+ * [`ExternalSparkSigner`]: breez_sdk_spark::signer::ExternalSparkSigner
621
+ */
622
+ export class ExternalSparkSignerHandle {
623
+ static __wrap(ptr) {
624
+ const obj = Object.create(ExternalSparkSignerHandle.prototype);
625
+ obj.__wbg_ptr = ptr;
626
+ ExternalSparkSignerHandleFinalization.register(obj, obj.__wbg_ptr, obj);
627
+ return obj;
628
+ }
629
+ __destroy_into_raw() {
630
+ const ptr = this.__wbg_ptr;
631
+ this.__wbg_ptr = 0;
632
+ ExternalSparkSignerHandleFinalization.unregister(this);
633
+ return ptr;
634
+ }
635
+ free() {
636
+ const ptr = this.__destroy_into_raw();
637
+ wasm.__wbg_externalsparksignerhandle_free(ptr, 0);
638
+ }
639
+ /**
640
+ * @returns {Promise<PublicKeyBytes>}
634
641
  */
635
- staticDepositSecret(index) {
636
- const ret = wasm.defaultsigner_staticDepositSecret(this.__wbg_ptr, index);
642
+ getIdentityPublicKey() {
643
+ const ret = wasm.externalsparksignerhandle_getIdentityPublicKey(this.__wbg_ptr);
637
644
  return ret;
638
645
  }
639
646
  /**
640
- * @param {number} index
641
- * @returns {Promise<ExternalSecretSource>}
647
+ * @param {ExternalTreeNodeId} leaf_id
648
+ * @returns {Promise<PublicKeyBytes>}
642
649
  */
643
- staticDepositSecretEncrypted(index) {
644
- const ret = wasm.defaultsigner_staticDepositSecretEncrypted(this.__wbg_ptr, index);
650
+ getPublicKeyForLeaf(leaf_id) {
651
+ const ret = wasm.externalsparksignerhandle_getPublicKeyForLeaf(this.__wbg_ptr, leaf_id);
645
652
  return ret;
646
653
  }
647
654
  /**
648
655
  * @param {number} index
649
656
  * @returns {Promise<PublicKeyBytes>}
650
657
  */
651
- staticDepositSigningKey(index) {
652
- const ret = wasm.defaultsigner_staticDepositSigningKey(this.__wbg_ptr, index);
658
+ getStaticDepositPublicKey(index) {
659
+ const ret = wasm.externalsparksignerhandle_getStaticDepositPublicKey(this.__wbg_ptr, index);
660
+ return ret;
661
+ }
662
+ /**
663
+ * @param {ExternalPrepareClaimRequest} request
664
+ * @returns {Promise<ExternalPreparedClaim>}
665
+ */
666
+ prepareClaim(request) {
667
+ const ret = wasm.externalsparksignerhandle_prepareClaim(this.__wbg_ptr, request);
653
668
  return ret;
654
669
  }
655
670
  /**
656
- * @param {ExternalSecretSource} signing_key
657
- * @param {ExternalSecretSource} new_signing_key
658
- * @returns {Promise<ExternalSecretSource>}
671
+ * @param {ExternalPrepareLightningReceiveRequest} request
672
+ * @returns {Promise<ExternalPreparedLightningReceive>}
659
673
  */
660
- subtractSecrets(signing_key, new_signing_key) {
661
- const ret = wasm.defaultsigner_subtractSecrets(this.__wbg_ptr, signing_key, new_signing_key);
674
+ prepareLightningReceive(request) {
675
+ const ret = wasm.externalsparksignerhandle_prepareLightningReceive(this.__wbg_ptr, request);
676
+ return ret;
677
+ }
678
+ /**
679
+ * @param {ExternalPrepareStaticDepositRequest} request
680
+ * @returns {Promise<ExternalPreparedStaticDeposit>}
681
+ */
682
+ prepareStaticDeposit(request) {
683
+ const ret = wasm.externalsparksignerhandle_prepareStaticDeposit(this.__wbg_ptr, request);
684
+ return ret;
685
+ }
686
+ /**
687
+ * @param {ExternalPrepareStaticDepositClaimRequest} request
688
+ * @returns {Promise<ExternalPreparedStaticDepositClaim>}
689
+ */
690
+ prepareStaticDepositClaim(request) {
691
+ const ret = wasm.externalsparksignerhandle_prepareStaticDepositClaim(this.__wbg_ptr, request);
692
+ return ret;
693
+ }
694
+ /**
695
+ * @param {ExternalPrepareTokenTransactionRequest} request
696
+ * @returns {Promise<ExternalPreparedTokenTransaction>}
697
+ */
698
+ prepareTokenTransaction(request) {
699
+ const ret = wasm.externalsparksignerhandle_prepareTokenTransaction(this.__wbg_ptr, request);
700
+ return ret;
701
+ }
702
+ /**
703
+ * @param {ExternalPrepareTransferRequest} request
704
+ * @returns {Promise<ExternalPreparedTransfer>}
705
+ */
706
+ prepareTransfer(request) {
707
+ const ret = wasm.externalsparksignerhandle_prepareTransfer(this.__wbg_ptr, request);
708
+ return ret;
709
+ }
710
+ /**
711
+ * @param {Uint8Array} challenge
712
+ * @returns {Promise<EcdsaSignatureBytes>}
713
+ */
714
+ signAuthenticationChallenge(challenge) {
715
+ const ptr0 = passArray8ToWasm0(challenge, wasm.__wbindgen_malloc);
716
+ const len0 = WASM_VECTOR_LEN;
717
+ const ret = wasm.externalsparksignerhandle_signAuthenticationChallenge(this.__wbg_ptr, ptr0, len0);
718
+ return ret;
719
+ }
720
+ /**
721
+ * @param {ExternalFrostJob[]} jobs
722
+ * @returns {Promise<ExternalFrostShareResult[]>}
723
+ */
724
+ signFrost(jobs) {
725
+ const ptr0 = passArrayJsValueToWasm0(jobs, wasm.__wbindgen_malloc);
726
+ const len0 = WASM_VECTOR_LEN;
727
+ const ret = wasm.externalsparksignerhandle_signFrost(this.__wbg_ptr, ptr0, len0);
728
+ return ret;
729
+ }
730
+ /**
731
+ * @param {Uint8Array} message
732
+ * @returns {Promise<EcdsaSignatureBytes>}
733
+ */
734
+ signMessage(message) {
735
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
736
+ const len0 = WASM_VECTOR_LEN;
737
+ const ret = wasm.externalsparksignerhandle_signMessage(this.__wbg_ptr, ptr0, len0);
738
+ return ret;
739
+ }
740
+ /**
741
+ * @param {ExternalSignSparkInvoiceRequest} request
742
+ * @returns {Promise<ExternalSignedSparkInvoice>}
743
+ */
744
+ signSparkInvoice(request) {
745
+ const ret = wasm.externalsparksignerhandle_signSparkInvoice(this.__wbg_ptr, request);
746
+ return ret;
747
+ }
748
+ /**
749
+ * @param {ExternalSignStaticDepositRefundRequest} request
750
+ * @returns {Promise<ExternalFrostSignature>}
751
+ */
752
+ signStaticDepositRefund(request) {
753
+ const ret = wasm.externalsparksignerhandle_signStaticDepositRefund(this.__wbg_ptr, request);
754
+ return ret;
755
+ }
756
+ /**
757
+ * @param {ExternalStartStaticDepositRefundRequest} request
758
+ * @returns {Promise<ExternalStartedStaticDepositRefund>}
759
+ */
760
+ startStaticDepositRefund(request) {
761
+ const ret = wasm.externalsparksignerhandle_startStaticDepositRefund(this.__wbg_ptr, request);
662
762
  return ret;
663
763
  }
664
764
  }
665
- if (Symbol.dispose) DefaultSigner.prototype[Symbol.dispose] = DefaultSigner.prototype.free;
765
+ if (Symbol.dispose) ExternalSparkSignerHandle.prototype[Symbol.dispose] = ExternalSparkSignerHandle.prototype.free;
666
766
 
667
767
  export class IntoUnderlyingByteSource {
668
768
  __destroy_into_raw() {
@@ -776,140 +876,122 @@ export class IntoUnderlyingSource {
776
876
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
777
877
 
778
878
  /**
779
- * A shareable `MySQL` connection pool. See
780
- * [`PostgresConnectionPool`](super::postgres_pool::PostgresConnectionPool)
781
- * for sharing semantics and lifecycle.
879
+ * High-level orchestrator that collapses register / sign-in flows
880
+ * into single calls. See the matching Rust types for full semantics;
881
+ * the JS surface is a thin wasm-bindgen wrapper.
782
882
  */
783
- export class MysqlConnectionPool {
784
- static __wrap(ptr) {
785
- const obj = Object.create(MysqlConnectionPool.prototype);
786
- obj.__wbg_ptr = ptr;
787
- MysqlConnectionPoolFinalization.register(obj, obj.__wbg_ptr, obj);
788
- return obj;
789
- }
883
+ export class PasskeyClient {
790
884
  __destroy_into_raw() {
791
885
  const ptr = this.__wbg_ptr;
792
886
  this.__wbg_ptr = 0;
793
- MysqlConnectionPoolFinalization.unregister(this);
887
+ PasskeyClientFinalization.unregister(this);
794
888
  return ptr;
795
889
  }
796
890
  free() {
797
891
  const ptr = this.__destroy_into_raw();
798
- wasm.__wbg_mysqlconnectionpool_free(ptr, 0);
799
- }
800
- }
801
- if (Symbol.dispose) MysqlConnectionPool.prototype[Symbol.dispose] = MysqlConnectionPool.prototype.free;
802
-
803
- /**
804
- * Passkey-based wallet operations using WebAuthn PRF extension.
805
- *
806
- * Wraps a `PasskeyPrfProvider` and optional relay configuration to provide
807
- * wallet derivation and label management via Nostr relays.
808
- */
809
- export class Passkey {
810
- __destroy_into_raw() {
811
- const ptr = this.__wbg_ptr;
812
- this.__wbg_ptr = 0;
813
- PasskeyFinalization.unregister(this);
814
- return ptr;
815
- }
816
- free() {
817
- const ptr = this.__destroy_into_raw();
818
- wasm.__wbg_passkey_free(ptr, 0);
892
+ wasm.__wbg_passkeyclient_free(ptr, 0);
819
893
  }
820
894
  /**
821
- * Derive a wallet for a given label.
822
- *
823
- * Uses the passkey PRF to derive a `Wallet` containing the seed and resolved label.
824
- *
825
- * @param label - Optional label string (defaults to "Default")
826
- * @param {string | null} [label]
827
- * @returns {Promise<Wallet>}
895
+ * One-shot capability probe (PRF support + domain association)
896
+ * hosts can gate UX on.
897
+ * @returns {Promise<PasskeyAvailability>}
828
898
  */
829
- getWallet(label) {
830
- var ptr0 = isLikeNone(label) ? 0 : passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
831
- var len0 = WASM_VECTOR_LEN;
832
- const ret = wasm.passkey_getWallet(this.__wbg_ptr, ptr0, len0);
899
+ checkAvailability() {
900
+ const ret = wasm.passkeyclient_checkAvailability(this.__wbg_ptr);
833
901
  return ret;
834
902
  }
835
903
  /**
836
- * Check if passkey PRF is available on this device.
837
- * @returns {Promise<boolean>}
904
+ * Label sub-object. List / publish labels for this passkey's identity.
905
+ * @returns {PasskeyLabels}
838
906
  */
839
- isAvailable() {
840
- const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
841
- return ret;
907
+ labels() {
908
+ const ret = wasm.passkeyclient_labels(this.__wbg_ptr);
909
+ return PasskeyLabels.__wrap(ret);
842
910
  }
843
911
  /**
844
- * List all labels published to Nostr for this passkey's identity.
845
- *
846
- * Requires 1 PRF call (for Nostr identity derivation).
847
- * @returns {Promise<string[]>}
912
+ * Create a `PasskeyClient` backed by the supplied `PrfProvider` and
913
+ * the default Nostr-backed label store. `breezApiKey` enables
914
+ * authenticated (NIP-42) relay access for label storage; omit for
915
+ * public relays only.
916
+ * @param {PrfProvider} prf_provider
917
+ * @param {string | null} [breez_api_key]
918
+ * @param {PasskeyConfig | null} [config]
848
919
  */
849
- listLabels() {
850
- const ret = wasm.passkey_listLabels(this.__wbg_ptr);
851
- return ret;
920
+ constructor(prf_provider, breez_api_key, config) {
921
+ var ptr0 = isLikeNone(breez_api_key) ? 0 : passStringToWasm0(breez_api_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
922
+ var len0 = WASM_VECTOR_LEN;
923
+ const ret = wasm.passkeyclient_new(prf_provider, ptr0, len0, isLikeNone(config) ? 0 : addToExternrefTable0(config));
924
+ this.__wbg_ptr = ret;
925
+ PasskeyClientFinalization.register(this, this.__wbg_ptr, this);
926
+ return this;
852
927
  }
853
928
  /**
854
- * Create a new `Passkey` instance.
855
- *
856
- * @param prfProvider - Platform implementation of passkey PRF operations
857
- * @param relayConfig - Optional configuration for Nostr relay connections
858
- * @param {PasskeyPrfProvider} prf_provider
859
- * @param {NostrRelayConfig | null} [relay_config]
929
+ * First-time setup. Drives the platform's create-passkey ceremony
930
+ * then derives the wallet seed in the same PRF assertion ceremony
931
+ * where the platform supports it.
932
+ * @param {RegisterRequest} request
933
+ * @returns {Promise<RegisterResponse>}
860
934
  */
861
- constructor(prf_provider, relay_config) {
862
- const ret = wasm.passkey_new(prf_provider, isLikeNone(relay_config) ? 0 : addToExternrefTable0(relay_config));
863
- this.__wbg_ptr = ret;
864
- PasskeyFinalization.register(this, this.__wbg_ptr, this);
865
- return this;
935
+ register(request) {
936
+ const ret = wasm.passkeyclient_register(this.__wbg_ptr, request);
937
+ return ret;
866
938
  }
867
939
  /**
868
- * Publish a label to Nostr relays for this passkey's identity.
869
- *
870
- * Idempotent: if the label already exists, it is not published again.
871
- * Requires 1 PRF call.
872
- * @param {string} label
873
- * @returns {Promise<void>}
940
+ * Returning-user sign-in. With `label` set, uses the fast path
941
+ * (one ceremony, no Nostr round-trip). With `label` omitted,
942
+ * derives the default-label wallet and discovers the user's
943
+ * label set in the same ceremony.
944
+ * @param {SignInRequest} request
945
+ * @returns {Promise<SignInResponse>}
874
946
  */
875
- storeLabel(label) {
876
- const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
877
- const len0 = WASM_VECTOR_LEN;
878
- const ret = wasm.passkey_storeLabel(this.__wbg_ptr, ptr0, len0);
947
+ signIn(request) {
948
+ const ret = wasm.passkeyclient_signIn(this.__wbg_ptr, request);
879
949
  return ret;
880
950
  }
881
951
  }
882
- if (Symbol.dispose) Passkey.prototype[Symbol.dispose] = Passkey.prototype.free;
952
+ if (Symbol.dispose) PasskeyClient.prototype[Symbol.dispose] = PasskeyClient.prototype.free;
883
953
 
884
954
  /**
885
- * A shareable Postgres connection pool.
886
- *
887
- * Construct via [`create_postgres_connection_pool`] and pass the same handle to multiple
888
- * `SdkBuilder`s via `withPostgresConnectionPool` to share connections across SDKs.
889
- * Per-tenant scoping is derived from each SDK's seed.
890
- *
891
- * The pool's lifecycle is controlled by the integrator: it stays alive as
892
- * long as any reference is held. `disconnect()` does **not** close the pool.
955
+ * Label sub-object surfaced from `PasskeyClient.labels()`.
893
956
  */
894
- export class PostgresConnectionPool {
957
+ export class PasskeyLabels {
895
958
  static __wrap(ptr) {
896
- const obj = Object.create(PostgresConnectionPool.prototype);
959
+ const obj = Object.create(PasskeyLabels.prototype);
897
960
  obj.__wbg_ptr = ptr;
898
- PostgresConnectionPoolFinalization.register(obj, obj.__wbg_ptr, obj);
961
+ PasskeyLabelsFinalization.register(obj, obj.__wbg_ptr, obj);
899
962
  return obj;
900
963
  }
901
964
  __destroy_into_raw() {
902
965
  const ptr = this.__wbg_ptr;
903
966
  this.__wbg_ptr = 0;
904
- PostgresConnectionPoolFinalization.unregister(this);
967
+ PasskeyLabelsFinalization.unregister(this);
905
968
  return ptr;
906
969
  }
907
970
  free() {
908
971
  const ptr = this.__destroy_into_raw();
909
- wasm.__wbg_postgresconnectionpool_free(ptr, 0);
972
+ wasm.__wbg_passkeylabels_free(ptr, 0);
973
+ }
974
+ /**
975
+ * List labels published for this passkey's identity.
976
+ * @returns {Promise<string[]>}
977
+ */
978
+ list() {
979
+ const ret = wasm.passkeylabels_list(this.__wbg_ptr);
980
+ return ret;
981
+ }
982
+ /**
983
+ * Idempotently publish `label` for this passkey's identity.
984
+ * @param {string} label
985
+ * @returns {Promise<void>}
986
+ */
987
+ store(label) {
988
+ const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
989
+ const len0 = WASM_VECTOR_LEN;
990
+ const ret = wasm.passkeylabels_store(this.__wbg_ptr, ptr0, len0);
991
+ return ret;
910
992
  }
911
993
  }
912
- if (Symbol.dispose) PostgresConnectionPool.prototype[Symbol.dispose] = PostgresConnectionPool.prototype.free;
994
+ if (Symbol.dispose) PasskeyLabels.prototype[Symbol.dispose] = PasskeyLabels.prototype.free;
913
995
 
914
996
  export class SdkBuilder {
915
997
  static __wrap(ptr) {
@@ -947,11 +1029,21 @@ export class SdkBuilder {
947
1029
  }
948
1030
  /**
949
1031
  * @param {Config} config
950
- * @param {ExternalSigner} signer
1032
+ * @param {ExternalBreezSigner} breez_signer
1033
+ * @param {ExternalSparkSigner} spark_signer
1034
+ * @returns {SdkBuilder}
1035
+ */
1036
+ static newWithSigner(config, breez_signer, spark_signer) {
1037
+ const ret = wasm.sdkbuilder_newWithSigner(config, breez_signer, spark_signer);
1038
+ return SdkBuilder.__wrap(ret);
1039
+ }
1040
+ /**
1041
+ * @param {number} account_number
951
1042
  * @returns {SdkBuilder}
952
1043
  */
953
- static newWithSigner(config, signer) {
954
- const ret = wasm.sdkbuilder_newWithSigner(config, signer);
1044
+ withAccountNumber(account_number) {
1045
+ const ptr = this.__destroy_into_raw();
1046
+ const ret = wasm.sdkbuilder_withAccountNumber(ptr, account_number);
955
1047
  return SdkBuilder.__wrap(ret);
956
1048
  }
957
1049
  /**
@@ -983,15 +1075,6 @@ export class SdkBuilder {
983
1075
  const ret = wasm.sdkbuilder_withFiatService(ptr, fiat_service);
984
1076
  return SdkBuilder.__wrap(ret);
985
1077
  }
986
- /**
987
- * @param {KeySetConfig} config
988
- * @returns {SdkBuilder}
989
- */
990
- withKeySet(config) {
991
- const ptr = this.__destroy_into_raw();
992
- const ret = wasm.sdkbuilder_withKeySet(ptr, config);
993
- return SdkBuilder.__wrap(ret);
994
- }
995
1078
  /**
996
1079
  * @param {RestClient} lnurl_client
997
1080
  * @returns {SdkBuilder}
@@ -1002,8 +1085,7 @@ export class SdkBuilder {
1002
1085
  return SdkBuilder.__wrap(ret);
1003
1086
  }
1004
1087
  /**
1005
- * **Deprecated.** Call `createMysqlConnectionPool(config)` and
1006
- * `withMysqlConnectionPool(pool)` instead.
1088
+ * **Deprecated.** Use `withStorageBackend(mysqlStorage(config))`.
1007
1089
  * @param {MysqlStorageConfig} config
1008
1090
  * @returns {SdkBuilder}
1009
1091
  */
@@ -1015,20 +1097,6 @@ export class SdkBuilder {
1015
1097
  }
1016
1098
  return SdkBuilder.__wrap(ret[0]);
1017
1099
  }
1018
- /**
1019
- * Sets a shared `MySQL` connection pool as the backend for all stores.
1020
- *
1021
- * If the same builder also receives a `WasmSdkContext` carrying a MySQL
1022
- * pool, `build()` returns an error — pick one source.
1023
- * @param {MysqlConnectionPool} pool
1024
- * @returns {SdkBuilder}
1025
- */
1026
- withMysqlConnectionPool(pool) {
1027
- const ptr = this.__destroy_into_raw();
1028
- _assertClass(pool, MysqlConnectionPool);
1029
- const ret = wasm.sdkbuilder_withMysqlConnectionPool(ptr, pool.__wbg_ptr);
1030
- return SdkBuilder.__wrap(ret);
1031
- }
1032
1100
  /**
1033
1101
  * @param {PaymentObserver} payment_observer
1034
1102
  * @returns {SdkBuilder}
@@ -1039,8 +1107,7 @@ export class SdkBuilder {
1039
1107
  return SdkBuilder.__wrap(ret);
1040
1108
  }
1041
1109
  /**
1042
- * **Deprecated.** Call `createPostgresConnectionPool(config)` and
1043
- * `withPostgresConnectionPool(pool)` instead.
1110
+ * **Deprecated.** Use `withStorageBackend(postgresStorage(config))`.
1044
1111
  * @param {PostgresStorageConfig} config
1045
1112
  * @returns {SdkBuilder}
1046
1113
  */
@@ -1052,20 +1119,6 @@ export class SdkBuilder {
1052
1119
  }
1053
1120
  return SdkBuilder.__wrap(ret[0]);
1054
1121
  }
1055
- /**
1056
- * Sets a shared Postgres connection pool as the backend for all stores.
1057
- *
1058
- * If the same builder also receives a `WasmSdkContext` carrying a
1059
- * Postgres pool, `build()` returns an error — pick one source.
1060
- * @param {PostgresConnectionPool} pool
1061
- * @returns {SdkBuilder}
1062
- */
1063
- withPostgresConnectionPool(pool) {
1064
- const ptr = this.__destroy_into_raw();
1065
- _assertClass(pool, PostgresConnectionPool);
1066
- const ret = wasm.sdkbuilder_withPostgresConnectionPool(ptr, pool.__wbg_ptr);
1067
- return SdkBuilder.__wrap(ret);
1068
- }
1069
1122
  /**
1070
1123
  * @param {string} url
1071
1124
  * @param {ChainApiType} api_type
@@ -1103,6 +1156,21 @@ export class SdkBuilder {
1103
1156
  const ret = wasm.sdkbuilder_withStorage(ptr, storage);
1104
1157
  return SdkBuilder.__wrap(ret);
1105
1158
  }
1159
+ /**
1160
+ * Sets one of the SDK's built-in storage backends.
1161
+ *
1162
+ * Construct the [`WasmStorageConfig`] via `defaultStorage`,
1163
+ * `postgresStorage` or `mysqlStorage`.
1164
+ * @param {WasmStorageConfig} config
1165
+ * @returns {SdkBuilder}
1166
+ */
1167
+ withStorageBackend(config) {
1168
+ const ptr = this.__destroy_into_raw();
1169
+ _assertClass(config, WasmStorageConfig);
1170
+ var ptr0 = config.__destroy_into_raw();
1171
+ const ret = wasm.sdkbuilder_withStorageBackend(ptr, ptr0);
1172
+ return SdkBuilder.__wrap(ret);
1173
+ }
1106
1174
  }
1107
1175
  if (Symbol.dispose) SdkBuilder.prototype[Symbol.dispose] = SdkBuilder.prototype.free;
1108
1176
 
@@ -1207,6 +1275,32 @@ export class WasmSdkContext {
1207
1275
  }
1208
1276
  if (Symbol.dispose) WasmSdkContext.prototype[Symbol.dispose] = WasmSdkContext.prototype.free;
1209
1277
 
1278
+ /**
1279
+ * Selects one of the SDK's built-in storage backends.
1280
+ *
1281
+ * Construct it via `defaultStorage`, `postgresStorage` or `mysqlStorage` and
1282
+ * pass it to `SdkBuilder.withStorageBackend`.
1283
+ */
1284
+ export class WasmStorageConfig {
1285
+ static __wrap(ptr) {
1286
+ const obj = Object.create(WasmStorageConfig.prototype);
1287
+ obj.__wbg_ptr = ptr;
1288
+ WasmStorageConfigFinalization.register(obj, obj.__wbg_ptr, obj);
1289
+ return obj;
1290
+ }
1291
+ __destroy_into_raw() {
1292
+ const ptr = this.__wbg_ptr;
1293
+ this.__wbg_ptr = 0;
1294
+ WasmStorageConfigFinalization.unregister(this);
1295
+ return ptr;
1296
+ }
1297
+ free() {
1298
+ const ptr = this.__destroy_into_raw();
1299
+ wasm.__wbg_wasmstorageconfig_free(ptr, 0);
1300
+ }
1301
+ }
1302
+ if (Symbol.dispose) WasmStorageConfig.prototype[Symbol.dispose] = WasmStorageConfig.prototype.free;
1303
+
1210
1304
  /**
1211
1305
  * @param {ConnectRequest} request
1212
1306
  * @returns {Promise<BreezSdk>}
@@ -1218,41 +1312,28 @@ export function connect(request) {
1218
1312
 
1219
1313
  /**
1220
1314
  * @param {Config} config
1221
- * @param {ExternalSigner} signer
1315
+ * @param {ExternalBreezSigner} breez_signer
1316
+ * @param {ExternalSparkSigner} spark_signer
1222
1317
  * @param {string} storage_dir
1223
1318
  * @returns {Promise<BreezSdk>}
1224
1319
  */
1225
- export function connectWithSigner(config, signer, storage_dir) {
1320
+ export function connectWithSigner(config, breez_signer, spark_signer, storage_dir) {
1226
1321
  const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1227
1322
  const len0 = WASM_VECTOR_LEN;
1228
- const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
1323
+ const ret = wasm.connectWithSigner(config, breez_signer, spark_signer, ptr0, len0);
1229
1324
  return ret;
1230
1325
  }
1231
1326
 
1232
1327
  /**
1233
- * Creates a shareable `MySQL` connection pool from the given config.
1234
- * @param {MysqlStorageConfig} config
1235
- * @returns {MysqlConnectionPool}
1328
+ * Builds the Turnkey-backed signers from `config`, then pass
1329
+ * `signers.breezSigner` and `signers.sparkSigner` to `connectWithSigner`,
1330
+ * exactly as with any other external signer.
1331
+ * @param {TurnkeyConfig} config
1332
+ * @returns {Promise<ExternalSigners>}
1236
1333
  */
1237
- export function createMysqlConnectionPool(config) {
1238
- const ret = wasm.createMysqlConnectionPool(config);
1239
- if (ret[2]) {
1240
- throw takeFromExternrefTable0(ret[1]);
1241
- }
1242
- return MysqlConnectionPool.__wrap(ret[0]);
1243
- }
1244
-
1245
- /**
1246
- * Creates a shareable Postgres connection pool from the given config.
1247
- * @param {PostgresStorageConfig} config
1248
- * @returns {PostgresConnectionPool}
1249
- */
1250
- export function createPostgresConnectionPool(config) {
1251
- const ret = wasm.createPostgresConnectionPool(config);
1252
- if (ret[2]) {
1253
- throw takeFromExternrefTable0(ret[1]);
1254
- }
1255
- return PostgresConnectionPool.__wrap(ret[0]);
1334
+ export function createTurnkeySigner(config) {
1335
+ const ret = wasm.createTurnkeySigner(config);
1336
+ return ret;
1256
1337
  }
1257
1338
 
1258
1339
  /**
@@ -1265,22 +1346,26 @@ export function defaultConfig(network) {
1265
1346
  }
1266
1347
 
1267
1348
  /**
1349
+ * Creates the default external signers from a mnemonic phrase.
1350
+ *
1351
+ * Key derivation matches the seed-based connect path: an SDK built either
1352
+ * way from the same mnemonic is the same wallet.
1268
1353
  * @param {string} mnemonic
1269
1354
  * @param {string | null | undefined} passphrase
1270
1355
  * @param {Network} network
1271
- * @param {KeySetConfig | null} [key_set_config]
1272
- * @returns {DefaultSigner}
1356
+ * @param {number | null} [account_number]
1357
+ * @returns {ExternalSigners}
1273
1358
  */
1274
- export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
1359
+ export function defaultExternalSigners(mnemonic, passphrase, network, account_number) {
1275
1360
  const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1276
1361
  const len0 = WASM_VECTOR_LEN;
1277
1362
  var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1278
1363
  var len1 = WASM_VECTOR_LEN;
1279
- const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
1364
+ const ret = wasm.defaultExternalSigners(ptr0, len0, ptr1, len1, network, isLikeNone(account_number) ? Number.MAX_SAFE_INTEGER : (account_number) >>> 0);
1280
1365
  if (ret[2]) {
1281
1366
  throw takeFromExternrefTable0(ret[1]);
1282
1367
  }
1283
- return DefaultSigner.__wrap(ret[0]);
1368
+ return ExternalSigners.__wrap(ret[0]);
1284
1369
  }
1285
1370
 
1286
1371
  /**
@@ -1328,9 +1413,19 @@ export function defaultServerConfig(network) {
1328
1413
  }
1329
1414
 
1330
1415
  /**
1331
- * Creates a default external signer from a mnemonic phrase.
1332
- *
1333
- * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
1416
+ * File-based storage rooted at `storageDir` IndexedDB in the browser,
1417
+ * SQLite under Node.js.
1418
+ * @param {string} storage_dir
1419
+ * @returns {WasmStorageConfig}
1420
+ */
1421
+ export function defaultStorage(storage_dir) {
1422
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1423
+ const len0 = WASM_VECTOR_LEN;
1424
+ const ret = wasm.defaultStorage(ptr0, len0);
1425
+ return WasmStorageConfig.__wrap(ret);
1426
+ }
1427
+
1428
+ /**
1334
1429
  * @returns {Promise<SparkStatus>}
1335
1430
  */
1336
1431
  export function getSparkStatus() {
@@ -1350,6 +1445,16 @@ export function initLogging(logger, filter) {
1350
1445
  return ret;
1351
1446
  }
1352
1447
 
1448
+ /**
1449
+ * `MySQL`-backed storage built from `config`.
1450
+ * @param {MysqlStorageConfig} config
1451
+ * @returns {WasmStorageConfig}
1452
+ */
1453
+ export function mysqlStorage(config) {
1454
+ const ret = wasm.mysqlStorage(config);
1455
+ return WasmStorageConfig.__wrap(ret);
1456
+ }
1457
+
1353
1458
  /**
1354
1459
  * Constructs a shareable REST-based Bitcoin chain service.
1355
1460
  *
@@ -1381,6 +1486,26 @@ export function newSharedSdkContext(config) {
1381
1486
  return ret;
1382
1487
  }
1383
1488
 
1489
+ /**
1490
+ * `PostgreSQL`-backed storage built from `config`.
1491
+ * @param {PostgresStorageConfig} config
1492
+ * @returns {WasmStorageConfig}
1493
+ */
1494
+ export function postgresStorage(config) {
1495
+ const ret = wasm.postgresStorage(config);
1496
+ return WasmStorageConfig.__wrap(ret);
1497
+ }
1498
+
1499
+ /**
1500
+ * Runs automatically when the wasm module is instantiated. Installs the
1501
+ * panic hook so Rust panics surface as readable `console.error` output
1502
+ * (with the panic message + `file.rs:line`) instead of a bare
1503
+ * `RuntimeError: unreachable`.
1504
+ */
1505
+ export function start() {
1506
+ wasm.start();
1507
+ }
1508
+
1384
1509
  /**
1385
1510
  * Entry point invoked by JavaScript in a worker.
1386
1511
  * @param {number} ptr
@@ -1522,13 +1647,19 @@ function __wbg_get_imports() {
1522
1647
  const ret = arg0.addLeaves(arg1);
1523
1648
  return ret;
1524
1649
  }, arguments); },
1525
- __wbg_aggregateFrost_8eb928d3bf25ad91: function() { return handleError(function (arg0, arg1) {
1526
- const ret = arg0.aggregateFrost(arg1);
1650
+ __wbg_afterSend_465a6d26048f7342: function() { return handleError(function (arg0, arg1, arg2) {
1651
+ var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
1652
+ wasm.__wbindgen_free(arg1, arg2 * 4, 4);
1653
+ const ret = arg0.afterSend(v0);
1527
1654
  return ret;
1528
1655
  }, arguments); },
1529
1656
  __wbg_append_8df396311184f750: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1530
1657
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1531
1658
  }, arguments); },
1659
+ __wbg_applyPaymentUpdate_8526d773e5ac8314: function() { return handleError(function (arg0, arg1) {
1660
+ const ret = arg0.applyPaymentUpdate(arg1);
1661
+ return ret;
1662
+ }, arguments); },
1532
1663
  __wbg_arrayBuffer_87e3ac06d961f7a0: function() { return handleError(function (arg0) {
1533
1664
  const ret = arg0.arrayBuffer();
1534
1665
  return ret;
@@ -1619,6 +1750,9 @@ function __wbg_get_imports() {
1619
1750
  const ret = arg0.catch(arg1);
1620
1751
  return ret;
1621
1752
  },
1753
+ __wbg_clearInterval_d25b0cf526eff7ae: function(arg0) {
1754
+ globalThis.clearInterval(arg0);
1755
+ },
1622
1756
  __wbg_clearTimeout_113b1cde814ec762: function(arg0) {
1623
1757
  const ret = clearTimeout(arg0);
1624
1758
  return ret;
@@ -1636,6 +1770,9 @@ function __wbg_get_imports() {
1636
1770
  __wbg_close_de471367367aa5cb: function() { return handleError(function (arg0) {
1637
1771
  arg0.close();
1638
1772
  }, arguments); },
1773
+ __wbg_close_f1af935d7d7cec78: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1774
+ arg0.close(arg1, getStringFromWasm0(arg2, arg3));
1775
+ }, arguments); },
1639
1776
  __wbg_code_be6f339819ebb2c4: function(arg0) {
1640
1777
  const ret = arg0.code;
1641
1778
  return ret;
@@ -1652,8 +1789,8 @@ function __wbg_get_imports() {
1652
1789
  const ret = createMysqlPool(arg0);
1653
1790
  return ret;
1654
1791
  }, arguments); },
1655
- __wbg_createMysqlSessionManagerWithPool_81f4147900a5a954: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1656
- const ret = createMysqlSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1792
+ __wbg_createMysqlSessionStoreWithPool_52192c9b2932ff7c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1793
+ const ret = createMysqlSessionStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1657
1794
  return ret;
1658
1795
  }, arguments); },
1659
1796
  __wbg_createMysqlStorageWithPool_22d23b0d068eae47: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
@@ -1668,12 +1805,16 @@ function __wbg_get_imports() {
1668
1805
  const ret = createMysqlTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4, arg5 !== 0);
1669
1806
  return ret;
1670
1807
  }, arguments); },
1808
+ __wbg_createPasskey_5ceae054474c582a: function() { return handleError(function (arg0, arg1) {
1809
+ const ret = arg0.createPasskey(arg1);
1810
+ return ret;
1811
+ }, arguments); },
1671
1812
  __wbg_createPostgresPool_3c396c7ab2f0eab2: function() { return handleError(function (arg0) {
1672
1813
  const ret = createPostgresPool(arg0);
1673
1814
  return ret;
1674
1815
  }, arguments); },
1675
- __wbg_createPostgresSessionManagerWithPool_989bf80d96829c18: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1676
- const ret = createPostgresSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1816
+ __wbg_createPostgresSessionStoreWithPool_dd76c7c3517d7bd0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1817
+ const ret = createPostgresSessionStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1677
1818
  return ret;
1678
1819
  }, arguments); },
1679
1820
  __wbg_createPostgresStorageWithPool_9408116e32ab58f8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
@@ -1696,6 +1837,20 @@ function __wbg_get_imports() {
1696
1837
  const ret = arg0.data;
1697
1838
  return ret;
1698
1839
  },
1840
+ __wbg_decryptEcies_ebe426814020926b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1841
+ let deferred1_0;
1842
+ let deferred1_1;
1843
+ try {
1844
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1845
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1846
+ deferred1_0 = arg3;
1847
+ deferred1_1 = arg4;
1848
+ const ret = arg0.decryptEcies(v0, getStringFromWasm0(arg3, arg4));
1849
+ return ret;
1850
+ } finally {
1851
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1852
+ }
1853
+ }, arguments); },
1699
1854
  __wbg_deleteCachedItem_b8fbe3ebea21ed7e: function() { return handleError(function (arg0, arg1, arg2) {
1700
1855
  let deferred0_0;
1701
1856
  let deferred0_1;
@@ -1749,19 +1904,7 @@ function __wbg_get_imports() {
1749
1904
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1750
1905
  }
1751
1906
  }, arguments); },
1752
- __wbg_derivePrfSeed_7a4ec7d929c9bcca: function() { return handleError(function (arg0, arg1, arg2) {
1753
- let deferred0_0;
1754
- let deferred0_1;
1755
- try {
1756
- deferred0_0 = arg1;
1757
- deferred0_1 = arg2;
1758
- const ret = arg0.derivePrfSeed(getStringFromWasm0(arg1, arg2));
1759
- return ret;
1760
- } finally {
1761
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1762
- }
1763
- }, arguments); },
1764
- __wbg_derivePublicKey_bab57284cd981e9a: function() { return handleError(function (arg0, arg1, arg2) {
1907
+ __wbg_derivePublicKey_1bc53f60dc792488: function() { return handleError(function (arg0, arg1, arg2) {
1765
1908
  let deferred0_0;
1766
1909
  let deferred0_1;
1767
1910
  try {
@@ -1773,25 +1916,15 @@ function __wbg_get_imports() {
1773
1916
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1774
1917
  }
1775
1918
  }, arguments); },
1919
+ __wbg_deriveSeeds_5c331613e2894c56: function() { return handleError(function (arg0, arg1, arg2) {
1920
+ const ret = arg0.deriveSeeds(arg1, arg2);
1921
+ return ret;
1922
+ }, arguments); },
1776
1923
  __wbg_done_b1afd6201ac045e0: function(arg0) {
1777
1924
  const ret = arg0.done;
1778
1925
  return ret;
1779
1926
  },
1780
- __wbg_eciesDecrypt_986d793295625dc9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1781
- let deferred1_0;
1782
- let deferred1_1;
1783
- try {
1784
- var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1785
- wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1786
- deferred1_0 = arg3;
1787
- deferred1_1 = arg4;
1788
- const ret = arg0.eciesDecrypt(v0, getStringFromWasm0(arg3, arg4));
1789
- return ret;
1790
- } finally {
1791
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1792
- }
1793
- }, arguments); },
1794
- __wbg_eciesEncrypt_95486f45d5d74f6a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1927
+ __wbg_encryptEcies_6a990da1c19d1f7c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1795
1928
  let deferred1_0;
1796
1929
  let deferred1_1;
1797
1930
  try {
@@ -1799,16 +1932,12 @@ function __wbg_get_imports() {
1799
1932
  wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1800
1933
  deferred1_0 = arg3;
1801
1934
  deferred1_1 = arg4;
1802
- const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
1935
+ const ret = arg0.encryptEcies(v0, getStringFromWasm0(arg3, arg4));
1803
1936
  return ret;
1804
1937
  } finally {
1805
1938
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1806
1939
  }
1807
1940
  }, arguments); },
1808
- __wbg_encryptPrivateKeyForReceiver_a5414ece502e2eec: function() { return handleError(function (arg0, arg1, arg2) {
1809
- const ret = arg0.encryptPrivateKeyForReceiver(arg1, arg2);
1810
- return ret;
1811
- }, arguments); },
1812
1941
  __wbg_enqueue_6c7cd543c0f3828e: function() { return handleError(function (arg0, arg1) {
1813
1942
  arg0.enqueue(arg1);
1814
1943
  }, arguments); },
@@ -1819,6 +1948,21 @@ function __wbg_get_imports() {
1819
1948
  __wbg_error_145dadf4216d70bc: function(arg0, arg1) {
1820
1949
  console.error(getStringFromWasm0(arg0, arg1));
1821
1950
  },
1951
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
1952
+ let deferred0_0;
1953
+ let deferred0_1;
1954
+ try {
1955
+ deferred0_0 = arg0;
1956
+ deferred0_1 = arg1;
1957
+ console.error(getStringFromWasm0(arg0, arg1));
1958
+ } finally {
1959
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1960
+ }
1961
+ },
1962
+ __wbg_externalsigners_new: function(arg0) {
1963
+ const ret = ExternalSigners.__wrap(arg0);
1964
+ return ret;
1965
+ },
1822
1966
  __wbg_fetchFiatCurrencies_8afa0468f01bf013: function() { return handleError(function (arg0) {
1823
1967
  const ret = arg0.fetchFiatCurrencies();
1824
1968
  return ret;
@@ -1867,14 +2011,10 @@ function __wbg_get_imports() {
1867
2011
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1868
2012
  }
1869
2013
  }, arguments); },
1870
- __wbg_generateFrostSigningCommitments_1e8b83b2bed675c9: function() { return handleError(function (arg0) {
1871
- const ret = arg0.generateFrostSigningCommitments();
1872
- return ret;
1873
- }, arguments); },
1874
- __wbg_generateRandomSecret_432432761a2594b7: function() { return handleError(function (arg0) {
1875
- const ret = arg0.generateRandomSecret();
2014
+ __wbg_from_ff141b1e4c69b979: function(arg0) {
2015
+ const ret = Array.from(arg0);
1876
2016
  return ret;
1877
- }, arguments); },
2017
+ },
1878
2018
  __wbg_getAddressUtxos_9526b6d8078b867e: function() { return handleError(function (arg0, arg1, arg2) {
1879
2019
  let deferred0_0;
1880
2020
  let deferred0_1;
@@ -1915,6 +2055,27 @@ function __wbg_get_imports() {
1915
2055
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1916
2056
  }
1917
2057
  }, arguments); },
2058
+ __wbg_getCrossChainSwap_e3b8fcf14d3d17ce: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2059
+ let deferred0_0;
2060
+ let deferred0_1;
2061
+ let deferred1_0;
2062
+ let deferred1_1;
2063
+ try {
2064
+ deferred0_0 = arg1;
2065
+ deferred0_1 = arg2;
2066
+ deferred1_0 = arg3;
2067
+ deferred1_1 = arg4;
2068
+ const ret = arg0.getCrossChainSwap(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2069
+ return ret;
2070
+ } finally {
2071
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2072
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2073
+ }
2074
+ }, arguments); },
2075
+ __wbg_getIdentityPublicKey_c6fcd87d66ed6927: function() { return handleError(function (arg0) {
2076
+ const ret = arg0.getIdentityPublicKey();
2077
+ return ret;
2078
+ }, arguments); },
1918
2079
  __wbg_getLeaves_5259dc2b9de80ff0: function() { return handleError(function (arg0) {
1919
2080
  const ret = arg0.getLeaves();
1920
2081
  return ret;
@@ -1949,12 +2110,8 @@ function __wbg_get_imports() {
1949
2110
  const ret = arg0.getPaymentsByParentIds(v0);
1950
2111
  return ret;
1951
2112
  }, arguments); },
1952
- __wbg_getPublicKeyForNode_1c1b34ec571148c2: function() { return handleError(function (arg0, arg1) {
1953
- const ret = arg0.getPublicKeyForNode(arg1);
1954
- return ret;
1955
- }, arguments); },
1956
- __wbg_getPublicKeyFromSecretSource_cecb0b3d2ce521bd: function() { return handleError(function (arg0, arg1) {
1957
- const ret = arg0.getPublicKeyFromSecretSource(arg1);
2113
+ __wbg_getPublicKeyForLeaf_9826724c9b0c3963: function() { return handleError(function (arg0, arg1) {
2114
+ const ret = arg0.getPublicKeyForLeaf(arg1);
1958
2115
  return ret;
1959
2116
  }, arguments); },
1960
2117
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
@@ -1979,7 +2136,7 @@ function __wbg_get_imports() {
1979
2136
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1980
2137
  }
1981
2138
  }, arguments); },
1982
- __wbg_getSession_05b1be4bb146adcf: function() { return handleError(function (arg0, arg1, arg2) {
2139
+ __wbg_getSession_95998cc236a30653: function() { return handleError(function (arg0, arg1, arg2) {
1983
2140
  let deferred0_0;
1984
2141
  let deferred0_1;
1985
2142
  try {
@@ -1991,18 +2148,10 @@ function __wbg_get_imports() {
1991
2148
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1992
2149
  }
1993
2150
  }, arguments); },
1994
- __wbg_getStaticDepositPrivateKey_82943f7a0fe1208d: function() { return handleError(function (arg0, arg1) {
1995
- const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
1996
- return ret;
1997
- }, arguments); },
1998
- __wbg_getStaticDepositPublicKey_8424ddc7bb238008: function() { return handleError(function (arg0, arg1) {
2151
+ __wbg_getStaticDepositPublicKey_9c7c893612c4c53f: function() { return handleError(function (arg0, arg1) {
1999
2152
  const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
2000
2153
  return ret;
2001
2154
  }, arguments); },
2002
- __wbg_getStaticDepositSecretSource_86007c41c79d2bea: function() { return handleError(function (arg0, arg1) {
2003
- const ret = arg0.getStaticDepositSecretSource(arg1 >>> 0);
2004
- return ret;
2005
- }, arguments); },
2006
2155
  __wbg_getTokenBalances_b788cda26e92f342: function() { return handleError(function (arg0) {
2007
2156
  const ret = arg0.getTokenBalances();
2008
2157
  return ret;
@@ -2035,6 +2184,10 @@ function __wbg_get_imports() {
2035
2184
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2036
2185
  }
2037
2186
  }, arguments); },
2187
+ __wbg_get_41476db20fef99a8: function() { return handleError(function (arg0, arg1) {
2188
+ const ret = Reflect.get(arg0, arg1);
2189
+ return ret;
2190
+ }, arguments); },
2038
2191
  __wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
2039
2192
  const ret = arg0[arg1 >>> 0];
2040
2193
  return ret;
@@ -2067,7 +2220,7 @@ function __wbg_get_imports() {
2067
2220
  const ret = arg0.headers;
2068
2221
  return ret;
2069
2222
  },
2070
- __wbg_hmacSha256_44b56787dc85796b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2223
+ __wbg_hmacSha256_04164bea6bd3c7d4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2071
2224
  let deferred1_0;
2072
2225
  let deferred1_1;
2073
2226
  try {
@@ -2081,10 +2234,6 @@ function __wbg_get_imports() {
2081
2234
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2082
2235
  }
2083
2236
  }, arguments); },
2084
- __wbg_identityPublicKey_157f9d906d49e5c4: function() { return handleError(function (arg0) {
2085
- const ret = arg0.identityPublicKey();
2086
- return ret;
2087
- }, arguments); },
2088
2237
  __wbg_insertContact_cc39397cb8e88ff8: function() { return handleError(function (arg0, arg1) {
2089
2238
  const ret = arg0.insertContact(arg1);
2090
2239
  return ret;
@@ -2101,10 +2250,6 @@ function __wbg_get_imports() {
2101
2250
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2102
2251
  }
2103
2252
  }, arguments); },
2104
- __wbg_insertPayment_830c37c6efef1f8a: function() { return handleError(function (arg0, arg1) {
2105
- const ret = arg0.insertPayment(arg1);
2106
- return ret;
2107
- }, arguments); },
2108
2253
  __wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
2109
2254
  let result;
2110
2255
  try {
@@ -2189,14 +2334,14 @@ function __wbg_get_imports() {
2189
2334
  const ret = Array.isArray(arg0);
2190
2335
  return ret;
2191
2336
  },
2192
- __wbg_isPrfAvailable_f77f283e48e966e1: function() { return handleError(function (arg0) {
2193
- const ret = arg0.isPrfAvailable();
2194
- return ret;
2195
- }, arguments); },
2196
2337
  __wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
2197
2338
  const ret = Number.isSafeInteger(arg0);
2198
2339
  return ret;
2199
2340
  },
2341
+ __wbg_isSupported_0fab0220495a1089: function() { return handleError(function (arg0) {
2342
+ const ret = arg0.isSupported();
2343
+ return ret;
2344
+ }, arguments); },
2200
2345
  __wbg_iterator_9d68985a1d096fc2: function() {
2201
2346
  const ret = Symbol.iterator;
2202
2347
  return ret;
@@ -2209,6 +2354,18 @@ function __wbg_get_imports() {
2209
2354
  const ret = arg0.length;
2210
2355
  return ret;
2211
2356
  },
2357
+ __wbg_listActiveCrossChainSwaps_7339427675c1ddec: function() { return handleError(function (arg0, arg1, arg2) {
2358
+ let deferred0_0;
2359
+ let deferred0_1;
2360
+ try {
2361
+ deferred0_0 = arg1;
2362
+ deferred0_1 = arg2;
2363
+ const ret = arg0.listActiveCrossChainSwaps(getStringFromWasm0(arg1, arg2));
2364
+ return ret;
2365
+ } finally {
2366
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2367
+ }
2368
+ }, arguments); },
2212
2369
  __wbg_listContacts_0afeb7e9554fdb74: function() { return handleError(function (arg0, arg1) {
2213
2370
  const ret = arg0.listContacts(arg1);
2214
2371
  return ret;
@@ -2258,6 +2415,10 @@ function __wbg_get_imports() {
2258
2415
  const ret = new Headers();
2259
2416
  return ret;
2260
2417
  }, arguments); },
2418
+ __wbg_new_227d7c05414eb861: function() {
2419
+ const ret = new Error();
2420
+ return ret;
2421
+ },
2261
2422
  __wbg_new_2fad8ca02fd00684: function() {
2262
2423
  const ret = new Object();
2263
2424
  return ret;
@@ -2397,6 +2558,30 @@ function __wbg_get_imports() {
2397
2558
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2398
2559
  }
2399
2560
  }, arguments); },
2561
+ __wbg_prepareClaim_1286899715876e7d: function() { return handleError(function (arg0, arg1) {
2562
+ const ret = arg0.prepareClaim(arg1);
2563
+ return ret;
2564
+ }, arguments); },
2565
+ __wbg_prepareLightningReceive_fe5b5a46a5d5d976: function() { return handleError(function (arg0, arg1) {
2566
+ const ret = arg0.prepareLightningReceive(arg1);
2567
+ return ret;
2568
+ }, arguments); },
2569
+ __wbg_prepareStaticDepositClaim_2aac4f9634448525: function() { return handleError(function (arg0, arg1) {
2570
+ const ret = arg0.prepareStaticDepositClaim(arg1);
2571
+ return ret;
2572
+ }, arguments); },
2573
+ __wbg_prepareStaticDeposit_66175a4078320749: function() { return handleError(function (arg0, arg1) {
2574
+ const ret = arg0.prepareStaticDeposit(arg1);
2575
+ return ret;
2576
+ }, arguments); },
2577
+ __wbg_prepareTokenTransaction_d2e097f1363077c0: function() { return handleError(function (arg0, arg1) {
2578
+ const ret = arg0.prepareTokenTransaction(arg1);
2579
+ return ret;
2580
+ }, arguments); },
2581
+ __wbg_prepareTransfer_f1fd01fccd18c85b: function() { return handleError(function (arg0, arg1) {
2582
+ const ret = arg0.prepareTransfer(arg1);
2583
+ return ret;
2584
+ }, arguments); },
2400
2585
  __wbg_process_44c7a14e11e9f69e: function(arg0) {
2401
2586
  const ret = arg0.process;
2402
2587
  return ret;
@@ -2404,6 +2589,10 @@ function __wbg_get_imports() {
2404
2589
  __wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
2405
2590
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2406
2591
  },
2592
+ __wbg_push_60a5366c0bb22a7d: function(arg0, arg1) {
2593
+ const ret = arg0.push(arg1);
2594
+ return ret;
2595
+ },
2407
2596
  __wbg_queueMicrotask_40ac6ffc2848ba77: function(arg0) {
2408
2597
  queueMicrotask(arg0);
2409
2598
  },
@@ -2491,6 +2680,14 @@ function __wbg_get_imports() {
2491
2680
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2492
2681
  }
2493
2682
  }, arguments); },
2683
+ __wbg_setCrossChainSwap_9047f4cc41fe2eca: function() { return handleError(function (arg0, arg1) {
2684
+ const ret = arg0.setCrossChainSwap(arg1);
2685
+ return ret;
2686
+ }, arguments); },
2687
+ __wbg_setInterval_2aba203c2a1ea83f: function(arg0, arg1) {
2688
+ const ret = globalThis.setInterval(arg0, arg1);
2689
+ return ret;
2690
+ },
2494
2691
  __wbg_setLeaves_3a013e3266762f4b: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2495
2692
  const ret = arg0.setLeaves(arg1, arg2, arg3);
2496
2693
  return ret;
@@ -2501,7 +2698,7 @@ function __wbg_get_imports() {
2501
2698
  const ret = arg0.setLnurlMetadata(v0);
2502
2699
  return ret;
2503
2700
  }, arguments); },
2504
- __wbg_setSession_35cb471ae7537391: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2701
+ __wbg_setSession_86d7fef1f452677c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2505
2702
  let deferred0_0;
2506
2703
  let deferred0_1;
2507
2704
  try {
@@ -2593,7 +2790,13 @@ function __wbg_get_imports() {
2593
2790
  __wbg_set_signal_8c5cf4c3b27bd8a8: function(arg0, arg1) {
2594
2791
  arg0.signal = arg1;
2595
2792
  },
2596
- __wbg_signEcdsaRecoverable_e1e9c5e2c8ec869f: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2793
+ __wbg_signAuthenticationChallenge_e2ea9cf87c76a6de: function() { return handleError(function (arg0, arg1, arg2) {
2794
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2795
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2796
+ const ret = arg0.signAuthenticationChallenge(v0);
2797
+ return ret;
2798
+ }, arguments); },
2799
+ __wbg_signEcdsaRecoverable_978c5526e66a433b: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2597
2800
  let deferred0_0;
2598
2801
  let deferred0_1;
2599
2802
  try {
@@ -2605,7 +2808,7 @@ function __wbg_get_imports() {
2605
2808
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2606
2809
  }
2607
2810
  }, arguments); },
2608
- __wbg_signEcdsa_99eb88e7d9907236: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2811
+ __wbg_signEcdsa_1947a1a2c8f39a16: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2609
2812
  let deferred0_0;
2610
2813
  let deferred0_1;
2611
2814
  try {
@@ -2617,11 +2820,11 @@ function __wbg_get_imports() {
2617
2820
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2618
2821
  }
2619
2822
  }, arguments); },
2620
- __wbg_signFrost_df3d96ac20619b95: function() { return handleError(function (arg0, arg1) {
2823
+ __wbg_signFrost_08951e01d00d4b1c: function() { return handleError(function (arg0, arg1) {
2621
2824
  const ret = arg0.signFrost(arg1);
2622
2825
  return ret;
2623
2826
  }, arguments); },
2624
- __wbg_signHashSchnorr_33c182cb4c2323d5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2827
+ __wbg_signHashSchnorr_fc8afda9a7ee021a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2625
2828
  let deferred1_0;
2626
2829
  let deferred1_1;
2627
2830
  try {
@@ -2635,12 +2838,33 @@ function __wbg_get_imports() {
2635
2838
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2636
2839
  }
2637
2840
  }, arguments); },
2841
+ __wbg_signMessage_80ec0b0dfc7f00ee: function() { return handleError(function (arg0, arg1, arg2) {
2842
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2843
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2844
+ const ret = arg0.signMessage(v0);
2845
+ return ret;
2846
+ }, arguments); },
2847
+ __wbg_signSparkInvoice_cca6c7f35b5e85d2: function() { return handleError(function (arg0, arg1) {
2848
+ const ret = arg0.signSparkInvoice(arg1);
2849
+ return ret;
2850
+ }, arguments); },
2851
+ __wbg_signStaticDepositRefund_3a6fb4e71a15bebd: function() { return handleError(function (arg0, arg1) {
2852
+ const ret = arg0.signStaticDepositRefund(arg1);
2853
+ return ret;
2854
+ }, arguments); },
2638
2855
  __wbg_signal_4643ce883b92b553: function(arg0) {
2639
2856
  const ret = arg0.signal;
2640
2857
  return ret;
2641
2858
  },
2642
- __wbg_splitSecretWithProofs_c9d51158a14af659: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2643
- const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
2859
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
2860
+ const ret = arg1.stack;
2861
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2862
+ const len1 = WASM_VECTOR_LEN;
2863
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2864
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2865
+ },
2866
+ __wbg_startStaticDepositRefund_5b591bbea22aa0d2: function() { return handleError(function (arg0, arg1) {
2867
+ const ret = arg0.startStaticDepositRefund(arg1);
2644
2868
  return ret;
2645
2869
  }, arguments); },
2646
2870
  __wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
@@ -2671,10 +2895,6 @@ function __wbg_get_imports() {
2671
2895
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2672
2896
  return ret;
2673
2897
  },
2674
- __wbg_subtractPrivateKeys_c66265ac85e781b7: function() { return handleError(function (arg0, arg1, arg2) {
2675
- const ret = arg0.subtractPrivateKeys(arg1, arg2);
2676
- return ret;
2677
- }, arguments); },
2678
2898
  __wbg_syncAddOutgoingChange_69db2a1430cbd55a: function() { return handleError(function (arg0, arg1) {
2679
2899
  const ret = arg0.syncAddOutgoingChange(arg1);
2680
2900
  return ret;
@@ -2811,109 +3031,131 @@ function __wbg_get_imports() {
2811
3031
  return ret;
2812
3032
  },
2813
3033
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2814
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2815
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21);
3034
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3035
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522);
2816
3036
  return ret;
2817
3037
  },
2818
3038
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2819
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2820
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57);
3039
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3040
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2);
2821
3041
  return ret;
2822
3042
  },
2823
3043
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2824
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2825
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2);
3044
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3045
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2);
2826
3046
  return ret;
2827
3047
  },
2828
3048
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2829
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2830
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3);
3049
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3050
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3);
2831
3051
  return ret;
2832
3052
  },
2833
3053
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2834
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionManager")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2835
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4);
3054
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3055
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4);
2836
3056
  return ret;
2837
3057
  },
2838
3058
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2839
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2840
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5);
3059
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3060
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5);
2841
3061
  return ret;
2842
3062
  },
2843
3063
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2844
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2845
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6);
3064
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3065
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6);
2846
3066
  return ret;
2847
3067
  },
2848
3068
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2849
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2850
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7);
3069
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3070
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7);
2851
3071
  return ret;
2852
3072
  },
2853
3073
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
2854
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 408, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2855
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h124479769cd429fd);
3074
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3075
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8);
3076
+ return ret;
3077
+ },
3078
+ __wbindgen_cast_000000000000000a: function(arg0, arg1) {
3079
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3080
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9);
3081
+ return ret;
3082
+ },
3083
+ __wbindgen_cast_000000000000000b: function(arg0, arg1) {
3084
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 394, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3085
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1d6669a7b693932a);
2856
3086
  return ret;
2857
3087
  },
2858
- __wbindgen_cast_000000000000000a: function(arg0) {
3088
+ __wbindgen_cast_000000000000000c: function(arg0, arg1) {
3089
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 420, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
3090
+ const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e);
3091
+ return ret;
3092
+ },
3093
+ __wbindgen_cast_000000000000000d: function(arg0) {
2859
3094
  // Cast intrinsic for `F64 -> Externref`.
2860
3095
  const ret = arg0;
2861
3096
  return ret;
2862
3097
  },
2863
- __wbindgen_cast_000000000000000b: function(arg0) {
3098
+ __wbindgen_cast_000000000000000e: function(arg0) {
2864
3099
  // Cast intrinsic for `I64 -> Externref`.
2865
3100
  const ret = arg0;
2866
3101
  return ret;
2867
3102
  },
2868
- __wbindgen_cast_000000000000000c: function(arg0, arg1) {
3103
+ __wbindgen_cast_000000000000000f: function(arg0, arg1) {
2869
3104
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
2870
3105
  const ret = getArrayU8FromWasm0(arg0, arg1);
2871
3106
  return ret;
2872
3107
  },
2873
- __wbindgen_cast_000000000000000d: function(arg0, arg1) {
3108
+ __wbindgen_cast_0000000000000010: function(arg0, arg1) {
2874
3109
  // Cast intrinsic for `Ref(String) -> Externref`.
2875
3110
  const ret = getStringFromWasm0(arg0, arg1);
2876
3111
  return ret;
2877
3112
  },
2878
- __wbindgen_cast_000000000000000e: function(arg0, arg1) {
3113
+ __wbindgen_cast_0000000000000011: function(arg0, arg1) {
2879
3114
  // Cast intrinsic for `U128 -> Externref`.
2880
3115
  const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
2881
3116
  return ret;
2882
3117
  },
2883
- __wbindgen_cast_000000000000000f: function(arg0) {
3118
+ __wbindgen_cast_0000000000000012: function(arg0) {
2884
3119
  // Cast intrinsic for `U64 -> Externref`.
2885
3120
  const ret = BigInt.asUintN(64, arg0);
2886
3121
  return ret;
2887
3122
  },
2888
- __wbindgen_cast_0000000000000010: function(arg0, arg1) {
3123
+ __wbindgen_cast_0000000000000013: function(arg0, arg1) {
2889
3124
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2890
3125
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2891
3126
  // Cast intrinsic for `Vector(NamedExternref("Contact")) -> Externref`.
2892
3127
  const ret = v0;
2893
3128
  return ret;
2894
3129
  },
2895
- __wbindgen_cast_0000000000000011: function(arg0, arg1) {
3130
+ __wbindgen_cast_0000000000000014: function(arg0, arg1) {
3131
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3132
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3133
+ // Cast intrinsic for `Vector(NamedExternref("CrossChainRoutePair")) -> Externref`.
3134
+ const ret = v0;
3135
+ return ret;
3136
+ },
3137
+ __wbindgen_cast_0000000000000015: function(arg0, arg1) {
2896
3138
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2897
3139
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2898
- // Cast intrinsic for `Vector(NamedExternref("ExternalVerifiableSecretShare")) -> Externref`.
3140
+ // Cast intrinsic for `Vector(NamedExternref("ExternalFrostShareResult")) -> Externref`.
2899
3141
  const ret = v0;
2900
3142
  return ret;
2901
3143
  },
2902
- __wbindgen_cast_0000000000000012: function(arg0, arg1) {
3144
+ __wbindgen_cast_0000000000000016: function(arg0, arg1) {
2903
3145
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2904
3146
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2905
3147
  // Cast intrinsic for `Vector(NamedExternref("Webhook")) -> Externref`.
2906
3148
  const ret = v0;
2907
3149
  return ret;
2908
3150
  },
2909
- __wbindgen_cast_0000000000000013: function(arg0, arg1) {
3151
+ __wbindgen_cast_0000000000000017: function(arg0, arg1) {
2910
3152
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2911
3153
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2912
3154
  // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
2913
3155
  const ret = v0;
2914
3156
  return ret;
2915
3157
  },
2916
- __wbindgen_cast_0000000000000014: function(arg0, arg1) {
3158
+ __wbindgen_cast_0000000000000018: function(arg0, arg1) {
2917
3159
  var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2918
3160
  wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2919
3161
  // Cast intrinsic for `Vector(U8) -> Externref`.
@@ -2936,52 +3178,64 @@ function __wbg_get_imports() {
2936
3178
  };
2937
3179
  }
2938
3180
 
2939
- function wasm_bindgen__convert__closures_____invoke__h124479769cd429fd(arg0, arg1) {
2940
- wasm.wasm_bindgen__convert__closures_____invoke__h124479769cd429fd(arg0, arg1);
3181
+ function wasm_bindgen__convert__closures_____invoke__h1d6669a7b693932a(arg0, arg1) {
3182
+ wasm.wasm_bindgen__convert__closures_____invoke__h1d6669a7b693932a(arg0, arg1);
3183
+ }
3184
+
3185
+ function wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e(arg0, arg1) {
3186
+ wasm.wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e(arg0, arg1);
3187
+ }
3188
+
3189
+ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2(arg0, arg1, arg2) {
3190
+ wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2(arg0, arg1, arg2);
3191
+ }
3192
+
3193
+ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2(arg0, arg1, arg2) {
3194
+ wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2(arg0, arg1, arg2);
2941
3195
  }
2942
3196
 
2943
- function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57(arg0, arg1, arg2) {
2944
- wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57(arg0, arg1, arg2);
3197
+ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3(arg0, arg1, arg2) {
3198
+ wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3(arg0, arg1, arg2);
2945
3199
  }
2946
3200
 
2947
- function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2(arg0, arg1, arg2) {
2948
- wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2(arg0, arg1, arg2);
3201
+ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4(arg0, arg1, arg2) {
3202
+ wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4(arg0, arg1, arg2);
2949
3203
  }
2950
3204
 
2951
- function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, arg1, arg2) {
2952
- wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, arg1, arg2);
3205
+ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, arg1, arg2) {
3206
+ wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, arg1, arg2);
2953
3207
  }
2954
3208
 
2955
- function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21(arg0, arg1, arg2) {
2956
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21(arg0, arg1, arg2);
3209
+ function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2) {
3210
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2);
2957
3211
  if (ret[1]) {
2958
3212
  throw takeFromExternrefTable0(ret[0]);
2959
3213
  }
2960
3214
  }
2961
3215
 
2962
- function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4(arg0, arg1, arg2) {
2963
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4(arg0, arg1, arg2);
3216
+ function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2) {
3217
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2);
2964
3218
  if (ret[1]) {
2965
3219
  throw takeFromExternrefTable0(ret[0]);
2966
3220
  }
2967
3221
  }
2968
3222
 
2969
- function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5(arg0, arg1, arg2) {
2970
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5(arg0, arg1, arg2);
3223
+ function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2) {
3224
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2);
2971
3225
  if (ret[1]) {
2972
3226
  throw takeFromExternrefTable0(ret[0]);
2973
3227
  }
2974
3228
  }
2975
3229
 
2976
- function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6(arg0, arg1, arg2) {
2977
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6(arg0, arg1, arg2);
3230
+ function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8(arg0, arg1, arg2) {
3231
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8(arg0, arg1, arg2);
2978
3232
  if (ret[1]) {
2979
3233
  throw takeFromExternrefTable0(ret[0]);
2980
3234
  }
2981
3235
  }
2982
3236
 
2983
- function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7(arg0, arg1, arg2) {
2984
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7(arg0, arg1, arg2);
3237
+ function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9(arg0, arg1, arg2) {
3238
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9(arg0, arg1, arg2);
2985
3239
  if (ret[1]) {
2986
3240
  throw takeFromExternrefTable0(ret[0]);
2987
3241
  }
@@ -3017,9 +3271,15 @@ const BitcoinChainServiceHandleFinalization = (typeof FinalizationRegistry === '
3017
3271
  const BreezSdkFinalization = (typeof FinalizationRegistry === 'undefined')
3018
3272
  ? { register: () => {}, unregister: () => {} }
3019
3273
  : new FinalizationRegistry(ptr => wasm.__wbg_breezsdk_free(ptr, 1));
3020
- const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
3274
+ const ExternalBreezSignerHandleFinalization = (typeof FinalizationRegistry === 'undefined')
3021
3275
  ? { register: () => {}, unregister: () => {} }
3022
- : new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr, 1));
3276
+ : new FinalizationRegistry(ptr => wasm.__wbg_externalbreezsignerhandle_free(ptr, 1));
3277
+ const ExternalSignersFinalization = (typeof FinalizationRegistry === 'undefined')
3278
+ ? { register: () => {}, unregister: () => {} }
3279
+ : new FinalizationRegistry(ptr => wasm.__wbg_externalsigners_free(ptr, 1));
3280
+ const ExternalSparkSignerHandleFinalization = (typeof FinalizationRegistry === 'undefined')
3281
+ ? { register: () => {}, unregister: () => {} }
3282
+ : new FinalizationRegistry(ptr => wasm.__wbg_externalsparksignerhandle_free(ptr, 1));
3023
3283
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
3024
3284
  ? { register: () => {}, unregister: () => {} }
3025
3285
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
@@ -3029,15 +3289,12 @@ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefin
3029
3289
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
3030
3290
  ? { register: () => {}, unregister: () => {} }
3031
3291
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
3032
- const MysqlConnectionPoolFinalization = (typeof FinalizationRegistry === 'undefined')
3292
+ const PasskeyClientFinalization = (typeof FinalizationRegistry === 'undefined')
3033
3293
  ? { register: () => {}, unregister: () => {} }
3034
- : new FinalizationRegistry(ptr => wasm.__wbg_mysqlconnectionpool_free(ptr, 1));
3035
- const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
3294
+ : new FinalizationRegistry(ptr => wasm.__wbg_passkeyclient_free(ptr, 1));
3295
+ const PasskeyLabelsFinalization = (typeof FinalizationRegistry === 'undefined')
3036
3296
  ? { register: () => {}, unregister: () => {} }
3037
- : new FinalizationRegistry(ptr => wasm.__wbg_passkey_free(ptr, 1));
3038
- const PostgresConnectionPoolFinalization = (typeof FinalizationRegistry === 'undefined')
3039
- ? { register: () => {}, unregister: () => {} }
3040
- : new FinalizationRegistry(ptr => wasm.__wbg_postgresconnectionpool_free(ptr, 1));
3297
+ : new FinalizationRegistry(ptr => wasm.__wbg_passkeylabels_free(ptr, 1));
3041
3298
  const SdkBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
3042
3299
  ? { register: () => {}, unregister: () => {} }
3043
3300
  : new FinalizationRegistry(ptr => wasm.__wbg_sdkbuilder_free(ptr, 1));
@@ -3047,6 +3304,9 @@ const TokenIssuerFinalization = (typeof FinalizationRegistry === 'undefined')
3047
3304
  const WasmSdkContextFinalization = (typeof FinalizationRegistry === 'undefined')
3048
3305
  ? { register: () => {}, unregister: () => {} }
3049
3306
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmsdkcontext_free(ptr, 1));
3307
+ const WasmStorageConfigFinalization = (typeof FinalizationRegistry === 'undefined')
3308
+ ? { register: () => {}, unregister: () => {} }
3309
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmstorageconfig_free(ptr, 1));
3050
3310
 
3051
3311
  function addToExternrefTable0(obj) {
3052
3312
  const idx = wasm.__externref_table_alloc();
@@ -3178,6 +3438,31 @@ function isLikeNone(x) {
3178
3438
  return x === undefined || x === null;
3179
3439
  }
3180
3440
 
3441
+ function makeClosure(arg0, arg1, f) {
3442
+ const state = { a: arg0, b: arg1, cnt: 1 };
3443
+ const real = (...args) => {
3444
+
3445
+ // First up with a closure we increment the internal reference
3446
+ // count. This ensures that the Rust closure environment won't
3447
+ // be deallocated while we're invoking it.
3448
+ state.cnt++;
3449
+ try {
3450
+ return f(state.a, state.b, ...args);
3451
+ } finally {
3452
+ real._wbg_cb_unref();
3453
+ }
3454
+ };
3455
+ real._wbg_cb_unref = () => {
3456
+ if (--state.cnt === 0) {
3457
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
3458
+ state.a = 0;
3459
+ CLOSURE_DTORS.unregister(state);
3460
+ }
3461
+ };
3462
+ CLOSURE_DTORS.register(real, state, state);
3463
+ return real;
3464
+ }
3465
+
3181
3466
  function makeMutClosure(arg0, arg1, f) {
3182
3467
  const state = { a: arg0, b: arg1, cnt: 1 };
3183
3468
  const real = (...args) => {
@@ -3213,6 +3498,16 @@ function passArray8ToWasm0(arg, malloc) {
3213
3498
  return ptr;
3214
3499
  }
3215
3500
 
3501
+ function passArrayJsValueToWasm0(array, malloc) {
3502
+ const ptr = malloc(array.length * 4, 4) >>> 0;
3503
+ for (let i = 0; i < array.length; i++) {
3504
+ const add = addToExternrefTable0(array[i]);
3505
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
3506
+ }
3507
+ WASM_VECTOR_LEN = array.length;
3508
+ return ptr;
3509
+ }
3510
+
3216
3511
  function passStringToWasm0(arg, malloc, realloc) {
3217
3512
  if (realloc === undefined) {
3218
3513
  const buf = cachedTextEncoder.encode(arg);