@breeztech/breez-sdk-spark 0.6.6 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,11 +222,11 @@ function debugString(val) {
222
222
  return className;
223
223
  }
224
224
  /**
225
- * @param {Network} network
226
- * @returns {Config}
225
+ * @param {ConnectRequest} request
226
+ * @returns {Promise<BreezSdk>}
227
227
  */
228
- export function defaultConfig(network) {
229
- const ret = wasm.defaultConfig(network);
228
+ export function connect(request) {
229
+ const ret = wasm.connect(request);
230
230
  return ret;
231
231
  }
232
232
 
@@ -243,11 +243,24 @@ export function initLogging(logger, filter) {
243
243
  }
244
244
 
245
245
  /**
246
- * @param {ConnectRequest} request
246
+ * @param {Config} config
247
+ * @param {ExternalSigner} signer
248
+ * @param {string} storage_dir
247
249
  * @returns {Promise<BreezSdk>}
248
250
  */
249
- export function connect(request) {
250
- const ret = wasm.connect(request);
251
+ export function connectWithSigner(config, signer, storage_dir) {
252
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
253
+ const len0 = WASM_VECTOR_LEN;
254
+ const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
255
+ return ret;
256
+ }
257
+
258
+ /**
259
+ * @param {Network} network
260
+ * @returns {Config}
261
+ */
262
+ export function defaultConfig(network) {
263
+ const ret = wasm.defaultConfig(network);
251
264
  return ret;
252
265
  }
253
266
 
@@ -256,6 +269,34 @@ function takeFromExternrefTable0(idx) {
256
269
  wasm.__externref_table_dealloc(idx);
257
270
  return value;
258
271
  }
272
+ /**
273
+ * Creates a default external signer from a mnemonic phrase.
274
+ *
275
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
276
+ * @param {string} mnemonic
277
+ * @param {string | null | undefined} passphrase
278
+ * @param {Network} network
279
+ * @param {KeySetConfig | null} [key_set_config]
280
+ * @returns {DefaultSigner}
281
+ */
282
+ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
283
+ const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
284
+ const len0 = WASM_VECTOR_LEN;
285
+ var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
286
+ var len1 = WASM_VECTOR_LEN;
287
+ const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
288
+ if (ret[2]) {
289
+ throw takeFromExternrefTable0(ret[1]);
290
+ }
291
+ return DefaultSigner.__wrap(ret[0]);
292
+ }
293
+
294
+ function passArray8ToWasm0(arg, malloc) {
295
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
296
+ getUint8ArrayMemory0().set(arg, ptr / 1);
297
+ WASM_VECTOR_LEN = arg.length;
298
+ return ptr;
299
+ }
259
300
  /**
260
301
  * Entry point invoked by JavaScript in a worker.
261
302
  * @param {number} ptr
@@ -267,16 +308,16 @@ export function task_worker_entry_point(ptr) {
267
308
  }
268
309
  }
269
310
 
270
- function __wbg_adapter_58(arg0, arg1) {
311
+ function __wbg_adapter_64(arg0, arg1) {
271
312
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdf0ebd5238280272(arg0, arg1);
272
313
  }
273
314
 
274
- function __wbg_adapter_61(arg0, arg1, arg2) {
275
- wasm.closure997_externref_shim(arg0, arg1, arg2);
315
+ function __wbg_adapter_67(arg0, arg1, arg2) {
316
+ wasm.closure1047_externref_shim(arg0, arg1, arg2);
276
317
  }
277
318
 
278
- function __wbg_adapter_282(arg0, arg1, arg2, arg3) {
279
- wasm.closure571_externref_shim(arg0, arg1, arg2, arg3);
319
+ function __wbg_adapter_349(arg0, arg1, arg2, arg3) {
320
+ wasm.closure632_externref_shim(arg0, arg1, arg2, arg3);
280
321
  }
281
322
 
282
323
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -536,6 +577,14 @@ export class BreezSdk {
536
577
  const ret = wasm.breezsdk_registerLightningAddress(this.__wbg_ptr, request);
537
578
  return ret;
538
579
  }
580
+ /**
581
+ * @param {FetchTokenConversionLimitsRequest} request
582
+ * @returns {Promise<FetchTokenConversionLimitsResponse>}
583
+ */
584
+ fetchTokenConversionLimits(request) {
585
+ const ret = wasm.breezsdk_fetchTokenConversionLimits(this.__wbg_ptr, request);
586
+ return ret;
587
+ }
539
588
  /**
540
589
  * @returns {OptimizationProgress}
541
590
  */
@@ -579,6 +628,219 @@ export class BreezSdk {
579
628
  }
580
629
  }
