@breeztech/breez-sdk-spark 0.6.5 → 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.
- package/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +615 -412
- package/bundler/breez_sdk_spark_wasm_bg.js +460 -22
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -3
- package/bundler/storage/index.js +150 -41
- package/deno/breez_sdk_spark_wasm.d.ts +615 -412
- package/deno/breez_sdk_spark_wasm.js +438 -22
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +615 -412
- package/nodejs/breez_sdk_spark_wasm.js +461 -22
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -3
- package/nodejs/storage/index.cjs +101 -24
- package/nodejs/storage/migrations.cjs +23 -1
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +642 -415
- package/web/breez_sdk_spark_wasm.js +438 -22
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -3
- package/web/storage/index.js +150 -41
|
@@ -205,11 +205,11 @@ function debugString(val) {
|
|
|
205
205
|
return className;
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
|
-
* @param {
|
|
209
|
-
* @returns {
|
|
208
|
+
* @param {ConnectRequest} request
|
|
209
|
+
* @returns {Promise<BreezSdk>}
|
|
210
210
|
*/
|
|
211
|
-
export function
|
|
212
|
-
const ret = wasm.
|
|
211
|
+
export function connect(request) {
|
|
212
|
+
const ret = wasm.connect(request);
|
|
213
213
|
return ret;
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -226,11 +226,24 @@ export function initLogging(logger, filter) {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
/**
|
|
229
|
-
* @param {
|
|
229
|
+
* @param {Config} config
|
|
230
|
+
* @param {ExternalSigner} signer
|
|
231
|
+
* @param {string} storage_dir
|
|
230
232
|
* @returns {Promise<BreezSdk>}
|
|
231
233
|
*/
|
|
232
|
-
export function
|
|
233
|
-
const
|
|
234
|
+
export function connectWithSigner(config, signer, storage_dir) {
|
|
235
|
+
const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
236
|
+
const len0 = WASM_VECTOR_LEN;
|
|
237
|
+
const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
|
|
238
|
+
return ret;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @param {Network} network
|
|
243
|
+
* @returns {Config}
|
|
244
|
+
*/
|
|
245
|
+
export function defaultConfig(network) {
|
|
246
|
+
const ret = wasm.defaultConfig(network);
|
|
234
247
|
return ret;
|
|
235
248
|
}
|
|
236
249
|
|
|
@@ -239,6 +252,34 @@ function takeFromExternrefTable0(idx) {
|
|
|
239
252
|
wasm.__externref_table_dealloc(idx);
|
|
240
253
|
return value;
|
|
241
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
257
|
+
*
|
|
258
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
259
|
+
* @param {string} mnemonic
|
|
260
|
+
* @param {string | null | undefined} passphrase
|
|
261
|
+
* @param {Network} network
|
|
262
|
+
* @param {KeySetConfig | null} [key_set_config]
|
|
263
|
+
* @returns {DefaultSigner}
|
|
264
|
+
*/
|
|
265
|
+
export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
|
|
266
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
267
|
+
const len0 = WASM_VECTOR_LEN;
|
|
268
|
+
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
269
|
+
var len1 = WASM_VECTOR_LEN;
|
|
270
|
+
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
271
|
+
if (ret[2]) {
|
|
272
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
273
|
+
}
|
|
274
|
+
return DefaultSigner.__wrap(ret[0]);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
278
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
279
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
280
|
+
WASM_VECTOR_LEN = arg.length;
|
|
281
|
+
return ptr;
|
|
282
|
+
}
|
|
242
283
|
/**
|
|
243
284
|
* Entry point invoked by JavaScript in a worker.
|
|
244
285
|
* @param {number} ptr
|
|
@@ -250,16 +291,16 @@ export function task_worker_entry_point(ptr) {
|
|
|
250
291
|
}
|
|
251
292
|
}
|
|
252
293
|
|
|
253
|
-
function
|
|
294
|
+
function __wbg_adapter_64(arg0, arg1) {
|
|
254
295
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdf0ebd5238280272(arg0, arg1);
|
|
255
296
|
}
|
|
256
297
|
|
|
257
|
-
function
|
|
258
|
-
wasm.
|
|
298
|
+
function __wbg_adapter_67(arg0, arg1, arg2) {
|
|
299
|
+
wasm.closure1047_externref_shim(arg0, arg1, arg2);
|
|
259
300
|
}
|
|
260
301
|
|
|
261
|
-
function
|
|
262
|
-
wasm.
|
|
302
|
+
function __wbg_adapter_349(arg0, arg1, arg2, arg3) {
|
|
303
|
+
wasm.closure632_externref_shim(arg0, arg1, arg2, arg3);
|
|
263
304
|
}
|
|
264
305
|
|
|
265
306
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
@@ -519,6 +560,14 @@ export class BreezSdk {
|
|
|
519
560
|
const ret = wasm.breezsdk_registerLightningAddress(this.__wbg_ptr, request);
|
|
520
561
|
return ret;
|
|
521
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* @param {FetchTokenConversionLimitsRequest} request
|
|
565
|
+
* @returns {Promise<FetchTokenConversionLimitsResponse>}
|
|
566
|
+
*/
|
|
567
|
+
fetchTokenConversionLimits(request) {
|
|
568
|
+
const ret = wasm.breezsdk_fetchTokenConversionLimits(this.__wbg_ptr, request);
|
|
569
|
+
return ret;
|
|
570
|
+
}
|
|
522
571
|
/**
|
|
523
572
|
* @returns {OptimizationProgress}
|
|
524
573
|
*/
|
|
@@ -562,6 +611,219 @@ export class BreezSdk {
|
|
|
562
611
|
}
|
|
563
612
|
}
|
|
564
613
|
|
|
614
|
+
const DefaultSignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
615
|
+
? { register: () => {}, unregister: () => {} }
|
|
616
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_defaultsigner_free(ptr >>> 0, 1));
|
|
617
|
+
/**
|
|
618
|
+
* A default signer implementation that wraps the core SDK's ExternalSigner.
|
|
619
|
+
* This is returned by `defaultExternalSigner` and can be passed to `connectWithSigner`.
|
|
620
|
+
*/
|
|
621
|
+
export class DefaultSigner {
|
|
622
|
+
|
|
623
|
+
static __wrap(ptr) {
|
|
624
|
+
ptr = ptr >>> 0;
|
|
625
|
+
const obj = Object.create(DefaultSigner.prototype);
|
|
626
|
+
obj.__wbg_ptr = ptr;
|
|
627
|
+
DefaultSignerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
628
|
+
return obj;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
__destroy_into_raw() {
|
|
632
|
+
const ptr = this.__wbg_ptr;
|
|
633
|
+
this.__wbg_ptr = 0;
|
|
634
|
+
DefaultSignerFinalization.unregister(this);
|
|
635
|
+
return ptr;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
free() {
|
|
639
|
+
const ptr = this.__destroy_into_raw();
|
|
640
|
+
wasm.__wbg_defaultsigner_free(ptr, 0);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* @param {Uint8Array} message
|
|
644
|
+
* @param {string} path
|
|
645
|
+
* @returns {Promise<EcdsaSignatureBytes>}
|
|
646
|
+
*/
|
|
647
|
+
signEcdsa(message, path) {
|
|
648
|
+
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
|
649
|
+
const len0 = WASM_VECTOR_LEN;
|
|
650
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
651
|
+
const len1 = WASM_VECTOR_LEN;
|
|
652
|
+
const ret = wasm.defaultsigner_signEcdsa(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
653
|
+
return ret;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* @param {ExternalSignFrostRequest} request
|
|
657
|
+
* @returns {Promise<ExternalFrostSignatureShare>}
|
|
658
|
+
*/
|
|
659
|
+
signFrost(request) {
|
|
660
|
+
const ret = wasm.defaultsigner_signFrost(this.__wbg_ptr, request);
|
|
661
|
+
return ret;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* @param {Uint8Array} message
|
|
665
|
+
* @param {string} path
|
|
666
|
+
* @returns {Promise<Uint8Array>}
|
|
667
|
+
*/
|
|
668
|
+
eciesDecrypt(message, path) {
|
|
669
|
+
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
|
670
|
+
const len0 = WASM_VECTOR_LEN;
|
|
671
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
672
|
+
const len1 = WASM_VECTOR_LEN;
|
|
673
|
+
const ret = wasm.defaultsigner_eciesDecrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
674
|
+
return ret;
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* @param {Uint8Array} message
|
|
678
|
+
* @param {string} path
|
|
679
|
+
* @returns {Promise<Uint8Array>}
|
|
680
|
+
*/
|
|
681
|
+
eciesEncrypt(message, path) {
|
|
682
|
+
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
|
683
|
+
const len0 = WASM_VECTOR_LEN;
|
|
684
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
685
|
+
const len1 = WASM_VECTOR_LEN;
|
|
686
|
+
const ret = wasm.defaultsigner_eciesEncrypt(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
687
|
+
return ret;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* @param {ExternalAggregateFrostRequest} request
|
|
691
|
+
* @returns {Promise<ExternalFrostSignature>}
|
|
692
|
+
*/
|
|
693
|
+
aggregateFrost(request) {
|
|
694
|
+
const ret = wasm.defaultsigner_aggregateFrost(this.__wbg_ptr, request);
|
|
695
|
+
return ret;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* @param {string} path
|
|
699
|
+
* @returns {Promise<PublicKeyBytes>}
|
|
700
|
+
*/
|
|
701
|
+
derivePublicKey(path) {
|
|
702
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
703
|
+
const len0 = WASM_VECTOR_LEN;
|
|
704
|
+
const ret = wasm.defaultsigner_derivePublicKey(this.__wbg_ptr, ptr0, len0);
|
|
705
|
+
return ret;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* @param {Uint8Array} hash
|
|
709
|
+
* @param {string} path
|
|
710
|
+
* @returns {Promise<SchnorrSignatureBytes>}
|
|
711
|
+
*/
|
|
712
|
+
signHashSchnorr(hash, path) {
|
|
713
|
+
const ptr0 = passArray8ToWasm0(hash, wasm.__wbindgen_malloc);
|
|
714
|
+
const len0 = WASM_VECTOR_LEN;
|
|
715
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
716
|
+
const len1 = WASM_VECTOR_LEN;
|
|
717
|
+
const ret = wasm.defaultsigner_signHashSchnorr(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
718
|
+
return ret;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* @returns {Promise<ExternalPrivateKeySource>}
|
|
722
|
+
*/
|
|
723
|
+
generateRandomKey() {
|
|
724
|
+
const ret = wasm.defaultsigner_generateRandomKey(this.__wbg_ptr);
|
|
725
|
+
return ret;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* @returns {PublicKeyBytes}
|
|
729
|
+
*/
|
|
730
|
+
identityPublicKey() {
|
|
731
|
+
const ret = wasm.defaultsigner_identityPublicKey(this.__wbg_ptr);
|
|
732
|
+
if (ret[2]) {
|
|
733
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
734
|
+
}
|
|
735
|
+
return takeFromExternrefTable0(ret[0]);
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* @param {ExternalPrivateKeySource} signing_key
|
|
739
|
+
* @param {ExternalPrivateKeySource} new_signing_key
|
|
740
|
+
* @returns {Promise<ExternalPrivateKeySource>}
|
|
741
|
+
*/
|
|
742
|
+
subtractPrivateKeys(signing_key, new_signing_key) {
|
|
743
|
+
const ret = wasm.defaultsigner_subtractPrivateKeys(this.__wbg_ptr, signing_key, new_signing_key);
|
|
744
|
+
return ret;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* @param {Uint8Array} message
|
|
748
|
+
* @param {string} path
|
|
749
|
+
* @returns {Promise<RecoverableEcdsaSignatureBytes>}
|
|
750
|
+
*/
|
|
751
|
+
signEcdsaRecoverable(message, path) {
|
|
752
|
+
const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc);
|
|
753
|
+
const len0 = WASM_VECTOR_LEN;
|
|
754
|
+
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
755
|
+
const len1 = WASM_VECTOR_LEN;
|
|
756
|
+
const ret = wasm.defaultsigner_signEcdsaRecoverable(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
757
|
+
return ret;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* @param {ExternalTreeNodeId} id
|
|
761
|
+
* @returns {Promise<PublicKeyBytes>}
|
|
762
|
+
*/
|
|
763
|
+
getPublicKeyForNode(id) {
|
|
764
|
+
const ret = wasm.defaultsigner_getPublicKeyForNode(this.__wbg_ptr, id);
|
|
765
|
+
return ret;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* @param {ExternalSecretToSplit} secret
|
|
769
|
+
* @param {number} threshold
|
|
770
|
+
* @param {number} num_shares
|
|
771
|
+
* @returns {Promise<ExternalVerifiableSecretShare[]>}
|
|
772
|
+
*/
|
|
773
|
+
splitSecretWithProofs(secret, threshold, num_shares) {
|
|
774
|
+
const ret = wasm.defaultsigner_splitSecretWithProofs(this.__wbg_ptr, secret, threshold, num_shares);
|
|
775
|
+
return ret;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* @param {number} index
|
|
779
|
+
* @returns {Promise<PublicKeyBytes>}
|
|
780
|
+
*/
|
|
781
|
+
getStaticDepositPublicKey(index) {
|
|
782
|
+
const ret = wasm.defaultsigner_getStaticDepositPublicKey(this.__wbg_ptr, index);
|
|
783
|
+
return ret;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* @param {number} index
|
|
787
|
+
* @returns {Promise<PrivateKeyBytes>}
|
|
788
|
+
*/
|
|
789
|
+
getStaticDepositPrivateKey(index) {
|
|
790
|
+
const ret = wasm.defaultsigner_getStaticDepositPrivateKey(this.__wbg_ptr, index);
|
|
791
|
+
return ret;
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* @param {ExternalEncryptedPrivateKey} private_key
|
|
795
|
+
* @param {PublicKeyBytes} receiver_public_key
|
|
796
|
+
* @returns {Promise<Uint8Array>}
|
|
797
|
+
*/
|
|
798
|
+
encryptPrivateKeyForReceiver(private_key, receiver_public_key) {
|
|
799
|
+
const ret = wasm.defaultsigner_encryptPrivateKeyForReceiver(this.__wbg_ptr, private_key, receiver_public_key);
|
|
800
|
+
return ret;
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* @returns {Promise<ExternalFrostCommitments>}
|
|
804
|
+
*/
|
|
805
|
+
generateFrostSigningCommitments() {
|
|
806
|
+
const ret = wasm.defaultsigner_generateFrostSigningCommitments(this.__wbg_ptr);
|
|
807
|
+
return ret;
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* @param {number} index
|
|
811
|
+
* @returns {Promise<ExternalPrivateKeySource>}
|
|
812
|
+
*/
|
|
813
|
+
getStaticDepositPrivateKeySource(index) {
|
|
814
|
+
const ret = wasm.defaultsigner_getStaticDepositPrivateKeySource(this.__wbg_ptr, index);
|
|
815
|
+
return ret;
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* @param {ExternalPrivateKeySource} private_key
|
|
819
|
+
* @returns {Promise<PublicKeyBytes>}
|
|
820
|
+
*/
|
|
821
|
+
getPublicKeyFromPrivateKeySource(private_key) {
|
|
822
|
+
const ret = wasm.defaultsigner_getPublicKeyFromPrivateKeySource(this.__wbg_ptr, private_key);
|
|
823
|
+
return ret;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
565
827
|
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
566
828
|
? { register: () => {}, unregister: () => {} }
|
|
567
829
|
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
|
|
@@ -714,14 +976,12 @@ export class SdkBuilder {
|
|
|
714
976
|
wasm.__wbg_sdkbuilder_free(ptr, 0);
|
|
715
977
|
}
|
|
716
978
|
/**
|
|
717
|
-
* @param {
|
|
718
|
-
* @param {boolean} use_address_index
|
|
719
|
-
* @param {number | null} [account_number]
|
|
979
|
+
* @param {KeySetConfig} config
|
|
720
980
|
* @returns {SdkBuilder}
|
|
721
981
|
*/
|
|
722
|
-
withKeySet(
|
|
982
|
+
withKeySet(config) {
|
|
723
983
|
const ptr = this.__destroy_into_raw();
|
|
724
|
-
const ret = wasm.sdkbuilder_withKeySet(ptr,
|
|
984
|
+
const ret = wasm.sdkbuilder_withKeySet(ptr, config);
|
|
725
985
|
return SdkBuilder.__wrap(ret);
|
|
726
986
|
}
|
|
727
987
|
/**
|
|
@@ -733,6 +993,15 @@ export class SdkBuilder {
|
|
|
733
993
|
const ret = wasm.sdkbuilder_withStorage(ptr, storage);
|
|
734
994
|
return SdkBuilder.__wrap(ret);
|
|
735
995
|
}
|
|
996
|
+
/**
|
|
997
|
+
* @param {Config} config
|
|
998
|
+
* @param {ExternalSigner} signer
|
|
999
|
+
* @returns {SdkBuilder}
|
|
1000
|
+
*/
|
|
1001
|
+
static newWithSigner(config, signer) {
|
|
1002
|
+
const ret = wasm.sdkbuilder_newWithSigner(config, signer);
|
|
1003
|
+
return SdkBuilder.__wrap(ret);
|
|
1004
|
+
}
|
|
736
1005
|
/**
|
|
737
1006
|
* @param {FiatService} fiat_service
|
|
738
1007
|
* @returns {SdkBuilder}
|
|
@@ -920,6 +1189,10 @@ const imports = {
|
|
|
920
1189
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
921
1190
|
}
|
|
922
1191
|
}, arguments) },
|
|
1192
|
+
__wbg_aggregateFrost_053f2d54394422d5: function() { return handleError(function (arg0, arg1) {
|
|
1193
|
+
const ret = arg0.aggregateFrost(arg1);
|
|
1194
|
+
return ret;
|
|
1195
|
+
}, arguments) },
|
|
923
1196
|
__wbg_append_8c7dd8d641a5f01b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
924
1197
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
925
1198
|
}, arguments) },
|
|
@@ -1052,10 +1325,54 @@ const imports = {
|
|
|
1052
1325
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1053
1326
|
}
|
|
1054
1327
|
}, arguments) },
|
|
1328
|
+
__wbg_derivePublicKey_736fb57b6852f201: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1329
|
+
let deferred0_0;
|
|
1330
|
+
let deferred0_1;
|
|
1331
|
+
try {
|
|
1332
|
+
deferred0_0 = arg1;
|
|
1333
|
+
deferred0_1 = arg2;
|
|
1334
|
+
const ret = arg0.derivePublicKey(getStringFromWasm0(arg1, arg2));
|
|
1335
|
+
return ret;
|
|
1336
|
+
} finally {
|
|
1337
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1338
|
+
}
|
|
1339
|
+
}, arguments) },
|
|
1055
1340
|
__wbg_done_769e5ede4b31c67b: function(arg0) {
|
|
1056
1341
|
const ret = arg0.done;
|
|
1057
1342
|
return ret;
|
|
1058
1343
|
},
|
|
1344
|
+
__wbg_eciesDecrypt_4edc97146456d67b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1345
|
+
let deferred1_0;
|
|
1346
|
+
let deferred1_1;
|
|
1347
|
+
try {
|
|
1348
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
1349
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
1350
|
+
deferred1_0 = arg3;
|
|
1351
|
+
deferred1_1 = arg4;
|
|
1352
|
+
const ret = arg0.eciesDecrypt(v0, getStringFromWasm0(arg3, arg4));
|
|
1353
|
+
return ret;
|
|
1354
|
+
} finally {
|
|
1355
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1356
|
+
}
|
|
1357
|
+
}, arguments) },
|
|
1358
|
+
__wbg_eciesEncrypt_040d338cf1cb289f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1359
|
+
let deferred1_0;
|
|
1360
|
+
let deferred1_1;
|
|
1361
|
+
try {
|
|
1362
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
1363
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
1364
|
+
deferred1_0 = arg3;
|
|
1365
|
+
deferred1_1 = arg4;
|
|
1366
|
+
const ret = arg0.eciesEncrypt(v0, getStringFromWasm0(arg3, arg4));
|
|
1367
|
+
return ret;
|
|
1368
|
+
} finally {
|
|
1369
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1370
|
+
}
|
|
1371
|
+
}, arguments) },
|
|
1372
|
+
__wbg_encryptPrivateKeyForReceiver_6e87a5befdd3ee82: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1373
|
+
const ret = arg0.encryptPrivateKeyForReceiver(arg1, arg2);
|
|
1374
|
+
return ret;
|
|
1375
|
+
}, arguments) },
|
|
1059
1376
|
__wbg_enqueue_bb16ba72f537dc9e: function() { return handleError(function (arg0, arg1) {
|
|
1060
1377
|
arg0.enqueue(arg1);
|
|
1061
1378
|
}, arguments) },
|
|
@@ -1090,6 +1407,14 @@ const imports = {
|
|
|
1090
1407
|
const ret = fetch(arg0);
|
|
1091
1408
|
return ret;
|
|
1092
1409
|
},
|
|
1410
|
+
__wbg_generateFrostSigningCommitments_3473ea4923985769: function() { return handleError(function (arg0) {
|
|
1411
|
+
const ret = arg0.generateFrostSigningCommitments();
|
|
1412
|
+
return ret;
|
|
1413
|
+
}, arguments) },
|
|
1414
|
+
__wbg_generateRandomKey_48fd8bb84246b45f: function() { return handleError(function (arg0) {
|
|
1415
|
+
const ret = arg0.generateRandomKey();
|
|
1416
|
+
return ret;
|
|
1417
|
+
}, arguments) },
|
|
1093
1418
|
__wbg_getAddressUtxos_328ceb8b4a63a6da: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1094
1419
|
let deferred0_0;
|
|
1095
1420
|
let deferred0_1;
|
|
@@ -1138,6 +1463,14 @@ const imports = {
|
|
|
1138
1463
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1139
1464
|
}
|
|
1140
1465
|
}, arguments) },
|
|
1466
|
+
__wbg_getPublicKeyForNode_5ddb3378904e4ad4: function() { return handleError(function (arg0, arg1) {
|
|
1467
|
+
const ret = arg0.getPublicKeyForNode(arg1);
|
|
1468
|
+
return ret;
|
|
1469
|
+
}, arguments) },
|
|
1470
|
+
__wbg_getPublicKeyFromPrivateKeySource_1ef953e0c8c04628: function() { return handleError(function (arg0, arg1) {
|
|
1471
|
+
const ret = arg0.getPublicKeyFromPrivateKeySource(arg1);
|
|
1472
|
+
return ret;
|
|
1473
|
+
}, arguments) },
|
|
1141
1474
|
__wbg_getRandomValues_b8f5dbd5f3995a9e: function() { return handleError(function (arg0, arg1) {
|
|
1142
1475
|
arg0.getRandomValues(arg1);
|
|
1143
1476
|
}, arguments) },
|
|
@@ -1160,6 +1493,18 @@ const imports = {
|
|
|
1160
1493
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1161
1494
|
}
|
|
1162
1495
|
}, arguments) },
|
|
1496
|
+
__wbg_getStaticDepositPrivateKeySource_7b2991ed6d3d4711: function() { return handleError(function (arg0, arg1) {
|
|
1497
|
+
const ret = arg0.getStaticDepositPrivateKeySource(arg1 >>> 0);
|
|
1498
|
+
return ret;
|
|
1499
|
+
}, arguments) },
|
|
1500
|
+
__wbg_getStaticDepositPrivateKey_c4cc635b7e2348a8: function() { return handleError(function (arg0, arg1) {
|
|
1501
|
+
const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
|
|
1502
|
+
return ret;
|
|
1503
|
+
}, arguments) },
|
|
1504
|
+
__wbg_getStaticDepositPublicKey_86535a86c4cf3d04: function() { return handleError(function (arg0, arg1) {
|
|
1505
|
+
const ret = arg0.getStaticDepositPublicKey(arg1 >>> 0);
|
|
1506
|
+
return ret;
|
|
1507
|
+
}, arguments) },
|
|
1163
1508
|
__wbg_getTransactionHex_973b8d0555c60f99: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1164
1509
|
let deferred0_0;
|
|
1165
1510
|
let deferred0_1;
|
|
@@ -1212,6 +1557,10 @@ const imports = {
|
|
|
1212
1557
|
const ret = arg0.headers;
|
|
1213
1558
|
return ret;
|
|
1214
1559
|
},
|
|
1560
|
+
__wbg_identityPublicKey_c8b35005055a3df0: function() { return handleError(function (arg0) {
|
|
1561
|
+
const ret = arg0.identityPublicKey();
|
|
1562
|
+
return ret;
|
|
1563
|
+
}, arguments) },
|
|
1215
1564
|
__wbg_insertPayment_2afe3300c5f86ccf: function() { return handleError(function (arg0, arg1) {
|
|
1216
1565
|
const ret = arg0.insertPayment(arg1);
|
|
1217
1566
|
return ret;
|
|
@@ -1354,7 +1703,7 @@ const imports = {
|
|
|
1354
1703
|
const a = state0.a;
|
|
1355
1704
|
state0.a = 0;
|
|
1356
1705
|
try {
|
|
1357
|
-
return
|
|
1706
|
+
return __wbg_adapter_349(a, state0.b, arg0, arg1);
|
|
1358
1707
|
} finally {
|
|
1359
1708
|
state0.a = a;
|
|
1360
1709
|
}
|
|
@@ -1588,10 +1937,60 @@ const imports = {
|
|
|
1588
1937
|
__wbg_setsignal_75b21ef3a81de905: function(arg0, arg1) {
|
|
1589
1938
|
arg0.signal = arg1;
|
|
1590
1939
|
},
|
|
1940
|
+
__wbg_signEcdsaRecoverable_673b67f4f9ec42e7: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1941
|
+
let deferred1_0;
|
|
1942
|
+
let deferred1_1;
|
|
1943
|
+
try {
|
|
1944
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
1945
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
1946
|
+
deferred1_0 = arg3;
|
|
1947
|
+
deferred1_1 = arg4;
|
|
1948
|
+
const ret = arg0.signEcdsaRecoverable(v0, getStringFromWasm0(arg3, arg4));
|
|
1949
|
+
return ret;
|
|
1950
|
+
} finally {
|
|
1951
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1952
|
+
}
|
|
1953
|
+
}, arguments) },
|
|
1954
|
+
__wbg_signEcdsa_b0be26cee51844bc: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1955
|
+
let deferred1_0;
|
|
1956
|
+
let deferred1_1;
|
|
1957
|
+
try {
|
|
1958
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
1959
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
1960
|
+
deferred1_0 = arg3;
|
|
1961
|
+
deferred1_1 = arg4;
|
|
1962
|
+
const ret = arg0.signEcdsa(v0, getStringFromWasm0(arg3, arg4));
|
|
1963
|
+
return ret;
|
|
1964
|
+
} finally {
|
|
1965
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1966
|
+
}
|
|
1967
|
+
}, arguments) },
|
|
1968
|
+
__wbg_signFrost_06ac652135c4e862: function() { return handleError(function (arg0, arg1) {
|
|
1969
|
+
const ret = arg0.signFrost(arg1);
|
|
1970
|
+
return ret;
|
|
1971
|
+
}, arguments) },
|
|
1972
|
+
__wbg_signHashSchnorr_390c51f0bbb70a7a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1973
|
+
let deferred1_0;
|
|
1974
|
+
let deferred1_1;
|
|
1975
|
+
try {
|
|
1976
|
+
var v0 = getArrayU8FromWasm0(arg1, arg2).slice();
|
|
1977
|
+
wasm.__wbindgen_free(arg1, arg2 * 1, 1);
|
|
1978
|
+
deferred1_0 = arg3;
|
|
1979
|
+
deferred1_1 = arg4;
|
|
1980
|
+
const ret = arg0.signHashSchnorr(v0, getStringFromWasm0(arg3, arg4));
|
|
1981
|
+
return ret;
|
|
1982
|
+
} finally {
|
|
1983
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1984
|
+
}
|
|
1985
|
+
}, arguments) },
|
|
1591
1986
|
__wbg_signal_aaf9ad74119f20a4: function(arg0) {
|
|
1592
1987
|
const ret = arg0.signal;
|
|
1593
1988
|
return ret;
|
|
1594
1989
|
},
|
|
1990
|
+
__wbg_splitSecretWithProofs_1aba146de2c5eb0a: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1991
|
+
const ret = arg0.splitSecretWithProofs(arg1, arg2 >>> 0, arg3 >>> 0);
|
|
1992
|
+
return ret;
|
|
1993
|
+
}, arguments) },
|
|
1595
1994
|
__wbg_static_accessor_GLOBAL_88a902d13a557d07: function() {
|
|
1596
1995
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1597
1996
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
@@ -1620,6 +2019,10 @@ const imports = {
|
|
|
1620
2019
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1621
2020
|
return ret;
|
|
1622
2021
|
},
|
|
2022
|
+
__wbg_subtractPrivateKeys_8b281bbbac58f672: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2023
|
+
const ret = arg0.subtractPrivateKeys(arg1, arg2);
|
|
2024
|
+
return ret;
|
|
2025
|
+
}, arguments) },
|
|
1623
2026
|
__wbg_syncAddOutgoingChange_9d94d35ba215d3c9: function() { return handleError(function (arg0, arg1) {
|
|
1624
2027
|
const ret = arg0.syncAddOutgoingChange(arg1);
|
|
1625
2028
|
return ret;
|
|
@@ -1709,6 +2112,13 @@ const imports = {
|
|
|
1709
2112
|
const ret = arg0.view;
|
|
1710
2113
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1711
2114
|
},
|
|
2115
|
+
__wbindgen_array_new: function() {
|
|
2116
|
+
const ret = [];
|
|
2117
|
+
return ret;
|
|
2118
|
+
},
|
|
2119
|
+
__wbindgen_array_push: function(arg0, arg1) {
|
|
2120
|
+
arg0.push(arg1);
|
|
2121
|
+
},
|
|
1712
2122
|
__wbindgen_as_number: function(arg0) {
|
|
1713
2123
|
const ret = +arg0;
|
|
1714
2124
|
return ret;
|
|
@@ -1745,12 +2155,12 @@ const imports = {
|
|
|
1745
2155
|
const ret = false;
|
|
1746
2156
|
return ret;
|
|
1747
2157
|
},
|
|
1748
|
-
|
|
1749
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2158
|
+
__wbindgen_closure_wrapper11146: function(arg0, arg1, arg2) {
|
|
2159
|
+
const ret = makeMutClosure(arg0, arg1, 812, __wbg_adapter_64);
|
|
1750
2160
|
return ret;
|
|
1751
2161
|
},
|
|
1752
|
-
|
|
1753
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2162
|
+
__wbindgen_closure_wrapper13052: function(arg0, arg1, arg2) {
|
|
2163
|
+
const ret = makeMutClosure(arg0, arg1, 1048, __wbg_adapter_67);
|
|
1754
2164
|
return ret;
|
|
1755
2165
|
},
|
|
1756
2166
|
__wbindgen_debug_string: function(arg0, arg1) {
|
|
@@ -1844,6 +2254,12 @@ const imports = {
|
|
|
1844
2254
|
__wbindgen_throw: function(arg0, arg1) {
|
|
1845
2255
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1846
2256
|
},
|
|
2257
|
+
__wbindgen_uint8_array_new: function(arg0, arg1) {
|
|
2258
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
2259
|
+
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
2260
|
+
const ret = v0;
|
|
2261
|
+
return ret;
|
|
2262
|
+
},
|
|
1847
2263
|
},
|
|
1848
2264
|
|
|
1849
2265
|
};
|
|
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
|
|
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
|
|
90
|
-
export const
|
|
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;
|