@breeztech/breez-sdk-spark 0.13.1 → 0.13.2-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.
@@ -235,36 +235,23 @@ module.exports.defaultPostgresStorageConfig = function(connection_string) {
235
235
  };
236
236
 
237
237
  /**
238
- * @param {Network} network
239
- * @returns {Config}
238
+ * Creates a default external signer from a mnemonic phrase.
239
+ *
240
+ * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
241
+ * @returns {Promise<SparkStatus>}
240
242
  */
241
- module.exports.defaultConfig = function(network) {
242
- const ret = wasm.defaultConfig(network);
243
+ module.exports.getSparkStatus = function() {
244
+ const ret = wasm.getSparkStatus();
243
245
  return ret;
244
246
  };
245
247
 
246
- function takeFromExternrefTable0(idx) {
247
- const value = wasm.__wbindgen_export_5.get(idx);
248
- wasm.__externref_table_dealloc(idx);
249
- return value;
250
- }
251
248
  /**
252
- * @param {string} mnemonic
253
- * @param {string | null | undefined} passphrase
254
249
  * @param {Network} network
255
- * @param {KeySetConfig | null} [key_set_config]
256
- * @returns {DefaultSigner}
250
+ * @returns {Config}
257
251
  */
258
- module.exports.defaultExternalSigner = function(mnemonic, passphrase, network, key_set_config) {
259
- const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
260
- const len0 = WASM_VECTOR_LEN;
261
- var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
262
- var len1 = WASM_VECTOR_LEN;
263
- const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
264
- if (ret[2]) {
265
- throw takeFromExternrefTable0(ret[1]);
266
- }
267
- return DefaultSigner.__wrap(ret[0]);
252
+ module.exports.defaultConfig = function(network) {
253
+ const ret = wasm.defaultConfig(network);
254
+ return ret;
268
255
  };
269
256
 
270
257
  /**
@@ -279,6 +266,15 @@ module.exports.initLogging = function(logger, filter) {
279
266
  return ret;
280
267
  };
281
268
 
269
+ /**
270
+ * @param {ConnectRequest} request
271
+ * @returns {Promise<BreezSdk>}
272
+ */
273
+ module.exports.connect = function(request) {
274
+ const ret = wasm.connect(request);
275
+ return ret;
276
+ };
277
+
282
278
  /**
283
279
  * @param {Config} config
284
280
  * @param {ExternalSigner} signer
@@ -292,24 +288,28 @@ module.exports.connectWithSigner = function(config, signer, storage_dir) {
292
288
  return ret;
293
289
  };
294
290
 
291
+ function takeFromExternrefTable0(idx) {
292
+ const value = wasm.__wbindgen_export_5.get(idx);
293
+ wasm.__externref_table_dealloc(idx);
294
+ return value;
295
+ }
295
296
  /**
296
- * Creates a default external signer from a mnemonic phrase.
297
- *
298
- * This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
299
- * @returns {Promise<SparkStatus>}
300
- */
301
- module.exports.getSparkStatus = function() {
302
- const ret = wasm.getSparkStatus();
303
- return ret;
304
- };
305
-
306
- /**
307
- * @param {ConnectRequest} request
308
- * @returns {Promise<BreezSdk>}
297
+ * @param {string} mnemonic
298
+ * @param {string | null | undefined} passphrase
299
+ * @param {Network} network
300
+ * @param {KeySetConfig | null} [key_set_config]
301
+ * @returns {DefaultSigner}
309
302
  */
310
- module.exports.connect = function(request) {
311
- const ret = wasm.connect(request);
312
- return ret;
303
+ module.exports.defaultExternalSigner = function(mnemonic, passphrase, network, key_set_config) {
304
+ const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
305
+ const len0 = WASM_VECTOR_LEN;
306
+ var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
307
+ var len1 = WASM_VECTOR_LEN;
308
+ const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
309
+ if (ret[2]) {
310
+ throw takeFromExternrefTable0(ret[1]);
311
+ }
312
+ return DefaultSigner.__wrap(ret[0]);
313
313
  };
314
314
 
315
315
  function passArray8ToWasm0(arg, malloc) {
@@ -330,7 +330,7 @@ module.exports.task_worker_entry_point = function(ptr) {
330
330
  };
331
331
 
332
332
  function __wbg_adapter_64(arg0, arg1, arg2) {
333
- wasm.closure383_externref_shim(arg0, arg1, arg2);
333
+ wasm.closure384_externref_shim(arg0, arg1, arg2);
334
334
  }
335
335
 
336
336
  function __wbg_adapter_69(arg0, arg1) {
@@ -338,7 +338,7 @@ function __wbg_adapter_69(arg0, arg1) {
338
338
  }
339
339
 
340
340
  function __wbg_adapter_423(arg0, arg1, arg2, arg3) {
341
- wasm.closure661_externref_shim(arg0, arg1, arg2, arg3);
341
+ wasm.closure657_externref_shim(arg0, arg1, arg2, arg3);
342
342
  }
343
343
 
344
344
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -2888,28 +2888,28 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
2888
2888
  return ret;
2889
2889
  };
2890
2890
 
2891
- module.exports.__wbindgen_closure_wrapper10258 = function(arg0, arg1, arg2) {
2892
- const ret = makeMutClosure(arg0, arg1, 384, __wbg_adapter_69);
2891
+ module.exports.__wbindgen_closure_wrapper10276 = function(arg0, arg1, arg2) {
2892
+ const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_69);
2893
2893
  return ret;
2894
2894
  };
2895
2895
 
2896
- module.exports.__wbindgen_closure_wrapper15384 = function(arg0, arg1, arg2) {
2897
- const ret = makeMutClosure(arg0, arg1, 384, __wbg_adapter_64);
2896
+ module.exports.__wbindgen_closure_wrapper15437 = function(arg0, arg1, arg2) {
2897
+ const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
2898
2898
  return ret;
2899
2899
  };
2900
2900
 
2901
- module.exports.__wbindgen_closure_wrapper5940 = function(arg0, arg1, arg2) {
2902
- const ret = makeMutClosure(arg0, arg1, 384, __wbg_adapter_64);
2901
+ module.exports.__wbindgen_closure_wrapper5931 = function(arg0, arg1, arg2) {
2902
+ const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
2903
2903
  return ret;
2904
2904
  };
2905
2905
 
2906
- module.exports.__wbindgen_closure_wrapper5946 = function(arg0, arg1, arg2) {
2907
- const ret = makeMutClosure(arg0, arg1, 384, __wbg_adapter_64);
2906
+ module.exports.__wbindgen_closure_wrapper5937 = function(arg0, arg1, arg2) {
2907
+ const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
2908
2908
  return ret;
2909
2909
  };
2910
2910
 
2911
- module.exports.__wbindgen_closure_wrapper7585 = function(arg0, arg1, arg2) {
2912
- const ret = makeMutClosure(arg0, arg1, 870, __wbg_adapter_69);
2911
+ module.exports.__wbindgen_closure_wrapper7572 = function(arg0, arg1, arg2) {
2912
+ const ret = makeMutClosure(arg0, arg1, 866, __wbg_adapter_69);
2913
2913
  return ret;
2914
2914
  };
2915
2915
 
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 closure383_externref_shim: (a: number, b: number, c: any) => void;
131
+ export const closure384_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__h140914a8cfe47e73: (a: number, b: number) => void;
133
- export const closure661_externref_shim: (a: number, b: number, c: any, d: any) => void;
133
+ export const closure657_externref_shim: (a: number, b: number, c: any, d: any) => void;
134
134
  export const __wbindgen_start: () => void;
package/nodejs/index.mjs CHANGED
@@ -5,12 +5,12 @@ import pkg from './index.js';
5
5
 
6
6
  export const {
7
7
  defaultPostgresStorageConfig,
8
+ getSparkStatus,
8
9
  defaultConfig,
9
- defaultExternalSigner,
10
10
  initLogging,
11
- connectWithSigner,
12
- getSparkStatus,
13
11
  connect,
12
+ connectWithSigner,
13
+ defaultExternalSigner,
14
14
  task_worker_entry_point,
15
15
  BreezSdk,
16
16
  DefaultSigner,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark",
3
- "version": "0.13.1",
3
+ "version": "0.13.2-dev1",
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)",
package/ssr/index.js CHANGED
@@ -28,34 +28,34 @@ export function defaultPostgresStorageConfig(...args) {
28
28
  return _module.defaultPostgresStorageConfig(...args);
29
29
  }
30
30
 
31
+ export function getSparkStatus(...args) {
32
+ if (!_module) _notInitialized('getSparkStatus');
33
+ return _module.getSparkStatus(...args);
34
+ }
35
+
31
36
  export function defaultConfig(...args) {
32
37
  if (!_module) _notInitialized('defaultConfig');
33
38
  return _module.defaultConfig(...args);
34
39
  }
35
40
 
36
- export function defaultExternalSigner(...args) {
37
- if (!_module) _notInitialized('defaultExternalSigner');
38
- return _module.defaultExternalSigner(...args);
39
- }
40
-
41
41
  export function initLogging(...args) {
42
42
  if (!_module) _notInitialized('initLogging');
43
43
  return _module.initLogging(...args);
44
44
  }
45
45
 
46
+ export function connect(...args) {
47
+ if (!_module) _notInitialized('connect');
48
+ return _module.connect(...args);
49
+ }
50
+
46
51
  export function connectWithSigner(...args) {
47
52
  if (!_module) _notInitialized('connectWithSigner');
48
53
  return _module.connectWithSigner(...args);
49
54
  }
50
55
 
51
- export function getSparkStatus(...args) {
52
- if (!_module) _notInitialized('getSparkStatus');
53
- return _module.getSparkStatus(...args);
54
- }
55
-
56
- export function connect(...args) {
57
- if (!_module) _notInitialized('connect');
58
- return _module.connect(...args);
56
+ export function defaultExternalSigner(...args) {
57
+ if (!_module) _notInitialized('defaultExternalSigner');
58
+ return _module.defaultExternalSigner(...args);
59
59
  }
60
60
 
61
61
  export function task_worker_entry_point(...args) {