@breeztech/breez-sdk-spark 0.1.6 → 0.1.7

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.
Binary file
@@ -266,7 +266,7 @@ export interface LnurlPayRequestDetails {
266
266
  domain: string;
267
267
  url: string;
268
268
  address?: string;
269
- allowsNostr: boolean;
269
+ allowsNostr?: boolean;
270
270
  nostrPubkey?: string;
271
271
  }
272
272
 
@@ -283,11 +283,11 @@ function __wbg_adapter_52(arg0, arg1) {
283
283
  }
284
284
 
285
285
  function __wbg_adapter_55(arg0, arg1, arg2) {
286
- wasm.closure768_externref_shim(arg0, arg1, arg2);
286
+ wasm.closure771_externref_shim(arg0, arg1, arg2);
287
287
  }
288
288
 
289
289
  function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
290
- wasm.closure446_externref_shim(arg0, arg1, arg2, arg3);
290
+ wasm.closure412_externref_shim(arg0, arg1, arg2, arg3);
291
291
  }
292
292
 
293
293
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -1357,13 +1357,13 @@ export function __wbindgen_cb_drop(arg0) {
1357
1357
  return ret;
1358
1358
  };
1359
1359
 
1360
- export function __wbindgen_closure_wrapper8225(arg0, arg1, arg2) {
1361
- const ret = makeMutClosure(arg0, arg1, 623, __wbg_adapter_52);
1360
+ export function __wbindgen_closure_wrapper7674(arg0, arg1, arg2) {
1361
+ const ret = makeMutClosure(arg0, arg1, 589, __wbg_adapter_52);
1362
1362
  return ret;
1363
1363
  };
1364
1364
 
1365
- export function __wbindgen_closure_wrapper9036(arg0, arg1, arg2) {
1366
- const ret = makeMutClosure(arg0, arg1, 769, __wbg_adapter_55);
1365
+ export function __wbindgen_closure_wrapper9338(arg0, arg1, arg2) {
1366
+ const ret = makeMutClosure(arg0, arg1, 772, __wbg_adapter_55);
1367
1367
  return ret;
1368
1368
  };
1369
1369
 
@@ -53,6 +53,6 @@ export const __wbindgen_export_5: WebAssembly.Table;
53
53
  export const __wbindgen_export_6: WebAssembly.Table;
54
54
  export const __externref_table_dealloc: (a: number) => void;
55
55
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf7c49586be6831c4: (a: number, b: number) => void;
56
- export const closure768_externref_shim: (a: number, b: number, c: any) => void;
57
- export const closure446_externref_shim: (a: number, b: number, c: any, d: any) => void;
56
+ export const closure771_externref_shim: (a: number, b: number, c: any) => void;
57
+ export const closure412_externref_shim: (a: number, b: number, c: any, d: any) => void;
58
58
  export const __wbindgen_start: () => void;
@@ -266,7 +266,7 @@ export interface LnurlPayRequestDetails {
266
266
  domain: string;
267
267
  url: string;
268
268
  address?: string;
269
- allowsNostr: boolean;
269
+ allowsNostr?: boolean;
270
270
  nostrPubkey?: string;
271
271
  }
272
272
 
@@ -266,11 +266,11 @@ function __wbg_adapter_52(arg0, arg1) {
266
266
  }
267
267
 
268
268
  function __wbg_adapter_55(arg0, arg1, arg2) {
269
- wasm.closure768_externref_shim(arg0, arg1, arg2);
269
+ wasm.closure771_externref_shim(arg0, arg1, arg2);
270
270
  }
271
271
 
272
272
  function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
273
- wasm.closure446_externref_shim(arg0, arg1, arg2, arg3);
273
+ wasm.closure412_externref_shim(arg0, arg1, arg2, arg3);
274
274
  }
275
275
 
276
276
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -1217,12 +1217,12 @@ const imports = {
1217
1217
  const ret = false;
1218
1218
  return ret;
1219
1219
  },
1220
- __wbindgen_closure_wrapper8225: function(arg0, arg1, arg2) {
1221
- const ret = makeMutClosure(arg0, arg1, 623, __wbg_adapter_52);
1220
+ __wbindgen_closure_wrapper7674: function(arg0, arg1, arg2) {
1221
+ const ret = makeMutClosure(arg0, arg1, 589, __wbg_adapter_52);
1222
1222
  return ret;
1223
1223
  },
1224
- __wbindgen_closure_wrapper9036: function(arg0, arg1, arg2) {
1225
- const ret = makeMutClosure(arg0, arg1, 769, __wbg_adapter_55);
1224
+ __wbindgen_closure_wrapper9338: function(arg0, arg1, arg2) {
1225
+ const ret = makeMutClosure(arg0, arg1, 772, __wbg_adapter_55);
1226
1226
  return ret;
1227
1227
  },
1228
1228
  __wbindgen_debug_string: function(arg0, arg1) {
Binary file
@@ -53,6 +53,6 @@ export const __wbindgen_export_5: WebAssembly.Table;
53
53
  export const __wbindgen_export_6: WebAssembly.Table;
54
54
  export const __externref_table_dealloc: (a: number) => void;
55
55
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf7c49586be6831c4: (a: number, b: number) => void;
56
- export const closure768_externref_shim: (a: number, b: number, c: any) => void;
57
- export const closure446_externref_shim: (a: number, b: number, c: any, d: any) => void;
56
+ export const closure771_externref_shim: (a: number, b: number, c: any) => void;
57
+ export const closure412_externref_shim: (a: number, b: number, c: any, d: any) => void;
58
58
  export const __wbindgen_start: () => void;
@@ -266,7 +266,7 @@ export interface LnurlPayRequestDetails {
266
266
  domain: string;
267
267
  url: string;
268
268
  address?: string;
269
- allowsNostr: boolean;
269
+ allowsNostr?: boolean;
270
270
  nostrPubkey?: string;
271
271
  }
272
272
 
@@ -279,11 +279,11 @@ function __wbg_adapter_52(arg0, arg1) {
279
279
  }
280
280
 
281
281
  function __wbg_adapter_55(arg0, arg1, arg2) {
282
- wasm.closure768_externref_shim(arg0, arg1, arg2);
282
+ wasm.closure771_externref_shim(arg0, arg1, arg2);
283
283
  }
284
284
 
285
285
  function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
286
- wasm.closure446_externref_shim(arg0, arg1, arg2, arg3);
286
+ wasm.closure412_externref_shim(arg0, arg1, arg2, arg3);
287
287
  }
288
288
 
289
289
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -1358,13 +1358,13 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
1358
1358
  return ret;
1359
1359
  };
1360
1360
 
1361
- module.exports.__wbindgen_closure_wrapper8225 = function(arg0, arg1, arg2) {
1362
- const ret = makeMutClosure(arg0, arg1, 623, __wbg_adapter_52);
1361
+ module.exports.__wbindgen_closure_wrapper7674 = function(arg0, arg1, arg2) {
1362
+ const ret = makeMutClosure(arg0, arg1, 589, __wbg_adapter_52);
1363
1363
  return ret;
1364
1364
  };
1365
1365
 
1366
- module.exports.__wbindgen_closure_wrapper9036 = function(arg0, arg1, arg2) {
1367
- const ret = makeMutClosure(arg0, arg1, 769, __wbg_adapter_55);
1366
+ module.exports.__wbindgen_closure_wrapper9338 = function(arg0, arg1, arg2) {
1367
+ const ret = makeMutClosure(arg0, arg1, 772, __wbg_adapter_55);
1368
1368
  return ret;
1369
1369
  };
1370
1370
 
Binary file
@@ -53,6 +53,6 @@ export const __wbindgen_export_5: WebAssembly.Table;
53
53
  export const __wbindgen_export_6: WebAssembly.Table;
54
54
  export const __externref_table_dealloc: (a: number) => void;
55
55
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf7c49586be6831c4: (a: number, b: number) => void;
56
- export const closure768_externref_shim: (a: number, b: number, c: any) => void;
57
- export const closure446_externref_shim: (a: number, b: number, c: any, d: any) => void;
56
+ export const closure771_externref_shim: (a: number, b: number, c: any) => void;
57
+ export const closure412_externref_shim: (a: number, b: number, c: any, d: any) => void;
58
58
  export const __wbindgen_start: () => void;
@@ -1,7 +1,4 @@
1
1
  {
2
- "dependencies": {
3
- "better-sqlite3": "^9.2.2"
4
- },
5
2
  "files": [
6
3
  "breez_sdk_spark_wasm_bg.wasm",
7
4
  "breez_sdk_spark_wasm.js",
@@ -11,6 +8,9 @@
11
8
  ],
12
9
  "main": "index.js",
13
10
  "name": "breez-sdk-spark-wasm",
11
+ "optionalDependencies": {
12
+ "better-sqlite3": "^12.2.0"
13
+ },
14
14
  "types": "index.d.ts",
15
15
  "version": "0.1.0"
16
16
  }
@@ -374,6 +374,11 @@ class SqliteStorage {
374
374
 
375
375
  async function createDefaultStorage(dataDir, logger = null) {
376
376
  const path = require("path");
377
+ const fs = require("fs").promises;
378
+
379
+ // Create directory if it doesn't exist
380
+ await fs.mkdir(dataDir, { recursive: true });
381
+
377
382
  const dbPath = path.join(dataDir, "storage.sql");
378
383
  const storage = new SqliteStorage(dbPath, logger);
379
384
  storage.initialize();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Breez Spark SDK",
5
5
  "repository": "https://github.com/breez/spark-sdk",
6
6
  "author": "Breez <contact@breez.technology> (https://github.com/breez)",
@@ -266,7 +266,7 @@ export interface LnurlPayRequestDetails {
266
266
  domain: string;
267
267
  url: string;
268
268
  address?: string;
269
- allowsNostr: boolean;
269
+ allowsNostr?: boolean;
270
270
  nostrPubkey?: string;
271
271
  }
272
272
 
@@ -541,8 +541,8 @@ export interface InitOutput {
541
541
  readonly __wbindgen_export_6: WebAssembly.Table;
542
542
  readonly __externref_table_dealloc: (a: number) => void;
543
543
  readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf7c49586be6831c4: (a: number, b: number) => void;
544
- readonly closure768_externref_shim: (a: number, b: number, c: any) => void;
545
- readonly closure446_externref_shim: (a: number, b: number, c: any, d: any) => void;
544
+ readonly closure771_externref_shim: (a: number, b: number, c: any) => void;
545
+ readonly closure412_externref_shim: (a: number, b: number, c: any, d: any) => void;
546
546
  readonly __wbindgen_start: () => void;
547
547
  }
548
548
 
@@ -275,11 +275,11 @@ function __wbg_adapter_52(arg0, arg1) {
275
275
  }
276
276
 
277
277
  function __wbg_adapter_55(arg0, arg1, arg2) {
278
- wasm.closure768_externref_shim(arg0, arg1, arg2);
278
+ wasm.closure771_externref_shim(arg0, arg1, arg2);
279
279
  }
280
280
 
281
281
  function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
282
- wasm.closure446_externref_shim(arg0, arg1, arg2, arg3);
282
+ wasm.closure412_externref_shim(arg0, arg1, arg2, arg3);
283
283
  }
284
284
 
285
285
  const __wbindgen_enum_ReadableStreamType = ["bytes"];
@@ -1258,12 +1258,12 @@ function __wbg_get_imports() {
1258
1258
  const ret = false;
1259
1259
  return ret;
1260
1260
  };
1261
- imports.wbg.__wbindgen_closure_wrapper8225 = function(arg0, arg1, arg2) {
1262
- const ret = makeMutClosure(arg0, arg1, 623, __wbg_adapter_52);
1261
+ imports.wbg.__wbindgen_closure_wrapper7674 = function(arg0, arg1, arg2) {
1262
+ const ret = makeMutClosure(arg0, arg1, 589, __wbg_adapter_52);
1263
1263
  return ret;
1264
1264
  };
1265
- imports.wbg.__wbindgen_closure_wrapper9036 = function(arg0, arg1, arg2) {
1266
- const ret = makeMutClosure(arg0, arg1, 769, __wbg_adapter_55);
1265
+ imports.wbg.__wbindgen_closure_wrapper9338 = function(arg0, arg1, arg2) {
1266
+ const ret = makeMutClosure(arg0, arg1, 772, __wbg_adapter_55);
1267
1267
  return ret;
1268
1268
  };
1269
1269
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -53,6 +53,6 @@ export const __wbindgen_export_5: WebAssembly.Table;
53
53
  export const __wbindgen_export_6: WebAssembly.Table;
54
54
  export const __externref_table_dealloc: (a: number) => void;
55
55
  export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf7c49586be6831c4: (a: number, b: number) => void;
56
- export const closure768_externref_shim: (a: number, b: number, c: any) => void;
57
- export const closure446_externref_shim: (a: number, b: number, c: any, d: any) => void;
56
+ export const closure771_externref_shim: (a: number, b: number, c: any) => void;
57
+ export const closure412_externref_shim: (a: number, b: number, c: any, d: any) => void;
58
58
  export const __wbindgen_start: () => void;