@breeztech/breez-sdk-spark 0.4.2 → 0.4.3-dev1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,11 +222,11 @@ function debugString(val) {
222
222
  return className;
223
223
  }
224
224
  /**
225
- * @param {Network} network
226
- * @returns {Config}
225
+ * @param {ConnectRequest} request
226
+ * @returns {Promise<BreezSdk>}
227
227
  */
228
- export function defaultConfig(network) {
229
- const ret = wasm.defaultConfig(network);
228
+ export function connect(request) {
229
+ const ret = wasm.connect(request);
230
230
  return ret;
231
231
  }
232
232
 
@@ -243,11 +243,11 @@ export function initLogging(logger, filter) {
243
243
  }
244
244
 
245
245
  /**
246
- * @param {ConnectRequest} request
247
- * @returns {Promise<BreezSdk>}
246
+ * @param {Network} network
247
+ * @returns {Config}
248
248
  */
249
- export function connect(request) {
250
- const ret = wasm.connect(request);
249
+ export function defaultConfig(network) {
250
+ const ret = wasm.defaultConfig(network);
251
251
  return ret;
252
252
  }
253
253
 
@@ -268,15 +268,15 @@ export function task_worker_entry_point(ptr) {
268
268
  }
269
269
 
270
270
  function __wbg_adapter_58(arg0, arg1) {
271
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2290ca3f9d30a384(arg0, arg1);
271
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbac93e35ba6a14f4(arg0, arg1);
272
272
  }
273
273
 
274
274
  function __wbg_adapter_61(arg0, arg1, arg2) {
275
- wasm.closure914_externref_shim(arg0, arg1, arg2);
275
+ wasm.closure919_externref_shim(arg0, arg1, arg2);
276
276
  }
277
277
 
278
- function __wbg_adapter_218(arg0, arg1, arg2, arg3) {
279
- wasm.closure518_externref_shim(arg0, arg1, arg2, arg3);
278
+ function __wbg_adapter_224(arg0, arg1, arg2, arg3) {
279
+ wasm.closure517_externref_shim(arg0, arg1, arg2, arg3);
280
280
  }
281
281
 
282
282
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -418,11 +418,10 @@ export class BreezSdk {
418
418
  return TokenIssuer.__wrap(ret);
419
419
  }
420
420
  /**
421
- * @param {WaitForPaymentRequest} request
422
- * @returns {Promise<WaitForPaymentResponse>}
421
+ * @returns {Promise<RecommendedFees>}
423
422
  */
424
- waitForPayment(request) {
425
- const ret = wasm.breezsdk_waitForPayment(this.__wbg_ptr, request);
423
+ recommendedFees() {
424
+ const ret = wasm.breezsdk_recommendedFees(this.__wbg_ptr);
426
425
  return ret;
427
426
  }
428
427
  /**
@@ -775,14 +774,15 @@ export class SdkBuilder {
775
774
  }
776
775
  /**
777
776
  * @param {string} url
777
+ * @param {ChainApiType} api_type
778
778
  * @param {Credentials | null} [credentials]
779
779
  * @returns {SdkBuilder}
780
780
  */
781
- withRestChainService(url, credentials) {
781
+ withRestChainService(url, api_type, credentials) {
782
782
  const ptr = this.__destroy_into_raw();
783
783
  const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
784
784
  const len0 = WASM_VECTOR_LEN;
785
- const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
785
+ const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
786
786
  return SdkBuilder.__wrap(ret);
787
787
  }
788
788
  /**
@@ -1421,7 +1421,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1421
1421
  const a = state0.a;
1422
1422
  state0.a = 0;
1423
1423
  try {
1424
- return __wbg_adapter_218(a, state0.b, arg0, arg1);
1424
+ return __wbg_adapter_224(a, state0.b, arg0, arg1);
1425
1425
  } finally {
1426
1426
  state0.a = a;
1427
1427
  }
@@ -1567,6 +1567,11 @@ export function __wbg_read_a2434af1186cb56c(arg0) {
1567
1567
  return ret;
1568
1568
  };
1569
1569
 
1570
+ export function __wbg_recommendedFees_a61f331fce46523e() { return handleError(function (arg0) {
1571
+ const ret = arg0.recommendedFees();
1572
+ return ret;
1573
+ }, arguments) };
1574
+
1570
1575
  export function __wbg_releaseLock_091899af97991d2e(arg0) {
1571
1576
  arg0.releaseLock();
1572
1577
  };
@@ -1887,13 +1892,13 @@ export function __wbindgen_cb_drop(arg0) {
1887
1892
  return ret;
1888
1893
  };
1889
1894
 
1890
- export function __wbindgen_closure_wrapper11185(arg0, arg1, arg2) {
1891
- const ret = makeMutClosure(arg0, arg1, 915, __wbg_adapter_61);
1895
+ export function __wbindgen_closure_wrapper11284(arg0, arg1, arg2) {
1896
+ const ret = makeMutClosure(arg0, arg1, 920, __wbg_adapter_61);
1892
1897
  return ret;
1893
1898
  };
1894
1899
 
1895
- export function __wbindgen_closure_wrapper9444(arg0, arg1, arg2) {
1896
- const ret = makeMutClosure(arg0, arg1, 692, __wbg_adapter_58);
1900
+ export function __wbindgen_closure_wrapper9405(arg0, arg1, arg2) {
1901
+ const ret = makeMutClosure(arg0, arg1, 689, __wbg_adapter_58);
1897
1902
  return ret;
1898
1903
  };
1899
1904
 
@@ -26,6 +26,7 @@ export const breezsdk_parse: (a: number, b: number, c: number) => any;
26
26
  export const breezsdk_prepareLnurlPay: (a: number, b: any) => any;
27
27
  export const breezsdk_prepareSendPayment: (a: number, b: any) => any;
28
28
  export const breezsdk_receivePayment: (a: number, b: any) => any;
29
+ export const breezsdk_recommendedFees: (a: number) => any;
29
30
  export const breezsdk_refundDeposit: (a: number, b: any) => any;
30
31
  export const breezsdk_registerLightningAddress: (a: number, b: any) => any;
31
32
  export const breezsdk_removeEventListener: (a: number, b: number, c: number) => any;
@@ -33,7 +34,6 @@ export const breezsdk_sendPayment: (a: number, b: any) => any;
33
34
  export const breezsdk_signMessage: (a: number, b: any) => any;
34
35
  export const breezsdk_syncWallet: (a: number, b: any) => any;
35
36
  export const breezsdk_updateUserSettings: (a: number, b: any) => any;
36
- export const breezsdk_waitForPayment: (a: number, b: any) => any;
37
37
  export const connect: (a: any) => any;
38
38
  export const defaultConfig: (a: any) => any;
39
39
  export const initLogging: (a: any, b: number, c: number) => any;
@@ -45,7 +45,7 @@ export const sdkbuilder_withFiatService: (a: number, b: any) => number;
45
45
  export const sdkbuilder_withKeySet: (a: number, b: any, c: number, d: number) => number;
46
46
  export const sdkbuilder_withLnurlClient: (a: number, b: any) => number;
47
47
  export const sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
48
- export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: number) => number;
48
+ export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
49
49
  export const sdkbuilder_withStorage: (a: number, b: any) => number;
50
50
  export const tokenissuer_burnIssuerToken: (a: number, b: any) => any;
51
51
  export const tokenissuer_createIssuerToken: (a: number, b: any) => any;
@@ -81,7 +81,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
81
81
  export const __externref_drop_slice: (a: number, b: number) => void;
82
82
  export const __wbindgen_export_7: WebAssembly.Table;
83
83
  export const __externref_table_dealloc: (a: number) => void;
84
- export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2290ca3f9d30a384: (a: number, b: number) => void;
85
- export const closure914_externref_shim: (a: number, b: number, c: any) => void;
86
- export const closure518_externref_shim: (a: number, b: number, c: any, d: any) => void;
84
+ export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbac93e35ba6a14f4: (a: number, b: number) => void;
85
+ export const closure919_externref_shim: (a: number, b: number, c: any) => void;
86
+ export const closure517_externref_shim: (a: number, b: number, c: any, d: any) => void;
87
87
  export const __wbindgen_start: () => void;