@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
|
@@ -235,36 +235,23 @@ module.exports.defaultPostgresStorageConfig = function(connection_string) {
|
|
|
235
235
|
};
|
|
236
236
|
|
|
237
237
|
/**
|
|
238
|
-
*
|
|
239
|
-
*
|
|
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.
|
|
242
|
-
const ret = wasm.
|
|
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
|
-
* @
|
|
256
|
-
* @returns {DefaultSigner}
|
|
250
|
+
* @returns {Config}
|
|
257
251
|
*/
|
|
258
|
-
module.exports.
|
|
259
|
-
const
|
|
260
|
-
|
|
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
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* @
|
|
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.
|
|
311
|
-
const
|
|
312
|
-
|
|
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.
|
|
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.
|
|
341
|
+
wasm.closure656_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.
|
|
2892
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2891
|
+
module.exports.__wbindgen_closure_wrapper10270 = 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.
|
|
2897
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2896
|
+
module.exports.__wbindgen_closure_wrapper15421 = 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.
|
|
2902
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2901
|
+
module.exports.__wbindgen_closure_wrapper5932 = 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.
|
|
2907
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2906
|
+
module.exports.__wbindgen_closure_wrapper5938 = 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.
|
|
2912
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2911
|
+
module.exports.__wbindgen_closure_wrapper7573 = function(arg0, arg1, arg2) {
|
|
2912
|
+
const ret = makeMutClosure(arg0, arg1, 865, __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
|
|
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;
|
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,
|
|
@@ -410,6 +410,29 @@ class MigrationManager {
|
|
|
410
410
|
name: "Add conversion_status to payment_metadata",
|
|
411
411
|
sql: `ALTER TABLE payment_metadata ADD COLUMN conversion_status TEXT`,
|
|
412
412
|
},
|
|
413
|
+
{
|
|
414
|
+
name: "Drop foreign key on payment_metadata",
|
|
415
|
+
sql: [
|
|
416
|
+
`CREATE TABLE payment_metadata_new (
|
|
417
|
+
payment_id TEXT PRIMARY KEY,
|
|
418
|
+
parent_payment_id TEXT,
|
|
419
|
+
lnurl_pay_info TEXT,
|
|
420
|
+
lnurl_description TEXT,
|
|
421
|
+
lnurl_withdraw_info TEXT,
|
|
422
|
+
conversion_info TEXT,
|
|
423
|
+
conversion_status TEXT
|
|
424
|
+
)`,
|
|
425
|
+
`INSERT INTO payment_metadata_new
|
|
426
|
+
(payment_id, parent_payment_id, lnurl_pay_info, lnurl_description,
|
|
427
|
+
lnurl_withdraw_info, conversion_info, conversion_status)
|
|
428
|
+
SELECT payment_id, parent_payment_id, lnurl_pay_info, lnurl_description,
|
|
429
|
+
lnurl_withdraw_info, conversion_info, conversion_status
|
|
430
|
+
FROM payment_metadata`,
|
|
431
|
+
`DROP TABLE payment_metadata`,
|
|
432
|
+
`ALTER TABLE payment_metadata_new RENAME TO payment_metadata`,
|
|
433
|
+
`CREATE INDEX idx_payment_metadata_payment_id ON payment_metadata(payment_id)`,
|
|
434
|
+
],
|
|
435
|
+
},
|
|
413
436
|
];
|
|
414
437
|
}
|
|
415
438
|
}
|
package/package.json
CHANGED
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
|
|
52
|
-
if (!_module) _notInitialized('
|
|
53
|
-
return _module.
|
|
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) {
|