@breeztech/breez-sdk-spark 0.15.1 → 0.16.1-dev1

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 +511 -215
  3. package/bundler/breez_sdk_spark_wasm.js +1 -1
  4. package/bundler/breez_sdk_spark_wasm_bg.js +567 -414
  5. package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
  6. package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
  7. package/bundler/storage/index.js +205 -15
  8. package/deno/breez_sdk_spark_wasm.d.ts +511 -215
  9. package/deno/breez_sdk_spark_wasm.js +567 -414
  10. package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
  11. package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
  12. package/nodejs/breez_sdk_spark_wasm.d.ts +511 -215
  13. package/nodejs/breez_sdk_spark_wasm.js +578 -421
  14. package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
  15. package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
  16. package/nodejs/index.js +10 -10
  17. package/nodejs/index.mjs +12 -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 +229 -111
  23. package/nodejs/mysql-storage/migrations.cjs +37 -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 +174 -107
  34. package/nodejs/postgres-storage/migrations.cjs +24 -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 +167 -113
  38. package/nodejs/storage/migrations.cjs +23 -0
  39. package/package.json +6 -1
  40. package/ssr/index.js +52 -28
  41. package/web/breez_sdk_spark_wasm.d.ts +566 -261
  42. package/web/breez_sdk_spark_wasm.js +567 -414
  43. package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
  44. package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +55 -46
  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 +205 -15
  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>}
@@ -195,13 +204,6 @@ export class BreezSdk {
195
204
  const ret = wasm.breezsdk_getInfo(this.__wbg_ptr, request);
196
205
  return ret;
197
206
  }
198
- /**
199
- * @returns {OptimizationProgress}
200
- */
201
- getLeafOptimizationProgress() {
202
- const ret = wasm.breezsdk_getLeafOptimizationProgress(this.__wbg_ptr);
203
- return ret;
204
- }
205
207
  /**
206
208
  * @returns {Promise<LightningAddressInfo | undefined>}
207
209
  */
@@ -308,6 +310,14 @@ export class BreezSdk {
308
310
  const ret = wasm.breezsdk_lnurlWithdraw(this.__wbg_ptr, request);
309
311
  return ret;
310
312
  }
313
+ /**
314
+ * @param {OptimizeLeavesRequest} request
315
+ * @returns {Promise<OptimizeLeavesResponse>}
316
+ */
317
+ optimizeLeaves(request) {
318
+ const ret = wasm.breezsdk_optimizeLeaves(this.__wbg_ptr, request);
319
+ return ret;
320
+ }
311
321
  /**
312
322
  * @param {string} input
313
323
  * @returns {Promise<InputType>}
@@ -406,13 +416,6 @@ export class BreezSdk {
406
416
  const ret = wasm.breezsdk_signMessage(this.__wbg_ptr, request);
407
417
  return ret;
408
418
  }
409
- /**
410
- * @returns {Promise<void>}
411
- */
412
- startLeafOptimization() {
413
- const ret = wasm.breezsdk_startLeafOptimization(this.__wbg_ptr);
414
- return ret;
415
- }
416
419
  /**
417
420
  * @param {SyncWalletRequest} request
418
421
  * @returns {Promise<SyncWalletResponse>}
@@ -449,33 +452,28 @@ export class BreezSdk {
449
452
  if (Symbol.dispose) BreezSdk.prototype[Symbol.dispose] = BreezSdk.prototype.free;
450
453
 
451
454
  /**
452
- * A default signer implementation that wraps the core SDK's ExternalSigner.
453
- * This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
455
+ * A Rust-backed [`ExternalBreezSigner`] surfaced to JS as a signer object that
456
+ * can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
457
+ * by `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey).
458
+ *
459
+ * [`ExternalBreezSigner`]: breez_sdk_spark::signer::ExternalBreezSigner
454
460
  */
