@breeztech/breez-sdk-spark 0.24.1 → 0.26.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.
@@ -192,6 +192,14 @@ export class BreezSdk {
192
192
  const ret = wasm.breezsdk_checkMessage(this.__wbg_ptr, request);
193
193
  return ret;
194
194
  }
195
+ /**
196
+ * @param {CheckUnilateralExitRequest} request
197
+ * @returns {Promise<CheckUnilateralExitResponse>}
198
+ */
199
+ checkUnilateralExit(request) {
200
+ const ret = wasm.breezsdk_checkUnilateralExit(this.__wbg_ptr, request);
201
+ return ret;
202
+ }
195
203
  /**
196
204
  * @param {ClaimDepositRequest} request
197
205
  * @returns {Promise<ClaimDepositResponse>}
@@ -2206,9 +2214,6 @@ function __wbg_get_imports() {
2206
2214
  const ret = arg0.catch(arg1);
2207
2215
  return ret;
2208
2216
  },
2209
- __wbg_clearInterval_d25b0cf526eff7ae: function(arg0) {
2210
- globalThis.clearInterval(arg0);
2211
- },
2212
2217
  __wbg_clearTimeout_113b1cde814ec762: function(arg0) {
2213
2218
  const ret = clearTimeout(arg0);
2214
2219
  return ret;
@@ -2226,9 +2231,6 @@ function __wbg_get_imports() {
2226
2231
  __wbg_close_de471367367aa5cb: function() { return handleError(function (arg0) {
2227
2232
  arg0.close();
2228
2233
  }, arguments); },
2229
- __wbg_close_f1af935d7d7cec78: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2230
- arg0.close(arg1, getStringFromWasm0(arg2, arg3));
2231
- }, arguments); },
2232
2234
  __wbg_code_be6f339819ebb2c4: function(arg0) {
2233
2235
  const ret = arg0.code;
2234
2236
  return ret;
@@ -2894,6 +2896,10 @@ function __wbg_get_imports() {
2894
2896
  const ret = arg0.listTokensOutputs();
2895
2897
  return ret;
2896
2898
  }, arguments); },
2899
+ __wbg_listWatchedDepositAddresses_55fe8af0643e3ea9: function() { return handleError(function (arg0) {
2900
+ const ret = arg0.listWatchedDepositAddresses();
2901
+ return ret;
2902
+ }, arguments); },
2897
2903
  __wbg_log_cf86719f8acabfda: function(arg0, arg1) {
2898
2904
  arg0.log(arg1);
2899
2905
  },
@@ -3207,10 +3213,6 @@ function __wbg_get_imports() {
3207
3213
  const ret = arg0.setCrossChainSwap(arg1);
3208
3214
  return ret;
3209
3215
  }, arguments); },
3210
- __wbg_setInterval_2aba203c2a1ea83f: function(arg0, arg1) {
3211
- const ret = globalThis.setInterval(arg0, arg1);
3212
- return ret;
3213
- },
3214
3216
  __wbg_setLeaves_3a013e3266762f4b: function() { return handleError(function (arg0, arg1, arg2, arg3) {
3215
3217
  const ret = arg0.setLeaves(arg1, arg2, arg3);
3216
3218
  return ret;
@@ -3597,6 +3599,18 @@ function __wbg_get_imports() {
3597
3599
  const ret = arg0.updateTokenOutputs(arg1, arg2);
3598
3600
  return ret;
3599
3601
  }, arguments); },
3602
+ __wbg_updateWatchedDepositAddress_260322f77dee1443: function() { return handleError(function (arg0, arg1, arg2, arg3) {
3603
+ let deferred0_0;
3604
+ let deferred0_1;
3605
+ try {
3606
+ deferred0_0 = arg1;
3607
+ deferred0_1 = arg2;
3608
+ const ret = arg0.updateWatchedDepositAddress(getStringFromWasm0(arg1, arg2), arg3);
3609
+ return ret;
3610
+ } finally {
3611
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
3612
+ }
3613
+ }, arguments); },
3600
3614
  __wbg_url_68fd9a221360e0db: function(arg0, arg1) {
3601
3615
  const ret = arg1.url;
3602
3616
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -3632,131 +3646,116 @@ function __wbg_get_imports() {
3632
3646
  return ret;
3633
3647
  },
3634
3648
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
3635
- // 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`.
3636
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522);
3649
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3650
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a);
3637
3651
  return ret;
3638
3652
  },
3639
3653
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
3640
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3641
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2);
3654
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 405, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3655
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25);
3642
3656
  return ret;
3643
3657
  },
3644
3658
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
3645
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3646
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2);
3659
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 405, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3660
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_2);
3647
3661
  return ret;
3648
3662
  },
3649
3663
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
3650
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3651
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3);
3664
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 405, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3665
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3);
3652
3666
  return ret;
3653
3667
  },
3654
3668
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
3655
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3656
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4);
3669
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3670
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_4);
3657
3671
  return ret;
3658
3672
  },
3659
3673
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
3660
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 400, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3661
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5);
3674
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3675
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_5);
3662
3676
  return ret;
3663
3677
  },
3664
3678
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
3665
- // 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`.
3666
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6);
3679
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3680
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_6);
3667
3681
  return ret;
3668
3682
  },
3669
3683
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
3670
- // 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`.
3671
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7);
3684
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3685
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_7);
3672
3686
  return ret;
3673
3687
  },
3674
3688
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
3675
- // 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`.
3676
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8);
3677
- return ret;
3678
- },
3679
- __wbindgen_cast_000000000000000a: function(arg0, arg1) {
3680
- // 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`.
3681
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9);
3682
- return ret;
3683
- },
3684
- __wbindgen_cast_000000000000000b: function(arg0, arg1) {
3685
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 405, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3689
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 409, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3686
3690
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7);
3687
3691
  return ret;
3688
3692
  },
3689
- __wbindgen_cast_000000000000000c: function(arg0, arg1) {
3690
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 434, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
3691
- const ret = makeClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e);
3692
- return ret;
3693
- },
3694
- __wbindgen_cast_000000000000000d: function(arg0) {
3693
+ __wbindgen_cast_000000000000000a: function(arg0) {
3695
3694
  // Cast intrinsic for `F64 -> Externref`.
3696
3695
  const ret = arg0;
3697
3696
  return ret;
3698
3697
  },
3699
- __wbindgen_cast_000000000000000e: function(arg0) {
3698
+ __wbindgen_cast_000000000000000b: function(arg0) {
3700
3699
  // Cast intrinsic for `I64 -> Externref`.
3701
3700
  const ret = arg0;
3702
3701
  return ret;
3703
3702
  },
3704
- __wbindgen_cast_000000000000000f: function(arg0, arg1) {
3703
+ __wbindgen_cast_000000000000000c: function(arg0, arg1) {
3705
3704
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
3706
3705
  const ret = getArrayU8FromWasm0(arg0, arg1);
3707
3706
  return ret;
3708
3707
  },
3709
- __wbindgen_cast_0000000000000010: function(arg0, arg1) {
3708
+ __wbindgen_cast_000000000000000d: function(arg0, arg1) {
3710
3709
  // Cast intrinsic for `Ref(String) -> Externref`.
3711
3710
  const ret = getStringFromWasm0(arg0, arg1);
3712
3711
  return ret;
3713
3712
  },
3714
- __wbindgen_cast_0000000000000011: function(arg0, arg1) {
3713
+ __wbindgen_cast_000000000000000e: function(arg0, arg1) {
3715
3714
  // Cast intrinsic for `U128 -> Externref`.
3716
3715
  const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
3717
3716
  return ret;
3718
3717
  },
3719
- __wbindgen_cast_0000000000000012: function(arg0) {
3718
+ __wbindgen_cast_000000000000000f: function(arg0) {
3720
3719
  // Cast intrinsic for `U64 -> Externref`.
3721
3720
  const ret = BigInt.asUintN(64, arg0);
3722
3721
  return ret;
3723
3722
  },
3724
- __wbindgen_cast_0000000000000013: function(arg0, arg1) {
3723
+ __wbindgen_cast_0000000000000010: function(arg0, arg1) {
3725
3724
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3726
3725
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3727
3726
  // Cast intrinsic for `Vector(NamedExternref("Contact")) -> Externref`.
3728
3727
  const ret = v0;
3729
3728
  return ret;
3730
3729
  },
3731
- __wbindgen_cast_0000000000000014: function(arg0, arg1) {
3730
+ __wbindgen_cast_0000000000000011: function(arg0, arg1) {
3732
3731
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3733
3732
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3734
3733
  // Cast intrinsic for `Vector(NamedExternref("CrossChainRoutePair")) -> Externref`.
3735
3734
  const ret = v0;
3736
3735
  return ret;
3737
3736
  },
3738
- __wbindgen_cast_0000000000000015: function(arg0, arg1) {
3737
+ __wbindgen_cast_0000000000000012: function(arg0, arg1) {
3739
3738
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3740
3739
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3741
3740
  // Cast intrinsic for `Vector(NamedExternref("ExternalFrostShareResult")) -> Externref`.
3742
3741
  const ret = v0;
3743
3742
  return ret;
3744
3743
  },
3745
- __wbindgen_cast_0000000000000016: function(arg0, arg1) {
3744
+ __wbindgen_cast_0000000000000013: function(arg0, arg1) {
3746
3745
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3747
3746
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3748
3747
  // Cast intrinsic for `Vector(NamedExternref("Webhook")) -> Externref`.
3749
3748
  const ret = v0;
3750
3749
  return ret;
3751
3750
  },
3752
- __wbindgen_cast_0000000000000017: function(arg0, arg1) {
3751
+ __wbindgen_cast_0000000000000014: function(arg0, arg1) {
3753
3752
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
3754
3753
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
3755
3754
  // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
3756
3755
  const ret = v0;
3757
3756
  return ret;
3758
3757
  },
3759
- __wbindgen_cast_0000000000000018: function(arg0, arg1) {
3758
+ __wbindgen_cast_0000000000000015: function(arg0, arg1) {
3760
3759
  var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
3761
3760
  wasm.__wbindgen_free(arg0, arg1 * 1, 1);
3762
3761
  // Cast intrinsic for `Vector(U8) -> Externref`.
@@ -3783,60 +3782,48 @@ function wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg
3783
3782
  wasm.wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1);
3784
3783
  }
3785
3784
 
3786
- function wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e(arg0, arg1) {
3787
- wasm.wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e(arg0, arg1);
3785
+ function wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25(arg0, arg1, arg2) {
3786
+ wasm.wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25(arg0, arg1, arg2);
3788
3787
  }
3789
3788
 
3790
- function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2(arg0, arg1, arg2) {
3791
- wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2(arg0, arg1, arg2);
3789
+ function wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_2(arg0, arg1, arg2) {
3790
+ wasm.wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_2(arg0, arg1, arg2);
3792
3791
  }
3793
3792
 
3794
- function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2(arg0, arg1, arg2) {
3795
- wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2(arg0, arg1, arg2);
3793
+ function wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3(arg0, arg1, arg2) {
3794
+ wasm.wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3(arg0, arg1, arg2);
3796
3795
  }
3797
3796
 
3798
- function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3(arg0, arg1, arg2) {
3799
- wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3(arg0, arg1, arg2);
3800
- }
3801
-
3802
- function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4(arg0, arg1, arg2) {
3803
- wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4(arg0, arg1, arg2);
3804
- }
3805
-
3806
- function wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, arg1, arg2) {
3807
- wasm.wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5(arg0, arg1, arg2);
3808
- }
3809
-
3810
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2) {
3811
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522(arg0, arg1, arg2);
3797
+ function wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a(arg0, arg1, arg2) {
3798
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a(arg0, arg1, arg2);
3812
3799
  if (ret[1]) {
3813
3800
  throw takeFromExternrefTable0(ret[0]);
3814
3801
  }
3815
3802
  }
3816
3803
 
3817
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2) {
3818
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6(arg0, arg1, arg2);
3804
+ function wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_4(arg0, arg1, arg2) {
3805
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_4(arg0, arg1, arg2);
3819
3806
  if (ret[1]) {
3820
3807
  throw takeFromExternrefTable0(ret[0]);
3821
3808
  }
3822
3809
  }
3823
3810
 
3824
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2) {
3825
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7(arg0, arg1, arg2);
3811
+ function wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_5(arg0, arg1, arg2) {
3812
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_5(arg0, arg1, arg2);
3826
3813
  if (ret[1]) {
3827
3814
  throw takeFromExternrefTable0(ret[0]);
3828
3815
  }
3829
3816
  }
3830
3817
 
3831
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8(arg0, arg1, arg2) {
3832
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8(arg0, arg1, arg2);
3818
+ function wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_6(arg0, arg1, arg2) {
3819
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_6(arg0, arg1, arg2);
3833
3820
  if (ret[1]) {
3834
3821
  throw takeFromExternrefTable0(ret[0]);
3835
3822
  }
3836
3823
  }
3837
3824
 
3838
- function wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9(arg0, arg1, arg2) {
3839
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9(arg0, arg1, arg2);
3825
+ function wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_7(arg0, arg1, arg2) {
3826
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_7(arg0, arg1, arg2);
3840
3827
  if (ret[1]) {
3841
3828
  throw takeFromExternrefTable0(ret[0]);
3842
3829
  }
@@ -4051,31 +4038,6 @@ function isLikeNone(x) {
4051
4038
  return x === undefined || x === null;
4052
4039
  }
4053
4040
 
4054
- function makeClosure(arg0, arg1, f) {
4055
- const state = { a: arg0, b: arg1, cnt: 1 };
4056
- const real = (...args) => {
4057
-
4058
- // First up with a closure we increment the internal reference
4059
- // count. This ensures that the Rust closure environment won't
4060
- // be deallocated while we're invoking it.
4061
- state.cnt++;
4062
- try {
4063
- return f(state.a, state.b, ...args);
4064
- } finally {
4065
- real._wbg_cb_unref();
4066
- }
4067
- };
4068
- real._wbg_cb_unref = () => {
4069
- if (--state.cnt === 0) {
4070
- wasm.__wbindgen_destroy_closure(state.a, state.b);
4071
- state.a = 0;
4072
- CLOSURE_DTORS.unregister(state);
4073
- }
4074
- };
4075
- CLOSURE_DTORS.register(real, state, state);
4076
- return real;
4077
- }
4078
-
4079
4041
  function makeMutClosure(arg0, arg1, f) {
4080
4042
  const state = { a: arg0, b: arg1, cnt: 1 };
4081
4043
  const real = (...args) => {
Binary file
@@ -28,6 +28,7 @@ export const breezsdk_buildUnsignedTransferPackage: (a: number, b: any) => any;
28
28
  export const breezsdk_buyBitcoin: (a: number, b: any) => any;
29
29
  export const breezsdk_checkLightningAddressAvailable: (a: number, b: any) => any;
30
30
  export const breezsdk_checkMessage: (a: number, b: any) => any;
31
+ export const breezsdk_checkUnilateralExit: (a: number, b: any) => any;
31
32
  export const breezsdk_claimDeposit: (a: number, b: any) => any;
32
33
  export const breezsdk_claimHtlcPayment: (a: number, b: any) => any;
33
34
  export const breezsdk_claimLightningAddressTransfer: (a: number, b: any) => any;
@@ -188,19 +189,16 @@ export const __wbg_externalsparksignerhandle_free: (a: number, b: number) => voi
188
189
  export const __wbg_signingonlyexternalsigners_free: (a: number, b: number) => void;
189
190
  export const signingonlyexternalsigners_breezSigner: (a: number) => number;
190
191
  export const signingonlyexternalsigners_sparkSigner: (a: number) => number;
191
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522: (a: number, b: number, c: any) => [number, number];
192
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_6: (a: number, b: number, c: any) => [number, number];
193
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_7: (a: number, b: number, c: any) => [number, number];
194
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_8: (a: number, b: number, c: any) => [number, number];
195
- export const wasm_bindgen__convert__closures_____invoke__h62bc116e0c266522_9: (a: number, b: number, c: any) => [number, number];
192
+ export const wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a: (a: number, b: number, c: any) => [number, number];
193
+ export const wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_4: (a: number, b: number, c: any) => [number, number];
194
+ export const wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_5: (a: number, b: number, c: any) => [number, number];
195
+ export const wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_6: (a: number, b: number, c: any) => [number, number];
196
+ export const wasm_bindgen__convert__closures_____invoke__h2f6500191cedbf1a_7: (a: number, b: number, c: any) => [number, number];
196
197
  export const wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
197
- export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2: (a: number, b: number, c: any) => void;
198
- export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_2: (a: number, b: number, c: any) => void;
199
- export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_3: (a: number, b: number, c: any) => void;
200
- export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_4: (a: number, b: number, c: any) => void;
201
- export const wasm_bindgen__convert__closures_____invoke__h3120db8c4a8a92b2_5: (a: number, b: number, c: any) => void;
198
+ export const wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25: (a: number, b: number, c: any) => void;
199
+ export const wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_2: (a: number, b: number, c: any) => void;
200
+ export const wasm_bindgen__convert__closures_____invoke__h3b28fbbc8b451a25_3: (a: number, b: number, c: any) => void;
202
201
  export const wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7: (a: number, b: number) => void;
203
- export const wasm_bindgen__convert__closures_____invoke__h0fa3f876e31d2a3e: (a: number, b: number) => void;
204
202
  export const __wbindgen_malloc: (a: number, b: number) => number;
205
203
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
206
204
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
@@ -611,6 +611,19 @@ class MigrationManager {
611
611
  };
612
612
  },
613
613
  },
614
+ {
615
+ // Deposit addresses polled on-chain for deposits still in the mempool.
616
+ // Entries are removed once watching them can no longer lead to an early
617
+ // claim, so the store holds only the live watch set.
618
+ name: "Create watched_deposit_addresses store",
619
+ upgrade: (db) => {
620
+ if (!db.objectStoreNames.contains("watched_deposit_addresses")) {
621
+ db.createObjectStore("watched_deposit_addresses", {
622
+ keyPath: "address",
623
+ });
624
+ }
625
+ },
626
+ },
614
627
  ];
615
628
  }
616
629
  }
@@ -639,7 +652,7 @@ class IndexedDBStorage {
639
652
  // so existing databases depend on indices never shifting. Never insert,
640
653
  // reorder, or delete a migration — only append. dbVersion MUST equal the
641
654
  // number of migrations (enforced by the guard in initialize()).
642
- this.dbVersion = 21; // Current schema version (= migration count)
655
+ this.dbVersion = 22; // Current schema version (= migration count)
643
656
  }
644
657
 
645
658
  /**
@@ -1445,6 +1458,7 @@ class IndexedDBStorage {
1445
1458
  refundTxId: existing?.refundTxId ?? null,
1446
1459
  instantClaimStatus: existing?.instantClaimStatus ?? null,
1447
1460
  refundState: existing?.refundState ?? null,
1461
+ maxClaimFee: existing?.maxClaimFee ?? null,
1448
1462
  };
1449
1463
 
1450
1464
  const putRequest = store.put(depositToStore);
@@ -1521,6 +1535,7 @@ class IndexedDBStorage {
1521
1535
  ? JSON.parse(row.instantClaimStatus)
1522
1536
  : null,
1523
1537
  refundState: row.refundState ? JSON.parse(row.refundState) : null,
1538
+ maxClaimFee: row.maxClaimFee ? JSON.parse(row.maxClaimFee) : null,
1524
1539
  }));
1525
1540
  resolve(deposits);
1526
1541
  };
@@ -1576,6 +1591,10 @@ class IndexedDBStorage {
1576
1591
  if (existingDeposit.refundTxId === payload.refundTxid) {
1577
1592
  updatedDeposit.refundState = JSON.stringify(payload.state);
1578
1593
  }
1594
+ } else if (payload.type === "maxClaimFee") {
1595
+ updatedDeposit.maxClaimFee = payload.maxFee
1596
+ ? JSON.stringify(payload.maxFee)
1597
+ : null;
1579
1598
  } else {
1580
1599
  reject(new StorageError(`Unknown payload type: ${payload.type}`));
1581
1600
  return;
@@ -1606,6 +1625,131 @@ class IndexedDBStorage {
1606
1625
  });
1607
1626
  }
1608
1627
 
1628
+ async listWatchedDepositAddresses() {
1629
+ if (!this.db) {
1630
+ throw new StorageError("Database not initialized");
1631
+ }
1632
+
1633
+ return new Promise((resolve, reject) => {
1634
+ const transaction = this.db.transaction(
1635
+ "watched_deposit_addresses",
1636
+ "readonly"
1637
+ );
1638
+ const store = transaction.objectStore("watched_deposit_addresses");
1639
+ const request = store.getAll();
1640
+
1641
+ request.onsuccess = () => {
1642
+ const watched = (request.result || []).map((entry) => ({
1643
+ address: entry.address,
1644
+ issuedAt: entry.issuedAt,
1645
+ seen: Boolean(entry.seen),
1646
+ }));
1647
+ // The store is keyed by address, so ordering is applied here rather
1648
+ // than by an index.
1649
+ watched.sort((a, b) => Number(b.issuedAt) - Number(a.issuedAt));
1650
+ resolve(watched);
1651
+ };
1652
+ request.onerror = () =>
1653
+ reject(
1654
+ new StorageError(
1655
+ `Failed to list watched deposit addresses: ${request.error}`
1656
+ )
1657
+ );
1658
+ });
1659
+ }
1660
+
1661
+ async updateWatchedDepositAddress(address, payload) {
1662
+ if (!this.db) {
1663
+ throw new StorageError("Database not initialized");
1664
+ }
1665
+
1666
+ return new Promise((resolve, reject) => {
1667
+ const transaction = this.db.transaction(
1668
+ "watched_deposit_addresses",
1669
+ "readwrite"
1670
+ );
1671
+ const store = transaction.objectStore("watched_deposit_addresses");
1672
+
1673
+ if (payload.type === "watch") {
1674
+ const request = store.put({
1675
+ address,
1676
+ issuedAt: payload.issuedAt,
1677
+ seen: false,
1678
+ });
1679
+ request.onsuccess = () => resolve();
1680
+ request.onerror = () =>
1681
+ reject(
1682
+ new StorageError(
1683
+ `Failed to watch deposit address '${address}': ${request.error}`
1684
+ )
1685
+ );
1686
+ return;
1687
+ }
1688
+
1689
+ if (payload.type === "unwatch") {
1690
+ // Conditional on issuedAt, so an address handed out again since the
1691
+ // caller read it is not retired by a decision taken before that. The
1692
+ // get and the delete share one readwrite transaction, so nothing can
1693
+ // interleave between them.
1694
+ const getRequest = store.get(address);
1695
+ getRequest.onsuccess = () => {
1696
+ const existing = getRequest.result;
1697
+ const stale =
1698
+ !existing || String(existing.issuedAt) !== String(payload.issuedAt);
1699
+ if (stale) {
1700
+ resolve();
1701
+ return;
1702
+ }
1703
+ const request = store.delete(address);
1704
+ request.onsuccess = () => resolve();
1705
+ request.onerror = () =>
1706
+ reject(
1707
+ new StorageError(
1708
+ `Failed to unwatch deposit address '${address}': ${request.error}`
1709
+ )
1710
+ );
1711
+ };
1712
+ getRequest.onerror = () =>
1713
+ reject(
1714
+ new StorageError(
1715
+ `Failed to read watched deposit address '${address}': ${getRequest.error}`
1716
+ )
1717
+ );
1718
+ return;
1719
+ }
1720
+
1721
+ if (payload.type === "seen") {
1722
+ const getRequest = store.get(address);
1723
+ getRequest.onsuccess = () => {
1724
+ const existing = getRequest.result;
1725
+ if (!existing) {
1726
+ // Not watched, so there is nothing to mark (matches the SQL stores,
1727
+ // whose UPDATE affects no rows).
1728
+ resolve();
1729
+ return;
1730
+ }
1731
+ const request = store.put({ ...existing, seen: true });
1732
+ request.onsuccess = () => resolve();
1733
+ request.onerror = () =>
1734
+ reject(
1735
+ new StorageError(
1736
+ `Failed to mark deposit address '${address}' seen: ${request.error}`
1737
+ )
1738
+ );
1739
+ };
1740
+ getRequest.onerror = () =>
1741
+ reject(
1742
+ new StorageError(
1743
+ `Failed to read watched deposit address '${address}': ${getRequest.error}`
1744
+ )
1745
+ );
1746
+ return;
1747
+ }
1748
+
1749
+ reject(new StorageError(`Unknown payload type: ${payload.type}`));
1750
+ });
1751
+ }
1752
+
1609
1753
  async setLnurlMetadata(metadata) {
1610
1754
  if (!this.db) {
1611
1755
  throw new StorageError("Database not initialized");
@@ -522,31 +522,18 @@ class WebTreeStore {
522
522
 
523
523
  async getVerifiedLeafKeys() {
524
524
  try {
525
+ // Every stored leaf passed the ownership check on its way in, whatever
526
+ // its status, so all of them are projected.
525
527
  return await this._txRun(
526
- [STORE_LEAVES, STORE_RESERVATIONS],
528
+ [STORE_LEAVES],
527
529
  "readonly",
528
- [
529
- { name: "leaves", store: STORE_LEAVES },
530
- { name: "reservations", store: STORE_RESERVATIONS },
531
- ],
532
- (res) => {
533
- const resIds = new Set(res.reservations.map((r) => r.id));
534
- const out = [];
535
- for (const row of res.leaves) {
536
- const hasReservation =
537
- row.reservation_id != null && resIds.has(row.reservation_id);
538
- // Every reserved leaf plus every Available one; nothing that is
539
- // neither reserved nor Available.
540
- if (hasReservation || row.status === "Available") {
541
- out.push([
542
- row.id,
543
- row.verifying_public_key,
544
- row.signing_public_key,
545
- ]);
546
- }
547
- }
548
- return out;
549
- }
530
+ [{ name: "leaves", store: STORE_LEAVES }],
531
+ (res) =>
532
+ res.leaves.map((row) => [
533
+ row.id,
534
+ row.verifying_public_key,
535
+ row.signing_public_key,
536
+ ])
550
537
  );
551
538
  } catch (error) {
552
539
  if (error instanceof TreeStoreError) throw error;