@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.
@@ -218,11 +218,11 @@ function debugString(val) {
218
218
  return className;
219
219
  }
220
220
  /**
221
- * @param {Network} network
222
- * @returns {Config}
221
+ * @param {ConnectRequest} request
222
+ * @returns {Promise<BreezSdk>}
223
223
  */
224
- module.exports.defaultConfig = function(network) {
225
- const ret = wasm.defaultConfig(network);
224
+ module.exports.connect = function(request) {
225
+ const ret = wasm.connect(request);
226
226
  return ret;
227
227
  };
228
228
 
@@ -239,11 +239,24 @@ module.exports.initLogging = function(logger, filter) {
239
239
  };
240
240
 
241
241
  /**
242
- * @param {ConnectRequest} request
242
+ * @param {Config} config
243
+ * @param {ExternalSigner} signer
244
+ * @param {string} storage_dir
243
245
  * @returns {Promise<BreezSdk>}
244
246
  */
245
- module.exports.connect = function(request) {
246
- const ret = wasm.connect(request);
247
+ module.exports.connectWithSigner = function(config, signer, storage_dir) {
248
+ const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
249
+ const len0 = WASM_VECTOR_LEN;
250
+ const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
251
+ return ret;
252
+ };
253
+
254
+ /**
255
+ * @param {Network} network
256
+ * @returns {Config}
257
+ */
258
+ module.exports.defaultConfig = function(network) {
259
+ const ret = wasm.defaultConfig(network);
247
260
  return ret;
248
261
  };
249
262
 
@@ -252,6 +265,34 @@ function takeFromExternrefTable0(idx) {
252
265
  wasm.__externref_table_dealloc(idx);
253
266
  return value;
254
267
  }
268
+ /**
269
+ * Creates a default external signer from a mnemonic phrase.
270
+ *
271
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
272
+ * @param {string} mnemonic
273
+ * @param {string | null | undefined} passphrase
274
+ * @param {Network} network
275
+ * @param {KeySetConfig | null} [key_set_config]
276
+ * @returns {DefaultSigner}
277
+ */
278
+ module.exports.defaultExternalSigner = function(mnemonic, passphrase, network, key_set_config) {
279
+ const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
280
+ const len0 = WASM_VECTOR_LEN;
281
+ var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
+ var len1 = WASM_VECTOR_LEN;
283
+ const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
284
+ if (ret[2]) {
285
+ throw takeFromExternrefTable0(ret[1]);
286
+ }
287
+ return DefaultSigner.__wrap(ret[0]);
288
+ };
289
+
290
+ function passArray8ToWasm0(arg, malloc) {
291
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
292
+ getUint8ArrayMemory0().set(arg, ptr / 1);
293
+ WASM_VECTOR_LEN = arg.length;
294
+ return ptr;
295
+ }
255
296
  /**
256
297
  * Entry point invoked by JavaScript in a worker.
257
298
  * @param {number} ptr
@@ -263,16 +304,16 @@ module.exports.task_worker_entry_point = function(ptr) {
263
304
  }
264
305
  };
265
306
 
266
- function __wbg_adapter_58(arg0, arg1) {
307
+ function __wbg_adapter_64(arg0, arg1) {
267
308
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdf0ebd5238280272(arg0, arg1);
268
309
  }
269
310
 
270
- function __wbg_adapter_61(arg0, arg1, arg2) {
271
- wasm.closure997_externref_shim(arg0, arg1, arg2);
311
+ function __wbg_adapter_67(arg0, arg1, arg2) {
312
+ wasm.closure1047_externref_shim(arg0, arg1, arg2);
272
313
  }
273
314
 
274
- function __wbg_adapter_282(arg0, arg1, arg2, arg3) {
275
- wasm.closure571_externref_shim(arg0, arg1, arg2, arg3);
315
+ function __wbg_adapter_349(arg0, arg1, arg2, arg3) {
316
+ wasm.closure632_externref_shim(arg0, arg1, arg2, arg3);
276
317
  }
277
318
 
278
319
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -532,6 +573,14 @@ class BreezSdk {
532
573
  const ret = wasm.breezsdk_registerLightningAddress(this.__wbg_ptr, request);
533
574
  return ret;
534
575
  }
576
+ /**
577
+ * @param {FetchTokenConversionLimitsRequest} request
578
+ * @returns {Promise<FetchTokenConversionLimitsResponse>}
579
+ */
580
+ fetchTokenConversionLimits(request) {
581
+ const ret = wasm.breezsdk_fetchTokenConversionLimits(this.__wbg_ptr, request);
582
+ return ret;
583
+ }
535
584
  /**
536
585
  * @returns {OptimizationProgress}
537
586
  */
@@ -576,6 +625,220 @@ class BreezSdk {
576
625
  }
577
626
  module.exports.BreezSdk = BreezSdk;
578
627
 
628
+ const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
629
+ ? { register: () => {}, unregister: () => {} }
630
+ : new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr >>> 0, 1));
631
+ /**
632
+ * A default signer implementation that wraps the core SDK's ExternalSigner.
633
+ * This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
634
+ */
635
+ class DefaultSigner {
636
+
637
+ static __wrap(ptr) {
638
+ ptr = ptr >>> 0;
639
+ const obj = Object.create(DefaultSigner.prototype);
640
+ obj.__wbg_ptr = ptr;
641
+ DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
642
+ return obj;
643
+ }
644
+
645
+ __destroy_into_raw() {
646
+ const ptr = this.__wbg_ptr;
647
+ this.__wbg_ptr = 0;
648
+ DefaultSignerFinalization.unregister(this);
649
+ return ptr;
650
+ }
651
+
652
+ free() {
653
+ const ptr = this.__destroy_into_raw();
654
+ wasm.__wbg_defaultsigner_free(ptr, 0);
655
+ }
656
+ /**
657
+ * @param {Uint8Array} message
658
+ * @param {string} path
659
+ * @returns {Promise<EcdsaSignatureBytes>}
660
+ */
661
+ signEcdsa(message, path) {
662
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
663
+ const len0 = WASM_VECTOR_LEN;
664
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
665
+ const len1 = WASM_VECTOR_LEN;
666
+ const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, ptr0, len0, ptr1, len1);
667
+ return ret;
668
+ }
669
+ /**
670
+ * @param {ExternalSignFrostRequest} request
671
+ * @returns {Promise<ExternalFrostSignatureShare>}
672
+ */
673
+ signFrost(request) {
674
+ const ret = wasm.defaultsigner_signFrost(this.__wbg_ptr, request);
675
+ return ret;
676
+ }
677
+ /**
678
+ * @param {Uint8Array} message
679
+ * @param {string} path
680
+ * @returns {Promise<Uint8Array>}
681
+ */
682
+ eciesDecrypt(message, path) {
683
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
684
+ const len0 = WASM_VECTOR_LEN;
685
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
686
+ const len1 = WASM_VECTOR_LEN;
687
+ const ret = wasm.defaultsigner_eciesDecrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
688
+ return ret;
689
+ }
690
+ /**
691
+ * @param {Uint8Array} message
692
+ * @param {string} path
693
+ * @returns {Promise<Uint8Array>}
694
+ */
695
+ eciesEncrypt(message, path) {
696
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
697
+ const len0 = WASM_VECTOR_LEN;
698
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
699
+ const len1 = WASM_VECTOR_LEN;
700
+ const ret = wasm.defaultsigner_eciesEncrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
701
+ return ret;
702
+ }
703
+ /**
704
+ * @param {ExternalAggregateFrostRequest} request
705
+ * @returns {Promise<ExternalFrostSignature>}
706
+ */
707
+ aggregateFrost(request) {
708
+ const ret = wasm.defaultsigner_aggregateFrost(this.__wbg_ptr, request);
709
+ return ret;
710
+ }
711
+ /**
712
+ * @param {string} path
713
+ * @returns {Promise<PublicKeyBytes>}
714
+ */
715
+ derivePublicKey(path) {
716
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
717
+ const len0 = WASM_VECTOR_LEN;
718
+ const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
719
+ return ret;
720
+ }
721
+ /**
722
+ * @param {Uint8Array} hash
723
+ * @param {string} path
724
+ * @returns {Promise<SchnorrSignatureBytes>}
725
+ */
726
+ signHashSchnorr(hash, path) {
727
+ const ptr0 = passArray8ToWasm0(hash, wasm.__wbindgen_malloc);
728
+ const len0 = WASM_VECTOR_LEN;
729
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
730
+ const len1 = WASM_VECTOR_LEN;
731
+ const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
732
+ return ret;
733
+ }
734
+ /**
735
+ * @returns {Promise<ExternalPrivateKeySource>}
736
+ */
737
+ generateRandomKey() {
738
+ const ret = wasm.defaultsigner_generateRandomKey(this.__wbg_ptr);
739
+ return ret;
740
+ }
741
+ /**
742
+ * @returns {PublicKeyBytes}
743
+ */
744
+ identityPublicKey() {
745
+ const ret = wasm.defaultsigner_identityPublicKey(this.__wbg_ptr);
746
+ if (ret[2]) {
747
+ throw takeFromExternrefTable0(ret[1]);
748
+ }
749
+ return takeFromExternrefTable0(ret[0]);
750
+ }
751
+ /**
752
+ * @param {ExternalPrivateKeySource} signing_key
753
+ * @param {ExternalPrivateKeySource} new_signing_key
754
+ * @returns {Promise<ExternalPrivateKeySource>}
755
+ */
756
+ subtractPrivateKeys(signing_key, new_signing_key) {
757
+ const ret = wasm.defaultsigner_subtractPrivateKeys(this.__wbg_ptr, signing_key, new_signing_key);
758
+ return ret;
759
+ }
760
+ /**
761
+ * @param {Uint8Array} message
762
+ * @param {string} path
763
+ * @returns {Promise<RecoverableEcdsaSignatureBytes>}
764
+ */
765
+ signEcdsaRecoverable(message, path) {
766
+ const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
767
+ const len0 = WASM_VECTOR_LEN;
768
+ const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
769
+ const len1 = WASM_VECTOR_LEN;
770
+ const ret = wasm.defaultsigner_signEcdsaRecoverable(this.__wbg_ptr, ptr0, len0, ptr1, len1);
771
+ return ret;
772
+ }
773
+ /**
774
+ * @param {ExternalTreeNodeId} id
775
+ * @returns {Promise<PublicKeyBytes>}
776
+ */
777
+ getPublicKeyForNode(id) {
778
+ const ret = wasm.defaultsigner_getPublicKeyForNode(this.__wbg_ptr, id);
779
+ return ret;
780
+ }
781
+ /**
782
+ * @param {ExternalSecretToSplit} secret
783
+ * @param {number} threshold
784
+ * @param {number} num_shares
785
+ * @returns {Promise<ExternalVerifiableSecretShare[]>}
786
+ */
787
+ splitSecretWithProofs(secret, threshold, num_shares) {
788
+ const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
789
+ return ret;
790
+ }
791
+ /**
792
+ * @param {number} index
793
+ * @returns {Promise<PublicKeyBytes>}
794
+ */
795
+ getStaticDepositPublicKey(index) {
796
+ const ret = wasm.defaultsigner_getStaticDepositPublicKey(this.__wbg_ptr, index);
797
+ return ret;
798
+ }
799
+ /**
800
+ * @param {number} index
801
+ * @returns {Promise<PrivateKeyBytes>}
802
+ */
803
+ getStaticDepositPrivateKey(index) {
804
+ const ret = wasm.defaultsigner_getStaticDepositPrivateKey(this.__wbg_ptr, index);
805
+ return ret;
806
+ }
807
+ /**
808
+ * @param {ExternalEncryptedPrivateKey} private_key
809
+ * @param {PublicKeyBytes} receiver_public_key
810
+ * @returns {Promise<Uint8Array>}
811
+ */
812
+ encryptPrivateKeyForReceiver(private_key, receiver_public_key) {
813
+ const ret = wasm.defaultsigner_encryptPrivateKeyForReceiver(this.__wbg_ptr, private_key, receiver_public_key);
814
+ return ret;
815
+ }
816
+ /**
817
+ * @returns {Promise<ExternalFrostCommitments>}
818
+ */
819
+ generateFrostSigningCommitments() {
820
+ const ret = wasm.defaultsigner_generateFrostSigningCommitments(this.__wbg_ptr);
821
+ return ret;
822
+ }
823
+ /**
824
+ * @param {number} index
825
+ * @returns {Promise<ExternalPrivateKeySource>}
826
+ */
827
+ getStaticDepositPrivateKeySource(index) {
828
+ const ret = wasm.defaultsigner_getStaticDepositPrivateKeySource(this.__wbg_ptr, index);
829
+ return ret;
830
+ }
831
+ /**
832
+ * @param {ExternalPrivateKeySource} private_key
833
+ * @returns {Promise<PublicKeyBytes>}
834
+ */
835
+ getPublicKeyFromPrivateKeySource(private_key) {
836
+ const ret = wasm.defaultsigner_getPublicKeyFromPrivateKeySource(this.__wbg_ptr, private_key);
837
+ return ret;
838
+ }
839
+ }
840
+ module.exports.DefaultSigner = DefaultSigner;
841
+
579
842
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
580
843
  ? { register: () => {}, unregister: () => {} }
