@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
|
@@ -239,36 +239,23 @@ export function defaultPostgresStorageConfig(connection_string) {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
242
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
243
|
+
*
|
|
244
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
245
|
+
* @returns {Promise<SparkStatus>}
|
|
244
246
|
*/
|
|
245
|
-
export function
|
|
246
|
-
const ret = wasm.
|
|
247
|
+
export function getSparkStatus() {
|
|
248
|
+
const ret = wasm.getSparkStatus();
|
|
247
249
|
return ret;
|
|
248
250
|
}
|
|
249
251
|
|
|
250
|
-
function takeFromExternrefTable0(idx) {
|
|
251
|
-
const value = wasm.__wbindgen_export_5.get(idx);
|
|
252
|
-
wasm.__externref_table_dealloc(idx);
|
|
253
|
-
return value;
|
|
254
|
-
}
|
|
255
252
|
/**
|
|
256
|
-
* @param {string} mnemonic
|
|
257
|
-
* @param {string | null | undefined} passphrase
|
|
258
253
|
* @param {Network} network
|
|
259
|
-
* @
|
|
260
|
-
* @returns {DefaultSigner}
|
|
254
|
+
* @returns {Config}
|
|
261
255
|
*/
|
|
262
|
-
export function
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
|
-
var len1 = WASM_VECTOR_LEN;
|
|
267
|
-
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
268
|
-
if (ret[2]) {
|
|
269
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
270
|
-
}
|
|
271
|
-
return DefaultSigner.__wrap(ret[0]);
|
|
256
|
+
export function defaultConfig(network) {
|
|
257
|
+
const ret = wasm.defaultConfig(network);
|
|
258
|
+
return ret;
|
|
272
259
|
}
|
|
273
260
|
|
|
274
261
|
/**
|
|
@@ -283,6 +270,15 @@ export function initLogging(logger, filter) {
|
|
|
283
270
|
return ret;
|
|
284
271
|
}
|
|
285
272
|
|
|
273
|
+
/**
|
|
274
|
+
* @param {ConnectRequest} request
|
|
275
|
+
* @returns {Promise<BreezSdk>}
|
|
276
|
+
*/
|
|
277
|
+
export function connect(request) {
|
|
278
|
+
const ret = wasm.connect(request);
|
|
279
|
+
return ret;
|
|
280
|
+
}
|
|
281
|
+
|
|
286
282
|
/**
|
|
287
283
|
* @param {Config} config
|
|
288
284
|
* @param {ExternalSigner} signer
|
|
@@ -296,24 +292,28 @@ export function connectWithSigner(config, signer, storage_dir) {
|
|
|
296
292
|
return ret;
|
|
297
293
|
}
|
|
298
294
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
* @returns {Promise<SparkStatus>}
|
|
304
|
-
*/
|
|
305
|
-
export function getSparkStatus() {
|
|
306
|
-
const ret = wasm.getSparkStatus();
|
|
307
|
-
return ret;
|
|
295
|
+
function takeFromExternrefTable0(idx) {
|
|
296
|
+
const value = wasm.__wbindgen_export_5.get(idx);
|
|
297
|
+
wasm.__externref_table_dealloc(idx);
|
|
298
|
+
return value;
|
|
308
299
|
}
|
|
309
|
-
|
|
310
300
|
/**
|
|
311
|
-
* @param {
|
|
312
|
-
* @
|
|
301
|
+
* @param {string} mnemonic
|
|
302
|
+
* @param {string | null | undefined} passphrase
|
|
303
|
+
* @param {Network} network
|
|
304
|
+
* @param {KeySetConfig | null} [key_set_config]
|
|
305
|
+
* @returns {DefaultSigner}
|
|
313
306
|
*/
|
|
314
|
-
export function
|
|
315
|
-
const
|
|
316
|
-
|
|
307
|
+
export function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
|
|
308
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
|
+
const len0 = WASM_VECTOR_LEN;
|
|
310
|
+
var ptr1 = isLikeNone(passphrase) ? 0 : passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
311
|
+
var len1 = WASM_VECTOR_LEN;
|
|
312
|
+
const ret = wasm.defaultExternalSigner(ptr0, len0, ptr1, len1, network, isLikeNone(key_set_config) ? 0 : addToExternrefTable0(key_set_config));
|
|
313
|
+
if (ret[2]) {
|
|
314
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
315
|
+
}
|
|
316
|
+
return DefaultSigner.__wrap(ret[0]);
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -334,7 +334,7 @@ export function task_worker_entry_point(ptr) {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
function __wbg_adapter_64(arg0, arg1, arg2) {
|
|
337
|
-
wasm.
|
|
337
|
+
wasm.closure384_externref_shim(arg0, arg1, arg2);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
function __wbg_adapter_69(arg0, arg1) {
|
|
@@ -342,7 +342,7 @@ function __wbg_adapter_69(arg0, arg1) {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
function __wbg_adapter_423(arg0, arg1, arg2, arg3) {
|
|
345
|
-
wasm.
|
|
345
|
+
wasm.closure657_externref_shim(arg0, arg1, arg2, arg3);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
@@ -2884,28 +2884,28 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
2884
2884
|
return ret;
|
|
2885
2885
|
};
|
|
2886
2886
|
|
|
2887
|
-
export function
|
|
2888
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2887
|
+
export function __wbindgen_closure_wrapper10276(arg0, arg1, arg2) {
|
|
2888
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_69);
|
|
2889
2889
|
return ret;
|
|
2890
2890
|
};
|
|
2891
2891
|
|
|
2892
|
-
export function
|
|
2893
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2892
|
+
export function __wbindgen_closure_wrapper15437(arg0, arg1, arg2) {
|
|
2893
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2894
2894
|
return ret;
|
|
2895
2895
|
};
|
|
2896
2896
|
|
|
2897
|
-
export function
|
|
2898
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2897
|
+
export function __wbindgen_closure_wrapper5931(arg0, arg1, arg2) {
|
|
2898
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2899
2899
|
return ret;
|
|
2900
2900
|
};
|
|
2901
2901
|
|
|
2902
|
-
export function
|
|
2903
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2902
|
+
export function __wbindgen_closure_wrapper5937(arg0, arg1, arg2) {
|
|
2903
|
+
const ret = makeMutClosure(arg0, arg1, 385, __wbg_adapter_64);
|
|
2904
2904
|
return ret;
|
|
2905
2905
|
};
|
|
2906
2906
|
|
|
2907
|
-
export function
|
|
2908
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2907
|
+
export function __wbindgen_closure_wrapper7572(arg0, arg1, arg2) {
|
|
2908
|
+
const ret = makeMutClosure(arg0, arg1, 866, __wbg_adapter_69);
|
|
2909
2909
|
return ret;
|
|
2910
2910
|
};
|
|
2911
2911
|
|
|
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;
|