@breeztech/breez-sdk-spark 0.13.10-dev → 0.13.11-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.
Files changed (41) hide show
  1. package/breez-sdk-spark.tgz +0 -0
  2. package/bundler/breez_sdk_spark_wasm.d.ts +33 -0
  3. package/bundler/breez_sdk_spark_wasm.js +1 -1
  4. package/bundler/breez_sdk_spark_wasm_bg.js +66 -24
  5. package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
  6. package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +7 -5
  7. package/deno/breez_sdk_spark_wasm.d.ts +33 -0
  8. package/deno/breez_sdk_spark_wasm.js +66 -24
  9. package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
  10. package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +7 -5
  11. package/nodejs/breez_sdk_spark_wasm.d.ts +33 -0
  12. package/nodejs/breez_sdk_spark_wasm.js +67 -24
  13. package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
  14. package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +7 -5
  15. package/nodejs/index.js +34 -0
  16. package/nodejs/index.mjs +1 -0
  17. package/nodejs/mysql-storage/errors.cjs +19 -0
  18. package/nodejs/mysql-storage/index.cjs +1366 -0
  19. package/nodejs/mysql-storage/migrations.cjs +387 -0
  20. package/nodejs/mysql-storage/package.json +9 -0
  21. package/nodejs/mysql-token-store/errors.cjs +9 -0
  22. package/nodejs/mysql-token-store/index.cjs +988 -0
  23. package/nodejs/mysql-token-store/migrations.cjs +255 -0
  24. package/nodejs/mysql-token-store/package.json +9 -0
  25. package/nodejs/mysql-tree-store/errors.cjs +9 -0
  26. package/nodejs/mysql-tree-store/index.cjs +939 -0
  27. package/nodejs/mysql-tree-store/migrations.cjs +221 -0
  28. package/nodejs/mysql-tree-store/package.json +9 -0
  29. package/nodejs/package.json +3 -0
  30. package/nodejs/postgres-storage/index.cjs +147 -92
  31. package/nodejs/postgres-storage/migrations.cjs +85 -4
  32. package/nodejs/postgres-token-store/index.cjs +176 -89
  33. package/nodejs/postgres-token-store/migrations.cjs +92 -3
  34. package/nodejs/postgres-tree-store/index.cjs +168 -83
  35. package/nodejs/postgres-tree-store/migrations.cjs +80 -3
  36. package/package.json +1 -1
  37. package/ssr/index.js +5 -0
  38. package/web/breez_sdk_spark_wasm.d.ts +40 -5
  39. package/web/breez_sdk_spark_wasm.js +66 -24
  40. package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
  41. package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +7 -5
