@breeztech/breez-sdk-spark 0.22.2 → 0.23.0
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 +65 -5
- package/bundler/breez_sdk_spark_wasm_bg.js +66 -27
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +9 -6
- package/bundler/index.js +15 -2
- package/bundler/package.json +5 -0
- package/bundler/storage/index.js +6 -0
- package/bundler/tree-store/index.js +1518 -0
- package/bundler/tree-store/package.json +12 -0
- package/deno/breez_sdk_spark_wasm.d.ts +65 -5
- package/deno/breez_sdk_spark_wasm.js +66 -27
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +9 -6
- package/nodejs/breez_sdk_spark_wasm.d.ts +65 -5
- package/nodejs/breez_sdk_spark_wasm.js +66 -27
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +9 -6
- package/nodejs/index.js +11 -0
- package/nodejs/mysql-storage/index.cjs +9 -1
- package/nodejs/mysql-storage/migrations.cjs +6 -0
- package/nodejs/mysql-tree-store/index.cjs +296 -29
- package/nodejs/mysql-tree-store/migrations.cjs +198 -34
- package/nodejs/package.json +1 -0
- package/nodejs/postgres-storage/index.cjs +9 -1
- package/nodejs/postgres-storage/migrations.cjs +6 -0
- package/nodejs/postgres-tree-store/index.cjs +301 -40
- package/nodejs/postgres-tree-store/migrations.cjs +42 -0
- package/nodejs/storage/index.cjs +14 -3
- package/nodejs/storage/migrations.cjs +6 -0
- package/nodejs/tree-store/errors.cjs +13 -0
- package/nodejs/tree-store/index.cjs +1185 -0
- package/nodejs/tree-store/migrations.cjs +185 -0
- package/nodejs/tree-store/package.json +9 -0
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +74 -11
- package/web/breez_sdk_spark_wasm.js +66 -27
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +9 -6
- package/web/index.js +15 -2
- package/web/package.json +5 -0
- package/web/storage/index.js +6 -0
- package/web/tree-store/index.js +1518 -0
- package/web/tree-store/package.json +12 -0
|
@@ -233,6 +233,13 @@ export class BreezSdk {
|
|
|
233
233
|
const ret = wasm.breezsdk_disconnect(this.__wbg_ptr);
|
|
234
234
|
return ret;
|
|
235
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* @returns {Promise<ExportUnilateralExitStateResponse>}
|
|
238
|
+
*/
|
|
239
|
+
exportUnilateralExitState() {
|
|
240
|
+
const ret = wasm.breezsdk_exportUnilateralExitState(this.__wbg_ptr);
|
|
241
|
+
return ret;
|
|
242
|
+
}
|
|
236
243
|
/**
|
|
237
244
|
* @param {FetchConversionLimitsRequest} request
|
|
238
245
|
* @returns {Promise<FetchConversionLimitsResponse>}
|
|
@@ -294,6 +301,14 @@ export class BreezSdk {
|
|
|
294
301
|
const ret = wasm.breezsdk_getUserSettings(this.__wbg_ptr);
|
|
295
302
|
return ret;
|
|
296
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* @param {ImportUnilateralExitStateRequest} request
|
|
306
|
+
* @returns {Promise<ImportUnilateralExitStateResponse>}
|
|
307
|
+
*/
|
|
308
|
+
importUnilateralExitState(request) {
|
|
309
|
+
const ret = wasm.breezsdk_importUnilateralExitState(this.__wbg_ptr, request);
|
|
310
|
+
return ret;
|
|
311
|
+
}
|
|
297
312
|
/**
|
|
298
313
|
* @param {ListContactsRequest} request
|
|
299
314
|
* @returns {Promise<Contact[]>}
|
|
@@ -389,6 +404,14 @@ export class BreezSdk {
|
|
|
389
404
|
const ret = wasm.breezsdk_prepareLnurlPay(this.__wbg_ptr, request);
|
|
390
405
|
return ret;
|
|
391
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* @param {PreparePaymentLinkRequest} request
|
|
409
|
+
* @returns {Promise<PreparePaymentLinkResponse>}
|
|
410
|
+
*/
|
|
411
|
+
preparePaymentLink(request) {
|
|
412
|
+
const ret = wasm.breezsdk_preparePaymentLink(this.__wbg_ptr, request);
|
|
413
|
+
return ret;
|
|
414
|
+
}
|
|
392
415
|
/**
|
|
393
416
|
* @param {PrepareSendBatchRequest} request
|
|
394
417
|
* @returns {Promise<PrepareSendBatchResponse>}
|
|
@@ -2204,6 +2227,10 @@ function __wbg_get_imports() {
|
|
|
2204
2227
|
const ret = createDefaultStorage(getStringFromWasm0(arg0, arg1), arg2);
|
|
2205
2228
|
return ret;
|
|
2206
2229
|
}, arguments); },
|
|
2230
|
+
__wbg_createDefaultTreeStore_231e13cea886fab8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2231
|
+
const ret = createDefaultTreeStore(getStringFromWasm0(arg0, arg1), arg2);
|
|
2232
|
+
return ret;
|
|
2233
|
+
}, arguments); },
|
|
2207
2234
|
__wbg_createMysqlPool_8927bff3a28fcef9: function() { return handleError(function (arg0) {
|
|
2208
2235
|
const ret = createMysqlPool(arg0);
|
|
2209
2236
|
return ret;
|
|
@@ -2519,6 +2546,10 @@ function __wbg_get_imports() {
|
|
|
2519
2546
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2520
2547
|
}
|
|
2521
2548
|
}, arguments); },
|
|
2549
|
+
__wbg_getExitChains_a61db75ca1ab9009: function() { return handleError(function (arg0, arg1) {
|
|
2550
|
+
const ret = arg0.getExitChains(arg1);
|
|
2551
|
+
return ret;
|
|
2552
|
+
}, arguments); },
|
|
2522
2553
|
__wbg_getIdentityPublicKey_c6fcd87d66ed6927: function() { return handleError(function (arg0) {
|
|
2523
2554
|
const ret = arg0.getIdentityPublicKey();
|
|
2524
2555
|
return ret;
|
|
@@ -2809,6 +2840,10 @@ function __wbg_get_imports() {
|
|
|
2809
2840
|
const ret = Symbol.iterator;
|
|
2810
2841
|
return ret;
|
|
2811
2842
|
},
|
|
2843
|
+
__wbg_leavesMissingExitChains_f49172139683e37b: function() { return handleError(function (arg0) {
|
|
2844
|
+
const ret = arg0.leavesMissingExitChains();
|
|
2845
|
+
return ret;
|
|
2846
|
+
}, arguments); },
|
|
2812
2847
|
__wbg_length_0a6ce016dc1460b0: function(arg0) {
|
|
2813
2848
|
const ret = arg0.length;
|
|
2814
2849
|
return ret;
|
|
@@ -3415,6 +3450,10 @@ function __wbg_get_imports() {
|
|
|
3415
3450
|
const ret = arg0.status;
|
|
3416
3451
|
return ret;
|
|
3417
3452
|
},
|
|
3453
|
+
__wbg_storeAncestors_4977efb1f53b8d99: function() { return handleError(function (arg0, arg1) {
|
|
3454
|
+
const ret = arg0.storeAncestors(arg1);
|
|
3455
|
+
return ret;
|
|
3456
|
+
}, arguments); },
|
|
3418
3457
|
__wbg_stringify_7fd5cae8859a6f10: function() { return handleError(function (arg0) {
|
|
3419
3458
|
const ret = JSON.stringify(arg0);
|
|
3420
3459
|
return ret;
|
|
@@ -3579,62 +3618,62 @@ function __wbg_get_imports() {
|
|
|
3579
3618
|
return ret;
|
|
3580
3619
|
},
|
|
3581
3620
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3582
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3583
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3621
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3622
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522);
|
|
3584
3623
|
return ret;
|
|
3585
3624
|
},
|
|
3586
3625
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3587
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3626
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 395, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3588
3627
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2);
|
|
3589
3628
|
return ret;
|
|
3590
3629
|
},
|
|
3591
3630
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3592
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
3631
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 395, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3593
3632
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2);
|
|
3594
3633
|
return ret;
|
|
3595
3634
|
},
|
|
3596
3635
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3597
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
3636
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 395, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3598
3637
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3);
|
|
3599
3638
|
return ret;
|
|
3600
3639
|
},
|
|
3601
3640
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3602
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
3641
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 395, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3603
3642
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4);
|
|
3604
3643
|
return ret;
|
|
3605
3644
|
},
|
|
3606
3645
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3607
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
3646
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 395, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3608
3647
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5);
|
|
3609
3648
|
return ret;
|
|
3610
3649
|
},
|
|
3611
3650
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3612
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx:
|
|
3613
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3651
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3652
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6);
|
|
3614
3653
|
return ret;
|
|
3615
3654
|
},
|
|
3616
3655
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3617
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx:
|
|
3618
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3656
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3657
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7);
|
|
3619
3658
|
return ret;
|
|
3620
3659
|
},
|
|
3621
3660
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3622
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx:
|
|
3623
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3661
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3662
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8);
|
|
3624
3663
|
return ret;
|
|
3625
3664
|
},
|
|
3626
3665
|
__wbindgen_cast_000000000000000a: function(arg0, arg1) {
|
|
3627
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx:
|
|
3628
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3666
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 22, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3667
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9);
|
|
3629
3668
|
return ret;
|
|
3630
3669
|
},
|
|
3631
3670
|
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
3632
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3671
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3633
3672
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1d6669a7b693932a);
|
|
3634
3673
|
return ret;
|
|
3635
3674
|
},
|
|
3636
3675
|
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
3637
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3676
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 429, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
3638
3677
|
const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e);
|
|
3639
3678
|
return ret;
|
|
3640
3679
|
},
|
|
@@ -3754,36 +3793,36 @@ function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, a
|
|
|
3754
3793
|
wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, arg1, arg2);
|
|
3755
3794
|
}
|
|
3756
3795
|
|
|
3757
|
-
function
|
|
3758
|
-
const ret = wasm.
|
|
3796
|
+
function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2) {
|
|
3797
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2);
|
|
3759
3798
|
if (ret[1]) {
|
|
3760
3799
|
throw takeFromExternrefTable0(ret[0]);
|
|
3761
3800
|
}
|
|
3762
3801
|
}
|
|
3763
3802
|
|
|
3764
|
-
function
|
|
3765
|
-
const ret = wasm.
|
|
3803
|
+
function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2) {
|
|
3804
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2);
|
|
3766
3805
|
if (ret[1]) {
|
|
3767
3806
|
throw takeFromExternrefTable0(ret[0]);
|
|
3768
3807
|
}
|
|
3769
3808
|
}
|
|
3770
3809
|
|
|
3771
|
-
function
|
|
3772
|
-
const ret = wasm.
|
|
3810
|
+
function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2) {
|
|
3811
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2);
|
|
3773
3812
|
if (ret[1]) {
|
|
3774
3813
|
throw takeFromExternrefTable0(ret[0]);
|
|
3775
3814
|
}
|
|
3776
3815
|
}
|
|
3777
3816
|
|
|
3778
|
-
function
|
|
3779
|
-
const ret = wasm.
|
|
3817
|
+
function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8(arg0, arg1, arg2) {
|
|
3818
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8(arg0, arg1, arg2);
|
|
3780
3819
|
if (ret[1]) {
|
|
3781
3820
|
throw takeFromExternrefTable0(ret[0]);
|
|
3782
3821
|
}
|
|
3783
3822
|
}
|
|
3784
3823
|
|
|
3785
|
-
function
|
|
3786
|
-
const ret = wasm.
|
|
3824
|
+
function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9(arg0, arg1, arg2) {
|
|
3825
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9(arg0, arg1, arg2);
|
|
3787
3826
|
if (ret[1]) {
|
|
3788
3827
|
throw takeFromExternrefTable0(ret[0]);
|
|
3789
3828
|
}
|
|
Binary file
|
|
@@ -33,6 +33,7 @@ export const breezsdk_claimLightningAddressTransfer: (a: number, b: any) => any;
|
|
|
33
33
|
export const breezsdk_deleteContact: (a: number, b: number, c: number) => any;
|
|
34
34
|
export const breezsdk_deleteLightningAddress: (a: number) => any;
|
|
35
35
|
export const breezsdk_disconnect: (a: number) => any;
|
|
36
|
+
export const breezsdk_exportUnilateralExitState: (a: number) => any;
|
|
36
37
|
export const breezsdk_fetchConversionLimits: (a: number, b: any) => any;
|
|
37
38
|
export const breezsdk_getCrossChainRoutes: (a: number, b: any) => any;
|
|
38
39
|
export const breezsdk_getInfo: (a: number, b: any) => any;
|
|
@@ -41,6 +42,7 @@ export const breezsdk_getPayment: (a: number, b: any) => any;
|
|
|
41
42
|
export const breezsdk_getTokenIssuer: (a: number) => number;
|
|
42
43
|
export const breezsdk_getTokensMetadata: (a: number, b: any) => any;
|
|
43
44
|
export const breezsdk_getUserSettings: (a: number) => any;
|
|
45
|
+
export const breezsdk_importUnilateralExitState: (a: number, b: any) => any;
|
|
44
46
|
export const breezsdk_listContacts: (a: number, b: any) => any;
|
|
45
47
|
export const breezsdk_listFiatCurrencies: (a: number) => any;
|
|
46
48
|
export const breezsdk_listFiatRates: (a: number) => any;
|
|
@@ -53,6 +55,7 @@ export const breezsdk_lnurlWithdraw: (a: number, b: any) => any;
|
|
|
53
55
|
export const breezsdk_optimizeLeaves: (a: number, b: any) => any;
|
|
54
56
|
export const breezsdk_parse: (a: number, b: number, c: number) => any;
|
|
55
57
|
export const breezsdk_prepareLnurlPay: (a: number, b: any) => any;
|
|
58
|
+
export const breezsdk_preparePaymentLink: (a: number, b: any) => any;
|
|
56
59
|
export const breezsdk_prepareSendBatch: (a: number, b: any) => any;
|
|
57
60
|
export const breezsdk_prepareSendPayment: (a: number, b: any) => any;
|
|
58
61
|
export const breezsdk_prepareUnilateralExit: (a: number, b: any) => any;
|
|
@@ -178,16 +181,16 @@ export const intounderlyingsource_cancel: (a: number) => void;
|
|
|
178
181
|
export const intounderlyingsource_pull: (a: number, b: any) => any;
|
|
179
182
|
export const __wbg_externalbreezsignerhandle_free: (a: number, b: number) => void;
|
|
180
183
|
export const __wbg_defaultsessionstore_free: (a: number, b: number) => void;
|
|
181
|
-
export const __wbg_externalsigningsignerhandle_free: (a: number, b: number) => void;
|
|
182
184
|
export const __wbg_externalsparksignerhandle_free: (a: number, b: number) => void;
|
|
185
|
+
export const __wbg_externalsigningsignerhandle_free: (a: number, b: number) => void;
|
|
183
186
|
export const __wbg_signingonlyexternalsigners_free: (a: number, b: number) => void;
|
|
184
187
|
export const signingonlyexternalsigners_breezSigner: (a: number) => number;
|
|
185
188
|
export const signingonlyexternalsigners_sparkSigner: (a: number) => number;
|
|
186
|
-
export const
|
|
187
|
-
export const
|
|
188
|
-
export const
|
|
189
|
-
export const
|
|
190
|
-
export const
|
|
189
|
+
export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522: (a: number, b: number, c: any) => [number, number];
|
|
190
|
+
export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6: (a: number, b: number, c: any) => [number, number];
|
|
191
|
+
export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7: (a: number, b: number, c: any) => [number, number];
|
|
192
|
+
export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8: (a: number, b: number, c: any) => [number, number];
|
|
193
|
+
export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9: (a: number, b: number, c: any) => [number, number];
|
|
191
194
|
export const wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
|
|
192
195
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2: (a: number, b: number, c: any) => void;
|
|
193
196
|
export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2: (a: number, b: number, c: any) => void;
|
package/web/index.js
CHANGED
|
@@ -10,16 +10,29 @@ const setupWebStorage = async () => {
|
|
|
10
10
|
try {
|
|
11
11
|
// Dynamic import of storage module
|
|
12
12
|
const { createDefaultStorage } = await import('./storage/index.js');
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
// Make createDefaultStorage available globally for WASM to find
|
|
15
15
|
globalThis.createDefaultStorage = createDefaultStorage;
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
console.log('Breez SDK: Web IndexedDB storage automatically enabled');
|
|
18
18
|
storageSetupComplete = true;
|
|
19
19
|
} catch (error) {
|
|
20
20
|
console.warn('Breez SDK: Failed to load Web storage:', error.message);
|
|
21
21
|
console.warn('Breez SDK: Storage operations may not work properly. Ignore this warning if you are not using the default storage.');
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
// Dynamic import of the IndexedDB tree store module
|
|
26
|
+
const { createWebTreeStore } = await import('./tree-store/index.js');
|
|
27
|
+
|
|
28
|
+
// Make createDefaultTreeStore available globally for the WASM bridge to
|
|
29
|
+
// find. The browser store uses its own `-tree` database.
|
|
30
|
+
globalThis.createDefaultTreeStore = (dbName, logger) =>
|
|
31
|
+
createWebTreeStore(`${dbName}-tree`, logger);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.warn('Breez SDK: Failed to load Web tree store:', error.message);
|
|
34
|
+
console.warn('Breez SDK: Tree state will not be persisted. Ignore this warning if you are not using the default storage.');
|
|
35
|
+
}
|
|
23
36
|
};
|
|
24
37
|
|
|
25
38
|
// Initialize WASM and storage
|
package/web/package.json
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"./storage": {
|
|
10
10
|
"default": "./storage/index.js",
|
|
11
11
|
"import": "./storage/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./tree-store": {
|
|
14
|
+
"default": "./tree-store/index.js",
|
|
15
|
+
"import": "./tree-store/index.js"
|
|
12
16
|
}
|
|
13
17
|
},
|
|
14
18
|
"files": [
|
|
@@ -16,6 +20,7 @@
|
|
|
16
20
|
"breez_sdk_spark_wasm.js",
|
|
17
21
|
"breez_sdk_spark_wasm.d.ts",
|
|
18
22
|
"storage/",
|
|
23
|
+
"tree-store/",
|
|
19
24
|
"index.js"
|
|
20
25
|
],
|
|
21
26
|
"main": "index.js",
|
package/web/storage/index.js
CHANGED
|
@@ -1418,6 +1418,7 @@ class IndexedDBStorage {
|
|
|
1418
1418
|
claimError: existing?.claimError ?? null,
|
|
1419
1419
|
refundTx: existing?.refundTx ?? null,
|
|
1420
1420
|
refundTxId: existing?.refundTxId ?? null,
|
|
1421
|
+
instantClaimStatus: existing?.instantClaimStatus ?? null,
|
|
1421
1422
|
};
|
|
1422
1423
|
|
|
1423
1424
|
const putRequest = store.put(depositToStore);
|
|
@@ -1490,6 +1491,9 @@ class IndexedDBStorage {
|
|
|
1490
1491
|
claimError: row.claimError ? JSON.parse(row.claimError) : null,
|
|
1491
1492
|
refundTx: row.refundTx,
|
|
1492
1493
|
refundTxId: row.refundTxId,
|
|
1494
|
+
instantClaimStatus: row.instantClaimStatus
|
|
1495
|
+
? JSON.parse(row.instantClaimStatus)
|
|
1496
|
+
: null,
|
|
1493
1497
|
}));
|
|
1494
1498
|
resolve(deposits);
|
|
1495
1499
|
};
|
|
@@ -1539,6 +1543,8 @@ class IndexedDBStorage {
|
|
|
1539
1543
|
updatedDeposit.refundTx = payload.refundTx;
|
|
1540
1544
|
updatedDeposit.refundTxId = payload.refundTxid;
|
|
1541
1545
|
updatedDeposit.claimError = null;
|
|
1546
|
+
} else if (payload.type === "instantClaim") {
|
|
1547
|
+
updatedDeposit.instantClaimStatus = JSON.stringify(payload.status);
|
|
1542
1548
|
} else {
|
|
1543
1549
|
reject(new StorageError(`Unknown payload type: ${payload.type}`));
|
|
1544
1550
|
return;
|