@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.
@@ -214,11 +214,11 @@ function debugString(val) {
214
214
  return className;
215
215
  }
216
216
  /**
217
- * @param {Network} network
218
- * @returns {Config}
217
+ * @param {ConnectRequest} request
218
+ * @returns {Promise<BreezSdk>}
219
219
  */
220
- export function defaultConfig(network) {
221
- const ret = wasm.defaultConfig(network);
220
+ export function connect(request) {
221
+ const ret = wasm.connect(request);
222
222
  return ret;
223
223
  }
224
224
 
@@ -235,11 +235,11 @@ export function initLogging(logger, filter) {
235
235
  }
236
236
 
237
237
  /**
238
- * @param {ConnectRequest} request
239
- * @returns {Promise<BreezSdk>}
238
+ * @param {Network} network
239
+ * @returns {Config}
240
240
  */
241
- export function connect(request) {
242
- const ret = wasm.connect(request);
241
+ export function defaultConfig(network) {
242
+ const ret = wasm.defaultConfig(network);
243
243
  return ret;
244
244
  }
245
245
 
@@ -260,15 +260,15 @@ export function task_worker_entry_point(ptr) {
260
260
  }
261
261
 
262
262
  function __wbg_adapter_58(arg0, arg1) {
263
- wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h2290ca3f9d30a384(arg0, arg1);
263
+ wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbac93e35ba6a14f4(arg0, arg1);
264
264
  }
265
265
 
266
266
  function __wbg_adapter_61(arg0, arg1, arg2) {
267
- wasm.closure914_externref_shim(arg0, arg1, arg2);
267
+ wasm.closure919_externref_shim(arg0, arg1, arg2);
268
268
  }
269
269
 
270
- function __wbg_adapter_218(arg0, arg1, arg2, arg3) {
271
- wasm.closure518_externref_shim(arg0, arg1, arg2, arg3);
270
+ function __wbg_adapter_224(arg0, arg1, arg2, arg3) {
271
+ wasm.closure517_externref_shim(arg0, arg1, arg2, arg3);
272
272
  }
273
273
 
274
274
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -410,11 +410,10 @@ export class BreezSdk {
410
410
  return TokenIssuer.__wrap(ret);
411
411
  }
412
412
  /**
413
- * @param {WaitForPaymentRequest} request
414
- * @returns {Promise<WaitForPaymentResponse>}
413
+ * @returns {Promise<RecommendedFees>}
415
414
  */
416
- waitForPayment(request) {
417
- const ret = wasm.breezsdk_waitForPayment(this.__wbg_ptr, request);
415
+ recommendedFees() {
416
+ const ret = wasm.breezsdk_recommendedFees(this.__wbg_ptr);
418
417
  return ret;
419
418
  }
420
419
  /**
@@ -767,14 +766,15 @@ export class SdkBuilder {
767
766
  }
768
767
  /**
769
768
  * @param {string} url
769
+ * @param {ChainApiType} api_type
770
770
  * @param {Credentials | null} [credentials]
771
771
  * @returns {SdkBuilder}
772
772
  */
773
- withRestChainService(url, credentials) {
773
+ withRestChainService(url, api_type, credentials) {
774
774
  const ptr = this.__destroy_into_raw();
775
775
  const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
776
776
  const len0 = WASM_VECTOR_LEN;
777
- const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
777
+ const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
778
778
  return SdkBuilder.__wrap(ret);
779
779
  }
780
780
  /**
@@ -1370,7 +1370,7 @@ function __wbg_get_imports() {
1370
1370
  const a = state0.a;
1371
1371
  state0.a = 0;
1372
1372
  try {
1373
- return __wbg_adapter_218(a, state0.b, arg0, arg1);
1373
+ return __wbg_adapter_224(a, state0.b, arg0, arg1);
1374
1374
  } finally {
1375
1375
  state0.a = a;
1376
1376
  }
@@ -1490,6 +1490,10 @@ function __wbg_get_imports() {
1490
1490
  const ret = arg0.read();
1491
1491
  return ret;
1492
1492
  };
1493
+ imports.wbg.__wbg_recommendedFees_a61f331fce46523e = function() { return handleError(function (arg0) {
1494
+ const ret = arg0.recommendedFees();
1495
+ return ret;
1496
+ }, arguments) };
1493
1497
  imports.wbg.__wbg_releaseLock_091899af97991d2e = function(arg0) {
1494
1498
  arg0.releaseLock();
1495
1499
  };
@@ -1751,12 +1755,12 @@ function __wbg_get_imports() {
1751
1755
  const ret = false;
1752
1756
  return ret;
1753
1757
  };
1754
- imports.wbg.__wbindgen_closure_wrapper11185 = function(arg0, arg1, arg2) {
1755
- const ret = makeMutClosure(arg0, arg1, 915, __wbg_adapter_61);
1758
+ imports.wbg.__wbindgen_closure_wrapper11284 = function(arg0, arg1, arg2) {
1759
+ const ret = makeMutClosure(arg0, arg1, 920, __wbg_adapter_61);
1756
1760
  return ret;
1757
1761
  };
1758
- imports.wbg.__wbindgen_closure_wrapper9444 = function(arg0, arg1, arg2) {
1759
- const ret = makeMutClosure(arg0, arg1, 692, __wbg_adapter_58);
1762
+ imports.wbg.__wbindgen_closure_wrapper9405 = function(arg0, arg1, arg2) {
1763
+ const ret = makeMutClosure(arg0, arg1, 689, __wbg_adapter_58);
1760
1764
  return ret;
1761
1765
  };
1762
1766
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -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;