@@ -22,8 +22,16 @@ class TreeStoreMigrationManager {
22
22
  /**
23
23
  * Run all pending migrations inside a single transaction with an advisory lock.
24
24
  * @param {import('pg').Pool} pool
25
+ * @param {Buffer|Uint8Array} identity - 33-byte secp256k1 compressed pubkey
26
+ * identifying the tenant. Used to backfill `user_id` columns in the
27
+ * multi-tenant scoping migration. Required.
25
28
  */
26
- async migrate(pool) {
29
+ async migrate(pool, identity) {
30
+ if (!identity || identity.length !== 33) {
31
+ throw new TreeStoreError(
32
+ "tenant identity (33-byte secp256k1 pubkey) is required"
33
+ );
34
+ }
27
35
  const client = await pool.connect();
28
36
  try {
29
37
  await client.query("BEGIN");
@@ -45,7 +53,7 @@ class TreeStoreMigrationManager {
45
53
  );
46
54
  const currentVersion = versionResult.rows[0].version;
47
55
 
48
- const migrations = this._getMigrations();
56
+ const migrations = this._getMigrations(identity);
49
57
 
50
58
  if (currentVersion >= migrations.length) {
51
59
  this._log("info", `Tree store database is up to date (version ${currentVersion})`);
@@ -96,8 +104,16 @@ class TreeStoreMigrationManager {
96
104
 
97
105
  /**
98
106
  * Migrations matching the Rust PostgresTreeStore schema exactly.
107
+ *
108
+ * @param {Buffer|Uint8Array} identity - tenant identity inlined as a hex
109
+ * BYTEA literal in the multi-tenant scoping migration. Safe because the
110
+ * bytes come from a typed secp256k1 pubkey (`[0-9a-f]{66}` after hex
111
+ * encoding) — not user-controlled input.
99
112
  */
100
- _getMigrations() {
113
+ _getMigrations(identity) {
114
+ const idHex = Buffer.from(identity).toString("hex");
115
+ const idLit = `'\\x${idHex}'::bytea`;
116
+
101
117
  return [
102
118
  {
103
119
  name: "Create tree store tables",
@@ -143,6 +159,67 @@ class TreeStoreMigrationManager {
143
159
  `INSERT INTO tree_swap_status (id) VALUES (1) ON CONFLICT DO NOTHING`,
144
160
  ],
145
161
  },
162
+ {
163
+ // Mirrors Rust migration 3 in spark-postgres/src/tree_store.rs.
164
+ // Adds user_id to every tree-store table, backfills with the connecting
165
+ // tenant's identity, and rewrites primary keys / FKs / indexes to lead
166
+ // with user_id. The composite FK uses NO ACTION (the default) instead
167
+ // of the previous single-column ON DELETE SET NULL — PG-only column-list
168
+ // SET NULL is PG15+, and a whole-row SET NULL would null user_id (NOT
169
+ // NULL). cleanupStaleReservations now releases leaves explicitly.
170
+ name: "Multi-tenant scoping: add user_id and rewrite primary keys",
171
+ sql: [
172
+ // Drop the old single-column FK FIRST, before touching the
173
+ // tree_reservations PK it depends on.
174
+ `ALTER TABLE tree_leaves
175
+ DROP CONSTRAINT IF EXISTS tree_leaves_reservation_id_fkey`,
176
+
177
+ // tree_reservations: scope by user_id.
178
+ `ALTER TABLE tree_reservations ADD COLUMN user_id BYTEA`,
179
+ `UPDATE tree_reservations SET user_id = ${idLit}`,
180
+ `ALTER TABLE tree_reservations
181
+ ALTER COLUMN user_id SET NOT NULL,
182
+ DROP CONSTRAINT IF EXISTS tree_reservations_pkey,
183
+ ADD PRIMARY KEY (user_id, id)`,
184
+
185
+ // tree_leaves: add user_id, rekey, and re-add the composite FK.
186
+ `ALTER TABLE tree_leaves ADD COLUMN user_id BYTEA`,
187
+ `UPDATE tree_leaves SET user_id = ${idLit}`,
188
+ `ALTER TABLE tree_leaves
189
+ ALTER COLUMN user_id SET NOT NULL,
190
+ DROP CONSTRAINT IF EXISTS tree_leaves_pkey,
191
+ ADD PRIMARY KEY (user_id, id),
192
+ ADD FOREIGN KEY (user_id, reservation_id)
193
+ REFERENCES tree_reservations(user_id, id)`,
194
+ `DROP INDEX IF EXISTS idx_tree_leaves_available`,
195
+ `DROP INDEX IF EXISTS idx_tree_leaves_reservation`,
196
+ `DROP INDEX IF EXISTS idx_tree_leaves_added_at`,
197
+ `CREATE INDEX idx_tree_leaves_user_available
198
+ ON tree_leaves(user_id, status, is_missing_from_operators)
199
+ WHERE status = 'Available' AND is_missing_from_operators = FALSE`,
200
+ `CREATE INDEX idx_tree_leaves_user_reservation
201
+ ON tree_leaves(user_id, reservation_id)
202
+ WHERE reservation_id IS NOT NULL`,
203
+ `CREATE INDEX idx_tree_leaves_user_added_at ON tree_leaves(user_id, added_at)`,
204
+
205
+ // tree_spent_leaves: scope by user_id.
206
+ `ALTER TABLE tree_spent_leaves ADD COLUMN user_id BYTEA`,
207
+ `UPDATE tree_spent_leaves SET user_id = ${idLit}`,
208
+ `ALTER TABLE tree_spent_leaves
209
+ ALTER COLUMN user_id SET NOT NULL,
210
+ DROP CONSTRAINT IF EXISTS tree_spent_leaves_pkey,
211
+ ADD PRIMARY KEY (user_id, leaf_id)`,
212
+
213
+ // tree_swap_status was a singleton (PK id=1, CHECK id=1). Drop the id
214
+ // column (CASCADE removes both PK and CHECK), then re-key by user_id.
215
+ `ALTER TABLE tree_swap_status DROP COLUMN id CASCADE`,
216
+ `ALTER TABLE tree_swap_status ADD COLUMN user_id BYTEA`,
217
+ `UPDATE tree_swap_status SET user_id = ${idLit}`,
218
+ `ALTER TABLE tree_swap_status
219
+ ALTER COLUMN user_id SET NOT NULL,
220
+ ADD PRIMARY KEY (user_id)`,
221
+ ],
222
+ },
146
223
  ];
147
224
  }
148
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark",
3
- "version": "0.13.10-dev",
3
+ "version": "0.13.11-dev1",
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)",
package/ssr/index.js CHANGED
@@ -43,6 +43,11 @@ export function defaultExternalSigner(...args) {
43
43
  return _module.defaultExternalSigner(...args);
44
44
  }
45
45
 
46
+ export function defaultMysqlStorageConfig(...args) {
47
+ if (!_module) _notInitialized('defaultMysqlStorageConfig');
48
+ return _module.defaultMysqlStorageConfig(...args);
49
+ }
50
+
46
51
  export function defaultPostgresStorageConfig(...args) {
47
52
  if (!_module) _notInitialized('defaultPostgresStorageConfig');
48
53
  return _module.defaultPostgresStorageConfig(...args);
@@ -142,6 +142,28 @@ export interface Wallet {
142
142
  label: string;
143
143
  }
144
144
 
145
+ /**
146
+ * Configuration for MySQL storage connection pool. Targets MySQL 8.0+.
147
+ */
148
+ export interface MysqlStorageConfig {
149
+ /**
150
+ * MySQL connection URL (e.g. `mysql://user:pass@host:3306/dbname`).
151
+ */
152
+ connectionString: string;
153
+ /**
154
+ * Maximum number of connections in the pool.
155
+ */
156
+ maxPoolSize: number;
157
+ /**
158
+ * Timeout in seconds for establishing a new connection (0 = no timeout).
159
+ */
160
+ createTimeoutSecs: number;
161
+ /**
162
+ * Timeout in seconds before recycling an idle connection.
163
+ */
164
+ recycleTimeoutSecs: number;
165
+ }
166
+
145
167
  /**
146
168
  * Configuration for PostgreSQL storage connection pool.
147
169
  */
@@ -1519,6 +1541,7 @@ export class SdkBuilder {
1519
1541
  withFiatService(fiat_service: FiatService): SdkBuilder;
1520
1542
  withKeySet(config: KeySetConfig): SdkBuilder;
1521
1543
  withLnurlClient(lnurl_client: RestClient): SdkBuilder;
1544
+ withMysqlBackend(config: MysqlStorageConfig): SdkBuilder;
1522
1545
  withPaymentObserver(payment_observer: PaymentObserver): SdkBuilder;
1523
1546
  withPostgresBackend(config: PostgresStorageConfig): SdkBuilder;
1524
1547
  withRestChainService(url: string, api_type: ChainApiType, credentials?: Credentials | null): SdkBuilder;
@@ -1546,6 +1569,16 @@ export function defaultConfig(network: Network): Config;
1546
1569
 
1547
1570
  export function defaultExternalSigner(mnemonic: string, passphrase: string | null | undefined, network: Network, key_set_config?: KeySetConfig | null): DefaultSigner;
1548
1571
 
1572
+ /**
1573
+ * Creates a default MySQL storage configuration with sensible defaults.
1574
+ *
1575
+ * Default values:
1576
+ * - `maxPoolSize`: 10
1577
+ * - `createTimeoutSecs`: 0 (no timeout)
1578
+ * - `recycleTimeoutSecs`: 10
1579
+ */
1580
+ export function defaultMysqlStorageConfig(connection_string: string): MysqlStorageConfig;
1581
+
1549
1582
  /**
1550
1583
  * Creates a default PostgreSQL storage configuration with sensible defaults.
1551
1584
  *
@@ -1627,7 +1660,7 @@ export interface InitOutput {
1627
1660
  readonly connectWithSigner: (a: any, b: any, c: number, d: number) => any;
1628
1661
  readonly defaultConfig: (a: any) => any;
1629
1662
  readonly defaultExternalSigner: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
1630
- readonly defaultPostgresStorageConfig: (a: number, b: number) => any;
1663
+ readonly defaultMysqlStorageConfig: (a: number, b: number) => any;
1631
1664
  readonly defaultsigner_aggregateFrost: (a: number, b: any) => any;
1632
1665
  readonly defaultsigner_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
1633
1666
  readonly defaultsigner_derivePublicKey: (a: number, b: number, c: number) => any;
@@ -1663,6 +1696,7 @@ export interface InitOutput {
1663
1696
  readonly sdkbuilder_withFiatService: (a: number, b: any) => number;
1664
1697
  readonly sdkbuilder_withKeySet: (a: number, b: any) => number;
1665
1698
  readonly sdkbuilder_withLnurlClient: (a: number, b: any) => number;
1699
+ readonly sdkbuilder_withMysqlBackend: (a: number, b: any) => number;
1666
1700
  readonly sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
1667
1701
  readonly sdkbuilder_withPostgresBackend: (a: number, b: any) => number;
1668
1702
  readonly sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
@@ -1692,10 +1726,11 @@ export interface InitOutput {
1692
1726
  readonly intounderlyingsink_write: (a: number, b: any) => any;
1693
1727
  readonly intounderlyingsource_cancel: (a: number) => void;
1694
1728
  readonly intounderlyingsource_pull: (a: number, b: any) => any;
1695
- readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84: (a: number, b: number, c: any) => [number, number];
1696
- readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4: (a: number, b: number, c: any) => [number, number];
1697
- readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5: (a: number, b: number, c: any) => [number, number];
1698
- readonly wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6: (a: number, b: number, c: any) => [number, number];
1729
+ readonly defaultPostgresStorageConfig: (a: number, b: number) => any;
1730
+ readonly wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7: (a: number, b: number, c: any) => [number, number];
1731
+ readonly wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_4: (a: number, b: number, c: any) => [number, number];
1732
+ readonly wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_5: (a: number, b: number, c: any) => [number, number];
1733
+ readonly wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_6: (a: number, b: number, c: any) => [number, number];
1699
1734
  readonly wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
1700
1735
  readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57: (a: number, b: number, c: any) => void;
1701
1736
  readonly wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2: (a: number, b: number, c: any) => void;
@@ -864,6 +864,15 @@ export class SdkBuilder {
864
864
  const ret = wasm.sdkbuilder_withLnurlClient(ptr, lnurl_client);
865
865
  return SdkBuilder.__wrap(ret);
866
866
  }
867
+ /**
868
+ * @param {MysqlStorageConfig} config
869
+ * @returns {SdkBuilder}
870
+ */
871
+ withMysqlBackend(config) {
872
+ const ptr = this.__destroy_into_raw();
873
+ const ret = wasm.sdkbuilder_withMysqlBackend(ptr, config);
874
+ return SdkBuilder.__wrap(ret);
875
+ }
867
876
  /**
868
877
  * @param {PaymentObserver} payment_observer
869
878
  * @returns {SdkBuilder}
@@ -1031,6 +1040,23 @@ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_con
1031
1040
  return DefaultSigner.__wrap(ret[0]);
1032
1041
  }
1033
1042
 
1043
+ /**
1044
+ * Creates a default MySQL storage configuration with sensible defaults.
1045
+ *
1046
+ * Default values:
1047
+ * - `maxPoolSize`: 10
1048
+ * - `createTimeoutSecs`: 0 (no timeout)
1049
+ * - `recycleTimeoutSecs`: 10
1050
+ * @param {string} connection_string
1051
+ * @returns {MysqlStorageConfig}
1052
+ */
1053
+ export function defaultMysqlStorageConfig(connection_string) {
1054
+ const ptr0 = passStringToWasm0(connection_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1055
+ const len0 = WASM_VECTOR_LEN;
1056
+ const ret = wasm.defaultMysqlStorageConfig(ptr0, len0);
1057
+ return ret;
1058
+ }
1059
+
1034
1060
  /**
1035
1061
  * Creates a default PostgreSQL storage configuration with sensible defaults.
1036
1062
  *
@@ -1334,20 +1360,36 @@ function __wbg_get_imports() {
1334
1360
  const ret = createDefaultStorage(getStringFromWasm0(arg0, arg1), arg2);
1335
1361
  return ret;
1336
1362
  }, arguments); },
1363
+ __wbg_createMysqlPool_8927bff3a28fcef9: function() { return handleError(function (arg0) {
1364
+ const ret = createMysqlPool(arg0);
1365
+ return ret;
1366
+ }, arguments); },
1367
+ __wbg_createMysqlStorageWithPool_c92d8cd5f2ca6ade: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1368
+ const ret = createMysqlStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1369
+ return ret;
1370
+ }, arguments); },
1371
+ __wbg_createMysqlTokenStoreWithPool_cb308b20dccd4b4e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1372
+ const ret = createMysqlTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1373
+ return ret;
1374
+ }, arguments); },
1375
+ __wbg_createMysqlTreeStoreWithPool_98638c799d6a967c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1376
+ const ret = createMysqlTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1377
+ return ret;
1378
+ }, arguments); },
1337
1379
  __wbg_createPostgresPool_3c396c7ab2f0eab2: function() { return handleError(function (arg0) {
1338
1380
  const ret = createPostgresPool(arg0);
1339
1381
  return ret;
1340
1382
  }, arguments); },
1341
- __wbg_createPostgresStorageWithPool_9effb8c7315e402a: function() { return handleError(function (arg0, arg1) {
1342
- const ret = createPostgresStorageWithPool(arg0, arg1);
1383
+ __wbg_createPostgresStorageWithPool_3fe1b7ee3ca10589: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1384
+ const ret = createPostgresStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1343
1385
  return ret;
1344
1386
  }, arguments); },
1345
- __wbg_createPostgresTokenStoreWithPool_810f67a7b8eced70: function() { return handleError(function (arg0, arg1) {
1346
- const ret = createPostgresTokenStoreWithPool(arg0, arg1);
1387
+ __wbg_createPostgresTokenStoreWithPool_ebd4c54228196816: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1388
+ const ret = createPostgresTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1347
1389
  return ret;
1348
1390
  }, arguments); },
1349
- __wbg_createPostgresTreeStoreWithPool_d6f7ade37b9e1ecc: function() { return handleError(function (arg0, arg1) {
1350
- const ret = createPostgresTreeStoreWithPool(arg0, arg1);
1391
+ __wbg_createPostgresTreeStoreWithPool_6b43821b450142cb: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1392
+ const ret = createPostgresTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1351
1393
  return ret;
1352
1394
  }, arguments); },
1353
1395
  __wbg_crypto_38df2bab126b63dc: function(arg0) {
@@ -1478,7 +1520,7 @@ function __wbg_get_imports() {
1478
1520
  const ret = Object.entries(arg0);
1479
1521
  return ret;
1480
1522
  },
1481
- __wbg_error_ba2b2915aeba36d8: function(arg0, arg1) {
1523
+ __wbg_error_145dadf4216d70bc: function(arg0, arg1) {
1482
1524
  console.error(getStringFromWasm0(arg0, arg1));
1483
1525
  },
1484
1526
  __wbg_fetchFiatCurrencies_8afa0468f01bf013: function() { return handleError(function (arg0) {
@@ -2155,7 +2197,7 @@ function __wbg_get_imports() {
2155
2197
  const ret = arg0.setLnurlMetadata(v0);
2156
2198
  return ret;
2157
2199
  }, arguments); },
2158
- __wbg_setTimeout_3b5e32486c12c54e: function(arg0, arg1) {
2200
+ __wbg_setTimeout_631eb4eafbc308a9: function(arg0, arg1) {
2159
2201
  globalThis.setTimeout(arg0, arg1);
2160
2202
  },
2161
2203
  __wbg_setTimeout_ef24d2fc3ad97385: function() { return handleError(function (arg0, arg1) {
@@ -2446,41 +2488,41 @@ function __wbg_get_imports() {
2446
2488
  },
2447
2489
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2448
2490
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2449
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84);
2491
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7);
2450
2492
  return ret;
2451
2493
  },
2452
2494
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2453
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2495
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 401, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2454
2496
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57);
2455
2497
  return ret;
2456
2498
  },
2457
2499
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2458
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2500
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 401, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2459
2501
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2);
2460
2502
  return ret;
2461
2503
  },
2462
2504
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2463
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2505
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 401, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2464
2506
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3);
2465
2507
  return ret;
2466
2508
  },
2467
2509
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2468
2510
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Storage")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2469
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4);
2511
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_4);
2470
2512
  return ret;
2471
2513
  },
2472
2514
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2473
2515
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TokenStore")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2474
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5);
2516
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_5);
2475
2517
  return ret;
2476
2518
  },
2477
2519
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2478
2520
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("TreeStore")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2479
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6);
2521
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_6);
2480
2522
  return ret;
2481
2523
  },
2482
2524
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2483
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 408, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2525
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 406, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2484
2526
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7);
2485
2527
  return ret;
2486
2528
  },
@@ -2581,29 +2623,29 @@ function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, a
2581
2623
  wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, arg1, arg2);
2582
2624
  }
2583
2625
 
2584
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84(arg0, arg1, arg2) {
2585
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84(arg0, arg1, arg2);
2626
+ function wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7(arg0, arg1, arg2) {
2627
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7(arg0, arg1, arg2);
2586
2628
  if (ret[1]) {
2587
2629
  throw takeFromExternrefTable0(ret[0]);
2588
2630
  }
2589
2631
  }
2590
2632
 
2591
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4(arg0, arg1, arg2) {
2592
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4(arg0, arg1, arg2);
2633
+ function wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_4(arg0, arg1, arg2) {
2634
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_4(arg0, arg1, arg2);
2593
2635
  if (ret[1]) {
2594
2636
  throw takeFromExternrefTable0(ret[0]);
2595
2637
  }
2596
2638
  }
2597
2639
 
2598
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5(arg0, arg1, arg2) {
2599
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5(arg0, arg1, arg2);
2640
+ function wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_5(arg0, arg1, arg2) {
2641
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_5(arg0, arg1, arg2);
2600
2642
  if (ret[1]) {
2601
2643
  throw takeFromExternrefTable0(ret[0]);
2602
2644
  }
2603
2645
  }
2604
2646
 
2605
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6(arg0, arg1, arg2) {
2606
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6(arg0, arg1, arg2);
2647
+ function wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_6(arg0, arg1, arg2) {
2648
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_6(arg0, arg1, arg2);
2607
2649
  if (ret[1]) {
2608
2650
  throw takeFromExternrefTable0(ret[0]);
2609
2651
  }
Binary file
@@ -54,7 +54,7 @@ export const connect: (a: any) => any;
54
54
  export const connectWithSigner: (a: any, b: any, c: number, d: number) => any;
55
55
  export const defaultConfig: (a: any) => any;
56
56
  export const defaultExternalSigner: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
57
- export const defaultPostgresStorageConfig: (a: number, b: number) => any;
57
+ export const defaultMysqlStorageConfig: (a: number, b: number) => any;
58
58
  export const defaultsigner_aggregateFrost: (a: number, b: any) => any;
59
59
  export const defaultsigner_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
60
60
  export const defaultsigner_derivePublicKey: (a: number, b: number, c: number) => any;
@@ -90,6 +90,7 @@ export const sdkbuilder_withDefaultStorage: (a: number, b: number, c: number) =>
90
90
  export const sdkbuilder_withFiatService: (a: number, b: any) => number;
91
91
  export const sdkbuilder_withKeySet: (a: number, b: any) => number;
92
92
  export const sdkbuilder_withLnurlClient: (a: number, b: any) => number;
93
+ export const sdkbuilder_withMysqlBackend: (a: number, b: any) => number;
93
94
  export const sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
94
95
  export const sdkbuilder_withPostgresBackend: (a: number, b: any) => number;
95
96
  export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
@@ -119,10 +120,11 @@ export const intounderlyingsink_close: (a: number) => any;
119
120
  export const intounderlyingsink_write: (a: number, b: any) => any;
120
121
  export const intounderlyingsource_cancel: (a: number) => void;
121
122
  export const intounderlyingsource_pull: (a: number, b: any) => any;
122
- export const wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84: (a: number, b: number, c: any) => [number, number];
123
- export const wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4: (a: number, b: number, c: any) => [number, number];
124
- export const wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5: (a: number, b: number, c: any) => [number, number];
125
- export const wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6: (a: number, b: number, c: any) => [number, number];
123
+ export const defaultPostgresStorageConfig: (a: number, b: number) => any;
124
+ export const wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7: (a: number, b: number, c: any) => [number, number];
125
+ export const wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_4: (a: number, b: number, c: any) => [number, number];
126
+ export const wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_5: (a: number, b: number, c: any) => [number, number];
127
+ export const wasm_bindgen__convert__closures_____invoke__h27d08ee20b1285c7_6: (a: number, b: number, c: any) => [number, number];
126
128
  export const wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
127
129
  export const wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57: (a: number, b: number, c: any) => void;
128
130
  export const wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2: (a: number, b: number, c: any) => void;