581
844
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
@@ -731,14 +994,12 @@ class SdkBuilder {
731
994
  wasm.__wbg_sdkbuilder_free(ptr, 0);
732
995
  }
733
996
  /**
734
- * @param {KeySetType} key_set_type
735
- * @param {boolean} use_address_index
736
- * @param {number | null} [account_number]
997
+ * @param {KeySetConfig} config
737
998
  * @returns {SdkBuilder}
738
999
  */
739
- withKeySet(key_set_type, use_address_index, account_number) {
1000
+ withKeySet(config) {
740
1001
  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);
1002
+ const ret = wasm.sdkbuilder_withKeySet(ptr, config);
742
1003
  return SdkBuilder.__wrap(ret);
743
1004
  }
744
1005
  /**
@@ -750,6 +1011,15 @@ class SdkBuilder {
750
1011
  const ret = wasm.sdkbuilder_withStorage(ptr, storage);
751
1012
  return SdkBuilder.__wrap(ret);
752
1013
  }
1014
+ /**
1015
+ * @param {Config} config
1016
+ * @param {ExternalSigner} signer
1017
+ * @returns {SdkBuilder}
1018
+ */
1019
+ static newWithSigner(config, signer) {
1020
+ const ret = wasm.sdkbuilder_newWithSigner(config, signer);
1021
+ return SdkBuilder.__wrap(ret);
1022
+ }
753
1023
  /**
754
1024
  * @param {FiatService} fiat_service
755
1025
  * @returns {SdkBuilder}
@@ -941,6 +1211,11 @@ module.exports.__wbg_addDeposit_5b1f93e7014f1e18 = function() { return handleErr
941
1211
  }
942
1212
  }, arguments) };
943
1213
 
1214
+ module.exports.__wbg_aggregateFrost_053f2d54394422d5 = function() { return handleError(function (arg0, arg1) {
1215
+ const ret = arg0.aggregateFrost(arg1);
1216
+ return ret;
1217
+ }, arguments) };
1218
+
944
1219
  module.exports.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
945
1220
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
946
1221
  }, arguments) };
@@ -1097,11 +1372,59 @@ module.exports.__wbg_deleteRequest_7be0a74a10deac70 = function() { return handle
1097
1372
  }
1098
1373
  }, arguments) };
1099
1374
 
1375
+ module.exports.__wbg_derivePublicKey_736fb57b6852f201 = function() { return handleError(function (arg0, arg1, arg2) {
1376
+ let deferred0_0;
1377
+ let deferred0_1;
1378
+ try {
1379
+ deferred0_0 = arg1;
1380
+ deferred0_1 = arg2;
1381
+ const ret = arg0.derivePublicKey(getStringFromWasm0(arg1, arg2));
1382
+ return ret;
1383
+ } finally {
1384
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1385
+ }
1386
+ }, arguments) };
1387
+
1100
1388
  module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
1101
1389
  const ret = arg0.done;
1102
1390
  return ret;
1103
1391
  };
1104
1392
 
1393
+ module.exports.__wbg_eciesDecrypt_4edc97146456d67b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1394
+ let deferred1_0;
1395
+ let deferred1_1;
1396
+ try {
1397
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1398
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1399
+ deferred1_0 = arg3;
1400
+ deferred1_1 = arg4;
1401
+ const ret = arg0.eciesDecrypt(v0, getStringFromWasm0(arg3, arg4));
1402
+ return ret;
1403
+ } finally {
1404
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1405
+ }
1406
+ }, arguments) };
1407
+
1408
+ module.exports.__wbg_eciesEncrypt_040d338cf1cb289f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1409
+ let deferred1_0;
1410
+ let deferred1_1;
1411
+ try {
1412
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
1413
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
1414
+ deferred1_0 = arg3;
1415
+ deferred1_1 = arg4;
1416
+ const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
1417
+ return ret;
1418
+ } finally {
1419
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1420
+ }
1421
+ }, arguments) };
1422
+
1423
+ module.exports.__wbg_encryptPrivateKeyForReceiver_6e87a5befdd3ee82 = function() { return handleError(function (arg0, arg1, arg2) {
1424
+ const ret = arg0.encryptPrivateKeyForReceiver(arg1, arg2);
1425
+ return ret;
1426
+ }, arguments) };
1427
+
1105
1428
  module.exports.__wbg_enqueue_bb16ba72f537dc9e = function() { return handleError(function (arg0, arg1) {
1106
1429
  arg0.enqueue(arg1);
1107
1430
  }, arguments) };
@@ -1145,6 +1468,16 @@ module.exports.__wbg_fetch_f156d10be9a5c88a = function(arg0) {
1145
1468
  return ret;
1146
1469
  };
1147
1470
 
1471
+ module.exports.__wbg_generateFrostSigningCommitments_3473ea4923985769 = function() { return handleError(function (arg0) {
1472
+ const ret = arg0.generateFrostSigningCommitments();
1473
+ return ret;
1474
+ }, arguments) };
1475
+
1476
+ module.exports.__wbg_generateRandomKey_48fd8bb84246b45f = function() { return handleError(function (arg0) {
1477
+ const ret = arg0.generateRandomKey();
1478
+ return ret;
1479
+ }, arguments) };
1480
+
1148
1481
  module.exports.__wbg_getAddressUtxos_328ceb8b4a63a6da = function() { return handleError(function (arg0, arg1, arg2) {
1149
1482
  let deferred0_0;
1150
1483
  let deferred0_1;
@@ -1197,6 +1530,16 @@ module.exports.__wbg_getPaymentByInvoice_afddfcbefa5508b0 = function() { return
1197
1530
  }
1198
1531
  }, arguments) };
1199
1532
 
1533
+ module.exports.__wbg_getPublicKeyForNode_5ddb3378904e4ad4 = function() { return handleError(function (arg0, arg1) {
1534
+ const ret = arg0.getPublicKeyForNode(arg1);
1535
+ return ret;
1536
+ }, arguments) };
1537
+
1538
+ module.exports.__wbg_getPublicKeyFromPrivateKeySource_1ef953e0c8c04628 = function() { return handleError(function (arg0, arg1) {
1539
+ const ret = arg0.getPublicKeyFromPrivateKeySource(arg1);
1540
+ return ret;
1541
+ }, arguments) };
1542
+
1200
1543
  module.exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1201
1544
  arg0.getRandomValues(arg1);
1202
1545
  }, arguments) };
@@ -1223,6 +1566,21 @@ module.exports.__wbg_getRequest_4ab87a8cbe18fa22 = function() { return handleErr
1223
1566
  }
1224
1567
  }, arguments) };
1225
1568
 
1569
+ module.exports.__wbg_getStaticDepositPrivateKeySource_7b2991ed6d3d4711 = function() { return handleError(function (arg0, arg1) {
1570
+ const ret = arg0.getStaticDepositPrivateKeySource(arg1 >>> 0);
1571
+ return ret;
1572
+ }, arguments) };
1573
+
1574
+ module.exports.__wbg_getStaticDepositPrivateKey_c4cc635b7e2348a8 = function() { return handleError(function (arg0, arg1) {
1575
+ const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
1576
+ return ret;
1577
+ }, arguments) };
1578
+
1579
+ module.exports.__wbg_getStaticDepositPublicKey_86535a86c4cf3d04 = function() { return handleError(function (arg0, arg1) {
1580
+ const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
1581
+ return ret;
1582
+ }, arguments) };
1583
+
1226
1584
  module.exports.__wbg_getTransactionHex_973b8d0555c60f99 = function() { return handleError(function (arg0, arg1, arg2) {
1227
1585
  let deferred0_0;
1228
1586
  let deferred0_1;
@@ -1284,6 +1642,11 @@ module.exports.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
1284
1642
  return ret;
1285
1643
  };
1286
1644
 
1645
+ module.exports.__wbg_identityPublicKey_c8b35005055a3df0 = function() { return handleError(function (arg0) {
1646
+ const ret = arg0.identityPublicKey();
1647
+ return ret;
1648
+ }, arguments) };
1649
+
1287
1650
  module.exports.__wbg_insertPayment_2afe3300c5f86ccf = function() { return handleError(function (arg0, arg1) {
1288
1651
  const ret = arg0.insertPayment(arg1);
1289
1652
  return ret;
@@ -1448,7 +1811,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
1448
1811
  const a = state0.a;
1449
1812
  state0.a = 0;
1450
1813
  try {
1451
- return __wbg_adapter_282(a, state0.b, arg0, arg1);
1814
+ return __wbg_adapter_349(a, state0.b, arg0, arg1);
1452
1815
  } finally {
1453
1816
  state0.a = a;
1454
1817
  }
@@ -1735,11 +2098,66 @@ module.exports.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
1735
2098
  arg0.signal = arg1;
1736
2099
  };
1737
2100
 
2101
+ module.exports.__wbg_signEcdsaRecoverable_673b67f4f9ec42e7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2102
+ let deferred1_0;
2103
+ let deferred1_1;
2104
+ try {
2105
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2106
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2107
+ deferred1_0 = arg3;
2108
+ deferred1_1 = arg4;
2109
+ const ret = arg0.signEcdsaRecoverable(v0, getStringFromWasm0(arg3, arg4));
2110
+ return ret;
2111
+ } finally {
2112
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2113
+ }
2114
+ }, arguments) };
2115
+
2116
+ module.exports.__wbg_signEcdsa_b0be26cee51844bc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2117
+ let deferred1_0;
2118
+ let deferred1_1;
2119
+ try {
2120
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2121
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2122
+ deferred1_0 = arg3;
2123
+ deferred1_1 = arg4;
2124
+ const ret = arg0.signEcdsa(v0, getStringFromWasm0(arg3, arg4));
2125
+ return ret;
2126
+ } finally {
2127
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2128
+ }
2129
+ }, arguments) };
2130
+
2131
+ module.exports.__wbg_signFrost_06ac652135c4e862 = function() { return handleError(function (arg0, arg1) {
2132
+ const ret = arg0.signFrost(arg1);
2133
+ return ret;
2134
+ }, arguments) };
2135
+
2136
+ module.exports.__wbg_signHashSchnorr_390c51f0bbb70a7a = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2137
+ let deferred1_0;
2138
+ let deferred1_1;
2139
+ try {
2140
+ var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
2141
+ wasm.__wbindgen_free(arg1, arg2 * 1, 1);
2142
+ deferred1_0 = arg3;
2143
+ deferred1_1 = arg4;
2144
+ const ret = arg0.signHashSchnorr(v0, getStringFromWasm0(arg3, arg4));
2145
+ return ret;
2146
+ } finally {
2147
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2148
+ }
2149
+ }, arguments) };
2150
+
1738
2151
  module.exports.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
1739
2152
  const ret = arg0.signal;
1740
2153
  return ret;
1741
2154
  };
1742
2155
 
2156
+ module.exports.__wbg_splitSecretWithProofs_1aba146de2c5eb0a = function() { return handleError(function (arg0, arg1, arg2, arg3) {
2157
+ const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
2158
+ return ret;
2159
+ }, arguments) };
2160
+
1743
2161
  module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
1744
2162
  const ret = typeof global === 'undefined' ? null : global;
1745
2163
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
@@ -1775,6 +2193,11 @@ module.exports.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
1775
2193
  return ret;
1776
2194
  };
1777
2195
 
2196
+ module.exports.__wbg_subtractPrivateKeys_8b281bbbac58f672 = function() { return handleError(function (arg0, arg1, arg2) {
2197
+ const ret = arg0.subtractPrivateKeys(arg1, arg2);
2198
+ return ret;
2199
+ }, arguments) };
2200
+
1778
2201
  module.exports.__wbg_syncAddOutgoingChange_9d94d35ba215d3c9 = function() { return handleError(function (arg0, arg1) {
1779
2202
  const ret = arg0.syncAddOutgoingChange(arg1);
1780
2203
  return ret;
@@ -1883,6 +2306,15 @@ module.exports.__wbg_view_fd8a56e8983f448d = function(arg0) {
1883
2306
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1884
2307
  };
1885
2308
 
2309
+ module.exports.__wbindgen_array_new = function() {
2310
+ const ret = [];
2311
+ return ret;
2312
+ };
2313
+
2314
+ module.exports.__wbindgen_array_push = function(arg0, arg1) {
2315
+ arg0.push(arg1);
2316
+ };
2317
+
1886
2318
  module.exports.__wbindgen_as_number = function(arg0) {
1887
2319
  const ret = +arg0;
1888
2320
  return ret;
@@ -1926,13 +2358,13 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
1926
2358
  return ret;
1927
2359
  };
1928
2360
 
1929
- module.exports.__wbindgen_closure_wrapper11879 = function(arg0, arg1, arg2) {
1930
- const ret = makeMutClosure(arg0, arg1, 998, __wbg_adapter_61);
2361
+ module.exports.__wbindgen_closure_wrapper11146 = function(arg0, arg1, arg2) {
2362
+ const ret = makeMutClosure(arg0, arg1, 812, __wbg_adapter_64);
1931
2363
  return ret;
1932
2364
  };
1933
2365
 
1934
- module.exports.__wbindgen_closure_wrapper9947 = function(arg0, arg1, arg2) {
1935
- const ret = makeMutClosure(arg0, arg1, 766, __wbg_adapter_58);
2366
+ module.exports.__wbindgen_closure_wrapper13052 = function(arg0, arg1, arg2) {
2367
+ const ret = makeMutClosure(arg0, arg1, 1048, __wbg_adapter_67);
1936
2368
  return ret;
1937
2369
  };
1938
2370
 
@@ -2046,6 +2478,13 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
2046
2478
  throw new Error(getStringFromWasm0(arg0, arg1));
2047
2479
  };
2048
2480
 
2481
+ module.exports.__wbindgen_uint8_array_new = function(arg0, arg1) {
2482
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2483
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2484
+ const ret = v0;
2485
+ return ret;
2486
+ };
2487
+
2049
2488
  const path = require('path').join(__dirname, 'breez_sdk_spark_wasm_bg.wasm');
2050
2489
  const bytes = require('fs').readFileSync(path);
2051
2490
 
Binary file