@breeztech/breez-sdk-spark 0.8.0-dev1 → 0.8.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.
- package/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +568 -561
- package/bundler/breez_sdk_spark_wasm_bg.js +37 -41
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/bundler/storage/index.js +106 -173
- package/deno/breez_sdk_spark_wasm.d.ts +568 -561
- package/deno/breez_sdk_spark_wasm.js +37 -40
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/nodejs/breez_sdk_spark_wasm.d.ts +568 -561
- package/nodejs/breez_sdk_spark_wasm.js +37 -41
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/nodejs/storage/index.cjs +43 -66
- package/nodejs/storage/migrations.cjs +25 -3
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +571 -564
- package/web/breez_sdk_spark_wasm.js +37 -40
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +3 -3
- package/web/storage/index.js +106 -173
|
@@ -204,27 +204,6 @@ function debugString(val) {
|
|
|
204
204
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
205
205
|
return className;
|
|
206
206
|
}
|
|
207
|
-
/**
|
|
208
|
-
* @param {Config} config
|
|
209
|
-
* @param {ExternalSigner} signer
|
|
210
|
-
* @param {string} storage_dir
|
|
211
|
-
* @returns {Promise<BreezSdk>}
|
|
212
|
-
*/
|
|
213
|
-
export function connectWithSigner(config, signer, storage_dir) {
|
|
214
|
-
const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
215
|
-
const len0 = WASM_VECTOR_LEN;
|
|
216
|
-
const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
|
|
217
|
-
return ret;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @param {ConnectRequest} request
|
|
222
|
-
* @returns {Promise<BreezSdk>}
|
|
223
|
-
*/
|
|
224
|
-
export function connect(request) {
|
|
225
|
-
const ret = wasm.connect(request);
|
|
226
|
-
return ret;
|
|
227
|
-
}
|
|
228
207
|
|
|
229
208
|
function takeFromExternrefTable0(idx) {
|
|
230
209
|
const value = wasm.__wbindgen_export_5.get(idx);
|
|
@@ -250,6 +229,15 @@ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_con
|
|
|
250
229
|
return DefaultSigner.__wrap(ret[0]);
|
|
251
230
|
}
|
|
252
231
|
|
|
232
|
+
/**
|
|
233
|
+
* @param {ConnectRequest} request
|
|
234
|
+
* @returns {Promise<BreezSdk>}
|
|
235
|
+
*/
|
|
236
|
+
export function connect(request) {
|
|
237
|
+
const ret = wasm.connect(request);
|
|
238
|
+
return ret;
|
|
239
|
+
}
|
|
240
|
+
|
|
253
241
|
/**
|
|
254
242
|
* @param {Logger} logger
|
|
255
243
|
* @param {string | null} [filter]
|
|
@@ -263,13 +251,15 @@ export function initLogging(logger, filter) {
|
|
|
263
251
|
}
|
|
264
252
|
|
|
265
253
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* @returns {Promise<
|
|
254
|
+
* @param {Config} config
|
|
255
|
+
* @param {ExternalSigner} signer
|
|
256
|
+
* @param {string} storage_dir
|
|
257
|
+
* @returns {Promise<BreezSdk>}
|
|
270
258
|
*/
|
|
271
|
-
export function
|
|
272
|
-
const
|
|
259
|
+
export function connectWithSigner(config, signer, storage_dir) {
|
|
260
|
+
const ptr0 = passStringToWasm0(storage_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
261
|
+
const len0 = WASM_VECTOR_LEN;
|
|
262
|
+
const ret = wasm.connectWithSigner(config, signer, ptr0, len0);
|
|
273
263
|
return ret;
|
|
274
264
|
}
|
|
275
265
|
|
|
@@ -282,6 +272,17 @@ export function defaultConfig(network) {
|
|
|
282
272
|
return ret;
|
|
283
273
|
}
|
|
284
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Creates a default external signer from a mnemonic phrase.
|
|
277
|
+
*
|
|
278
|
+
* This creates a signer that can be used with `connectWithSigner` or `SdkBuilder.newWithSigner`.
|
|
279
|
+
* @returns {Promise<SparkStatus>}
|
|
280
|
+
*/
|
|
281
|
+
export function getSparkStatus() {
|
|
282
|
+
const ret = wasm.getSparkStatus();
|
|
283
|
+
return ret;
|
|
284
|
+
}
|
|
285
|
+
|
|
285
286
|
function passArray8ToWasm0(arg, malloc) {
|
|
286
287
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
287
288
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -300,15 +301,15 @@ export function task_worker_entry_point(ptr) {
|
|
|
300
301
|
}
|
|
301
302
|
|
|
302
303
|
function __wbg_adapter_64(arg0, arg1) {
|
|
303
|
-
wasm.
|
|
304
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h127c718764a2a72f(arg0, arg1);
|
|
304
305
|
}
|
|
305
306
|
|
|
306
307
|
function __wbg_adapter_67(arg0, arg1, arg2) {
|
|
307
|
-
wasm.
|
|
308
|
+
wasm.closure1090_externref_shim(arg0, arg1, arg2);
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
function
|
|
311
|
-
wasm.
|
|
311
|
+
function __wbg_adapter_285(arg0, arg1, arg2, arg3) {
|
|
312
|
+
wasm.closure670_externref_shim(arg0, arg1, arg2, arg3);
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
@@ -1768,7 +1769,7 @@ const imports = {
|
|
|
1768
1769
|
const a = state0.a;
|
|
1769
1770
|
state0.a = 0;
|
|
1770
1771
|
try {
|
|
1771
|
-
return
|
|
1772
|
+
return __wbg_adapter_285(a, state0.b, arg0, arg1);
|
|
1772
1773
|
} finally {
|
|
1773
1774
|
state0.a = a;
|
|
1774
1775
|
}
|
|
@@ -2106,10 +2107,6 @@ const imports = {
|
|
|
2106
2107
|
const ret = arg0.syncInsertIncomingRecords(v0);
|
|
2107
2108
|
return ret;
|
|
2108
2109
|
}, arguments) },
|
|
2109
|
-
__wbg_syncRebasePendingOutgoingRecords_b3441ced5dee0c8e: function() { return handleError(function (arg0, arg1) {
|
|
2110
|
-
const ret = arg0.syncRebasePendingOutgoingRecords(BigInt.asUintN(64, arg1));
|
|
2111
|
-
return ret;
|
|
2112
|
-
}, arguments) },
|
|
2113
2110
|
__wbg_syncUpdateRecordFromIncoming_a76ad82592bfdcb3: function() { return handleError(function (arg0, arg1) {
|
|
2114
2111
|
const ret = arg0.syncUpdateRecordFromIncoming(arg1);
|
|
2115
2112
|
return ret;
|
|
@@ -2204,12 +2201,12 @@ const imports = {
|
|
|
2204
2201
|
const ret = false;
|
|
2205
2202
|
return ret;
|
|
2206
2203
|
},
|
|
2207
|
-
|
|
2208
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2204
|
+
__wbindgen_closure_wrapper11879: function(arg0, arg1, arg2) {
|
|
2205
|
+
const ret = makeMutClosure(arg0, arg1, 851, __wbg_adapter_64);
|
|
2209
2206
|
return ret;
|
|
2210
2207
|
},
|
|
2211
|
-
|
|
2212
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2208
|
+
__wbindgen_closure_wrapper13824: function(arg0, arg1, arg2) {
|
|
2209
|
+
const ret = makeMutClosure(arg0, arg1, 1091, __wbg_adapter_67);
|
|
2213
2210
|
return ret;
|
|
2214
2211
|
},
|
|
2215
2212
|
__wbindgen_debug_string: function(arg0, arg1) {
|
|
Binary file
|
|
@@ -113,7 +113,7 @@ export const __wbindgen_export_5: WebAssembly.Table;
|
|
|
113
113
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
114
114
|
export const __wbindgen_export_7: WebAssembly.Table;
|
|
115
115
|
export const __externref_table_dealloc: (a: number) => void;
|
|
116
|
-
export const
|
|
117
|
-
export const
|
|
118
|
-
export const
|
|
116
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h127c718764a2a72f: (a: number, b: number) => void;
|
|
117
|
+
export const closure1090_externref_shim: (a: number, b: number, c: any) => void;
|
|
118
|
+
export const closure670_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
119
119
|
export const __wbindgen_start: () => void;
|