@breeztech/breez-sdk-spark 0.6.6 → 0.7.0-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.
@@ -214,11 +214,11 @@ function debugString(val) {
214
214
  return className;
215
215
  }
216
216
  /**
217
- * @param {Network} network
218
- * @returns {Config}
217
+ * @param {ConnectRequest} request
218
+ * @returns {Promise<BreezSdk>}
219
219
  */
220
- export function defaultConfig(network) {
221
- const ret = wasm.defaultConfig(network);
220
+ export function connect(request) {
221
+ const ret = wasm.connect(request);
222
222
  return ret;
223
223
  }
224
224
 
@@ -235,11 +235,24 @@ export function initLogging(logger, filter) {
235
235
  }
236
236
 
237
237
  /**
238
- * @param {ConnectRequest} request
238
+ * @param {Config} config
239
+ * @param {ExternalSigner} signer
240
+ * @param {string} storage_dir
239
241
  * @returns {Promise<BreezSdk>}
240
242
  */
241
- export function connect(request) {
242
- const ret = wasm.connect(request);
243
+ export function connectWithSigner(config, signer, storage_dir) {
244
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
245
+ const len0 = WASM_VECTOR_LEN;
246
+ const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
247
+ return ret;
248
+ }
249
+
250
+ /**
251
+ * @param {Network} network
252
+ * @returns {Config}
253
+ */
254
+ export function defaultConfig(network) {
255
+ const ret = wasm.defaultConfig(network);
243
256
  return ret;
244
257
  }
245
258
 
@@ -248,6 +261,34 @@ function takeFromExternrefTable0(idx) {
248
261
  wasm.__externref_table_dealloc(idx);
249
262
  return value;
250
263
  }
264
+ /**
265
+ * Creates a default external signer from a mnemonic phrase.
266
+ *
267
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
268
+ * @param {string} mnemonic
269
+ * @param {string | null | undefined} passphrase
270
+ * @param {Network} network
271
+ * @param {KeySetConfig | null} [key_set_config]
272
+ * @returns {DefaultSigner}
273
+ */
274
+ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
275
+ const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
276
+ const len0 = WASM_VECTOR_LEN;
277
+ var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
278
+ var len1 = WASM_VECTOR_LEN;
279
+ const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
280
+ if (ret[2]) {
281
+ throw takeFromExternrefTable0(ret[1]);
282
+ }
283
+ return DefaultSigner.__wrap(ret[0]);
284
+ }
285
+
286
+ function passArray8ToWasm0(arg, malloc) {
287
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
288
+ getUint8ArrayMemory0().set(arg, ptr / 1);
289
+ WASM_VECTOR_LEN = arg.length;
290
+ return ptr;
291
+ }
251
292
  /**
252
293
  * Entry point invoked by JavaScript in a worker.
253
294
  * @param {number} ptr
@@ -259,16 +300,16 @@ export function task_worker_entry_point(ptr) {
259
300
  }
260
301
  }
261
302
 
262
- function __wbg_adapter_58(arg0, arg1) {
303
+ function __wbg_adapter_64(arg0, arg1) {
263
304
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdf0ebd5238280272(arg0, arg1);
264
305
  }
265
306
 
266
- function __wbg_adapter_61(arg0, arg1, arg2) {
267
- wasm.closure997_externref_shim(arg0, arg1, arg2);
307
+ function __wbg_adapter_67(arg0, arg1, arg2) {
308
+ wasm.closure1047_externref_shim(arg0, arg1, arg2);
268
309
  }
269
310
 
270
- function __wbg_adapter_282(arg0, arg1, arg2, arg3) {
271
- wasm.closure571_externref_shim(arg0, arg1, arg2, arg3);
311
+ function __wbg_adapter_349(arg0, arg1, arg2, arg3) {
312
+ wasm.closure632_externref_shim(arg0, arg1, arg2, arg3);
272
313
  }
273
314
 
274
315
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -528,6 +569,14 @@ export class BreezSdk {
528
569
  const ret = wasm.breezsdk_registerLightningAddress(this.__wbg_ptr, request);
529
570
  return ret;
530
571
  }
572
+ /**
573
+ * @param {FetchTokenConversionLimitsRequest} request
574
+ * @returns {Promise<FetchTokenConversionLimitsResponse>}
575
+ */
576
+ fetchTokenConversionLimits(request) {
577
+ const ret = wasm.breezsdk_fetchTokenConversionLimits(this.__wbg_ptr, request);
578
+ return ret;
579
+ }
531
580
  /**
532
581
  * @returns {OptimizationProgress}
533
582
  */
@@ -571,6 +620,219 @@ export class BreezSdk {
571
620
  }
572
621
  }
