@breeztech/breez-sdk-spark 0.13.7-debug → 0.13.8-debug

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.
Binary file
@@ -65,6 +65,7 @@ type ReserveResult =
65
65
  export interface TreeStore {
66
66
  addLeaves: (leaves: TreeNode[]) => Promise<void>;
67
67
  getLeaves: () => Promise<Leaves>;
68
+ getAvailableBalance: () => Promise<bigint | number>;
68
69
  setLeaves: (leaves: TreeNode[], missingLeaves: TreeNode[], refreshStartedAtMs: number) => Promise<void>;
69
70
  cancelReservation: (id: string, leavesToKeep: TreeNode[]) => Promise<void>;
70
71
  finalizeReservation: (id: string, newLeaves: TreeNode[] | null) => Promise<void>;
@@ -152,6 +153,7 @@ type WasmReservationTarget =
152
153
  export interface TokenStore {
153
154
  setTokensOutputs: (tokenOutputs: WasmTokenOutputs[], refreshStartedAtMs: number) => Promise<void>;
154
155
  listTokensOutputs: () => Promise<WasmTokenOutputsPerStatus[]>;
156
+ getTokenBalances: () => Promise<WasmTokenBalance[]>;
155
157
  getTokenOutputs: (filter: WasmGetTokenOutputsFilter) => Promise<WasmTokenOutputsPerStatus>;
156
158
  insertTokenOutputs: (tokenOutputs: WasmTokenOutputs) => Promise<void>;
157
159
  reserveTokenOutputs: (
@@ -333,16 +333,16 @@ export function task_worker_entry_point(ptr) {
333
333
  }
334
334
  }
335
335
 
336
- function __wbg_adapter_64(arg0, arg1, arg2) {
337
- wasm.closure386_externref_shim(arg0, arg1, arg2);
336
+ function __wbg_adapter_68(arg0, arg1, arg2) {
337
+ wasm.closure388_externref_shim(arg0, arg1, arg2);
338
338
  }
339
339
 
340
- function __wbg_adapter_69(arg0, arg1) {
340
+ function __wbg_adapter_73(arg0, arg1) {
341
341
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c(arg0, arg1);
342
342
  }
343
343
 
344
- function __wbg_adapter_433(arg0, arg1, arg2, arg3) {
345
- wasm.closure666_externref_shim(arg0, arg1, arg2, arg3);
344
+ function __wbg_adapter_445(arg0, arg1, arg2, arg3) {
345
+ wasm.closure668_externref_shim(arg0, arg1, arg2, arg3);
346
346
  }
347
347
 
348
348
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1386,6 +1386,11 @@ export class TokenIssuer {
1386
1386
  }
1387
1387
  }
1388
1388
 
1389
+ export function __wbg_BigInt_470dd987b8190f8e(arg0) {
1390
+ const ret = BigInt(arg0);
1391
+ return ret;
1392
+ };
1393
+
1389
1394
  export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
1390
1395
  const ret = String(arg1);
1391
1396
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1817,6 +1822,11 @@ export function __wbg_getAddressUtxos_328ceb8b4a63a6da() { return handleError(fu
1817
1822
  }
1818
1823
  }, arguments) };
1819
1824
 
1825
+ export function __wbg_getAvailableBalance_c24d30be8dc60bd5() { return handleError(function (arg0) {
1826
+ const ret = arg0.getAvailableBalance();
1827
+ return ret;
1828
+ }, arguments) };
1829
+
1820
1830
  export function __wbg_getCachedItem_de40d6348815c7b9() { return handleError(function (arg0, arg1, arg2) {
1821
1831
  let deferred0_0;
1822
1832
  let deferred0_1;
@@ -1932,6 +1942,11 @@ export function __wbg_getStaticDepositSecretSource_8e310c718339e400() { return h
1932
1942
  return ret;
1933
1943
  }, arguments) };
1934
1944
 
1945
+ export function __wbg_getTokenBalances_2e44f820b2d89c1e() { return handleError(function (arg0) {
1946
+ const ret = arg0.getTokenBalances();
1947
+ return ret;
1948
+ }, arguments) };
1949
+
1935
1950
  export function __wbg_getTokenOutputs_f51d6f5d47330273() { return handleError(function (arg0, arg1) {
1936
1951
  const ret = arg0.getTokenOutputs(arg1);
1937
1952
  return ret;
@@ -2231,7 +2246,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
2231
2246
  const a = state0.a;
2232
2247
  state0.a = 0;
2233
2248
  try {
2234
- return __wbg_adapter_433(a, state0.b, arg0, arg1);
2249
+ return __wbg_adapter_445(a, state0.b, arg0, arg1);
2235
2250
  } finally {
2236
2251
  state0.a = a;
2237
2252
  }
@@ -2752,6 +2767,14 @@ export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
2752
2767
  return ret;
2753
2768
  };
2754
2769
 
2770
+ export function __wbg_toString_2f76f493957b63da(arg0, arg1, arg2) {
2771
+ const ret = arg1.toString(arg2);
2772
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2773
+ const len1 = WASM_VECTOR_LEN;
2774
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2775
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2776
+ };
2777
+
2755
2778
  export function __wbg_toString_5285597960676b7b(arg0) {
2756
2779
  const ret = arg0.toString();
2757
2780
  return ret;
@@ -2884,28 +2907,28 @@ export function __wbindgen_cb_drop(arg0) {
2884
2907
  return ret;
2885
2908
  };
2886
2909
 
2887
- export function __wbindgen_closure_wrapper13509(arg0, arg1, arg2) {
2888
- const ret = makeMutClosure(arg0, arg1, 870, __wbg_adapter_69);
2910
+ export function __wbindgen_closure_wrapper13524(arg0, arg1, arg2) {
2911
+ const ret = makeMutClosure(arg0, arg1, 872, __wbg_adapter_73);
2889
2912
  return ret;
2890
2913
  };
2891
2914
 
2892
- export function __wbindgen_closure_wrapper15533(arg0, arg1, arg2) {
2893
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2915
+ export function __wbindgen_closure_wrapper15546(arg0, arg1, arg2) {
2916
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2894
2917
  return ret;
2895
2918
  };
2896
2919
 
2897
- export function __wbindgen_closure_wrapper6003(arg0, arg1, arg2) {
2898
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2920
+ export function __wbindgen_closure_wrapper6018(arg0, arg1, arg2) {
2921
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2899
2922
  return ret;
2900
2923
  };
2901
2924
 
2902
- export function __wbindgen_closure_wrapper6010(arg0, arg1, arg2) {
2903
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2925
+ export function __wbindgen_closure_wrapper6025(arg0, arg1, arg2) {
2926
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2904
2927
  return ret;
2905
2928
  };
2906
2929
 
2907
- export function __wbindgen_closure_wrapper7625(arg0, arg1, arg2) {
2908
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_69);
2930
+ export function __wbindgen_closure_wrapper7640(arg0, arg1, arg2) {
2931
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_73);
2909
2932
  return ret;
2910
2933
  };
2911
2934
 
@@ -2979,11 +3002,21 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
2979
3002
  return ret;
2980
3003
  };
2981
3004
 
3005
+ export function __wbindgen_lt(arg0, arg1) {
3006
+ const ret = arg0 < arg1;
3007
+ return ret;
3008
+ };
3009
+
2982
3010
  export function __wbindgen_memory() {
2983
3011
  const ret = wasm.memory;
2984
3012
  return ret;
2985
3013
  };
2986
3014
 
3015
+ export function __wbindgen_neg(arg0) {
3016
+ const ret = -arg0;
3017
+ return ret;
3018
+ };
3019
+
2987
3020
  export function __wbindgen_number_get(arg0, arg1) {
2988
3021
  const obj = arg1;
2989
3022
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -128,7 +128,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
128
128
  export const __externref_drop_slice: (a: number, b: number) => void;
129
129
  export const __wbindgen_export_7: WebAssembly.Table;
130
130
  export const __externref_table_dealloc: (a: number) => void;
131
- export const closure386_externref_shim: (a: number, b: number, c: any) => void;
131
+ export const closure388_externref_shim: (a: number, b: number, c: any) => void;
132
132
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c: (a: number, b: number) => void;
133
- export const closure666_externref_shim: (a: number, b: number, c: any, d: any) => void;
133
+ export const closure668_externref_shim: (a: number, b: number, c: any, d: any) => void;
134
134
  export const __wbindgen_start: () => void;
@@ -65,6 +65,7 @@ type ReserveResult =
65
65
  export interface TreeStore {
66
66
  addLeaves: (leaves: TreeNode[]) => Promise<void>;
67
67
  getLeaves: () => Promise<Leaves>;
68
+ getAvailableBalance: () => Promise<bigint | number>;
68
69
  setLeaves: (leaves: TreeNode[], missingLeaves: TreeNode[], refreshStartedAtMs: number) => Promise<void>;
69
70
  cancelReservation: (id: string, leavesToKeep: TreeNode[]) => Promise<void>;
70
71
  finalizeReservation: (id: string, newLeaves: TreeNode[] | null) => Promise<void>;
@@ -152,6 +153,7 @@ type WasmReservationTarget =
152
153
  export interface TokenStore {
153
154
  setTokensOutputs: (tokenOutputs: WasmTokenOutputs[], refreshStartedAtMs: number) => Promise<void>;
154
155
  listTokensOutputs: () => Promise<WasmTokenOutputsPerStatus[]>;
156
+ getTokenBalances: () => Promise<WasmTokenBalance[]>;
155
157
  getTokenOutputs: (filter: WasmGetTokenOutputsFilter) => Promise<WasmTokenOutputsPerStatus>;
156
158
  insertTokenOutputs: (tokenOutputs: WasmTokenOutputs) => Promise<void>;
157
159
  reserveTokenOutputs: (
@@ -316,16 +316,16 @@ export function task_worker_entry_point(ptr) {
316
316
  }
317
317
  }
318
318
 
319
- function __wbg_adapter_64(arg0, arg1, arg2) {
320
- wasm.closure386_externref_shim(arg0, arg1, arg2);
319
+ function __wbg_adapter_68(arg0, arg1, arg2) {
320
+ wasm.closure388_externref_shim(arg0, arg1, arg2);
321
321
  }
322
322
 
323
- function __wbg_adapter_69(arg0, arg1) {
323
+ function __wbg_adapter_73(arg0, arg1) {
324
324
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c(arg0, arg1);
325
325
  }
326
326
 
327
- function __wbg_adapter_433(arg0, arg1, arg2, arg3) {
328
- wasm.closure666_externref_shim(arg0, arg1, arg2, arg3);
327
+ function __wbg_adapter_445(arg0, arg1, arg2, arg3) {
328
+ wasm.closure668_externref_shim(arg0, arg1, arg2, arg3);
329
329
  }
330
330
 
331
331
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1371,6 +1371,10 @@ export class TokenIssuer {
1371
1371
 
1372
1372
  const imports = {
1373
1373
  __wbindgen_placeholder__: {
1374
+ __wbg_BigInt_470dd987b8190f8e: function(arg0) {
1375
+ const ret = BigInt(arg0);
1376
+ return ret;
1377
+ },
1374
1378
  __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
1375
1379
  const ret = String(arg1);
1376
1380
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1741,6 +1745,10 @@ const imports = {
1741
1745
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1742
1746
  }
1743
1747
  }, arguments) },
1748
+ __wbg_getAvailableBalance_c24d30be8dc60bd5: function() { return handleError(function (arg0) {
1749
+ const ret = arg0.getAvailableBalance();
1750
+ return ret;
1751
+ }, arguments) },
1744
1752
  __wbg_getCachedItem_de40d6348815c7b9: function() { return handleError(function (arg0, arg1, arg2) {
1745
1753
  let deferred0_0;
1746
1754
  let deferred0_1;
@@ -1841,6 +1849,10 @@ const imports = {
1841
1849
  const ret = arg0.getStaticDepositSecretSource(arg1 >>> 0);
1842
1850
  return ret;
1843
1851
  }, arguments) },
1852
+ __wbg_getTokenBalances_2e44f820b2d89c1e: function() { return handleError(function (arg0) {
1853
+ const ret = arg0.getTokenBalances();
1854
+ return ret;
1855
+ }, arguments) },
1844
1856
  __wbg_getTokenOutputs_f51d6f5d47330273: function() { return handleError(function (arg0, arg1) {
1845
1857
  const ret = arg0.getTokenOutputs(arg1);
1846
1858
  return ret;
@@ -2099,7 +2111,7 @@ const imports = {
2099
2111
  const a = state0.a;
2100
2112
  state0.a = 0;
2101
2113
  try {
2102
- return __wbg_adapter_433(a, state0.b, arg0, arg1);
2114
+ return __wbg_adapter_445(a, state0.b, arg0, arg1);
2103
2115
  } finally {
2104
2116
  state0.a = a;
2105
2117
  }
@@ -2526,6 +2538,13 @@ const imports = {
2526
2538
  const ret = arg0.then(arg1, arg2);
2527
2539
  return ret;
2528
2540
  },
2541
+ __wbg_toString_2f76f493957b63da: function(arg0, arg1, arg2) {
2542
+ const ret = arg1.toString(arg2);
2543
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2544
+ const len1 = WASM_VECTOR_LEN;
2545
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2546
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2547
+ },
2529
2548
  __wbg_toString_5285597960676b7b: function(arg0) {
2530
2549
  const ret = arg0.toString();
2531
2550
  return ret;
@@ -2639,24 +2658,24 @@ const imports = {
2639
2658
  const ret = false;
2640
2659
  return ret;
2641
2660
  },
2642
- __wbindgen_closure_wrapper13509: function(arg0, arg1, arg2) {
2643
- const ret = makeMutClosure(arg0, arg1, 870, __wbg_adapter_69);
2661
+ __wbindgen_closure_wrapper13524: function(arg0, arg1, arg2) {
2662
+ const ret = makeMutClosure(arg0, arg1, 872, __wbg_adapter_73);
2644
2663
  return ret;
2645
2664
  },
2646
- __wbindgen_closure_wrapper15533: function(arg0, arg1, arg2) {
2647
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2665
+ __wbindgen_closure_wrapper15546: function(arg0, arg1, arg2) {
2666
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2648
2667
  return ret;
2649
2668
  },
2650
- __wbindgen_closure_wrapper6003: function(arg0, arg1, arg2) {
2651
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2669
+ __wbindgen_closure_wrapper6018: function(arg0, arg1, arg2) {
2670
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2652
2671
  return ret;
2653
2672
  },
2654
- __wbindgen_closure_wrapper6010: function(arg0, arg1, arg2) {
2655
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2673
+ __wbindgen_closure_wrapper6025: function(arg0, arg1, arg2) {
2674
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2656
2675
  return ret;
2657
2676
  },
2658
- __wbindgen_closure_wrapper7625: function(arg0, arg1, arg2) {
2659
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_69);
2677
+ __wbindgen_closure_wrapper7640: function(arg0, arg1, arg2) {
2678
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_73);
2660
2679
  return ret;
2661
2680
  },
2662
2681
  __wbindgen_debug_string: function(arg0, arg1) {
@@ -2717,10 +2736,18 @@ const imports = {
2717
2736
  const ret = arg0 == arg1;
2718
2737
  return ret;
2719
2738
  },
2739
+ __wbindgen_lt: function(arg0, arg1) {
2740
+ const ret = arg0 < arg1;
2741
+ return ret;
2742
+ },
2720
2743
  __wbindgen_memory: function() {
2721
2744
  const ret = wasm.memory;
2722
2745
  return ret;
2723
2746
  },
2747
+ __wbindgen_neg: function(arg0) {
2748
+ const ret = -arg0;
2749
+ return ret;
2750
+ },
2724
2751
  __wbindgen_number_get: function(arg0, arg1) {
2725
2752
  const obj = arg1;
2726
2753
  const ret = typeof(obj) === 'number' ? obj : undefined;
Binary file
@@ -128,7 +128,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
128
128
  export const __externref_drop_slice: (a: number, b: number) => void;
129
129
  export const __wbindgen_export_7: WebAssembly.Table;
130
130
  export const __externref_table_dealloc: (a: number) => void;
131
- export const closure386_externref_shim: (a: number, b: number, c: any) => void;
131
+ export const closure388_externref_shim: (a: number, b: number, c: any) => void;
132
132
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c: (a: number, b: number) => void;
133
- export const closure666_externref_shim: (a: number, b: number, c: any, d: any) => void;
133
+ export const closure668_externref_shim: (a: number, b: number, c: any, d: any) => void;
134
134
  export const __wbindgen_start: () => void;
@@ -65,6 +65,7 @@ type ReserveResult =
65
65
  export interface TreeStore {
66
66
  addLeaves: (leaves: TreeNode[]) => Promise<void>;
67
67
  getLeaves: () => Promise<Leaves>;
68
+ getAvailableBalance: () => Promise<bigint | number>;
68
69
  setLeaves: (leaves: TreeNode[], missingLeaves: TreeNode[], refreshStartedAtMs: number) => Promise<void>;
69
70
  cancelReservation: (id: string, leavesToKeep: TreeNode[]) => Promise<void>;
70
71
  finalizeReservation: (id: string, newLeaves: TreeNode[] | null) => Promise<void>;
@@ -152,6 +153,7 @@ type WasmReservationTarget =
152
153
  export interface TokenStore {
153
154
  setTokensOutputs: (tokenOutputs: WasmTokenOutputs[], refreshStartedAtMs: number) => Promise<void>;
154
155
  listTokensOutputs: () => Promise<WasmTokenOutputsPerStatus[]>;
156
+ getTokenBalances: () => Promise<WasmTokenBalance[]>;
155
157
  getTokenOutputs: (filter: WasmGetTokenOutputsFilter) => Promise<WasmTokenOutputsPerStatus>;
156
158
  insertTokenOutputs: (tokenOutputs: WasmTokenOutputs) => Promise<void>;
157
159
  reserveTokenOutputs: (
@@ -329,16 +329,16 @@ module.exports.task_worker_entry_point = function(ptr) {
329
329
  }
330
330
  };
331
331
 
332
- function __wbg_adapter_64(arg0, arg1, arg2) {
333
- wasm.closure386_externref_shim(arg0, arg1, arg2);
332
+ function __wbg_adapter_68(arg0, arg1, arg2) {
333
+ wasm.closure388_externref_shim(arg0, arg1, arg2);
334
334
  }
335
335
 
336
- function __wbg_adapter_69(arg0, arg1) {
336
+ function __wbg_adapter_73(arg0, arg1) {
337
337
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c(arg0, arg1);
338
338
  }
339
339
 
340
- function __wbg_adapter_433(arg0, arg1, arg2, arg3) {
341
- wasm.closure666_externref_shim(arg0, arg1, arg2, arg3);
340
+ function __wbg_adapter_445(arg0, arg1, arg2, arg3) {
341
+ wasm.closure668_externref_shim(arg0, arg1, arg2, arg3);
342
342
  }
343
343
 
344
344
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1390,6 +1390,11 @@ class TokenIssuer {
1390
1390
  }
1391
1391
  module.exports.TokenIssuer = TokenIssuer;
1392
1392
 
1393
+ module.exports.__wbg_BigInt_470dd987b8190f8e = function(arg0) {
1394
+ const ret = BigInt(arg0);
1395
+ return ret;
1396
+ };
1397
+
1393
1398
  module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1394
1399
  const ret = String(arg1);
1395
1400
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1821,6 +1826,11 @@ module.exports.__wbg_getAddressUtxos_328ceb8b4a63a6da = function() { return hand
1821
1826
  }
1822
1827
  }, arguments) };
1823
1828
 
1829
+ module.exports.__wbg_getAvailableBalance_c24d30be8dc60bd5 = function() { return handleError(function (arg0) {
1830
+ const ret = arg0.getAvailableBalance();
1831
+ return ret;
1832
+ }, arguments) };
1833
+
1824
1834
  module.exports.__wbg_getCachedItem_de40d6348815c7b9 = function() { return handleError(function (arg0, arg1, arg2) {
1825
1835
  let deferred0_0;
1826
1836
  let deferred0_1;
@@ -1936,6 +1946,11 @@ module.exports.__wbg_getStaticDepositSecretSource_8e310c718339e400 = function()
1936
1946
  return ret;
1937
1947
  }, arguments) };
1938
1948
 
1949
+ module.exports.__wbg_getTokenBalances_2e44f820b2d89c1e = function() { return handleError(function (arg0) {
1950
+ const ret = arg0.getTokenBalances();
1951
+ return ret;
1952
+ }, arguments) };
1953
+
1939
1954
  module.exports.__wbg_getTokenOutputs_f51d6f5d47330273 = function() { return handleError(function (arg0, arg1) {
1940
1955
  const ret = arg0.getTokenOutputs(arg1);
1941
1956
  return ret;
@@ -2235,7 +2250,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
2235
2250
  const a = state0.a;
2236
2251
  state0.a = 0;
2237
2252
  try {
2238
- return __wbg_adapter_433(a, state0.b, arg0, arg1);
2253
+ return __wbg_adapter_445(a, state0.b, arg0, arg1);
2239
2254
  } finally {
2240
2255
  state0.a = a;
2241
2256
  }
@@ -2756,6 +2771,14 @@ module.exports.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
2756
2771
  return ret;
2757
2772
  };
2758
2773
 
2774
+ module.exports.__wbg_toString_2f76f493957b63da = function(arg0, arg1, arg2) {
2775
+ const ret = arg1.toString(arg2);
2776
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2777
+ const len1 = WASM_VECTOR_LEN;
2778
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2779
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2780
+ };
2781
+
2759
2782
  module.exports.__wbg_toString_5285597960676b7b = function(arg0) {
2760
2783
  const ret = arg0.toString();
2761
2784
  return ret;
@@ -2888,28 +2911,28 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
2888
2911
  return ret;
2889
2912
  };
2890
2913
 
2891
- module.exports.__wbindgen_closure_wrapper13509 = function(arg0, arg1, arg2) {
2892
- const ret = makeMutClosure(arg0, arg1, 870, __wbg_adapter_69);
2914
+ module.exports.__wbindgen_closure_wrapper13524 = function(arg0, arg1, arg2) {
2915
+ const ret = makeMutClosure(arg0, arg1, 872, __wbg_adapter_73);
2893
2916
  return ret;
2894
2917
  };
2895
2918
 
2896
- module.exports.__wbindgen_closure_wrapper15533 = function(arg0, arg1, arg2) {
2897
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2919
+ module.exports.__wbindgen_closure_wrapper15546 = function(arg0, arg1, arg2) {
2920
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2898
2921
  return ret;
2899
2922
  };
2900
2923
 
2901
- module.exports.__wbindgen_closure_wrapper6003 = function(arg0, arg1, arg2) {
2902
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2924
+ module.exports.__wbindgen_closure_wrapper6018 = function(arg0, arg1, arg2) {
2925
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2903
2926
  return ret;
2904
2927
  };
2905
2928
 
2906
- module.exports.__wbindgen_closure_wrapper6010 = function(arg0, arg1, arg2) {
2907
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2929
+ module.exports.__wbindgen_closure_wrapper6025 = function(arg0, arg1, arg2) {
2930
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2908
2931
  return ret;
2909
2932
  };
2910
2933
 
2911
- module.exports.__wbindgen_closure_wrapper7625 = function(arg0, arg1, arg2) {
2912
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_69);
2934
+ module.exports.__wbindgen_closure_wrapper7640 = function(arg0, arg1, arg2) {
2935
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_73);
2913
2936
  return ret;
2914
2937
  };
2915
2938
 
@@ -2983,11 +3006,21 @@ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2983
3006
  return ret;
2984
3007
  };
2985
3008
 
3009
+ module.exports.__wbindgen_lt = function(arg0, arg1) {
3010
+ const ret = arg0 < arg1;
3011
+ return ret;
3012
+ };
3013
+
2986
3014
  module.exports.__wbindgen_memory = function() {
2987
3015
  const ret = wasm.memory;
2988
3016
  return ret;
2989
3017
  };
2990
3018
 
3019
+ module.exports.__wbindgen_neg = function(arg0) {
3020
+ const ret = -arg0;
3021
+ return ret;
3022
+ };
3023
+
2991
3024
  module.exports.__wbindgen_number_get = function(arg0, arg1) {
2992
3025
  const obj = arg1;
2993
3026
  const ret = typeof(obj) === 'number' ? obj : undefined;
Binary file
@@ -128,7 +128,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
128
128
  export const __externref_drop_slice: (a: number, b: number) => void;
129
129
  export const __wbindgen_export_7: WebAssembly.Table;
130
130
  export const __externref_table_dealloc: (a: number) => void;
131
- export const closure386_externref_shim: (a: number, b: number, c: any) => void;
131
+ export const closure388_externref_shim: (a: number, b: number, c: any) => void;
132
132
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c: (a: number, b: number) => void;
133
- export const closure666_externref_shim: (a: number, b: number, c: any, d: any) => void;
133
+ export const closure668_externref_shim: (a: number, b: number, c: any, d: any) => void;
134
134
  export const __wbindgen_start: () => void;
@@ -292,6 +292,58 @@ class PostgresTokenStore {
292
292
  * List all token outputs grouped by status.
293
293
  * @returns {Promise<Array<{metadata: Object, available: Array, reservedForPayment: Array, reservedForSwap: Array}>>}
294
294
  */
295
+ /**
296
+ * Returns the spendable per-token balances aggregated server-side.
297
+ * Each entry includes full token metadata + the available + swap-reserved sum.
298
+ * Tokens with zero spendable balance are filtered out by the HAVING clause.
299
+ * @returns {Promise<Array<{metadata: object, balance: string}>>}
300
+ */
301
+ async getTokenBalances() {
302
+ try {
303
+ const result = await this.pool.query(`
304
+ SELECT m.identifier, m.issuer_public_key, m.name, m.ticker, m.decimals,
305
+ m.max_supply, m.is_freezable, m.creation_entity_public_key,
306
+ COALESCE(SUM(
307
+ CASE
308
+ WHEN o.reservation_id IS NULL THEN o.token_amount::numeric
309
+ WHEN r.purpose = 'Swap' THEN o.token_amount::numeric
310
+ ELSE 0
311
+ END
312
+ ), 0)::text AS balance
313
+ FROM token_metadata m
314
+ JOIN token_outputs o ON o.token_identifier = m.identifier
315
+ LEFT JOIN token_reservations r ON o.reservation_id = r.id
316
+ GROUP BY m.identifier, m.issuer_public_key, m.name, m.ticker,
317
+ m.decimals, m.max_supply, m.is_freezable, m.creation_entity_public_key
318
+ HAVING COALESCE(SUM(
319
+ CASE
320
+ WHEN o.reservation_id IS NULL THEN o.token_amount::numeric
321
+ WHEN r.purpose = 'Swap' THEN o.token_amount::numeric
322
+ ELSE 0
323
+ END
324
+ ), 0) > 0
325
+ `);
326
+ return result.rows.map((row) => ({
327
+ metadata: {
328
+ identifier: row.identifier,
329
+ issuerPublicKey: row.issuer_public_key,
330
+ name: row.name,
331
+ ticker: row.ticker,
332
+ decimals: row.decimals,
333
+ maxSupply: row.max_supply,
334
+ isFreezable: row.is_freezable,
335
+ creationEntityPublicKey: row.creation_entity_public_key,
336
+ },
337
+ balance: row.balance,
338
+ }));
339
+ } catch (error) {
340
+ throw new TokenStoreError(
341
+ `Failed to get token balances: ${error.message}`,
342
+ error
343
+ );
344
+ }
345
+ }
346
+
295
347
  async listTokensOutputs() {
296
348
  try {
297
349
  const result = await this.pool.query(
@@ -154,6 +154,30 @@ class PostgresTreeStore {
154
154
  * Get all leaves categorized by status.
155
155
  * @returns {Promise<Object>} Leaves object with available, notAvailable, etc.
156
156
  */
157
+ /**
158
+ * Returns the wallet's spendable balance (available + missing-from-operators
159
+ * + swap-reserved). Aggregated server-side so we don't fetch every leaf.
160
+ * @returns {Promise<bigint>}
161
+ */
162
+ async getAvailableBalance() {
163
+ try {
164
+ const result = await this.pool.query(`
165
+ SELECT COALESCE(SUM((l.data->>'value')::bigint), 0)::bigint AS balance
166
+ FROM tree_leaves l
167
+ LEFT JOIN tree_reservations r ON l.reservation_id = r.id
168
+ WHERE
169
+ (l.reservation_id IS NULL AND l.status = 'Available')
170
+ OR r.purpose = 'Swap'
171
+ `);
172
+ return BigInt(result.rows[0].balance);
173
+ } catch (error) {
174
+ throw new TreeStoreError(
175
+ `Failed to get available balance: ${error.message}`,
176
+ error
177
+ );
178
+ }
179
+ }
180
+
157
181
  async getLeaves() {
158
182
  try {
159
183
  const result = await this.pool.query(`
@@ -380,59 +404,98 @@ class PostgresTreeStore {
380
404
  try {
381
405
  return await this._withWriteTransaction(async (client) => {
382
406
  const targetAmount = targetAmounts ? this._totalSats(targetAmounts) : 0;
407
+ const maxTarget = this._maxTargetForPrefilter(targetAmounts);
383
408
 
384
- // Get available leaves
385
- const availableResult = await client.query(`
386
- SELECT data
409
+ // True total available, computed server-side over ALL eligible leaves.
410
+ // Required for the WaitForPending decision below — must NOT be derived
411
+ // from the prefiltered set since the prefilter may exclude big leaves.
412
+ const totalResult = await client.query(`
413
+ SELECT COALESCE(SUM((data->>'value')::bigint), 0)::bigint AS total
387
414
  FROM tree_leaves
388
415
  WHERE status = 'Available'
389
416
  AND is_missing_from_operators = FALSE
390
417
  AND reservation_id IS NULL
391
418
  `);
392
-
393
- const availableLeaves = availableResult.rows.map((r) => r.data);
394
- const available = availableLeaves.reduce((sum, l) => sum + l.value, 0);
419
+ const available = Number(totalResult.rows[0].total);
420
+
421
+ // Slim projection: only (id, value) for leaves the selection might use.
422
+ // Includes all leaves with value <= maxTarget (covers exact-match + the
423
+ // small-leaf accumulators for the minimum-amount path) plus the single
424
+ // smallest leaf with value > maxTarget (covers the minimum-amount
425
+ // fallback case where one larger leaf is sufficient).
426
+ const slimResult = await client.query(`
427
+ SELECT id, (data->>'value')::bigint AS value
428
+ FROM tree_leaves
429
+ WHERE status = 'Available'
430
+ AND is_missing_from_operators = FALSE
431
+ AND reservation_id IS NULL
432
+ AND (
433
+ (data->>'value')::bigint <= $1
434
+ OR id = (
435
+ SELECT id FROM tree_leaves
436
+ WHERE status = 'Available'
437
+ AND is_missing_from_operators = FALSE
438
+ AND reservation_id IS NULL
439
+ AND (data->>'value')::bigint > $1
440
+ ORDER BY (data->>'value')::bigint
441
+ LIMIT 1
442
+ )
443
+ )
444
+ `, [maxTarget]);
445
+
446
+ const slimLeaves = slimResult.rows.map((r) => ({
447
+ id: r.id,
448
+ value: Number(r.value),
449
+ }));
395
450
 
396
451
  // Calculate pending balance
397
452
  const pending = await this._calculatePendingBalance(client);
398
453
 
399
- // Try exact selection first
400
- const selected = this._selectLeavesByTargetAmounts(availableLeaves, targetAmounts);
454
+ // Try exact selection on slim leaves — selection only reads .id/.value
455
+ const selected = this._selectLeavesByTargetAmounts(slimLeaves, targetAmounts);
401
456
 
402
457
  if (selected !== null) {
403
458
  if (selected.length === 0) {
404
459
  throw new TreeStoreError("NonReservableLeaves");
405
460
  }
406
461
 
462
+ const fullLeaves = await this._fetchFullLeavesByIds(
463
+ client,
464
+ selected.map((l) => l.id)
465
+ );
407
466
  const reservationId = this._generateId();
408
- await this._createReservation(client, reservationId, selected, purpose, 0);
467
+ await this._createReservation(client, reservationId, fullLeaves, purpose, 0);
409
468
 
410
469
  return {
411
470
  type: "success",
412
471
  reservation: {
413
472
  id: reservationId,
414
- leaves: selected,
473
+ leaves: fullLeaves,
415
474
  },
416
475
  };
417
476
  }
418
477
 
419
478
  if (!exactOnly) {
420
- // Try minimum amount selection
421
- const minSelected = this._selectLeavesByMinimumAmount(availableLeaves, targetAmount);
479
+ // Try minimum amount selection on the slim set
480
+ const minSelected = this._selectLeavesByMinimumAmount(slimLeaves, targetAmount);
422
481
  if (minSelected !== null) {
423
- const reservedAmount = minSelected.reduce((sum, l) => sum + l.value, 0);
482
+ const fullLeaves = await this._fetchFullLeavesByIds(
483
+ client,
484
+ minSelected.map((l) => l.id)
485
+ );
486
+ const reservedAmount = fullLeaves.reduce((sum, l) => sum + l.value, 0);
424
487
  const pendingChange = reservedAmount > targetAmount && targetAmount > 0
425
488
  ? reservedAmount - targetAmount
426
489
  : 0;
427
490
 
428
491
  const reservationId = this._generateId();
429
- await this._createReservation(client, reservationId, minSelected, purpose, pendingChange);
492
+ await this._createReservation(client, reservationId, fullLeaves, purpose, pendingChange);
430
493
 
431
494
  return {
432
495
  type: "success",
433
496
  reservation: {
434
497
  id: reservationId,
435
- leaves: minSelected,
498
+ leaves: fullLeaves,
436
499
  },
437
500
  };
438
501
  }
@@ -459,6 +522,34 @@ class PostgresTreeStore {
459
522
  }
460
523
  }
461
524
 
525
+ /**
526
+ * Largest single value the selection algorithm could possibly need.
527
+ * For an unbounded target we have to return all leaves (no prefilter).
528
+ */
529
+ _maxTargetForPrefilter(targetAmounts) {
530
+ if (!targetAmounts) return Number.MAX_SAFE_INTEGER;
531
+ if (targetAmounts.type === "amountAndFee") {
532
+ return Math.max(targetAmounts.amountSats, targetAmounts.feeSats || 0);
533
+ }
534
+ if (targetAmounts.type === "exactDenominations") {
535
+ return targetAmounts.denominations.reduce((m, v) => Math.max(m, v), 0);
536
+ }
537
+ return Number.MAX_SAFE_INTEGER;
538
+ }
539
+
540
+ /**
541
+ * Pull the full `data` JSON for the leaves the selection algorithm picked.
542
+ * Typically this is 1-3 rows even when the prefiltered set was thousands.
543
+ */
544
+ async _fetchFullLeavesByIds(client, ids) {
545
+ if (!ids || ids.length === 0) return [];
546
+ const result = await client.query(
547
+ "SELECT data FROM tree_leaves WHERE id = ANY($1)",
548
+ [ids]
549
+ );
550
+ return result.rows.map((r) => r.data);
551
+ }
552
+
462
553
  /**
463
554
  * Get current database time as epoch milliseconds.
464
555
  * @returns {Promise<number>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark",
3
- "version": "0.13.7-debug",
3
+ "version": "0.13.8-debug",
4
4
  "description": "Breez Spark SDK",
5
5
  "repository": "https://github.com/breez/spark-sdk",
6
6
  "author": "Breez <contact@breez.technology> (https://github.com/breez)",
@@ -65,6 +65,7 @@ type ReserveResult =
65
65
  export interface TreeStore {
66
66
  addLeaves: (leaves: TreeNode[]) => Promise<void>;
67
67
  getLeaves: () => Promise<Leaves>;
68
+ getAvailableBalance: () => Promise<bigint | number>;
68
69
  setLeaves: (leaves: TreeNode[], missingLeaves: TreeNode[], refreshStartedAtMs: number) => Promise<void>;
69
70
  cancelReservation: (id: string, leavesToKeep: TreeNode[]) => Promise<void>;
70
71
  finalizeReservation: (id: string, newLeaves: TreeNode[] | null) => Promise<void>;
@@ -152,6 +153,7 @@ type WasmReservationTarget =
152
153
  export interface TokenStore {
153
154
  setTokensOutputs: (tokenOutputs: WasmTokenOutputs[], refreshStartedAtMs: number) => Promise<void>;
154
155
  listTokensOutputs: () => Promise<WasmTokenOutputsPerStatus[]>;
156
+ getTokenBalances: () => Promise<WasmTokenBalance[]>;
155
157
  getTokenOutputs: (filter: WasmGetTokenOutputsFilter) => Promise<WasmTokenOutputsPerStatus>;
156
158
  insertTokenOutputs: (tokenOutputs: WasmTokenOutputs) => Promise<void>;
157
159
  reserveTokenOutputs: (
@@ -1669,9 +1671,9 @@ export interface InitOutput {
1669
1671
  readonly __externref_drop_slice: (a: number, b: number) => void;
1670
1672
  readonly __wbindgen_export_7: WebAssembly.Table;
1671
1673
  readonly __externref_table_dealloc: (a: number) => void;
1672
- readonly closure386_externref_shim: (a: number, b: number, c: any) => void;
1674
+ readonly closure388_externref_shim: (a: number, b: number, c: any) => void;
1673
1675
  readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c: (a: number, b: number) => void;
1674
- readonly closure666_externref_shim: (a: number, b: number, c: any, d: any) => void;
1676
+ readonly closure668_externref_shim: (a: number, b: number, c: any, d: any) => void;
1675
1677
  readonly __wbindgen_start: () => void;
1676
1678
  }
1677
1679
 
@@ -325,16 +325,16 @@ export function task_worker_entry_point(ptr) {
325
325
  }
326
326
  }
327
327
 
328
- function __wbg_adapter_64(arg0, arg1, arg2) {
329
- wasm.closure386_externref_shim(arg0, arg1, arg2);
328
+ function __wbg_adapter_68(arg0, arg1, arg2) {
329
+ wasm.closure388_externref_shim(arg0, arg1, arg2);
330
330
  }
331
331
 
332
- function __wbg_adapter_69(arg0, arg1) {
332
+ function __wbg_adapter_73(arg0, arg1) {
333
333
  wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c(arg0, arg1);
334
334
  }
335
335
 
336
- function __wbg_adapter_433(arg0, arg1, arg2, arg3) {
337
- wasm.closure666_externref_shim(arg0, arg1, arg2, arg3);
336
+ function __wbg_adapter_445(arg0, arg1, arg2, arg3) {
337
+ wasm.closure668_externref_shim(arg0, arg1, arg2, arg3);
338
338
  }
339
339
 
340
340
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1412,6 +1412,10 @@ async function __wbg_load(module, imports) {
1412
1412
  function __wbg_get_imports() {
1413
1413
  const imports = {};
1414
1414
  imports.wbg = {};
1415
+ imports.wbg.__wbg_BigInt_470dd987b8190f8e = function(arg0) {
1416
+ const ret = BigInt(arg0);
1417
+ return ret;
1418
+ };
1415
1419
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1416
1420
  const ret = String(arg1);
1417
1421
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1782,6 +1786,10 @@ function __wbg_get_imports() {
1782
1786
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1783
1787
  }
1784
1788
  }, arguments) };
1789
+ imports.wbg.__wbg_getAvailableBalance_c24d30be8dc60bd5 = function() { return handleError(function (arg0) {
1790
+ const ret = arg0.getAvailableBalance();
1791
+ return ret;
1792
+ }, arguments) };
1785
1793
  imports.wbg.__wbg_getCachedItem_de40d6348815c7b9 = function() { return handleError(function (arg0, arg1, arg2) {
1786
1794
  let deferred0_0;
1787
1795
  let deferred0_1;
@@ -1882,6 +1890,10 @@ function __wbg_get_imports() {
1882
1890
  const ret = arg0.getStaticDepositSecretSource(arg1 >>> 0);
1883
1891
  return ret;
1884
1892
  }, arguments) };
1893
+ imports.wbg.__wbg_getTokenBalances_2e44f820b2d89c1e = function() { return handleError(function (arg0) {
1894
+ const ret = arg0.getTokenBalances();
1895
+ return ret;
1896
+ }, arguments) };
1885
1897
  imports.wbg.__wbg_getTokenOutputs_f51d6f5d47330273 = function() { return handleError(function (arg0, arg1) {
1886
1898
  const ret = arg0.getTokenOutputs(arg1);
1887
1899
  return ret;
@@ -2140,7 +2152,7 @@ function __wbg_get_imports() {
2140
2152
  const a = state0.a;
2141
2153
  state0.a = 0;
2142
2154
  try {
2143
- return __wbg_adapter_433(a, state0.b, arg0, arg1);
2155
+ return __wbg_adapter_445(a, state0.b, arg0, arg1);
2144
2156
  } finally {
2145
2157
  state0.a = a;
2146
2158
  }
@@ -2567,6 +2579,13 @@ function __wbg_get_imports() {
2567
2579
  const ret = arg0.then(arg1, arg2);
2568
2580
  return ret;
2569
2581
  };
2582
+ imports.wbg.__wbg_toString_2f76f493957b63da = function(arg0, arg1, arg2) {
2583
+ const ret = arg1.toString(arg2);
2584
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2585
+ const len1 = WASM_VECTOR_LEN;
2586
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2587
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2588
+ };
2570
2589
  imports.wbg.__wbg_toString_5285597960676b7b = function(arg0) {
2571
2590
  const ret = arg0.toString();
2572
2591
  return ret;
@@ -2680,24 +2699,24 @@ function __wbg_get_imports() {
2680
2699
  const ret = false;
2681
2700
  return ret;
2682
2701
  };
2683
- imports.wbg.__wbindgen_closure_wrapper13509 = function(arg0, arg1, arg2) {
2684
- const ret = makeMutClosure(arg0, arg1, 870, __wbg_adapter_69);
2702
+ imports.wbg.__wbindgen_closure_wrapper13524 = function(arg0, arg1, arg2) {
2703
+ const ret = makeMutClosure(arg0, arg1, 872, __wbg_adapter_73);
2685
2704
  return ret;
2686
2705
  };
2687
- imports.wbg.__wbindgen_closure_wrapper15533 = function(arg0, arg1, arg2) {
2688
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2706
+ imports.wbg.__wbindgen_closure_wrapper15546 = function(arg0, arg1, arg2) {
2707
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2689
2708
  return ret;
2690
2709
  };
2691
- imports.wbg.__wbindgen_closure_wrapper6003 = function(arg0, arg1, arg2) {
2692
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2710
+ imports.wbg.__wbindgen_closure_wrapper6018 = function(arg0, arg1, arg2) {
2711
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2693
2712
  return ret;
2694
2713
  };
2695
- imports.wbg.__wbindgen_closure_wrapper6010 = function(arg0, arg1, arg2) {
2696
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_64);
2714
+ imports.wbg.__wbindgen_closure_wrapper6025 = function(arg0, arg1, arg2) {
2715
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_68);
2697
2716
  return ret;
2698
2717
  };
2699
- imports.wbg.__wbindgen_closure_wrapper7625 = function(arg0, arg1, arg2) {
2700
- const ret = makeMutClosure(arg0, arg1, 387, __wbg_adapter_69);
2718
+ imports.wbg.__wbindgen_closure_wrapper7640 = function(arg0, arg1, arg2) {
2719
+ const ret = makeMutClosure(arg0, arg1, 389, __wbg_adapter_73);
2701
2720
  return ret;
2702
2721
  };
2703
2722
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
@@ -2758,10 +2777,18 @@ function __wbg_get_imports() {
2758
2777
  const ret = arg0 == arg1;
2759
2778
  return ret;
2760
2779
  };
2780
+ imports.wbg.__wbindgen_lt = function(arg0, arg1) {
2781
+ const ret = arg0 < arg1;
2782
+ return ret;
2783
+ };
2761
2784
  imports.wbg.__wbindgen_memory = function() {
2762
2785
  const ret = wasm.memory;
2763
2786
  return ret;
2764
2787
  };
2788
+ imports.wbg.__wbindgen_neg = function(arg0) {
2789
+ const ret = -arg0;
2790
+ return ret;
2791
+ };
2765
2792
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2766
2793
  const obj = arg1;
2767
2794
  const ret = typeof(obj) === 'number' ? obj : undefined;
Binary file
@@ -128,7 +128,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
128
128
  export const __externref_drop_slice: (a: number, b: number) => void;
129
129
  export const __wbindgen_export_7: WebAssembly.Table;
130
130
  export const __externref_table_dealloc: (a: number) => void;
131
- export const closure386_externref_shim: (a: number, b: number, c: any) => void;
131
+ export const closure388_externref_shim: (a: number, b: number, c: any) => void;
132
132
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1015faeeadd5b26c: (a: number, b: number) => void;
133
- export const closure666_externref_shim: (a: number, b: number, c: any, d: any) => void;
133
+ export const closure668_externref_shim: (a: number, b: number, c: any, d: any) => void;
134
134
  export const __wbindgen_start: () => void;