455
- export class DefaultSigner {
461
+ export class ExternalBreezSignerHandle {
456
462
  static __wrap(ptr) {
457
- const obj = Object.create(DefaultSigner.prototype);
463
+ const obj = Object.create(ExternalBreezSignerHandle.prototype);
458
464
  obj.__wbg_ptr = ptr;
459
- DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
465
+ ExternalBreezSignerHandleFinalization.register(obj, obj.__wbg_ptr, obj);
460
466
  return obj;
461
467
  }
462
468
  __destroy_into_raw() {
463
469
  const ptr = this.__wbg_ptr;
464
470
  this.__wbg_ptr = 0;
465
- DefaultSignerFinalization.unregister(this);
471
+ ExternalBreezSignerHandleFinalization.unregister(this);
466
472
  return ptr;
467
473
  }
468
474
  free() {
469
475
  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;
476
+ wasm.__wbg_externalbreezsignerhandle_free(ptr, 0);
479
477
  }
480
478
  /**
481
479
  * @param {Uint8Array} message
@@ -487,7 +485,7 @@ export class DefaultSigner {
487
485
  const len0 = WASM_VECTOR_LEN;
488
486
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
489
487
  const len1 = WASM_VECTOR_LEN;
490
- const ret = wasm.defaultsigner_decryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
488
+ const ret = wasm.externalbreezsignerhandle_decryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
491
489
  return ret;
492
490
  }
493
491
  /**
@@ -497,7 +495,7 @@ export class DefaultSigner {
497
495
  derivePublicKey(path) {
498
496
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
499
497
  const len0 = WASM_VECTOR_LEN;
500
- const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
498
+ const ret = wasm.externalbreezsignerhandle_derivePublicKey(this.__wbg_ptr, ptr0, len0);
501
499
  return ret;
502
500
  }
503
501
  /**
@@ -510,38 +508,7 @@ export class DefaultSigner {
510
508
  const len0 = WASM_VECTOR_LEN;
511
509
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
512
510
  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);
511
+ const ret = wasm.externalbreezsignerhandle_encryptEcies(this.__wbg_ptr, ptr0, len0, ptr1, len1);
545
512
  return ret;
546
513
  }
547
514
  /**
@@ -554,25 +521,7 @@ export class DefaultSigner {
554
521
  const len0 = WASM_VECTOR_LEN;
555
522
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
556
523
  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);
524
+ const ret = wasm.externalbreezsignerhandle_hmacSha256(this.__wbg_ptr, ptr0, len0, ptr1, len1);
576
525
  return ret;
577
526
  }
578
527
  /**
@@ -583,7 +532,7 @@ export class DefaultSigner {
583
532
  signEcdsa(message, path) {
584
533
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
585
534
  const len0 = WASM_VECTOR_LEN;
586
- const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, message, ptr0, len0);
535
+ const ret = wasm.externalbreezsignerhandle_signEcdsa(this.__wbg_ptr, message, ptr0, len0);
587
536
  return ret;
588
537
  }
589
538
  /**
@@ -594,15 +543,7 @@ export class DefaultSigner {
594
543
  signEcdsaRecoverable(message, path) {
595
544
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
596
545
  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);
546
+ const ret = wasm.externalbreezsignerhandle_signEcdsaRecoverable(this.__wbg_ptr, message, ptr0, len0);
606
547
  return ret;
607
548
  }
608
549
  /**
@@ -615,54 +556,205 @@ export class DefaultSigner {
615
556
  const len0 = WASM_VECTOR_LEN;
616
557
  const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
617
558
  const len1 = WASM_VECTOR_LEN;
618
- const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
559
+ const ret = wasm.externalbreezsignerhandle_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
619
560
  return ret;
620
561
  }
562
+ }
563
+ if (Symbol.dispose) ExternalBreezSignerHandle.prototype[Symbol.dispose] = ExternalBreezSignerHandle.prototype.free;
564
+
565
+ /**
566
+ * The two external signers for the SDK's signer-based connect. Returned by
567
+ * `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey); pass
568
+ * both halves to `connectWithSigner` or `SdkBuilder.newWithSigner`.
569
+ */
570
+ export class ExternalSigners {
571
+ static __wrap(ptr) {
572
+ const obj = Object.create(ExternalSigners.prototype);
573
+ obj.__wbg_ptr = ptr;
574
+ ExternalSignersFinalization.register(obj, obj.__wbg_ptr, obj);
575
+ return obj;
576
+ }
577
+ __destroy_into_raw() {
578
+ const ptr = this.__wbg_ptr;
579
+ this.__wbg_ptr = 0;
580
+ ExternalSignersFinalization.unregister(this);
581
+ return ptr;
582
+ }
583
+ free() {
584
+ const ptr = this.__destroy_into_raw();
585
+ wasm.__wbg_externalsigners_free(ptr, 0);
586
+ }
621
587
  /**
622
- * @param {ExternalSecretToSplit} secret
623
- * @param {number} threshold
624
- * @param {number} num_shares
625
- * @returns {Promise<ExternalVerifiableSecretShare[]>}
588
+ * External signer for non-Spark SDK signing (LNURL-auth, sync, message
589
+ * signing, ECIES).
590
+ * @returns {ExternalBreezSignerHandle}
626
591
  */
627
- splitSecretWithProofs(secret, threshold, num_shares) {
628
- const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
629
- return ret;
592
+ get breezSigner() {
593
+ const ret = wasm.externalsigners_breezSigner(this.__wbg_ptr);
594
+ return ExternalBreezSignerHandle.__wrap(ret);
630
595
  }
631
596
  /**
632
- * @param {number} index
633
- * @returns {Promise<SecretBytes>}
597
+ * External high-level Spark signer for the Spark wallet flows.
598
+ * @returns {ExternalSparkSignerHandle}
634
599
  */
635
- staticDepositSecret(index) {
636
- const ret = wasm.defaultsigner_staticDepositSecret(this.__wbg_ptr, index);
600
+ get sparkSigner() {
601
+ const ret = wasm.externalsigners_sparkSigner(this.__wbg_ptr);
602
+ return ExternalSparkSignerHandle.__wrap(ret);
603
+ }
604
+ }
605
+ if (Symbol.dispose) ExternalSigners.prototype[Symbol.dispose] = ExternalSigners.prototype.free;
606
+
607
+ /**
608
+ * A Rust-backed [`ExternalSparkSigner`] surfaced to JS as a signer object that
609
+ * can be passed to `connectWithSigner` or `SdkBuilder.newWithSigner`. Produced
610
+ * by `defaultExternalSigners` (seed) and `createTurnkeySigner` (Turnkey).
611
+ *
612
+ * [`ExternalSparkSigner`]: breez_sdk_spark::signer::ExternalSparkSigner
613
+ */
614
+ export class ExternalSparkSignerHandle {
615
+ static __wrap(ptr) {
616
+ const obj = Object.create(ExternalSparkSignerHandle.prototype);
617
+ obj.__wbg_ptr = ptr;
618
+ ExternalSparkSignerHandleFinalization.register(obj, obj.__wbg_ptr, obj);
619
+ return obj;
620
+ }
621
+ __destroy_into_raw() {
622
+ const ptr = this.__wbg_ptr;
623
+ this.__wbg_ptr = 0;
624
+ ExternalSparkSignerHandleFinalization.unregister(this);
625
+ return ptr;
626
+ }
627
+ free() {
628
+ const ptr = this.__destroy_into_raw();
629
+ wasm.__wbg_externalsparksignerhandle_free(ptr, 0);
630
+ }
631
+ /**
632
+ * @returns {Promise<PublicKeyBytes>}
633
+ */
634
+ getIdentityPublicKey() {
635
+ const ret = wasm.externalsparksignerhandle_getIdentityPublicKey(this.__wbg_ptr);
637
636
  return ret;
638
637
  }
639
638
  /**
640
- * @param {number} index
641
- * @returns {Promise<ExternalSecretSource>}
639
+ * @param {ExternalTreeNodeId} leaf_id
640
+ * @returns {Promise<PublicKeyBytes>}
642
641
  */
643
- staticDepositSecretEncrypted(index) {
644
- const ret = wasm.defaultsigner_staticDepositSecretEncrypted(this.__wbg_ptr, index);
642
+ getPublicKeyForLeaf(leaf_id) {
643
+ const ret = wasm.externalsparksignerhandle_getPublicKeyForLeaf(this.__wbg_ptr, leaf_id);
645
644
  return ret;
646
645
  }
647
646
  /**
648
647
  * @param {number} index
649
648
  * @returns {Promise<PublicKeyBytes>}
650
649
  */
651
- staticDepositSigningKey(index) {
652
- const ret = wasm.defaultsigner_staticDepositSigningKey(this.__wbg_ptr, index);
650
+ getStaticDepositPublicKey(index) {
651
+ const ret = wasm.externalsparksignerhandle_getStaticDepositPublicKey(this.__wbg_ptr, index);
652
+ return ret;
653
+ }
654
+ /**
655
+ * @param {ExternalPrepareClaimRequest} request
656
+ * @returns {Promise<ExternalPreparedClaim>}
657
+ */
658
+ prepareClaim(request) {
659
+ const ret = wasm.externalsparksignerhandle_prepareClaim(this.__wbg_ptr, request);
660
+ return ret;
661
+ }
662
+ /**
663
+ * @param {ExternalPrepareLightningReceiveRequest} request
664
+ * @returns {Promise<ExternalPreparedLightningReceive>}
665
+ */
666
+ prepareLightningReceive(request) {
667
+ const ret = wasm.externalsparksignerhandle_prepareLightningReceive(this.__wbg_ptr, request);
668
+ return ret;
669
+ }
670
+ /**
671
+ * @param {ExternalPrepareStaticDepositRequest} request
672
+ * @returns {Promise<ExternalPreparedStaticDeposit>}
673
+ */
674
+ prepareStaticDeposit(request) {
675
+ const ret = wasm.externalsparksignerhandle_prepareStaticDeposit(this.__wbg_ptr, request);
676
+ return ret;
677
+ }
678
+ /**
679
+ * @param {ExternalPrepareStaticDepositClaimRequest} request
680
+ * @returns {Promise<ExternalPreparedStaticDepositClaim>}
681
+ */
682
+ prepareStaticDepositClaim(request) {
683
+ const ret = wasm.externalsparksignerhandle_prepareStaticDepositClaim(this.__wbg_ptr, request);
684
+ return ret;
685
+ }
686
+ /**
687
+ * @param {ExternalPrepareTokenTransactionRequest} request
688
+ * @returns {Promise<ExternalPreparedTokenTransaction>}
689
+ */
690
+ prepareTokenTransaction(request) {
691
+ const ret = wasm.externalsparksignerhandle_prepareTokenTransaction(this.__wbg_ptr, request);
692
+ return ret;
693
+ }
694
+ /**
695
+ * @param {ExternalPrepareTransferRequest} request
696
+ * @returns {Promise<ExternalPreparedTransfer>}
697
+ */
698
+ prepareTransfer(request) {
699
+ const ret = wasm.externalsparksignerhandle_prepareTransfer(this.__wbg_ptr, request);
700
+ return ret;
701
+ }
702
+ /**
703
+ * @param {Uint8Array} challenge
704
+ * @returns {Promise<EcdsaSignatureBytes>}
705
+ */
706
+ signAuthenticationChallenge(challenge) {
707
+ const ptr0 = passArray8ToWasm0(challenge, wasm.__wbindgen_malloc);
708
+ const len0 = WASM_VECTOR_LEN;
709
+ const ret = wasm.externalsparksignerhandle_signAuthenticationChallenge(this.__wbg_ptr, ptr0, len0);
710
+ return ret;
711
+ }
712
+ /**
713
+ * @param {ExternalFrostJob[]} jobs
714
+ * @returns {Promise<ExternalFrostShareResult[]>}
715
+ */
716
+ signFrost(jobs) {
717
+ const ptr0 = passArrayJsValueToWasm0(jobs, wasm.__wbindgen_malloc);
718
+ const len0 = WASM_VECTOR_LEN;
719
+ const ret = wasm.externalsparksignerhandle_signFrost(this.__wbg_ptr, ptr0, len0);
720
+ return ret;
721
+ }
722
+ /**
723
+ * @param {Uint8Array} message
724
+ * @returns {Promise<EcdsaSignatureBytes>}
725
+ */
726
+ signMessage(message) {
727
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
728
+ const len0 = WASM_VECTOR_LEN;
729
+ const ret = wasm.externalsparksignerhandle_signMessage(this.__wbg_ptr, ptr0, len0);
653
730
  return ret;
654
731
  }
655
732
  /**
656
- * @param {ExternalSecretSource} signing_key
657
- * @param {ExternalSecretSource} new_signing_key
658
- * @returns {Promise<ExternalSecretSource>}
733
+ * @param {ExternalSignSparkInvoiceRequest} request
734
+ * @returns {Promise<ExternalSignedSparkInvoice>}
735
+ */
736
+ signSparkInvoice(request) {
737
+ const ret = wasm.externalsparksignerhandle_signSparkInvoice(this.__wbg_ptr, request);
738
+ return ret;
739
+ }
740
+ /**
741
+ * @param {ExternalSignStaticDepositRefundRequest} request
742
+ * @returns {Promise<ExternalFrostSignature>}
659
743
  */
660
- subtractSecrets(signing_key, new_signing_key) {
661
- const ret = wasm.defaultsigner_subtractSecrets(this.__wbg_ptr, signing_key, new_signing_key);
744
+ signStaticDepositRefund(request) {
745
+ const ret = wasm.externalsparksignerhandle_signStaticDepositRefund(this.__wbg_ptr, request);
746
+ return ret;
747
+ }
748
+ /**
749
+ * @param {ExternalStartStaticDepositRefundRequest} request
750
+ * @returns {Promise<ExternalStartedStaticDepositRefund>}
751
+ */
752
+ startStaticDepositRefund(request) {
753
+ const ret = wasm.externalsparksignerhandle_startStaticDepositRefund(this.__wbg_ptr, request);
662
754
  return ret;
663
755
  }
664
756
  }
665
- if (Symbol.dispose) DefaultSigner.prototype[Symbol.dispose] = DefaultSigner.prototype.free;
757
+ if (Symbol.dispose) ExternalSparkSignerHandle.prototype[Symbol.dispose] = ExternalSparkSignerHandle.prototype.free;
666
758
 
667
759
  export class IntoUnderlyingByteSource {
668
760
  __destroy_into_raw() {
@@ -776,140 +868,122 @@ export class IntoUnderlyingSource {
776
868
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
777
869
 
778
870
  /**
779
- * A shareable `MySQL` connection pool. See
780
- * [`PostgresConnectionPool`](super::postgres_pool::PostgresConnectionPool)
781
- * for sharing semantics and lifecycle.
871
+ * High-level orchestrator that collapses register / sign-in flows
872
+ * into single calls. See the matching Rust types for full semantics;
873
+ * the JS surface is a thin wasm-bindgen wrapper.
782
874
  */
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
- }
875
+ export class PasskeyClient {
790
876
  __destroy_into_raw() {
791
877
  const ptr = this.__wbg_ptr;
792
878
  this.__wbg_ptr = 0;
793
- MysqlConnectionPoolFinalization.unregister(this);
879
+ PasskeyClientFinalization.unregister(this);
794
880
  return ptr;
795
881
  }
796
882
  free() {
797
883
  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);
884
+ wasm.__wbg_passkeyclient_free(ptr, 0);
819
885
  }
820
886
  /**
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>}
887
+ * One-shot capability probe (PRF support + domain association)
888
+ * hosts can gate UX on.
889
+ * @returns {Promise<PasskeyAvailability>}
828
890
  */
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);
891
+ checkAvailability() {
892
+ const ret = wasm.passkeyclient_checkAvailability(this.__wbg_ptr);
833
893
  return ret;
834
894
  }
835
895
  /**
836
- * Check if passkey PRF is available on this device.
837
- * @returns {Promise<boolean>}
896
+ * Label sub-object. List / publish labels for this passkey's identity.
897
+ * @returns {PasskeyLabels}
838
898
  */
839
- isAvailable() {
840
- const ret = wasm.passkey_isAvailable(this.__wbg_ptr);
841
- return ret;
899
+ labels() {
900
+ const ret = wasm.passkeyclient_labels(this.__wbg_ptr);
901
+ return PasskeyLabels.__wrap(ret);
842
902
  }
843
903
  /**
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[]>}
904
+ * Create a `PasskeyClient` backed by the supplied `PrfProvider` and
905
+ * the default Nostr-backed label store. `breezApiKey` enables
906
+ * authenticated (NIP-42) relay access for label storage; omit for
907
+ * public relays only.
908
+ * @param {PrfProvider} prf_provider
909
+ * @param {string | null} [breez_api_key]
910
+ * @param {PasskeyConfig | null} [config]
848
911
  */
849
- listLabels() {
850
- const ret = wasm.passkey_listLabels(this.__wbg_ptr);
851
- return ret;
912
+ constructor(prf_provider, breez_api_key, config) {
913
+ var ptr0 = isLikeNone(breez_api_key) ? 0 : passStringToWasm0(breez_api_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
914
+ var len0 = WASM_VECTOR_LEN;
915
+ const ret = wasm.passkeyclient_new(prf_provider, ptr0, len0, isLikeNone(config) ? 0 : addToExternrefTable0(config));
916
+ this.__wbg_ptr = ret;
917
+ PasskeyClientFinalization.register(this, this.__wbg_ptr, this);
918
+ return this;
852
919
  }
853
920
  /**
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]
921
+ * First-time setup. Drives the platform's create-passkey ceremony
922
+ * then derives the wallet seed in the same PRF assertion ceremony
923
+ * where the platform supports it.
924
+ * @param {RegisterRequest} request
925
+ * @returns {Promise<RegisterResponse>}
860
926
  */
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;
927
+ register(request) {
928
+ const ret = wasm.passkeyclient_register(this.__wbg_ptr, request);
929
+ return ret;
866
930
  }
867
931
  /**
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>}
932
+ * Returning-user sign-in. With `label` set, uses the fast path
933
+ * (one ceremony, no Nostr round-trip). With `label` omitted,
934
+ * derives the default-label wallet and discovers the user's
935
+ * label set in the same ceremony.
936
+ * @param {SignInRequest} request
937
+ * @returns {Promise<SignInResponse>}
874
938
  */
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);
939
+ signIn(request) {
940
+ const ret = wasm.passkeyclient_signIn(this.__wbg_ptr, request);
879
941
  return ret;
880
942
  }
881
943
  }
882
- if (Symbol.dispose) Passkey.prototype[Symbol.dispose] = Passkey.prototype.free;
944
+ if (Symbol.dispose) PasskeyClient.prototype[Symbol.dispose] = PasskeyClient.prototype.free;
883
945
 
884
946
  /**
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.
947
+ * Label sub-object surfaced from `PasskeyClient.labels()`.
893
948
  */
894
- export class PostgresConnectionPool {
949
+ export class PasskeyLabels {
895
950
  static __wrap(ptr) {
896
- const obj = Object.create(PostgresConnectionPool.prototype);
951
+ const obj = Object.create(PasskeyLabels.prototype);
897
952
  obj.__wbg_ptr = ptr;
898
- PostgresConnectionPoolFinalization.register(obj, obj.__wbg_ptr, obj);
953
+ PasskeyLabelsFinalization.register(obj, obj.__wbg_ptr, obj);
899
954
  return obj;
900
955
  }
901
956
  __destroy_into_raw() {
902
957
  const ptr = this.__wbg_ptr;
903
958
  this.__wbg_ptr = 0;
904
- PostgresConnectionPoolFinalization.unregister(this);
959
+ PasskeyLabelsFinalization.unregister(this);
905
960
  return ptr;
906
961
  }
907
962
  free() {
908
963
  const ptr = this.__destroy_into_raw();
909
- wasm.__wbg_postgresconnectionpool_free(ptr, 0);
964
+ wasm.__wbg_passkeylabels_free(ptr, 0);
965
+ }
966
+ /**
967
+ * List labels published for this passkey's identity.
968
+ * @returns {Promise<string[]>}
969
+ */
970
+ list() {
971
+ const ret = wasm.passkeylabels_list(this.__wbg_ptr);
972
+ return ret;
973
+ }
974
+ /**
975
+ * Idempotently publish `label` for this passkey's identity.
976
+ * @param {string} label
977
+ * @returns {Promise<void>}
978
+ */
979
+ store(label) {
980
+ const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
981
+ const len0 = WASM_VECTOR_LEN;
982
+ const ret = wasm.passkeylabels_store(this.__wbg_ptr, ptr0, len0);
983
+ return ret;
910
984
  }
911
985
  }
912
- if (Symbol.dispose) PostgresConnectionPool.prototype[Symbol.dispose] = PostgresConnectionPool.prototype.free;
986
+ if (Symbol.dispose) PasskeyLabels.prototype[Symbol.dispose] = PasskeyLabels.prototype.free;
913
987
 
914
988
  export class SdkBuilder {
915
989
  static __wrap(ptr) {
@@ -947,11 +1021,21 @@ export class SdkBuilder {
947
1021
  }
948
1022
  /**
949
1023
  * @param {Config} config
950
- * @param {ExternalSigner} signer
1024
+ * @param {ExternalBreezSigner} breez_signer
1025
+ * @param {ExternalSparkSigner} spark_signer
1026
+ * @returns {SdkBuilder}
1027
+ */
1028
+ static newWithSigner(config, breez_signer, spark_signer) {
1029
+ const ret = wasm.sdkbuilder_newWithSigner(config, breez_signer, spark_signer);
1030
+ return SdkBuilder.__wrap(ret);
1031
+ }
1032
+ /**
1033
+ * @param {number} account_number
951
1034
  * @returns {SdkBuilder}
952
1035
  */
953
- static newWithSigner(config, signer) {
954
- const ret = wasm.sdkbuilder_newWithSigner(config, signer);
1036
+ withAccountNumber(account_number) {
1037
+ const ptr = this.__destroy_into_raw();
1038
+ const ret = wasm.sdkbuilder_withAccountNumber(ptr, account_number);
955
1039
  return SdkBuilder.__wrap(ret);
956
1040
  }
957
1041
  /**
@@ -983,15 +1067,6 @@ export class SdkBuilder {
983
1067
  const ret = wasm.sdkbuilder_withFiatService(ptr, fiat_service);
984
1068
  return SdkBuilder.__wrap(ret);
985
1069
  }
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
1070
  /**
996
1071
  * @param {RestClient} lnurl_client
997
1072
  * @returns {SdkBuilder}
@@ -1002,8 +1077,7 @@ export class SdkBuilder {
1002
1077
  return SdkBuilder.__wrap(ret);
1003
1078
  }
1004
1079
  /**
1005
- * **Deprecated.** Call `createMysqlConnectionPool(config)` and
1006
- * `withMysqlConnectionPool(pool)` instead.
1080
+ * **Deprecated.** Use `withStorageBackend(mysqlStorage(config))`.
1007
1081
  * @param {MysqlStorageConfig} config
1008
1082
  * @returns {SdkBuilder}
1009
1083
  */
@@ -1015,20 +1089,6 @@ export class SdkBuilder {
1015
1089
  }
1016
1090
  return SdkBuilder.__wrap(ret[0]);
1017
1091
  }
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
1092
  /**
1033
1093
  * @param {PaymentObserver} payment_observer
1034
1094
  * @returns {SdkBuilder}
@@ -1039,8 +1099,7 @@ export class SdkBuilder {
1039
1099
  return SdkBuilder.__wrap(ret);
1040
1100
  }
1041
1101
  /**
1042
- * **Deprecated.** Call `createPostgresConnectionPool(config)` and
1043
- * `withPostgresConnectionPool(pool)` instead.
1102
+ * **Deprecated.** Use `withStorageBackend(postgresStorage(config))`.
1044
1103
  * @param {PostgresStorageConfig} config
1045
1104
  * @returns {SdkBuilder}
1046
1105
  */
@@ -1052,20 +1111,6 @@ export class SdkBuilder {
1052
1111
  }
1053
1112
  return SdkBuilder.__wrap(ret[0]);
1054
1113
  }
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
1114
  /**
1070
1115
  * @param {string} url
1071
1116
  * @param {ChainApiType} api_type
@@ -1103,6 +1148,21 @@ export class SdkBuilder {
1103
1148
  const ret = wasm.sdkbuilder_withStorage(ptr, storage);
1104
1149
  return SdkBuilder.__wrap(ret);
1105
1150
  }
1151
+ /**
1152
+ * Sets one of the SDK's built-in storage backends.
1153
+ *
1154
+ * Construct the [`WasmStorageConfig`] via `defaultStorage`,
1155
+ * `postgresStorage` or `mysqlStorage`.
1156
+ * @param {WasmStorageConfig} config
1157
+ * @returns {SdkBuilder}
1158
+ */
1159
+ withStorageBackend(config) {
1160
+ const ptr = this.__destroy_into_raw();
1161
+ _assertClass(config, WasmStorageConfig);
1162
+ var ptr0 = config.__destroy_into_raw();
1163
+ const ret = wasm.sdkbuilder_withStorageBackend(ptr, ptr0);
1164
+ return SdkBuilder.__wrap(ret);
1165
+ }
1106
1166
  }
1107
1167
  if (Symbol.dispose) SdkBuilder.prototype[Symbol.dispose] = SdkBuilder.prototype.free;
1108
1168
 
@@ -1207,6 +1267,32 @@ export class WasmSdkContext {
1207
1267
  }
1208
1268
  if (Symbol.dispose) WasmSdkContext.prototype[Symbol.dispose] = WasmSdkContext.prototype.free;
1209
1269
 
1270
+ /**
1271
+ * Selects one of the SDK's built-in storage backends.
1272
+ *
1273
+ * Construct it via `defaultStorage`, `postgresStorage` or `mysqlStorage` and
1274
+ * pass it to `SdkBuilder.withStorageBackend`.
1275
+ */
1276
+ export class WasmStorageConfig {
1277
+ static __wrap(ptr) {
1278
+ const obj = Object.create(WasmStorageConfig.prototype);
1279
+ obj.__wbg_ptr = ptr;
1280
+ WasmStorageConfigFinalization.register(obj, obj.__wbg_ptr, obj);
1281
+ return obj;
1282
+ }
1283
+ __destroy_into_raw() {
1284
+ const ptr = this.__wbg_ptr;
1285
+ this.__wbg_ptr = 0;
1286
+ WasmStorageConfigFinalization.unregister(this);
1287
+ return ptr;
1288
+ }
1289
+ free() {
1290
+ const ptr = this.__destroy_into_raw();
1291
+ wasm.__wbg_wasmstorageconfig_free(ptr, 0);
1292
+ }
1293
+ }
1294
+ if (Symbol.dispose) WasmStorageConfig.prototype[Symbol.dispose] = WasmStorageConfig.prototype.free;
1295
+
1210
1296
  /**
1211
1297
  * @param {ConnectRequest} request
1212
1298
  * @returns {Promise<BreezSdk>}
@@ -1218,41 +1304,28 @@ export function connect(request) {
1218
1304
 
1219
1305
  /**
1220
1306
  * @param {Config} config
1221
- * @param {ExternalSigner} signer
1307
+ * @param {ExternalBreezSigner} breez_signer
1308
+ * @param {ExternalSparkSigner} spark_signer
1222
1309
  * @param {string} storage_dir
1223
1310
  * @returns {Promise<BreezSdk>}
1224
1311
  */
1225
- export function connectWithSigner(config, signer, storage_dir) {
1312
+ export function connectWithSigner(config, breez_signer, spark_signer, storage_dir) {
1226
1313
  const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1227
1314
  const len0 = WASM_VECTOR_LEN;
1228
- const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
1315
+ const ret = wasm.connectWithSigner(config, breez_signer, spark_signer, ptr0, len0);
1229
1316
  return ret;
1230
1317
  }
1231
1318
 
1232
1319
  /**
1233
- * Creates a shareable `MySQL` connection pool from the given config.
1234
- * @param {MysqlStorageConfig} config
1235
- * @returns {MysqlConnectionPool}
1236
- */
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}
1320
+ * Builds the Turnkey-backed signers from `config`, then pass
1321
+ * `signers.breezSigner` and `signers.sparkSigner` to `connectWithSigner`,
1322
+ * exactly as with any other external signer.
1323
+ * @param {TurnkeyConfig} config
1324
+ * @returns {Promise<ExternalSigners>}
1249
1325
  */
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]);
1326
+ export function createTurnkeySigner(config) {
1327
+ const ret = wasm.createTurnkeySigner(config);
1328
+ return ret;
1256
1329
  }
1257
1330
 
1258
1331
  /**
@@ -1265,22 +1338,26 @@ export function defaultConfig(network) {
1265
1338
  }
1266
1339
 
1267
1340
  /**
1341
+ * Creates the default external signers from a mnemonic phrase.
1342
+ *
1343
+ * Key derivation matches the seed-based connect path: an SDK built either
1344
+ * way from the same mnemonic is the same wallet.
1268
1345
  * @param {string} mnemonic
1269
1346
  * @param {string | null | undefined} passphrase
1270
1347
  * @param {Network} network
1271
- * @param {KeySetConfig | null} [key_set_config]
1272
- * @returns {DefaultSigner}
1348
+ * @param {number | null} [account_number]
1349
+ * @returns {ExternalSigners}
1273
1350
  */
1274
- export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
1351
+ export function defaultExternalSigners(mnemonic, passphrase, network, account_number) {
1275
1352
  const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1276
1353
  const len0 = WASM_VECTOR_LEN;
1277
1354
  var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1278
1355
  var len1 = WASM_VECTOR_LEN;
1279
- const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
1356
+ const ret = wasm.defaultExternalSigners(ptr0, len0, ptr1, len1, network, isLikeNone(account_number) ? Number.MAX_SAFE_INTEGER : (account_number) >>> 0);
1280
1357
  if (ret[2]) {
1281
1358
  throw takeFromExternrefTable0(ret[1]);
1282
1359
  }
1283
- return DefaultSigner.__wrap(ret[0]);
1360
+ return ExternalSigners.__wrap(ret[0]);
1284
1361
  }
1285
1362
 
1286
1363
  /**
@@ -1328,9 +1405,19 @@ export function defaultServerConfig(network) {
1328
1405
  }
1329
1406
 
1330
1407
  /**
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`.
1408
+ * File-based storage rooted at `storageDir` IndexedDB in the browser,
1409
+ * SQLite under Node.js.
1410
+ * @param {string} storage_dir
1411
+ * @returns {WasmStorageConfig}
1412
+ */
1413
+ export function defaultStorage(storage_dir) {
1414
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1415
+ const len0 = WASM_VECTOR_LEN;
1416
+ const ret = wasm.defaultStorage(ptr0, len0);
1417
+ return WasmStorageConfig.__wrap(ret);
1418
+ }
1419
+
1420
+ /**
1334
1421
  * @returns {Promise<SparkStatus>}
1335
1422
  */
1336
1423
  export function getSparkStatus() {
@@ -1350,6 +1437,16 @@ export function initLogging(logger, filter) {
1350
1437
  return ret;
1351
1438
  }
1352
1439
 
1440
+ /**
1441
+ * `MySQL`-backed storage built from `config`.
1442
+ * @param {MysqlStorageConfig} config
1443
+ * @returns {WasmStorageConfig}
1444
+ */
1445
+ export function mysqlStorage(config) {
1446
+ const ret = wasm.mysqlStorage(config);
1447
+ return WasmStorageConfig.__wrap(ret);
1448
+ }
1449
+
1353
1450
  /**
1354
1451
  * Constructs a shareable REST-based Bitcoin chain service.
1355
1452
  *
@@ -1381,6 +1478,16 @@ export function newSharedSdkContext(config) {
1381
1478
  return ret;
1382
1479
  }
1383
1480
 
1481
+ /**
1482
+ * `PostgreSQL`-backed storage built from `config`.
1483
+ * @param {PostgresStorageConfig} config
1484
+ * @returns {WasmStorageConfig}
1485
+ */
1486
+ export function postgresStorage(config) {
1487
+ const ret = wasm.postgresStorage(config);
1488
+ return WasmStorageConfig.__wrap(ret);
1489
+ }
1490
+
1384
1491
  /**
1385
1492
  * Entry point invoked by JavaScript in a worker.
1386
1493
  * @param {number} ptr
@@ -1522,13 +1629,19 @@ function __wbg_get_imports() {
1522
1629
  const ret = arg0.addLeaves(arg1);
1523
1630
  return ret;
1524
1631
  }, arguments); },
1525
- __wbg_aggregateFrost_8eb928d3bf25ad91: function() { return handleError(function (arg0, arg1) {
1526
- const ret = arg0.aggregateFrost(arg1);
1632
+ __wbg_afterSend_465a6d26048f7342: function() { return handleError(function (arg0, arg1, arg2) {
1633
+ var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice();
1634
+ wasm.__wbindgen_free(arg1, arg2 * 4, 4);
1635
+ const ret = arg0.afterSend(v0);
1527
1636
  return ret;
1528
1637
  }, arguments); },
1529
1638
  __wbg_append_8df396311184f750: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1530
1639
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1531
1640
  }, arguments); },
1641
+ __wbg_applyPaymentUpdate_8526d773e5ac8314: function() { return handleError(function (arg0, arg1) {
1642
+ const ret = arg0.applyPaymentUpdate(arg1);
1643
+ return ret;
1644
+ }, arguments); },
1532
1645
  __wbg_arrayBuffer_87e3ac06d961f7a0: function() { return handleError(function (arg0) {
1533
1646
  const ret = arg0.arrayBuffer();
1534
1647
  return ret;
@@ -1652,8 +1765,8 @@ function __wbg_get_imports() {
1652
1765
  const ret = createMysqlPool(arg0);
1653
1766
  return ret;
1654
1767
  }, 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);
1768
+ __wbg_createMysqlSessionStoreWithPool_52192c9b2932ff7c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1769
+ const ret = createMysqlSessionStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1657
1770
  return ret;
1658
1771
  }, arguments); },
1659
1772
  __wbg_createMysqlStorageWithPool_22d23b0d068eae47: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
@@ -1668,12 +1781,16 @@ function __wbg_get_imports() {
1668
1781
  const ret = createMysqlTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4, arg5 !== 0);
1669
1782
  return ret;
1670
1783
  }, arguments); },
1784
+ __wbg_createPasskey_5ceae054474c582a: function() { return handleError(function (arg0, arg1) {
1785
+ const ret = arg0.createPasskey(arg1);
1786
+ return ret;
1787
+ }, arguments); },
1671
1788
  __wbg_createPostgresPool_3c396c7ab2f0eab2: function() { return handleError(function (arg0) {
1672
1789
  const ret = createPostgresPool(arg0);
1673
1790
  return ret;
1674
1791
  }, 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);
1792
+ __wbg_createPostgresSessionStoreWithPool_dd76c7c3517d7bd0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1793
+ const ret = createPostgresSessionStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1677
1794
  return ret;
1678
1795
  }, arguments); },
1679
1796
  __wbg_createPostgresStorageWithPool_9408116e32ab58f8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
@@ -1696,6 +1813,20 @@ function __wbg_get_imports() {
1696
1813
  const ret = arg0.data;
1697
1814
  return ret;
1698
1815
  },
1816
+ __wbg_decryptEcies_ebe426814020926b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1817
+ let deferred1_0;
1818
+ let deferred1_1;
1819
+ try {
1820
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1821
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1822
+ deferred1_0 = arg3;
1823
+ deferred1_1 = arg4;
1824
+ const ret = arg0.decryptEcies(v0, getStringFromWasm0(arg3, arg4));
1825
+ return ret;
1826
+ } finally {
1827
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1828
+ }
1829
+ }, arguments); },
1699
1830
  __wbg_deleteCachedItem_b8fbe3ebea21ed7e: function() { return handleError(function (arg0, arg1, arg2) {
1700
1831
  let deferred0_0;
1701
1832
  let deferred0_1;
@@ -1749,19 +1880,7 @@ function __wbg_get_imports() {
1749
1880
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1750
1881
  }
1751
1882
  }, 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) {
1883
+ __wbg_derivePublicKey_1bc53f60dc792488: function() { return handleError(function (arg0, arg1, arg2) {
1765
1884
  let deferred0_0;
1766
1885
  let deferred0_1;
1767
1886
  try {
@@ -1773,25 +1892,15 @@ function __wbg_get_imports() {
1773
1892
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1774
1893
  }
1775
1894
  }, arguments); },
1895
+ __wbg_deriveSeeds_5c331613e2894c56: function() { return handleError(function (arg0, arg1, arg2) {
1896
+ const ret = arg0.deriveSeeds(arg1, arg2);
1897
+ return ret;
1898
+ }, arguments); },
1776
1899
  __wbg_done_b1afd6201ac045e0: function(arg0) {
1777
1900
  const ret = arg0.done;
1778
1901
  return ret;
1779
1902
  },
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) {
1903
+ __wbg_encryptEcies_6a990da1c19d1f7c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1795
1904
  let deferred1_0;
1796
1905
  let deferred1_1;
1797
1906
  try {
@@ -1799,16 +1908,12 @@ function __wbg_get_imports() {
1799
1908
  wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1800
1909
  deferred1_0 = arg3;
1801
1910
  deferred1_1 = arg4;
1802
- const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
1911
+ const ret = arg0.encryptEcies(v0, getStringFromWasm0(arg3, arg4));
1803
1912
  return ret;
1804
1913
  } finally {
1805
1914
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1806
1915
  }
1807
1916
  }, 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
1917
  __wbg_enqueue_6c7cd543c0f3828e: function() { return handleError(function (arg0, arg1) {
1813
1918
  arg0.enqueue(arg1);
1814
1919
  }, arguments); },
@@ -1819,6 +1924,10 @@ function __wbg_get_imports() {
1819
1924
  __wbg_error_145dadf4216d70bc: function(arg0, arg1) {
1820
1925
  console.error(getStringFromWasm0(arg0, arg1));
1821
1926
  },
1927
+ __wbg_externalsigners_new: function(arg0) {
1928
+ const ret = ExternalSigners.__wrap(arg0);
1929
+ return ret;
1930
+ },
1822
1931
  __wbg_fetchFiatCurrencies_8afa0468f01bf013: function() { return handleError(function (arg0) {
1823
1932
  const ret = arg0.fetchFiatCurrencies();
1824
1933
  return ret;
@@ -1867,14 +1976,10 @@ function __wbg_get_imports() {
1867
1976
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1868
1977
  }
1869
1978
  }, arguments); },
1870
- __wbg_generateFrostSigningCommitments_1e8b83b2bed675c9: function() { return handleError(function (arg0) {
1871
- const ret = arg0.generateFrostSigningCommitments();
1979
+ __wbg_from_ff141b1e4c69b979: function(arg0) {
1980
+ const ret = Array.from(arg0);
1872
1981
  return ret;
1873
- }, arguments); },
1874
- __wbg_generateRandomSecret_432432761a2594b7: function() { return handleError(function (arg0) {
1875
- const ret = arg0.generateRandomSecret();
1876
- return ret;
1877
- }, arguments); },
1982
+ },
1878
1983
  __wbg_getAddressUtxos_9526b6d8078b867e: function() { return handleError(function (arg0, arg1, arg2) {
1879
1984
  let deferred0_0;
1880
1985
  let deferred0_1;
@@ -1915,6 +2020,10 @@ function __wbg_get_imports() {
1915
2020
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1916
2021
  }
1917
2022
  }, arguments); },
2023
+ __wbg_getIdentityPublicKey_c6fcd87d66ed6927: function() { return handleError(function (arg0) {
2024
+ const ret = arg0.getIdentityPublicKey();
2025
+ return ret;
2026
+ }, arguments); },
1918
2027
  __wbg_getLeaves_5259dc2b9de80ff0: function() { return handleError(function (arg0) {
1919
2028
  const ret = arg0.getLeaves();
1920
2029
  return ret;
@@ -1949,12 +2058,8 @@ function __wbg_get_imports() {
1949
2058
  const ret = arg0.getPaymentsByParentIds(v0);
1950
2059
  return ret;
1951
2060
  }, 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);
2061
+ __wbg_getPublicKeyForLeaf_9826724c9b0c3963: function() { return handleError(function (arg0, arg1) {
2062
+ const ret = arg0.getPublicKeyForLeaf(arg1);
1958
2063
  return ret;
1959
2064
  }, arguments); },
1960
2065
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
@@ -1979,7 +2084,7 @@ function __wbg_get_imports() {
1979
2084
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1980
2085
  }
1981
2086
  }, arguments); },
1982
- __wbg_getSession_05b1be4bb146adcf: function() { return handleError(function (arg0, arg1, arg2) {
2087
+ __wbg_getSession_95998cc236a30653: function() { return handleError(function (arg0, arg1, arg2) {
1983
2088
  let deferred0_0;
1984
2089
  let deferred0_1;
1985
2090
  try {
@@ -1991,18 +2096,10 @@ function __wbg_get_imports() {
1991
2096
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1992
2097
  }
1993
2098
  }, 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) {
2099
+ __wbg_getStaticDepositPublicKey_9c7c893612c4c53f: function() { return handleError(function (arg0, arg1) {
1999
2100
  const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
2000
2101
  return ret;
2001
2102
  }, arguments); },
2002
- __wbg_getStaticDepositSecretSource_86007c41c79d2bea: function() { return handleError(function (arg0, arg1) {
2003
- const ret = arg0.getStaticDepositSecretSource(arg1 >>> 0);
2004
- return ret;
2005
- }, arguments); },
2006
2103
  __wbg_getTokenBalances_b788cda26e92f342: function() { return handleError(function (arg0) {
2007
2104
  const ret = arg0.getTokenBalances();
2008
2105
  return ret;
@@ -2035,6 +2132,10 @@ function __wbg_get_imports() {
2035
2132
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2036
2133
  }
2037
2134
  }, arguments); },
2135
+ __wbg_get_41476db20fef99a8: function() { return handleError(function (arg0, arg1) {
2136
+ const ret = Reflect.get(arg0, arg1);
2137
+ return ret;
2138
+ }, arguments); },
2038
2139
  __wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
2039
2140
  const ret = arg0[arg1 >>> 0];
2040
2141
  return ret;
@@ -2067,7 +2168,7 @@ function __wbg_get_imports() {
2067
2168
  const ret = arg0.headers;
2068
2169
  return ret;
2069
2170
  },
2070
- __wbg_hmacSha256_44b56787dc85796b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2171
+ __wbg_hmacSha256_04164bea6bd3c7d4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2071
2172
  let deferred1_0;
2072
2173
  let deferred1_1;
2073
2174
  try {
@@ -2081,10 +2182,6 @@ function __wbg_get_imports() {
2081
2182
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2082
2183
  }
2083
2184
  }, arguments); },
2084
- __wbg_identityPublicKey_157f9d906d49e5c4: function() { return handleError(function (arg0) {
2085
- const ret = arg0.identityPublicKey();
2086
- return ret;
2087
- }, arguments); },
2088
2185
  __wbg_insertContact_cc39397cb8e88ff8: function() { return handleError(function (arg0, arg1) {
2089
2186
  const ret = arg0.insertContact(arg1);
2090
2187
  return ret;
@@ -2101,10 +2198,6 @@ function __wbg_get_imports() {
2101
2198
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2102
2199
  }
2103
2200
  }, arguments); },
2104
- __wbg_insertPayment_830c37c6efef1f8a: function() { return handleError(function (arg0, arg1) {
2105
- const ret = arg0.insertPayment(arg1);
2106
- return ret;
2107
- }, arguments); },
2108
2201
  __wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
2109
2202
  let result;
2110
2203
  try {
@@ -2189,14 +2282,14 @@ function __wbg_get_imports() {
2189
2282
  const ret = Array.isArray(arg0);
2190
2283
  return ret;
2191
2284
  },
2192
- __wbg_isPrfAvailable_f77f283e48e966e1: function() { return handleError(function (arg0) {
2193
- const ret = arg0.isPrfAvailable();
2194
- return ret;
2195
- }, arguments); },
2196
2285
  __wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
2197
2286
  const ret = Number.isSafeInteger(arg0);
2198
2287
  return ret;
2199
2288
  },
2289
+ __wbg_isSupported_0fab0220495a1089: function() { return handleError(function (arg0) {
2290
+ const ret = arg0.isSupported();
2291
+ return ret;
2292
+ }, arguments); },
2200
2293
  __wbg_iterator_9d68985a1d096fc2: function() {
2201
2294
  const ret = Symbol.iterator;
2202
2295
  return ret;
@@ -2397,6 +2490,30 @@ function __wbg_get_imports() {
2397
2490
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2398
2491
  }
2399
2492
  }, arguments); },
2493
+ __wbg_prepareClaim_1286899715876e7d: function() { return handleError(function (arg0, arg1) {
2494
+ const ret = arg0.prepareClaim(arg1);
2495
+ return ret;
2496
+ }, arguments); },
2497
+ __wbg_prepareLightningReceive_fe5b5a46a5d5d976: function() { return handleError(function (arg0, arg1) {
2498
+ const ret = arg0.prepareLightningReceive(arg1);
2499
+ return ret;
2500
+ }, arguments); },
2501
+ __wbg_prepareStaticDepositClaim_2aac4f9634448525: function() { return handleError(function (arg0, arg1) {
2502
+ const ret = arg0.prepareStaticDepositClaim(arg1);
2503
+ return ret;
2504
+ }, arguments); },
2505
+ __wbg_prepareStaticDeposit_66175a4078320749: function() { return handleError(function (arg0, arg1) {
2506
+ const ret = arg0.prepareStaticDeposit(arg1);
2507
+ return ret;
2508
+ }, arguments); },
2509
+ __wbg_prepareTokenTransaction_d2e097f1363077c0: function() { return handleError(function (arg0, arg1) {
2510
+ const ret = arg0.prepareTokenTransaction(arg1);
2511
+ return ret;
2512
+ }, arguments); },
2513
+ __wbg_prepareTransfer_f1fd01fccd18c85b: function() { return handleError(function (arg0, arg1) {
2514
+ const ret = arg0.prepareTransfer(arg1);
2515
+ return ret;
2516
+ }, arguments); },
2400
2517
  __wbg_process_44c7a14e11e9f69e: function(arg0) {
2401
2518
  const ret = arg0.process;
2402
2519
  return ret;
@@ -2404,6 +2521,10 @@ function __wbg_get_imports() {
2404
2521
  __wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
2405
2522
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2406
2523
  },
2524
+ __wbg_push_60a5366c0bb22a7d: function(arg0, arg1) {
2525
+ const ret = arg0.push(arg1);
2526
+ return ret;
2527
+ },
2407
2528
  __wbg_queueMicrotask_40ac6ffc2848ba77: function(arg0) {
2408
2529
  queueMicrotask(arg0);
2409
2530
  },
@@ -2501,7 +2622,7 @@ function __wbg_get_imports() {
2501
2622
  const ret = arg0.setLnurlMetadata(v0);
2502
2623
  return ret;
2503
2624
  }, arguments); },
2504
- __wbg_setSession_35cb471ae7537391: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2625
+ __wbg_setSession_86d7fef1f452677c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2505
2626
  let deferred0_0;
2506
2627
  let deferred0_1;
2507
2628
  try {
@@ -2593,7 +2714,13 @@ function __wbg_get_imports() {
2593
2714
  __wbg_set_signal_8c5cf4c3b27bd8a8: function(arg0, arg1) {
2594
2715
  arg0.signal = arg1;
2595
2716
  },
2596
- __wbg_signEcdsaRecoverable_e1e9c5e2c8ec869f: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2717
+ __wbg_signAuthenticationChallenge_e2ea9cf87c76a6de: function() { return handleError(function (arg0, arg1, arg2) {
2718
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2719
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2720
+ const ret = arg0.signAuthenticationChallenge(v0);
2721
+ return ret;
2722
+ }, arguments); },
2723
+ __wbg_signEcdsaRecoverable_978c5526e66a433b: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2597
2724
  let deferred0_0;
2598
2725
  let deferred0_1;
2599
2726
  try {
@@ -2605,7 +2732,7 @@ function __wbg_get_imports() {
2605
2732
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2606
2733
  }
2607
2734
  }, arguments); },
2608
- __wbg_signEcdsa_99eb88e7d9907236: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2735
+ __wbg_signEcdsa_1947a1a2c8f39a16: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2609
2736
  let deferred0_0;
2610
2737
  let deferred0_1;
2611
2738
  try {
@@ -2617,11 +2744,11 @@ function __wbg_get_imports() {
2617
2744
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2618
2745
  }
2619
2746
  }, arguments); },
2620
- __wbg_signFrost_df3d96ac20619b95: function() { return handleError(function (arg0, arg1) {
2747
+ __wbg_signFrost_08951e01d00d4b1c: function() { return handleError(function (arg0, arg1) {
2621
2748
  const ret = arg0.signFrost(arg1);
2622
2749
  return ret;
2623
2750
  }, arguments); },
2624
- __wbg_signHashSchnorr_33c182cb4c2323d5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2751
+ __wbg_signHashSchnorr_fc8afda9a7ee021a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2625
2752
  let deferred1_0;
2626
2753
  let deferred1_1;
2627
2754
  try {
@@ -2635,12 +2762,26 @@ function __wbg_get_imports() {
2635
2762
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2636
2763
  }
2637
2764
  }, arguments); },
2765
+ __wbg_signMessage_80ec0b0dfc7f00ee: function() { return handleError(function (arg0, arg1, arg2) {
2766
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2767
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2768
+ const ret = arg0.signMessage(v0);
2769
+ return ret;
2770
+ }, arguments); },
2771
+ __wbg_signSparkInvoice_cca6c7f35b5e85d2: function() { return handleError(function (arg0, arg1) {
2772
+ const ret = arg0.signSparkInvoice(arg1);
2773
+ return ret;
2774
+ }, arguments); },
2775
+ __wbg_signStaticDepositRefund_3a6fb4e71a15bebd: function() { return handleError(function (arg0, arg1) {
2776
+ const ret = arg0.signStaticDepositRefund(arg1);
2777
+ return ret;
2778
+ }, arguments); },
2638
2779
  __wbg_signal_4643ce883b92b553: function(arg0) {
2639
2780
  const ret = arg0.signal;
2640
2781
  return ret;
2641
2782
  },
2642
- __wbg_splitSecretWithProofs_c9d51158a14af659: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2643
- const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
2783
+ __wbg_startStaticDepositRefund_5b591bbea22aa0d2: function() { return handleError(function (arg0, arg1) {
2784
+ const ret = arg0.startStaticDepositRefund(arg1);
2644
2785
  return ret;
2645
2786
  }, arguments); },
2646
2787
  __wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
@@ -2671,10 +2812,6 @@ function __wbg_get_imports() {
2671
2812
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2672
2813
  return ret;
2673
2814
  },
2674
- __wbg_subtractPrivateKeys_c66265ac85e781b7: function() { return handleError(function (arg0, arg1, arg2) {
2675
- const ret = arg0.subtractPrivateKeys(arg1, arg2);
2676
- return ret;
2677
- }, arguments); },
2678
2815
  __wbg_syncAddOutgoingChange_69db2a1430cbd55a: function() { return handleError(function (arg0, arg1) {
2679
2816
  const ret = arg0.syncAddOutgoingChange(arg1);
2680
2817
  return ret;
@@ -2811,48 +2948,48 @@ function __wbg_get_imports() {
2811
2948
  return ret;
2812
2949
  },
2813
2950
  __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);
2951
+ // 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`.
2952
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c);
2816
2953
  return ret;
2817
2954
  },
2818
2955
  __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`.
2956
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 348, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2820
2957
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57);
2821
2958
  return ret;
2822
2959
  },
2823
2960
  __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`.
2961
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 348, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2825
2962
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2);
2826
2963
  return ret;
2827
2964
  },
2828
2965
  __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`.
2966
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 348, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2830
2967
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3);
2831
2968
  return ret;
2832
2969
  },
2833
2970
  __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);
2971
+ // 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`.
2972
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_4);
2836
2973
  return ret;
2837
2974
  },
2838
2975
  __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);
2976
+ // 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`.
2977
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_5);
2841
2978
  return ret;
2842
2979
  },
2843
2980
  __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);
2981
+ // 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`.
2982
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_6);
2846
2983
  return ret;
2847
2984
  },
2848
2985
  __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);
2986
+ // 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`.
2987
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_7);
2851
2988
  return ret;
2852
2989
  },
2853
2990
  __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);
2991
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 353, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2992
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7);
2856
2993
  return ret;
2857
2994
  },
2858
2995
  __wbindgen_cast_000000000000000a: function(arg0) {
@@ -2895,7 +3032,7 @@ function __wbg_get_imports() {
2895
3032
  __wbindgen_cast_0000000000000011: function(arg0, arg1) {
2896
3033
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2897
3034
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2898
- // Cast intrinsic for `Vector(NamedExternref("ExternalVerifiableSecretShare")) -> Externref`.
3035
+ // Cast intrinsic for `Vector(NamedExternref("ExternalFrostShareResult")) -> Externref`.
2899
3036
  const ret = v0;
2900
3037
  return ret;
2901
3038
  },
@@ -2936,8 +3073,8 @@ function __wbg_get_imports() {
2936
3073
  };
2937
3074
  }
2938
3075
 
2939
- function wasm_bindgen__convert__closures_____invoke__h124479769cd429fd(arg0, arg1) {
2940
- wasm.wasm_bindgen__convert__closures_____invoke__h124479769cd429fd(arg0, arg1);
3076
+ function wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1) {
3077
+ wasm.wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1);
2941
3078
  }
2942
3079
 
2943
3080
  function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57(arg0, arg1, arg2) {
@@ -2952,36 +3089,36 @@ function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, a
2952
3089
  wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, arg1, arg2);
2953
3090
  }
2954
3091
 
2955
- function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21(arg0, arg1, arg2) {
2956
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21(arg0, arg1, arg2);
3092
+ function wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c(arg0, arg1, arg2) {
3093
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c(arg0, arg1, arg2);
2957
3094
  if (ret[1]) {
2958
3095
  throw takeFromExternrefTable0(ret[0]);
2959
3096
  }
2960
3097
  }
2961
3098
 
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);
3099
+ function wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_4(arg0, arg1, arg2) {
3100
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_4(arg0, arg1, arg2);
2964
3101
  if (ret[1]) {
2965
3102
  throw takeFromExternrefTable0(ret[0]);
2966
3103
  }
2967
3104
  }
2968
3105
 
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);
3106
+ function wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_5(arg0, arg1, arg2) {
3107
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_5(arg0, arg1, arg2);
2971
3108
  if (ret[1]) {
2972
3109
  throw takeFromExternrefTable0(ret[0]);
2973
3110
  }
2974
3111
  }
2975
3112
 
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);
3113
+ function wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_6(arg0, arg1, arg2) {
3114
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_6(arg0, arg1, arg2);
2978
3115
  if (ret[1]) {
2979
3116
  throw takeFromExternrefTable0(ret[0]);
2980
3117
  }
2981
3118
  }
2982
3119
 
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);
3120
+ function wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_7(arg0, arg1, arg2) {
3121
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4bd7a023e323559c_7(arg0, arg1, arg2);
2985
3122
  if (ret[1]) {
2986
3123
  throw takeFromExternrefTable0(ret[0]);
2987
3124
  }
@@ -3017,9 +3154,15 @@ const BitcoinChainServiceHandleFinalization = (typeof FinalizationRegistry === '
3017
3154
  const BreezSdkFinalization = (typeof FinalizationRegistry === 'undefined')
3018
3155
  ? { register: () => {}, unregister: () => {} }
3019
3156
  : new FinalizationRegistry(ptr => wasm.__wbg_breezsdk_free(ptr, 1));
3020
- const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
3157
+ const ExternalBreezSignerHandleFinalization = (typeof FinalizationRegistry === 'undefined')
3158
+ ? { register: () => {}, unregister: () => {} }
3159
+ : new FinalizationRegistry(ptr => wasm.__wbg_externalbreezsignerhandle_free(ptr, 1));
3160
+ const ExternalSignersFinalization = (typeof FinalizationRegistry === 'undefined')
3161
+ ? { register: () => {}, unregister: () => {} }
3162
+ : new FinalizationRegistry(ptr => wasm.__wbg_externalsigners_free(ptr, 1));
3163
+ const ExternalSparkSignerHandleFinalization = (typeof FinalizationRegistry === 'undefined')
3021
3164
  ? { register: () => {}, unregister: () => {} }
3022
- : new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr, 1));
3165
+ : new FinalizationRegistry(ptr => wasm.__wbg_externalsparksignerhandle_free(ptr, 1));
3023
3166
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
3024
3167
  ? { register: () => {}, unregister: () => {} }
3025
3168
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
@@ -3029,15 +3172,12 @@ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefin
3029
3172
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
3030
3173
  ? { register: () => {}, unregister: () => {} }
3031
3174
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
3032
- const MysqlConnectionPoolFinalization = (typeof FinalizationRegistry === 'undefined')
3175
+ const PasskeyClientFinalization = (typeof FinalizationRegistry === 'undefined')
3033
3176
  ? { register: () => {}, unregister: () => {} }
3034
- : new FinalizationRegistry(ptr => wasm.__wbg_mysqlconnectionpool_free(ptr, 1));
3035
- const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
3177
+ : new FinalizationRegistry(ptr => wasm.__wbg_passkeyclient_free(ptr, 1));
3178
+ const PasskeyLabelsFinalization = (typeof FinalizationRegistry === 'undefined')
3036
3179
  ? { 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));
3180
+ : new FinalizationRegistry(ptr => wasm.__wbg_passkeylabels_free(ptr, 1));
3041
3181
  const SdkBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
3042
3182
  ? { register: () => {}, unregister: () => {} }
3043
3183
  : new FinalizationRegistry(ptr => wasm.__wbg_sdkbuilder_free(ptr, 1));
@@ -3047,6 +3187,9 @@ const TokenIssuerFinalization = (typeof FinalizationRegistry === 'undefined')
3047
3187
  const WasmSdkContextFinalization = (typeof FinalizationRegistry === 'undefined')
3048
3188
  ? { register: () => {}, unregister: () => {} }
3049
3189
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmsdkcontext_free(ptr, 1));
3190
+ const WasmStorageConfigFinalization = (typeof FinalizationRegistry === 'undefined')
3191
+ ? { register: () => {}, unregister: () => {} }
3192
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmstorageconfig_free(ptr, 1));
3050
3193
 
3051
3194
  function addToExternrefTable0(obj) {
3052
3195
  const idx = wasm.__externref_table_alloc();
@@ -3213,6 +3356,16 @@ function passArray8ToWasm0(arg, malloc) {
3213
3356
  return ptr;
3214
3357
  }
3215
3358
 
3359
+ function passArrayJsValueToWasm0(array, malloc) {
3360
+ const ptr = malloc(array.length * 4, 4) >>> 0;
3361
+ for (let i = 0; i < array.length; i++) {
3362
+ const add = addToExternrefTable0(array[i]);
3363
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
3364
+ }
3365
+ WASM_VECTOR_LEN = array.length;
3366
+ return ptr;
3367
+ }
3368
+
3216
3369
  function passStringToWasm0(arg, malloc, realloc) {
3217
3370
  if (realloc === undefined) {
3218
3371
  const buf = cachedTextEncoder.encode(arg);