@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.
- package/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +645 -645
- package/bundler/breez_sdk_spark_wasm_bg.js +50 -50
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
- package/deno/breez_sdk_spark_wasm.d.ts +645 -645
- package/deno/breez_sdk_spark_wasm.js +50 -50
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/breez_sdk_spark_wasm.d.ts +645 -645
- package/nodejs/breez_sdk_spark_wasm.js +51 -51
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/index.mjs +3 -3
- package/package.json +1 -1
- package/ssr/index.js +13 -13
- package/web/breez_sdk_spark_wasm.d.ts +647 -647
- package/web/breez_sdk_spark_wasm.js +50 -50
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +2 -2
|
@@ -231,36 +231,23 @@ export function defaultPostgresStorageConfig(connection_string) {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
234
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
235
|
+
*
|
|
236
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
237
|
+
* @returns {Promise<SparkStatus>}
|
|
236
238
|
*/
|
|
237
|
-
export function
|
|
238
|
-
const ret = wasm.
|
|
239
|
+
export function getSparkStatus() {
|
|
240
|
+
const ret = wasm.getSparkStatus();
|
|
239
241
|
return ret;
|
|
240
242
|
}
|
|
241
243
|
|
|
242
|
-
function takeFromExternrefTable0(idx) {
|
|
243
|
-
const value = wasm.__wbindgen_export_5.get(idx);
|
|
244
|
-
wasm.__externref_table_dealloc(idx);
|
|
245
|
-
return value;
|
|
246
|
-
}
|
|
247
244
|
/**
|
|
248
|
-
* @param {string} mnemonic
|
|
249
|
-
* @param {string | null | undefined} passphrase
|
|
250
245
|
* @param {Network} network
|
|
251
|
-
* @
|
|
252
|
-
* @returns {DefaultSigner}
|
|
246
|
+
* @returns {Config}
|
|
253
247
|
*/
|
|
254
|
-
export function
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
258
|
-
var len1 = WASM_VECTOR_LEN;
|
|
259
|
-
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
260
|
-
if (ret[2]) {
|
|
261
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
262
|
-
}
|
|
263
|
-
return DefaultSigner.__wrap(ret[0]);
|
|
248
|
+
export function defaultConfig(network) {
|
|
249
|
+
const ret = wasm.defaultConfig(network);
|
|
250
|
+
return ret;
|
|
264
251
|
}
|
|
265
252
|
|
|
266
253
|
/**
|
|
@@ -275,6 +262,15 @@ export function initLogging(logger, filter) {
|
|
|
275
262
|
return ret;
|
|
276
263
|
}
|
|
277
264
|
|
|
265
|
+
/**
|
|
266
|
+
* @param {ConnectRequest} request
|
|
267
|
+
* @returns {Promise<BreezSdk>}
|
|
268
|
+
*/
|
|
269
|
+
export function connect(request) {
|
|
270
|
+
const ret = wasm.connect(request);
|
|
271
|
+
return ret;
|
|
272
|
+
}
|
|
273
|
+
|
|
278
274
|
/**
|
|
279
275
|
* @param {Config} config
|
|
280
276
|
* @param {ExternalSigner} signer
|
|
@@ -288,24 +284,28 @@ export function connectWithSigner(config, signer, storage_dir) {
|
|
|
288
284
|
return ret;
|
|
289
285
|
}
|
|
290
286
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
* @returns {Promise<SparkStatus>}
|
|
296
|
-
*/
|
|
297
|
-
export function getSparkStatus() {
|
|
298
|
-
const ret = wasm.getSparkStatus();
|
|
299
|
-
return ret;
|
|
287
|
+
function takeFromExternrefTable0(idx) {
|
|
288
|
+
const value = wasm.__wbindgen_export_5.get(idx);
|
|
289
|
+
wasm.__externref_table_dealloc(idx);
|
|
290
|
+
return value;
|
|
300
291
|
}
|
|
301
|
-
|
|
302
292
|
/**
|
|
303
|
-
* @param {
|
|
304
|
-
* @
|
|
293
|
+
* @param {string} mnemonic
|
|
294
|
+
* @param {string | null | undefined} passphrase
|
|
295
|
+
* @param {Network} network
|
|
296
|
+
* @param {KeySetConfig | null} [key_set_config]
|
|
297
|
+
* @returns {DefaultSigner}
|
|
305
298
|
*/
|
|
306
|
-
export function
|
|
307
|
-
const
|
|
308
|
-
|
|
299
|
+
export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
|
|
300
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
301
|
+
const len0 = WASM_VECTOR_LEN;
|
|
302
|
+
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
+
var len1 = WASM_VECTOR_LEN;
|
|
304
|
+
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
305
|
+
if (ret[2]) {
|
|
306
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
307
|
+
}
|
|
308
|
+
return DefaultSigner.__wrap(ret[0]);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -326,7 +326,7 @@ export function task_worker_entry_point(ptr) {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
function __wbg_adapter_64(arg0, arg1, arg2) {
|
|
329
|
-
wasm.
|
|
329
|
+
wasm.closure384_externref_shim(arg0, arg1, arg2);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
function __wbg_adapter_69(arg0, arg1) {
|
|
@@ -334,7 +334,7 @@ function __wbg_adapter_69(arg0, arg1) {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
function __wbg_adapter_423(arg0, arg1, arg2, arg3) {
|
|
337
|
-
wasm.
|
|
337
|
+
wasm.closure657_externref_shim(arg0, arg1, arg2, arg3);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
@@ -2680,24 +2680,24 @@ function __wbg_get_imports() {
|
|
|
2680
2680
|
const ret = false;
|
|
2681
2681
|
return ret;
|
|
2682
2682
|
};
|
|
2683
|
-
imports.wbg.
|
|
2684
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2683
|
+
imports.wbg.__wbindgen_closure_wrapper10276 = function(arg0, arg1, arg2) {
|
|
2684
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_69);
|
|
2685
2685
|
return ret;
|
|
2686
2686
|
};
|
|
2687
|
-
imports.wbg.
|
|
2688
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2687
|
+
imports.wbg.__wbindgen_closure_wrapper15437 = function(arg0, arg1, arg2) {
|
|
2688
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2689
2689
|
return ret;
|
|
2690
2690
|
};
|
|
2691
|
-
imports.wbg.
|
|
2692
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2691
|
+
imports.wbg.__wbindgen_closure_wrapper5931 = function(arg0, arg1, arg2) {
|
|
2692
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2693
2693
|
return ret;
|
|
2694
2694
|
};
|
|
2695
|
-
imports.wbg.
|
|
2696
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2695
|
+
imports.wbg.__wbindgen_closure_wrapper5937 = function(arg0, arg1, arg2) {
|
|
2696
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2697
2697
|
return ret;
|
|
2698
2698
|
};
|
|
2699
|
-
imports.wbg.
|
|
2700
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2699
|
+
imports.wbg.__wbindgen_closure_wrapper7572 = function(arg0, arg1, arg2) {
|
|
2700
|
+
const ret = makeMutClosure(arg0, arg1, 866, __wbg_adapter_69);
|
|
2701
2701
|
return ret;
|
|
2702
2702
|
};
|
|
2703
2703
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
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
|
|
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
|
|
133
|
+
export const closure657_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
134
134
|
export const __wbindgen_start: () => void;
|