@breeztech/breez-sdk-spark 0.13.1 → 0.13.2-dev2
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/nodejs/storage/migrations.cjs +23 -0
- 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
|
@@ -222,36 +222,23 @@ export function defaultPostgresStorageConfig(connection_string) {
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
225
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
226
|
+
*
|
|
227
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
228
|
+
* @returns {Promise<SparkStatus>}
|
|
227
229
|
*/
|
|
228
|
-
export function
|
|
229
|
-
const ret = wasm.
|
|
230
|
+
export function getSparkStatus() {
|
|
231
|
+
const ret = wasm.getSparkStatus();
|
|
230
232
|
return ret;
|
|
231
233
|
}
|
|
232
234
|
|
|
233
|
-
function takeFromExternrefTable0(idx) {
|
|
234
|
-
const value = wasm.__wbindgen_export_5.get(idx);
|
|
235
|
-
wasm.__externref_table_dealloc(idx);
|
|
236
|
-
return value;
|
|
237
|
-
}
|
|
238
235
|
/**
|
|
239
|
-
* @param {string} mnemonic
|
|
240
|
-
* @param {string | null | undefined} passphrase
|
|
241
236
|
* @param {Network} network
|
|
242
|
-
* @
|
|
243
|
-
* @returns {DefaultSigner}
|
|
237
|
+
* @returns {Config}
|
|
244
238
|
*/
|
|
245
|
-
export function
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
-
var len1 = WASM_VECTOR_LEN;
|
|
250
|
-
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
251
|
-
if (ret[2]) {
|
|
252
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
253
|
-
}
|
|
254
|
-
return DefaultSigner.__wrap(ret[0]);
|
|
239
|
+
export function defaultConfig(network) {
|
|
240
|
+
const ret = wasm.defaultConfig(network);
|
|
241
|
+
return ret;
|
|
255
242
|
}
|
|
256
243
|
|
|
257
244
|
/**
|
|
@@ -266,6 +253,15 @@ export function initLogging(logger, filter) {
|
|
|
266
253
|
return ret;
|
|
267
254
|
}
|
|
268
255
|
|
|
256
|
+
/**
|
|
257
|
+
* @param {ConnectRequest} request
|
|
258
|
+
* @returns {Promise<BreezSdk>}
|
|
259
|
+
*/
|
|
260
|
+
export function connect(request) {
|
|
261
|
+
const ret = wasm.connect(request);
|
|
262
|
+
return ret;
|
|
263
|
+
}
|
|
264
|
+
|
|
269
265
|
/**
|
|
270
266
|
* @param {Config} config
|
|
271
267
|
* @param {ExternalSigner} signer
|
|
@@ -279,24 +275,28 @@ export function connectWithSigner(config, signer, storage_dir) {
|
|
|
279
275
|
return ret;
|
|
280
276
|
}
|
|
281
277
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
* @returns {Promise<SparkStatus>}
|
|
287
|
-
*/
|
|
288
|
-
export function getSparkStatus() {
|
|
289
|
-
const ret = wasm.getSparkStatus();
|
|
290
|
-
return ret;
|
|
278
|
+
function takeFromExternrefTable0(idx) {
|
|
279
|
+
const value = wasm.__wbindgen_export_5.get(idx);
|
|
280
|
+
wasm.__externref_table_dealloc(idx);
|
|
281
|
+
return value;
|
|
291
282
|
}
|
|
292
|
-
|
|
293
283
|
/**
|
|
294
|
-
* @param {
|
|
295
|
-
* @
|
|
284
|
+
* @param {string} mnemonic
|
|
285
|
+
* @param {string | null | undefined} passphrase
|
|
286
|
+
* @param {Network} network
|
|
287
|
+
* @param {KeySetConfig | null} [key_set_config]
|
|
288
|
+
* @returns {DefaultSigner}
|
|
296
289
|
*/
|
|
297
|
-
export function
|
|
298
|
-
const
|
|
299
|
-
|
|
290
|
+
export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
|
|
291
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
|
+
const len0 = WASM_VECTOR_LEN;
|
|
293
|
+
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
294
|
+
var len1 = WASM_VECTOR_LEN;
|
|
295
|
+
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
296
|
+
if (ret[2]) {
|
|
297
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
298
|
+
}
|
|
299
|
+
return DefaultSigner.__wrap(ret[0]);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -317,7 +317,7 @@ export function task_worker_entry_point(ptr) {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
function __wbg_adapter_64(arg0, arg1, arg2) {
|
|
320
|
-
wasm.
|
|
320
|
+
wasm.closure384_externref_shim(arg0, arg1, arg2);
|
|
321
321
|
}
|
|
322
322
|
|
|
323
323
|
function __wbg_adapter_69(arg0, arg1) {
|
|
@@ -325,7 +325,7 @@ function __wbg_adapter_69(arg0, arg1) {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
function __wbg_adapter_423(arg0, arg1, arg2, arg3) {
|
|
328
|
-
wasm.
|
|
328
|
+
wasm.closure656_externref_shim(arg0, arg1, arg2, arg3);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
@@ -2639,24 +2639,24 @@ const imports = {
|
|
|
2639
2639
|
const ret = false;
|
|
2640
2640
|
return ret;
|
|
2641
2641
|
},
|
|
2642
|
-
|
|
2643
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2642
|
+
__wbindgen_closure_wrapper10270: function(arg0, arg1, arg2) {
|
|
2643
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_69);
|
|
2644
2644
|
return ret;
|
|
2645
2645
|
},
|
|
2646
|
-
|
|
2647
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2646
|
+
__wbindgen_closure_wrapper15421: function(arg0, arg1, arg2) {
|
|
2647
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2648
2648
|
return ret;
|
|
2649
2649
|
},
|
|
2650
|
-
|
|
2651
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2650
|
+
__wbindgen_closure_wrapper5932: function(arg0, arg1, arg2) {
|
|
2651
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2652
2652
|
return ret;
|
|
2653
2653
|
},
|
|
2654
|
-
|
|
2655
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2654
|
+
__wbindgen_closure_wrapper5938: function(arg0, arg1, arg2) {
|
|
2655
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2656
2656
|
return ret;
|
|
2657
2657
|
},
|
|
2658
|
-
|
|
2659
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2658
|
+
__wbindgen_closure_wrapper7573: function(arg0, arg1, arg2) {
|
|
2659
|
+
const ret = makeMutClosure(arg0, arg1, 865, __wbg_adapter_69);
|
|
2660
2660
|
return ret;
|
|
2661
2661
|
},
|
|
2662
2662
|
__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 closure656_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
134
134
|
export const __wbindgen_start: () => void;
|