581
630
 
631
+ const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
632
+ ? { register: () => {}, unregister: () => {} }
633
+ : new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr >>> 0, 1));
634
+ /**
635
+ * A default signer implementation that wraps the core SDK's ExternalSigner.
636
+ * This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
637
+ */
638
+ export class DefaultSigner {
639
+
640
+ static __wrap(ptr) {
641
+ ptr = ptr >>> 0;
642
+ const obj = Object.create(DefaultSigner.prototype);
643
+ obj.__wbg_ptr = ptr;
644
+ DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
645
+ return obj;
646
+ }
647
+
648
+ __destroy_into_raw() {
649
+ const ptr = this.__wbg_ptr;
650
+ this.__wbg_ptr = 0;
651
+ DefaultSignerFinalization.unregister(this);
652
+ return ptr;
653
+ }
654
+
655
+ free() {
656
+ const ptr = this.__destroy_into_raw();
657
+ wasm.__wbg_defaultsigner_free(ptr, 0);
658
+ }
659
+ /**
660
+ * @param {Uint8Array} message
661
+ * @param {string} path
662
+ * @returns {Promise<EcdsaSignatureBytes>}
663
+ */
664
+ signEcdsa(message, path) {
665
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
666
+ const len0 = WASM_VECTOR_LEN;
667
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
668
+ const len1 = WASM_VECTOR_LEN;
669
+ const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, ptr0, len0, ptr1, len1);
670
+ return ret;
671
+ }
672
+ /**
673
+ * @param {ExternalSignFrostRequest} request
674
+ * @returns {Promise<ExternalFrostSignatureShare>}
675
+ */
676
+ signFrost(request) {
677
+ const ret = wasm.defaultsigner_signFrost(this.__wbg_ptr, request);
678
+ return ret;
679
+ }
680
+ /**
681
+ * @param {Uint8Array} message
682
+ * @param {string} path
683
+ * @returns {Promise<Uint8Array>}
684
+ */
685
+ eciesDecrypt(message, path) {
686
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
687
+ const len0 = WASM_VECTOR_LEN;
688
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
689
+ const len1 = WASM_VECTOR_LEN;
690
+ const ret = wasm.defaultsigner_eciesDecrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
691
+ return ret;
692
+ }
693
+ /**
694
+ * @param {Uint8Array} message
695
+ * @param {string} path
696
+ * @returns {Promise<Uint8Array>}
697
+ */
698
+ eciesEncrypt(message, path) {
699
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
700
+ const len0 = WASM_VECTOR_LEN;
701
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
702
+ const len1 = WASM_VECTOR_LEN;
703
+ const ret = wasm.defaultsigner_eciesEncrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
704
+ return ret;
705
+ }
706
+ /**
707
+ * @param {ExternalAggregateFrostRequest} request
708
+ * @returns {Promise<ExternalFrostSignature>}
709
+ */
710
+ aggregateFrost(request) {
711
+ const ret = wasm.defaultsigner_aggregateFrost(this.__wbg_ptr, request);
712
+ return ret;
713
+ }
714
+ /**
715
+ * @param {string} path
716
+ * @returns {Promise<PublicKeyBytes>}
717
+ */
718
+ derivePublicKey(path) {
719
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
720
+ const len0 = WASM_VECTOR_LEN;
721
+ const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
722
+ return ret;
723
+ }
724
+ /**
725
+ * @param {Uint8Array} hash
726
+ * @param {string} path
727
+ * @returns {Promise<SchnorrSignatureBytes>}
728
+ */
729
+ signHashSchnorr(hash, path) {
730
+ const ptr0 = passArray8ToWasm0(hash, wasm.__wbindgen_malloc);
731
+ const len0 = WASM_VECTOR_LEN;
732
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
733
+ const len1 = WASM_VECTOR_LEN;
734
+ const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
735
+ return ret;
736
+ }
737
+ /**
738
+ * @returns {Promise<ExternalPrivateKeySource>}
739
+ */
740
+ generateRandomKey() {
741
+ const ret = wasm.defaultsigner_generateRandomKey(this.__wbg_ptr);
742
+ return ret;
743
+ }
744
+ /**
745
+ * @returns {PublicKeyBytes}
746
+ */
747
+ identityPublicKey() {
748
+ const ret = wasm.defaultsigner_identityPublicKey(this.__wbg_ptr);
749
+ if (ret[2]) {
750
+ throw takeFromExternrefTable0(ret[1]);
751
+ }
752
+ return takeFromExternrefTable0(ret[0]);
753
+ }
754
+ /**
755
+ * @param {ExternalPrivateKeySource} signing_key
756
+ * @param {ExternalPrivateKeySource} new_signing_key
757
+ * @returns {Promise<ExternalPrivateKeySource>}
758
+ */
759
+ subtractPrivateKeys(signing_key, new_signing_key) {
760
+ const ret = wasm.defaultsigner_subtractPrivateKeys(this.__wbg_ptr, signing_key, new_signing_key);
761
+ return ret;
762
+ }
763
+ /**
764
+ * @param {Uint8Array} message
765
+ * @param {string} path
766
+ * @returns {Promise<RecoverableEcdsaSignatureBytes>}
767
+ */
768
+ signEcdsaRecoverable(message, path) {
769
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
770
+ const len0 = WASM_VECTOR_LEN;
771
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
772
+ const len1 = WASM_VECTOR_LEN;
773
+ const ret = wasm.defaultsigner_signEcdsaRecoverable(this.__wbg_ptr, ptr0, len0, ptr1, len1);
774
+ return ret;
775
+ }
776
+ /**
777
+ * @param {ExternalTreeNodeId} id
778
+ * @returns {Promise<PublicKeyBytes>}
779
+ */
780
+ getPublicKeyForNode(id) {
781
+ const ret = wasm.defaultsigner_getPublicKeyForNode(this.__wbg_ptr, id);
782
+ return ret;
783
+ }
784
+ /**
785
+ * @param {ExternalSecretToSplit} secret
786
+ * @param {number} threshold
787
+ * @param {number} num_shares
788
+ * @returns {Promise<ExternalVerifiableSecretShare[]>}
789
+ */
790
+ splitSecretWithProofs(secret, threshold, num_shares) {
791
+ const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
792
+ return ret;
793
+ }
794
+ /**
795
+ * @param {number} index
796
+ * @returns {Promise<PublicKeyBytes>}
797
+ */
798
+ getStaticDepositPublicKey(index) {
799
+ const ret = wasm.defaultsigner_getStaticDepositPublicKey(this.__wbg_ptr, index);
800
+ return ret;
801
+ }
802
+ /**
803
+ * @param {number} index
804
+ * @returns {Promise<PrivateKeyBytes>}
805
+ */
806
+ getStaticDepositPrivateKey(index) {
807
+ const ret = wasm.defaultsigner_getStaticDepositPrivateKey(this.__wbg_ptr, index);
808
+ return ret;
809
+ }
810
+ /**
811
+ * @param {ExternalEncryptedPrivateKey} private_key
812
+ * @param {PublicKeyBytes} receiver_public_key
813
+ * @returns {Promise<Uint8Array>}
814
+ */
815
+ encryptPrivateKeyForReceiver(private_key, receiver_public_key) {
816
+ const ret = wasm.defaultsigner_encryptPrivateKeyForReceiver(this.__wbg_ptr, private_key, receiver_public_key);
817
+ return ret;
818
+ }
819
+ /**
820
+ * @returns {Promise<ExternalFrostCommitments>}
821
+ */
822
+ generateFrostSigningCommitments() {
823
+ const ret = wasm.defaultsigner_generateFrostSigningCommitments(this.__wbg_ptr);
824
+ return ret;
825
+ }
826
+ /**
827
+ * @param {number} index
828
+ * @returns {Promise<ExternalPrivateKeySource>}
829
+ */
830
+ getStaticDepositPrivateKeySource(index) {
831
+ const ret = wasm.defaultsigner_getStaticDepositPrivateKeySource(this.__wbg_ptr, index);
832
+ return ret;
833
+ }
834
+ /**
835
+ * @param {ExternalPrivateKeySource} private_key
836
+ * @returns {Promise<PublicKeyBytes>}
837
+ */
838
+ getPublicKeyFromPrivateKeySource(private_key) {
839
+ const ret = wasm.defaultsigner_getPublicKeyFromPrivateKeySource(this.__wbg_ptr, private_key);
840
+ return ret;
841
+ }
842
+ }
843
+
582
844
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
583
845
  ? { register: () => {}, unregister: () => {} }