573
622
 
623
+ const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
624
+ ? { register: () => {}, unregister: () => {} }
625
+ : new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr >>> 0, 1));
626
+ /**
627
+ * A default signer implementation that wraps the core SDK's ExternalSigner.
628
+ * This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
629
+ */
630
+ export class DefaultSigner {
631
+
632
+ static __wrap(ptr) {
633
+ ptr = ptr >>> 0;
634
+ const obj = Object.create(DefaultSigner.prototype);
635
+ obj.__wbg_ptr = ptr;
636
+ DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
637
+ return obj;
638
+ }
639
+
640
+ __destroy_into_raw() {
641
+ const ptr = this.__wbg_ptr;
642
+ this.__wbg_ptr = 0;
643
+ DefaultSignerFinalization.unregister(this);
644
+ return ptr;
645
+ }
646
+
647
+ free() {
648
+ const ptr = this.__destroy_into_raw();
649
+ wasm.__wbg_defaultsigner_free(ptr, 0);
650
+ }
651
+ /**
652
+ * @param {Uint8Array} message
653
+ * @param {string} path
654
+ * @returns {Promise<EcdsaSignatureBytes>}
655
+ */
656
+ signEcdsa(message, path) {
657
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
658
+ const len0 = WASM_VECTOR_LEN;
659
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
660
+ const len1 = WASM_VECTOR_LEN;
661
+ const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, ptr0, len0, ptr1, len1);
662
+ return ret;
663
+ }
664
+ /**
665
+ * @param {ExternalSignFrostRequest} request
666
+ * @returns {Promise<ExternalFrostSignatureShare>}
667
+ */
668
+ signFrost(request) {
669
+ const ret = wasm.defaultsigner_signFrost(this.__wbg_ptr, request);
670
+ return ret;
671
+ }
672
+ /**
673
+ * @param {Uint8Array} message
674
+ * @param {string} path
675
+ * @returns {Promise<Uint8Array>}
676
+ */
677
+ eciesDecrypt(message, path) {
678
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
679
+ const len0 = WASM_VECTOR_LEN;
680
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
681
+ const len1 = WASM_VECTOR_LEN;
682
+ const ret = wasm.defaultsigner_eciesDecrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
683
+ return ret;
684
+ }
685
+ /**
686
+ * @param {Uint8Array} message
687
+ * @param {string} path
688
+ * @returns {Promise<Uint8Array>}
689
+ */
690
+ eciesEncrypt(message, path) {
691
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
692
+ const len0 = WASM_VECTOR_LEN;
693
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
694
+ const len1 = WASM_VECTOR_LEN;
695
+ const ret = wasm.defaultsigner_eciesEncrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
696
+ return ret;
697
+ }
698
+ /**
699
+ * @param {ExternalAggregateFrostRequest} request
700
+ * @returns {Promise<ExternalFrostSignature>}
701
+ */
702
+ aggregateFrost(request) {
703
+ const ret = wasm.defaultsigner_aggregateFrost(this.__wbg_ptr, request);
704
+ return ret;
705
+ }
706
+ /**
707
+ * @param {string} path
708
+ * @returns {Promise<PublicKeyBytes>}
709
+ */
710
+ derivePublicKey(path) {
711
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
712
+ const len0 = WASM_VECTOR_LEN;
713
+ const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
714
+ return ret;
715
+ }
716
+ /**
717
+ * @param {Uint8Array} hash
718
+ * @param {string} path
719
+ * @returns {Promise<SchnorrSignatureBytes>}
720
+ */
721
+ signHashSchnorr(hash, path) {
722
+ const ptr0 = passArray8ToWasm0(hash, wasm.__wbindgen_malloc);
723
+ const len0 = WASM_VECTOR_LEN;
724
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
725
+ const len1 = WASM_VECTOR_LEN;
726
+ const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
727
+ return ret;
728
+ }
729
+ /**
730
+ * @returns {Promise<ExternalPrivateKeySource>}
731
+ */
732
+ generateRandomKey() {
733
+ const ret = wasm.defaultsigner_generateRandomKey(this.__wbg_ptr);
734
+ return ret;
735
+ }
736
+ /**
737
+ * @returns {PublicKeyBytes}
738
+ */
739
+ identityPublicKey() {
740
+ const ret = wasm.defaultsigner_identityPublicKey(this.__wbg_ptr);
741
+ if (ret[2]) {
742
+ throw takeFromExternrefTable0(ret[1]);
743
+ }
744
+ return takeFromExternrefTable0(ret[0]);
745
+ }
746
+ /**
747
+ * @param {ExternalPrivateKeySource} signing_key
748
+ * @param {ExternalPrivateKeySource} new_signing_key
749
+ * @returns {Promise<ExternalPrivateKeySource>}
750
+ */
751
+ subtractPrivateKeys(signing_key, new_signing_key) {
752
+ const ret = wasm.defaultsigner_subtractPrivateKeys(this.__wbg_ptr, signing_key, new_signing_key);
753
+ return ret;
754
+ }
755
+ /**
756
+ * @param {Uint8Array} message
757
+ * @param {string} path
758
+ * @returns {Promise<RecoverableEcdsaSignatureBytes>}
759
+ */
760
+ signEcdsaRecoverable(message, path) {
761
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
762
+ const len0 = WASM_VECTOR_LEN;
763
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
764
+ const len1 = WASM_VECTOR_LEN;
765
+ const ret = wasm.defaultsigner_signEcdsaRecoverable(this.__wbg_ptr, ptr0, len0, ptr1, len1);
766
+ return ret;
767
+ }
768
+ /**
769
+ * @param {ExternalTreeNodeId} id
770
+ * @returns {Promise<PublicKeyBytes>}
771
+ */
772
+ getPublicKeyForNode(id) {
773
+ const ret = wasm.defaultsigner_getPublicKeyForNode(this.__wbg_ptr, id);
774
+ return ret;
775
+ }
776
+ /**
777
+ * @param {ExternalSecretToSplit} secret
778
+ * @param {number} threshold
779
+ * @param {number} num_shares
780
+ * @returns {Promise<ExternalVerifiableSecretShare[]>}
781
+ */
782
+ splitSecretWithProofs(secret, threshold, num_shares) {
783
+ const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
784
+ return ret;
785
+ }
786
+ /**
787
+ * @param {number} index
788
+ * @returns {Promise<PublicKeyBytes>}
789
+ */
790
+ getStaticDepositPublicKey(index) {
791
+ const ret = wasm.defaultsigner_getStaticDepositPublicKey(this.__wbg_ptr, index);
792
+ return ret;
793
+ }
794
+ /**
795
+ * @param {number} index
796
+ * @returns {Promise<PrivateKeyBytes>}
797
+ */
798
+ getStaticDepositPrivateKey(index) {
799
+ const ret = wasm.defaultsigner_getStaticDepositPrivateKey(this.__wbg_ptr, index);
800
+ return ret;
801
+ }
802
+ /**
803
+ * @param {ExternalEncryptedPrivateKey} private_key
804
+ * @param {PublicKeyBytes} receiver_public_key
805
+ * @returns {Promise<Uint8Array>}
806
+ */
807
+ encryptPrivateKeyForReceiver(private_key, receiver_public_key) {
808
+ const ret = wasm.defaultsigner_encryptPrivateKeyForReceiver(this.__wbg_ptr, private_key, receiver_public_key);
809
+ return ret;
810
+ }
811
+ /**
812
+ * @returns {Promise<ExternalFrostCommitments>}
813
+ */
814
+ generateFrostSigningCommitments() {
815
+ const ret = wasm.defaultsigner_generateFrostSigningCommitments(this.__wbg_ptr);
816
+ return ret;
817
+ }
818
+ /**
819
+ * @param {number} index
820
+ * @returns {Promise<ExternalPrivateKeySource>}
821
+ */
822
+ getStaticDepositPrivateKeySource(index) {
823
+ const ret = wasm.defaultsigner_getStaticDepositPrivateKeySource(this.__wbg_ptr, index);
824
+ return ret;
825
+ }
826
+ /**
827
+ * @param {ExternalPrivateKeySource} private_key
828
+ * @returns {Promise<PublicKeyBytes>}
829
+ */
830
+ getPublicKeyFromPrivateKeySource(private_key) {
831
+ const ret = wasm.defaultsigner_getPublicKeyFromPrivateKeySource(this.__wbg_ptr, private_key);
832
+ return ret;
833
+ }
834
+ }
835
+
574
836
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
575
837
  ? { register: () => {}, unregister: () => {} }