584
846
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
@@ -731,14 +993,12 @@ export class SdkBuilder {
731
993
  wasm.__wbg_sdkbuilder_free(ptr, 0);
732
994
  }
733
995
  /**
734
- * @param {KeySetType} key_set_type
735
- * @param {boolean} use_address_index
736
- * @param {number | null} [account_number]
996
+ * @param {KeySetConfig} config
737
997
  * @returns {SdkBuilder}
738
998
  */
739
- withKeySet(key_set_type, use_address_index, account_number) {
999
+ withKeySet(config) {
740
1000
  const ptr = this.__destroy_into_raw();
741
- const ret = wasm.sdkbuilder_withKeySet(ptr, key_set_type, use_address_index, isLikeNone(account_number) ? 0x100000001 : (account_number) >>> 0);
1001
+ const ret = wasm.sdkbuilder_withKeySet(ptr, config);
742
1002
  return SdkBuilder.__wrap(ret);
743
1003
  }
744
1004
  /**
@@ -750,6 +1010,15 @@ export class SdkBuilder {
750
1010
  const ret = wasm.sdkbuilder_withStorage(ptr, storage);
751
1011
  return SdkBuilder.__wrap(ret);
752
1012
  }
1013
+ /**
1014
+ * @param {Config} config
1015
+ * @param {ExternalSigner} signer
1016
+ * @returns {SdkBuilder}
1017
+ */
1018
+ static newWithSigner(config, signer) {
1019
+ const ret = wasm.sdkbuilder_newWithSigner(config, signer);
1020
+ return SdkBuilder.__wrap(ret);
1021
+ }
753
1022
  /**
754
1023
  * @param {FiatService} fiat_service
755
1024
  * @returns {SdkBuilder}
@@ -939,6 +1208,11 @@ export function __wbg_addDeposit_5b1f93e7014f1e18() { return handleError(functio
939
1208
  }
940
1209
  }, arguments) };
941
1210
 
1211
+ export function __wbg_aggregateFrost_053f2d54394422d5() { return handleError(function (arg0, arg1) {
1212
+ const ret = arg0.aggregateFrost(arg1);
1213
+ return ret;
1214
+ }, arguments) };
1215
+
942
1216
  export function __wbg_append_8c7dd8d641a5f01b() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
943
1217
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
944
1218
  }, arguments) };
@@ -1095,11 +1369,59 @@ export function __wbg_deleteRequest_7be0a74a10deac70() { return handleError(func
1095
1369
  }
1096
1370
  }, arguments) };
1097
1371
 
1372
+ export function __wbg_derivePublicKey_736fb57b6852f201() { return handleError(function (arg0, arg1, arg2) {
1373
+ let deferred0_0;
1374
+ let deferred0_1;
1375
+ try {
1376
+ deferred0_0 = arg1;
1377
+ deferred0_1 = arg2;
1378
+ const ret = arg0.derivePublicKey(getStringFromWasm0(arg1, arg2));
1379
+ return ret;
1380
+ } finally {
1381
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1382
+ }
1383
+ }, arguments) };
1384
+
1098
1385
  export function __wbg_done_769e5ede4b31c67b(arg0) {
1099
1386
  const ret = arg0.done;
1100
1387
  return ret;
1101
1388
  };
1102
1389
 
1390
+ export function __wbg_eciesDecrypt_4edc97146456d67b() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1391
+ let deferred1_0;
1392
+ let deferred1_1;
1393
+ try {
1394
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1395
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1396
+ deferred1_0 = arg3;
1397
+ deferred1_1 = arg4;
1398
+ const ret = arg0.eciesDecrypt(v0, getStringFromWasm0(arg3, arg4));
1399
+ return ret;
1400
+ } finally {
1401
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1402
+ }
1403
+ }, arguments) };
1404
+
1405
+ export function __wbg_eciesEncrypt_040d338cf1cb289f() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1406
+ let deferred1_0;
1407
+ let deferred1_1;
1408
+ try {
1409
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1410
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1411
+ deferred1_0 = arg3;
1412
+ deferred1_1 = arg4;
1413
+ const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
1414
+ return ret;
1415
+ } finally {
1416
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1417
+ }
1418
+ }, arguments) };
1419
+
1420
+ export function __wbg_encryptPrivateKeyForReceiver_6e87a5befdd3ee82() { return handleError(function (arg0, arg1, arg2) {
1421
+ const ret = arg0.encryptPrivateKeyForReceiver(arg1, arg2);
1422
+ return ret;
1423
+ }, arguments) };
1424
+
1103
1425
  export function __wbg_enqueue_bb16ba72f537dc9e() { return handleError(function (arg0, arg1) {
1104
1426
  arg0.enqueue(arg1);
1105
1427
  }, arguments) };
@@ -1143,6 +1465,16 @@ export function __wbg_fetch_f156d10be9a5c88a(arg0) {
1143
1465
  return ret;
1144
1466
  };
1145
1467
 
1468
+ export function __wbg_generateFrostSigningCommitments_3473ea4923985769() { return handleError(function (arg0) {
1469
+ const ret = arg0.generateFrostSigningCommitments();
1470
+ return ret;
1471
+ }, arguments) };
1472
+
1473
+ export function __wbg_generateRandomKey_48fd8bb84246b45f() { return handleError(function (arg0) {
1474
+ const ret = arg0.generateRandomKey();
1475
+ return ret;
1476
+ }, arguments) };
1477
+
1146
1478
  export function __wbg_getAddressUtxos_328ceb8b4a63a6da() { return handleError(function (arg0, arg1, arg2) {
1147
1479
  let deferred0_0;
1148
1480
  let deferred0_1;
@@ -1195,6 +1527,16 @@ export function __wbg_getPaymentByInvoice_afddfcbefa5508b0() { return handleErro
1195
1527
  }
1196
1528
  }, arguments) };
1197
1529
 
1530
+ export function __wbg_getPublicKeyForNode_5ddb3378904e4ad4() { return handleError(function (arg0, arg1) {
1531
+ const ret = arg0.getPublicKeyForNode(arg1);
1532
+ return ret;
1533
+ }, arguments) };
1534
+
1535
+ export function __wbg_getPublicKeyFromPrivateKeySource_1ef953e0c8c04628() { return handleError(function (arg0, arg1) {
1536
+ const ret = arg0.getPublicKeyFromPrivateKeySource(arg1);
1537
+ return ret;
1538
+ }, arguments) };
1539
+
1198
1540
  export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(function (arg0, arg1) {
1199
1541
  arg0.getRandomValues(arg1);
1200
1542
  }, arguments) };
@@ -1221,6 +1563,21 @@ export function __wbg_getRequest_4ab87a8cbe18fa22() { return handleError(functio
1221
1563
  }
1222
1564
  }, arguments) };
1223
1565
 
1566
+ export function __wbg_getStaticDepositPrivateKeySource_7b2991ed6d3d4711() { return handleError(function (arg0, arg1) {
1567
+ const ret = arg0.getStaticDepositPrivateKeySource(arg1 >>> 0);
1568
+ return ret;
1569
+ }, arguments) };
1570
+
1571
+ export function __wbg_getStaticDepositPrivateKey_c4cc635b7e2348a8() { return handleError(function (arg0, arg1) {
1572
+ const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
1573
+ return ret;
1574
+ }, arguments) };
1575
+
1576
+ export function __wbg_getStaticDepositPublicKey_86535a86c4cf3d04() { return handleError(function (arg0, arg1) {
1577
+ const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
1578
+ return ret;
1579
+ }, arguments) };
1580
+
1224
1581
  export function __wbg_getTransactionHex_973b8d0555c60f99() { return handleError(function (arg0, arg1, arg2) {
1225
1582
  let deferred0_0;
1226
1583
  let deferred0_1;
@@ -1282,6 +1639,11 @@ export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
1282
1639
  return ret;
1283
1640
  };
1284
1641
 
1642
+ export function __wbg_identityPublicKey_c8b35005055a3df0() { return handleError(function (arg0) {
1643
+ const ret = arg0.identityPublicKey();
1644
+ return ret;
1645
+ }, arguments) };
1646
+
1285
1647
  export function __wbg_insertPayment_2afe3300c5f86ccf() { return handleError(function (arg0, arg1) {
1286
1648
  const ret = arg0.insertPayment(arg1);
1287
1649
  return ret;
@@ -1446,7 +1808,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1446
1808
  const a = state0.a;
1447
1809
  state0.a = 0;
1448
1810
  try {
1449
- return __wbg_adapter_282(a, state0.b, arg0, arg1);
1811
+ return __wbg_adapter_349(a, state0.b, arg0, arg1);
1450
1812
  } finally {
1451
1813
  state0.a = a;
1452
1814
  }
@@ -1733,11 +2095,66 @@ export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
1733
2095
  arg0.signal = arg1;
1734
2096
  };
1735
2097
 
2098
+ export function __wbg_signEcdsaRecoverable_673b67f4f9ec42e7() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2099
+ let deferred1_0;
2100
+ let deferred1_1;
2101
+ try {
2102
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2103
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2104
+ deferred1_0 = arg3;
2105
+ deferred1_1 = arg4;
2106
+ const ret = arg0.signEcdsaRecoverable(v0, getStringFromWasm0(arg3, arg4));
2107
+ return ret;
2108
+ } finally {
2109
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2110
+ }
2111
+ }, arguments) };
2112
+
2113
+ export function __wbg_signEcdsa_b0be26cee51844bc() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2114
+ let deferred1_0;
2115
+ let deferred1_1;
2116
+ try {
2117
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2118
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2119
+ deferred1_0 = arg3;
2120
+ deferred1_1 = arg4;
2121
+ const ret = arg0.signEcdsa(v0, getStringFromWasm0(arg3, arg4));
2122
+ return ret;
2123
+ } finally {
2124
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2125
+ }
2126
+ }, arguments) };
2127
+
2128
+ export function __wbg_signFrost_06ac652135c4e862() { return handleError(function (arg0, arg1) {
2129
+ const ret = arg0.signFrost(arg1);
2130
+ return ret;
2131
+ }, arguments) };
2132
+
2133
+ export function __wbg_signHashSchnorr_390c51f0bbb70a7a() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2134
+ let deferred1_0;
2135
+ let deferred1_1;
2136
+ try {
2137
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2138
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2139
+ deferred1_0 = arg3;
2140
+ deferred1_1 = arg4;
2141
+ const ret = arg0.signHashSchnorr(v0, getStringFromWasm0(arg3, arg4));
2142
+ return ret;
2143
+ } finally {
2144
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2145
+ }
2146
+ }, arguments) };
2147
+
1736
2148
  export function __wbg_signal_aaf9ad74119f20a4(arg0) {
1737
2149
  const ret = arg0.signal;
1738
2150
  return ret;
1739
2151
  };
1740
2152
 
2153
+ export function __wbg_splitSecretWithProofs_1aba146de2c5eb0a() { return handleError(function (arg0, arg1, arg2, arg3) {
2154
+ const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
2155
+ return ret;
2156
+ }, arguments) };
2157
+
1741
2158
  export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
1742
2159
  const ret = typeof global === 'undefined' ? null : global;
1743
2160
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
@@ -1773,6 +2190,11 @@ export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
1773
2190
  return ret;
1774
2191
  };
1775
2192
 
2193
+ export function __wbg_subtractPrivateKeys_8b281bbbac58f672() { return handleError(function (arg0, arg1, arg2) {
2194
+ const ret = arg0.subtractPrivateKeys(arg1, arg2);
2195
+ return ret;
2196
+ }, arguments) };
2197
+
1776
2198
  export function __wbg_syncAddOutgoingChange_9d94d35ba215d3c9() { return handleError(function (arg0, arg1) {
1777
2199
  const ret = arg0.syncAddOutgoingChange(arg1);
1778
2200
  return ret;
@@ -1881,6 +2303,15 @@ export function __wbg_view_fd8a56e8983f448d(arg0) {
1881
2303
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1882
2304
  };
1883
2305
 
2306
+ export function __wbindgen_array_new() {
2307
+ const ret = [];
2308
+ return ret;
2309
+ };
2310
+
2311
+ export function __wbindgen_array_push(arg0, arg1) {
2312
+ arg0.push(arg1);
2313
+ };
2314
+
1884
2315
  export function __wbindgen_as_number(arg0) {
1885
2316
  const ret = +arg0;
1886
2317
  return ret;
@@ -1924,13 +2355,13 @@ export function __wbindgen_cb_drop(arg0) {
1924
2355
  return ret;
1925
2356
  };
1926
2357
 
1927
- export function __wbindgen_closure_wrapper11879(arg0, arg1, arg2) {
1928
- const ret = makeMutClosure(arg0, arg1, 998, __wbg_adapter_61);
2358
+ export function __wbindgen_closure_wrapper11146(arg0, arg1, arg2) {
2359
+ const ret = makeMutClosure(arg0, arg1, 812, __wbg_adapter_64);
1929
2360
  return ret;
1930
2361
  };
1931
2362
 
1932
- export function __wbindgen_closure_wrapper9947(arg0, arg1, arg2) {
1933
- const ret = makeMutClosure(arg0, arg1, 766, __wbg_adapter_58);
2363
+ export function __wbindgen_closure_wrapper13052(arg0, arg1, arg2) {
2364
+ const ret = makeMutClosure(arg0, arg1, 1048, __wbg_adapter_67);
1934
2365
  return ret;
1935
2366
  };
1936
2367
 
@@ -2044,3 +2475,10 @@ export function __wbindgen_throw(arg0, arg1) {
2044
2475
  throw new Error(getStringFromWasm0(arg0, arg1));
2045
2476
  };
2046
2477
 
2478
+ export function __wbindgen_uint8_array_new(arg0, arg1) {
2479
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2480
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2481
+ const ret = v0;
2482
+ return ret;
2483
+ };
2484
+
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_breezsdk_free: (a: number, b: number) => void;
5
+ export const __wbg_defaultsigner_free: (a: number, b: number) => void;
5
6
  export const __wbg_sdkbuilder_free: (a: number, b: number) => void;
6
7
  export const __wbg_tokenissuer_free: (a: number, b: number) => void;
7
8
  export const breezsdk_addEventListener: (a: number, b: any) => any;
@@ -12,6 +13,7 @@ export const breezsdk_claimDeposit: (a: number, b: any) => any;
12
13
  export const breezsdk_claimHtlcPayment: (a: number, b: any) => any;
13
14
  export const breezsdk_deleteLightningAddress: (a: number) => any;
14
15
  export const breezsdk_disconnect: (a: number) => any;
16
+ export const breezsdk_fetchTokenConversionLimits: (a: number, b: any) => any;
15
17
  export const breezsdk_getInfo: (a: number, b: any) => any;
16
18
  export const breezsdk_getLeafOptimizationProgress: (a: number) => any;
17
19
  export const breezsdk_getLightningAddress: (a: number) => any;
@@ -39,14 +41,36 @@ export const breezsdk_startLeafOptimization: (a: number) => void;
39
41
  export const breezsdk_syncWallet: (a: number, b: any) => any;
40
42
  export const breezsdk_updateUserSettings: (a: number, b: any) => any;
41
43
  export const connect: (a: any) => any;
44
+ export const connectWithSigner: (a: any, b: any, c: number, d: number) => any;
42
45
  export const defaultConfig: (a: any) => any;
46
+ export const defaultExternalSigner: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
47
+ export const defaultsigner_aggregateFrost: (a: number, b: any) => any;
48
+ export const defaultsigner_derivePublicKey: (a: number, b: number, c: number) => any;
49
+ export const defaultsigner_eciesDecrypt: (a: number, b: number, c: number, d: number, e: number) => any;
50
+ export const defaultsigner_eciesEncrypt: (a: number, b: number, c: number, d: number, e: number) => any;
51
+ export const defaultsigner_encryptPrivateKeyForReceiver: (a: number, b: any, c: any) => any;
52
+ export const defaultsigner_generateFrostSigningCommitments: (a: number) => any;
53
+ export const defaultsigner_generateRandomKey: (a: number) => any;
54
+ export const defaultsigner_getPublicKeyForNode: (a: number, b: any) => any;
55
+ export const defaultsigner_getPublicKeyFromPrivateKeySource: (a: number, b: any) => any;
56
+ export const defaultsigner_getStaticDepositPrivateKey: (a: number, b: number) => any;
57
+ export const defaultsigner_getStaticDepositPrivateKeySource: (a: number, b: number) => any;
58
+ export const defaultsigner_getStaticDepositPublicKey: (a: number, b: number) => any;
59
+ export const defaultsigner_identityPublicKey: (a: number) => [number, number, number];
60
+ export const defaultsigner_signEcdsa: (a: number, b: number, c: number, d: number, e: number) => any;
61
+ export const defaultsigner_signEcdsaRecoverable: (a: number, b: number, c: number, d: number, e: number) => any;
62
+ export const defaultsigner_signFrost: (a: number, b: any) => any;
63
+ export const defaultsigner_signHashSchnorr: (a: number, b: number, c: number, d: number, e: number) => any;
64
+ export const defaultsigner_splitSecretWithProofs: (a: number, b: any, c: number, d: number) => any;
65
+ export const defaultsigner_subtractPrivateKeys: (a: number, b: any, c: any) => any;
43
66
  export const initLogging: (a: any, b: number, c: number) => any;
44
67
  export const sdkbuilder_build: (a: number) => any;
45
68
  export const sdkbuilder_new: (a: any, b: any) => number;
69
+ export const sdkbuilder_newWithSigner: (a: any, b: any) => number;
46
70
  export const sdkbuilder_withChainService: (a: number, b: any) => number;
47
71
  export const sdkbuilder_withDefaultStorage: (a: number, b: number, c: number) => any;
48
72
  export const sdkbuilder_withFiatService: (a: number, b: any) => number;
49
- export const sdkbuilder_withKeySet: (a: number, b: any, c: number, d: number) => number;
73
+ export const sdkbuilder_withKeySet: (a: number, b: any) => number;
50
74
  export const sdkbuilder_withLnurlClient: (a: number, b: any) => number;
51
75
  export const sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
52
76
  export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
@@ -86,6 +110,6 @@ export const __externref_drop_slice: (a: number, b: number) => void;
86
110
  export const __wbindgen_export_7: WebAssembly.Table;
87
111
  export const __externref_table_dealloc: (a: number) => void;
88
112
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdf0ebd5238280272: (a: number, b: number) => void;
89
- export const closure997_externref_shim: (a: number, b: number, c: any) => void;
90
- export const closure571_externref_shim: (a: number, b: number, c: any, d: any) => void;
113
+ export const closure1047_externref_shim: (a: number, b: number, c: any) => void;
114
+ export const closure632_externref_shim: (a: number, b: number, c: any, d: any) => void;
91
115
  export const __wbindgen_start: () => void;