576
838
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
@@ -723,14 +985,12 @@ export class SdkBuilder {
723
985
  wasm.__wbg_sdkbuilder_free(ptr, 0);
724
986
  }
725
987
  /**
726
- * @param {KeySetType} key_set_type
727
- * @param {boolean} use_address_index
728
- * @param {number | null} [account_number]
988
+ * @param {KeySetConfig} config
729
989
  * @returns {SdkBuilder}
730
990
  */
731
- withKeySet(key_set_type, use_address_index, account_number) {
991
+ withKeySet(config) {
732
992
  const ptr = this.__destroy_into_raw();
733
- const ret = wasm.sdkbuilder_withKeySet(ptr, key_set_type, use_address_index, isLikeNone(account_number) ? 0x100000001 : (account_number) >>> 0);
993
+ const ret = wasm.sdkbuilder_withKeySet(ptr, config);
734
994
  return SdkBuilder.__wrap(ret);
735
995
  }
736
996
  /**
@@ -742,6 +1002,15 @@ export class SdkBuilder {
742
1002
  const ret = wasm.sdkbuilder_withStorage(ptr, storage);
743
1003
  return SdkBuilder.__wrap(ret);
744
1004
  }
1005
+ /**
1006
+ * @param {Config} config
1007
+ * @param {ExternalSigner} signer
1008
+ * @returns {SdkBuilder}
1009
+ */
1010
+ static newWithSigner(config, signer) {
1011
+ const ret = wasm.sdkbuilder_newWithSigner(config, signer);
1012
+ return SdkBuilder.__wrap(ret);
1013
+ }
745
1014
  /**
746
1015
  * @param {FiatService} fiat_service
747
1016
  * @returns {SdkBuilder}
@@ -961,6 +1230,10 @@ function __wbg_get_imports() {
961
1230
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
962
1231
  }
963
1232
  }, arguments) };
1233
+ imports.wbg.__wbg_aggregateFrost_053f2d54394422d5 = function() { return handleError(function (arg0, arg1) {
1234
+ const ret = arg0.aggregateFrost(arg1);
1235
+ return ret;
1236
+ }, arguments) };
964
1237
  imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
965
1238
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
966
1239
  }, arguments) };
@@ -1093,10 +1366,54 @@ function __wbg_get_imports() {
1093
1366
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1094
1367
  }
1095
1368
  }, arguments) };
1369
+ imports.wbg.__wbg_derivePublicKey_736fb57b6852f201 = function() { return handleError(function (arg0, arg1, arg2) {
1370
+ let deferred0_0;
1371
+ let deferred0_1;
1372
+ try {
1373
+ deferred0_0 = arg1;
1374
+ deferred0_1 = arg2;
1375
+ const ret = arg0.derivePublicKey(getStringFromWasm0(arg1, arg2));
1376
+ return ret;
1377
+ } finally {
1378
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1379
+ }
1380
+ }, arguments) };
1096
1381
  imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
1097
1382
  const ret = arg0.done;
1098
1383
  return ret;
1099
1384
  };
1385
+ imports.wbg.__wbg_eciesDecrypt_4edc97146456d67b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1386
+ let deferred1_0;
1387
+ let deferred1_1;
1388
+ try {
1389
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1390
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1391
+ deferred1_0 = arg3;
1392
+ deferred1_1 = arg4;
1393
+ const ret = arg0.eciesDecrypt(v0, getStringFromWasm0(arg3, arg4));
1394
+ return ret;
1395
+ } finally {
1396
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1397
+ }
1398
+ }, arguments) };
1399
+ imports.wbg.__wbg_eciesEncrypt_040d338cf1cb289f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1400
+ let deferred1_0;
1401
+ let deferred1_1;
1402
+ try {
1403
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1404
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1405
+ deferred1_0 = arg3;
1406
+ deferred1_1 = arg4;
1407
+ const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
1408
+ return ret;
1409
+ } finally {
1410
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1411
+ }
1412
+ }, arguments) };
1413
+ imports.wbg.__wbg_encryptPrivateKeyForReceiver_6e87a5befdd3ee82 = function() { return handleError(function (arg0, arg1, arg2) {
1414
+ const ret = arg0.encryptPrivateKeyForReceiver(arg1, arg2);
1415
+ return ret;
1416
+ }, arguments) };
1100
1417
  imports.wbg.__wbg_enqueue_bb16ba72f537dc9e = function() { return handleError(function (arg0, arg1) {
1101
1418
  arg0.enqueue(arg1);
1102
1419
  }, arguments) };
@@ -1131,6 +1448,14 @@ function __wbg_get_imports() {
1131
1448
  const ret = fetch(arg0);
1132
1449
  return ret;
1133
1450
  };
1451
+ imports.wbg.__wbg_generateFrostSigningCommitments_3473ea4923985769 = function() { return handleError(function (arg0) {
1452
+ const ret = arg0.generateFrostSigningCommitments();
1453
+ return ret;
1454
+ }, arguments) };
1455
+ imports.wbg.__wbg_generateRandomKey_48fd8bb84246b45f = function() { return handleError(function (arg0) {
1456
+ const ret = arg0.generateRandomKey();
1457
+ return ret;
1458
+ }, arguments) };
1134
1459
  imports.wbg.__wbg_getAddressUtxos_328ceb8b4a63a6da = function() { return handleError(function (arg0, arg1, arg2) {
1135
1460
  let deferred0_0;
1136
1461
  let deferred0_1;
@@ -1179,6 +1504,14 @@ function __wbg_get_imports() {
1179
1504
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1180
1505
  }
1181
1506
  }, arguments) };
1507
+ imports.wbg.__wbg_getPublicKeyForNode_5ddb3378904e4ad4 = function() { return handleError(function (arg0, arg1) {
1508
+ const ret = arg0.getPublicKeyForNode(arg1);
1509
+ return ret;
1510
+ }, arguments) };
1511
+ imports.wbg.__wbg_getPublicKeyFromPrivateKeySource_1ef953e0c8c04628 = function() { return handleError(function (arg0, arg1) {
1512
+ const ret = arg0.getPublicKeyFromPrivateKeySource(arg1);
1513
+ return ret;
1514
+ }, arguments) };
1182
1515
  imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1183
1516
  arg0.getRandomValues(arg1);
1184
1517
  }, arguments) };
@@ -1201,6 +1534,18 @@ function __wbg_get_imports() {
1201
1534
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1202
1535
  }
1203
1536
  }, arguments) };
1537
+ imports.wbg.__wbg_getStaticDepositPrivateKeySource_7b2991ed6d3d4711 = function() { return handleError(function (arg0, arg1) {
1538
+ const ret = arg0.getStaticDepositPrivateKeySource(arg1 >>> 0);
1539
+ return ret;
1540
+ }, arguments) };
1541
+ imports.wbg.__wbg_getStaticDepositPrivateKey_c4cc635b7e2348a8 = function() { return handleError(function (arg0, arg1) {
1542
+ const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
1543
+ return ret;
1544
+ }, arguments) };
1545
+ imports.wbg.__wbg_getStaticDepositPublicKey_86535a86c4cf3d04 = function() { return handleError(function (arg0, arg1) {
1546
+ const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
1547
+ return ret;
1548
+ }, arguments) };
1204
1549
  imports.wbg.__wbg_getTransactionHex_973b8d0555c60f99 = function() { return handleError(function (arg0, arg1, arg2) {
1205
1550
  let deferred0_0;
1206
1551
  let deferred0_1;
@@ -1253,6 +1598,10 @@ function __wbg_get_imports() {
1253
1598
  const ret = arg0.headers;
1254
1599
  return ret;
1255
1600
  };
1601
+ imports.wbg.__wbg_identityPublicKey_c8b35005055a3df0 = function() { return handleError(function (arg0) {
1602
+ const ret = arg0.identityPublicKey();
1603
+ return ret;
1604
+ }, arguments) };
1256
1605
  imports.wbg.__wbg_insertPayment_2afe3300c5f86ccf = function() { return handleError(function (arg0, arg1) {
1257
1606
  const ret = arg0.insertPayment(arg1);
1258
1607
  return ret;
@@ -1395,7 +1744,7 @@ function __wbg_get_imports() {
1395
1744
  const a = state0.a;
1396
1745
  state0.a = 0;
1397
1746
  try {
1398
- return __wbg_adapter_282(a, state0.b, arg0, arg1);
1747
+ return __wbg_adapter_349(a, state0.b, arg0, arg1);
1399
1748
  } finally {
1400
1749
  state0.a = a;
1401
1750
  }
@@ -1629,10 +1978,60 @@ function __wbg_get_imports() {
1629
1978
  imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
1630
1979
  arg0.signal = arg1;
1631
1980
  };
1981
+ imports.wbg.__wbg_signEcdsaRecoverable_673b67f4f9ec42e7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1982
+ let deferred1_0;
1983
+ let deferred1_1;
1984
+ try {
1985
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1986
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1987
+ deferred1_0 = arg3;
1988
+ deferred1_1 = arg4;
1989
+ const ret = arg0.signEcdsaRecoverable(v0, getStringFromWasm0(arg3, arg4));
1990
+ return ret;
1991
+ } finally {
1992
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1993
+ }
1994
+ }, arguments) };
1995
+ imports.wbg.__wbg_signEcdsa_b0be26cee51844bc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1996
+ let deferred1_0;
1997
+ let deferred1_1;
1998
+ try {
1999
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2000
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2001
+ deferred1_0 = arg3;
2002
+ deferred1_1 = arg4;
2003
+ const ret = arg0.signEcdsa(v0, getStringFromWasm0(arg3, arg4));
2004
+ return ret;
2005
+ } finally {
2006
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2007
+ }
2008
+ }, arguments) };
2009
+ imports.wbg.__wbg_signFrost_06ac652135c4e862 = function() { return handleError(function (arg0, arg1) {
2010
+ const ret = arg0.signFrost(arg1);
2011
+ return ret;
2012
+ }, arguments) };
2013
+ imports.wbg.__wbg_signHashSchnorr_390c51f0bbb70a7a = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2014
+ let deferred1_0;
2015
+ let deferred1_1;
2016
+ try {
2017
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2018
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2019
+ deferred1_0 = arg3;
2020
+ deferred1_1 = arg4;
2021
+ const ret = arg0.signHashSchnorr(v0, getStringFromWasm0(arg3, arg4));
2022
+ return ret;
2023
+ } finally {
2024
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2025
+ }
2026
+ }, arguments) };
1632
2027
  imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
1633
2028
  const ret = arg0.signal;
1634
2029
  return ret;
1635
2030
  };
2031
+ imports.wbg.__wbg_splitSecretWithProofs_1aba146de2c5eb0a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2032
+ const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
2033
+ return ret;
2034
+ }, arguments) };
1636
2035
  imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
1637
2036
  const ret = typeof global === 'undefined' ? null : global;
1638
2037
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
@@ -1661,6 +2060,10 @@ function __wbg_get_imports() {
1661
2060
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1662
2061
  return ret;
1663
2062
  };
2063
+ imports.wbg.__wbg_subtractPrivateKeys_8b281bbbac58f672 = function() { return handleError(function (arg0, arg1, arg2) {
2064
+ const ret = arg0.subtractPrivateKeys(arg1, arg2);
2065
+ return ret;
2066
+ }, arguments) };
1664
2067
  imports.wbg.__wbg_syncAddOutgoingChange_9d94d35ba215d3c9 = function() { return handleError(function (arg0, arg1) {
1665
2068
  const ret = arg0.syncAddOutgoingChange(arg1);
1666
2069
  return ret;
@@ -1750,6 +2153,13 @@ function __wbg_get_imports() {
1750
2153
  const ret = arg0.view;
1751
2154
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1752
2155
  };
2156
+ imports.wbg.__wbindgen_array_new = function() {
2157
+ const ret = [];
2158
+ return ret;
2159
+ };
2160
+ imports.wbg.__wbindgen_array_push = function(arg0, arg1) {
2161
+ arg0.push(arg1);
2162
+ };
1753
2163
  imports.wbg.__wbindgen_as_number = function(arg0) {
1754
2164
  const ret = +arg0;
1755
2165
  return ret;
@@ -1786,12 +2196,12 @@ function __wbg_get_imports() {
1786
2196
  const ret = false;
1787
2197
  return ret;
1788
2198
  };
1789
- imports.wbg.__wbindgen_closure_wrapper11879 = function(arg0, arg1, arg2) {
1790
- const ret = makeMutClosure(arg0, arg1, 998, __wbg_adapter_61);
2199
+ imports.wbg.__wbindgen_closure_wrapper11146 = function(arg0, arg1, arg2) {
2200
+ const ret = makeMutClosure(arg0, arg1, 812, __wbg_adapter_64);
1791
2201
  return ret;
1792
2202
  };
1793
- imports.wbg.__wbindgen_closure_wrapper9947 = function(arg0, arg1, arg2) {
1794
- const ret = makeMutClosure(arg0, arg1, 766, __wbg_adapter_58);
2203
+ imports.wbg.__wbindgen_closure_wrapper13052 = function(arg0, arg1, arg2) {
2204
+ const ret = makeMutClosure(arg0, arg1, 1048, __wbg_adapter_67);
1795
2205
  return ret;
1796
2206
  };
1797
2207
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
@@ -1885,6 +2295,12 @@ function __wbg_get_imports() {
1885
2295
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1886
2296
  throw new Error(getStringFromWasm0(arg0, arg1));
1887
2297
  };
2298
+ imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
2299
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2300
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2301
+ const ret = v0;
2302
+ return ret;
2303
+ };
1888
2304
 
1889
2305
  return imports;
1890
2306
  }
Binary file
@@ -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;