@breeztech/breez-sdk-spark 0.14.0 → 0.15.0

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 (37) hide show
  1. package/breez-sdk-spark.tgz +0 -0
  2. package/bundler/breez_sdk_spark_wasm.d.ts +114 -40
  3. package/bundler/breez_sdk_spark_wasm.js +1 -1
  4. package/bundler/breez_sdk_spark_wasm_bg.js +118 -104
  5. package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
  6. package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +12 -11
  7. package/deno/breez_sdk_spark_wasm.d.ts +114 -40
  8. package/deno/breez_sdk_spark_wasm.js +118 -104
  9. package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
  10. package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +12 -11
  11. package/nodejs/breez_sdk_spark_wasm.d.ts +114 -40
  12. package/nodejs/breez_sdk_spark_wasm.js +121 -106
  13. package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
  14. package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +12 -11
  15. package/nodejs/index.mjs +3 -2
  16. package/nodejs/mysql-session-manager/index.cjs +26 -8
  17. package/nodejs/mysql-session-manager/migrations.cjs +40 -3
  18. package/nodejs/mysql-storage/index.cjs +67 -48
  19. package/nodejs/mysql-storage/migrations.cjs +220 -85
  20. package/nodejs/mysql-token-store/index.cjs +133 -68
  21. package/nodejs/mysql-token-store/migrations.cjs +309 -80
  22. package/nodejs/mysql-tree-store/index.cjs +76 -41
  23. package/nodejs/mysql-tree-store/migrations.cjs +254 -71
  24. package/nodejs/postgres-session-manager/index.cjs +27 -9
  25. package/nodejs/postgres-session-manager/migrations.cjs +45 -6
  26. package/nodejs/postgres-storage/index.cjs +81 -62
  27. package/nodejs/postgres-storage/migrations.cjs +207 -79
  28. package/nodejs/postgres-token-store/index.cjs +111 -67
  29. package/nodejs/postgres-token-store/migrations.cjs +153 -61
  30. package/nodejs/postgres-tree-store/index.cjs +60 -42
  31. package/nodejs/postgres-tree-store/migrations.cjs +130 -46
  32. package/package.json +1 -1
  33. package/ssr/index.js +14 -9
  34. package/web/breez_sdk_spark_wasm.d.ts +126 -51
  35. package/web/breez_sdk_spark_wasm.js +118 -104
  36. package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
  37. package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +12 -11
@@ -357,6 +357,13 @@ export class BreezSdk {
357
357
  const ret = wasm.breezsdk_refundDeposit(this.__wbg_ptr, request);
358
358
  return ret;
359
359
  }
360
+ /**
361
+ * @returns {Promise<void>}
362
+ */
363
+ refundPendingConversions() {
364
+ const ret = wasm.breezsdk_refundPendingConversions(this.__wbg_ptr);
365
+ return ret;
366
+ }
360
367
  /**
361
368
  * @param {RegisterLightningAddressRequest} request
362
369
  * @returns {Promise<LightningAddressInfo>}
@@ -769,7 +776,8 @@ export class IntoUnderlyingSource {
769
776
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
770
777
 
771
778
  /**
772
- * A shareable MySQL connection pool. See [`PostgresConnectionPool`](super::postgres_pool::PostgresConnectionPool)
779
+ * A shareable `MySQL` connection pool. See
780
+ * [`PostgresConnectionPool`](super::postgres_pool::PostgresConnectionPool)
773
781
  * for sharing semantics and lifecycle.
774
782
  */
775
783
  export class MysqlConnectionPool {
@@ -994,7 +1002,8 @@ export class SdkBuilder {
994
1002
  return SdkBuilder.__wrap(ret);
995
1003
  }
996
1004
  /**
997
- * **Deprecated.** Call `withMysqlConnectionPool(config)` and `withMysqlConnectionPool(pool)` instead.
1005
+ * **Deprecated.** Call `createMysqlConnectionPool(config)` and
1006
+ * `withMysqlConnectionPool(pool)` instead.
998
1007
  * @param {MysqlStorageConfig} config
999
1008
  * @returns {SdkBuilder}
1000
1009
  */
@@ -1008,8 +1017,9 @@ export class SdkBuilder {
1008
1017
  }
1009
1018
  /**
1010
1019
  * Sets a shared `MySQL` connection pool as the backend for all stores.
1011
- * Construct via `createMysqlConnectionPool` and pass the same handle to multiple
1012
- * `SdkBuilder`s to share connections across SDKs.
1020
+ *
1021
+ * If the same builder also receives a `WasmSdkContext` carrying a MySQL
1022
+ * pool, `build()` returns an error — pick one source.
1013
1023
  * @param {MysqlConnectionPool} pool
1014
1024
  * @returns {SdkBuilder}
1015
1025
  */
@@ -1029,7 +1039,8 @@ export class SdkBuilder {
1029
1039
  return SdkBuilder.__wrap(ret);
1030
1040
  }
1031
1041
  /**
1032
- * **Deprecated.** Call `withPostgresConnectionPool(config)` and `withPostgresConnectionPool(pool)` instead.
1042
+ * **Deprecated.** Call `createPostgresConnectionPool(config)` and
1043
+ * `withPostgresConnectionPool(pool)` instead.
1033
1044
  * @param {PostgresStorageConfig} config
1034
1045
  * @returns {SdkBuilder}
1035
1046
  */
@@ -1042,9 +1053,10 @@ export class SdkBuilder {
1042
1053
  return SdkBuilder.__wrap(ret[0]);
1043
1054
  }
1044
1055
  /**
1045
- * Sets a shared `PostgreSQL` connection pool as the backend for all
1046
- * stores. Construct via `createPostgresConnectionPool` and pass the same handle
1047
- * to multiple `SdkBuilder`s to share connections across SDKs.
1056
+ * Sets a shared Postgres connection pool as the backend for all stores.
1057
+ *
1058
+ * If the same builder also receives a `WasmSdkContext` carrying a
1059
+ * Postgres pool, `build()` returns an error — pick one source.
1048
1060
  * @param {PostgresConnectionPool} pool
1049
1061
  * @returns {SdkBuilder}
1050
1062
  */
@@ -1068,30 +1080,18 @@ export class SdkBuilder {
1068
1080
  return SdkBuilder.__wrap(ret);
1069
1081
  }
1070
1082
  /**
1071
- * Sets a custom session manager used to persist authentication sessions.
1083
+ * Threads a shared [`WasmSdkContext`] into the builder.
1072
1084
  *
1073
- * Provide a shared, persistent implementation (e.g. backed by `PostgreSQL`
1074
- * or Redis) to let multiple SDK instances share authentication state and
1075
- * bootstrap quickly. If not set, an in-memory session manager is used.
1076
- * @param {SessionManager} session_manager
1077
- * @returns {SdkBuilder}
1078
- */
1079
- withSessionManager(session_manager) {
1080
- const ptr = this.__destroy_into_raw();
1081
- const ret = wasm.sdkbuilder_withSessionManager(ptr, session_manager);
1082
- return SdkBuilder.__wrap(ret);
1083
- }
1084
- /**
1085
- * Reuses a shared SSP connection across SDK instances. Pass the same
1086
- * manager to every `SdkBuilder` whose SSP traffic should share an
1087
- * underlying HTTP client.
1088
- * @param {SspConnectionManager} manager
1085
+ * Construct the context once via `newSharedSdkContext` and pass the same
1086
+ * handle to every `SdkBuilder` whose SDKs should share its resources
1087
+ * (operator gRPC channels, SSP HTTP client, database pool).
1088
+ * @param {WasmSdkContext} context
1089
1089
  * @returns {SdkBuilder}
1090
1090
  */
1091
- withSspConnectionManager(manager) {
1091
+ withSharedContext(context) {
1092
1092
  const ptr = this.__destroy_into_raw();
1093
- _assertClass(manager, SspConnectionManager);
1094
- const ret = wasm.sdkbuilder_withSspConnectionManager(ptr, manager.__wbg_ptr);
1093
+ _assertClass(context, WasmSdkContext);
1094
+ const ret = wasm.sdkbuilder_withSharedContext(ptr, context.__wbg_ptr);
1095
1095
  return SdkBuilder.__wrap(ret);
1096
1096
  }
1097
1097
  /**
@@ -1106,32 +1106,6 @@ export class SdkBuilder {
1106
1106
  }
1107
1107
  if (Symbol.dispose) SdkBuilder.prototype[Symbol.dispose] = SdkBuilder.prototype.free;
1108
1108
 
1109
- /**
1110
- * Shared transport for SSP GraphQL traffic across SDK instances.
1111
- *
1112
- * All SDK instances built with the same `SspConnectionManager` share a single
1113
- * underlying HTTP client (and its h2 connection pool) for SSP requests.
1114
- */
1115
- export class SspConnectionManager {
1116
- static __wrap(ptr) {
1117
- const obj = Object.create(SspConnectionManager.prototype);
1118
- obj.__wbg_ptr = ptr;
1119
- SspConnectionManagerFinalization.register(obj, obj.__wbg_ptr, obj);
1120
- return obj;
1121
- }
1122
- __destroy_into_raw() {
1123
- const ptr = this.__wbg_ptr;
1124
- this.__wbg_ptr = 0;
1125
- SspConnectionManagerFinalization.unregister(this);
1126
- return ptr;
1127
- }
1128
- free() {
1129
- const ptr = this.__destroy_into_raw();
1130
- wasm.__wbg_sspconnectionmanager_free(ptr, 0);
1131
- }
1132
- }
1133
- if (Symbol.dispose) SspConnectionManager.prototype[Symbol.dispose] = SspConnectionManager.prototype.free;
1134
-
1135
1109
  export class TokenIssuer {
1136
1110
  static __wrap(ptr) {
1137
1111
  const obj = Object.create(TokenIssuer.prototype);
@@ -1206,6 +1180,33 @@ export class TokenIssuer {
1206
1180
  }
1207
1181
  if (Symbol.dispose) TokenIssuer.prototype[Symbol.dispose] = TokenIssuer.prototype.free;
1208
1182
 
1183
+ /**
1184
+ * Process-shared resources backing one or more `BreezSdk` instances on WASM.
1185
+ *
1186
+ * Construct once via `newSharedSdkContext` and pass the handle to every
1187
+ * `SdkBuilder` whose SDKs should share its operator gRPC channels, SSP HTTP
1188
+ * client, and (optionally) database connection pool.
1189
+ */
1190
+ export class WasmSdkContext {
1191
+ static __wrap(ptr) {
1192
+ const obj = Object.create(WasmSdkContext.prototype);
1193
+ obj.__wbg_ptr = ptr;
1194
+ WasmSdkContextFinalization.register(obj, obj.__wbg_ptr, obj);
1195
+ return obj;
1196
+ }
1197
+ __destroy_into_raw() {
1198
+ const ptr = this.__wbg_ptr;
1199
+ this.__wbg_ptr = 0;
1200
+ WasmSdkContextFinalization.unregister(this);
1201
+ return ptr;
1202
+ }
1203
+ free() {
1204
+ const ptr = this.__destroy_into_raw();
1205
+ wasm.__wbg_wasmsdkcontext_free(ptr, 0);
1206
+ }
1207
+ }
1208
+ if (Symbol.dispose) WasmSdkContext.prototype[Symbol.dispose] = WasmSdkContext.prototype.free;
1209
+
1209
1210
  /**
1210
1211
  * @param {ConnectRequest} request
1211
1212
  * @returns {Promise<BreezSdk>}
@@ -1229,7 +1230,7 @@ export function connectWithSigner(config, signer, storage_dir) {
1229
1230
  }
1230
1231
 
1231
1232
  /**
1232
- * Creates a shareable MySQL connection pool from the given config.
1233
+ * Creates a shareable `MySQL` connection pool from the given config.
1233
1234
  * @param {MysqlStorageConfig} config
1234
1235
  * @returns {MysqlConnectionPool}
1235
1236
  */
@@ -1289,6 +1290,7 @@ export function defaultExternalSigner(mnemonic, passphrase, network, key_set_con
1289
1290
  * - `maxPoolSize`: 10
1290
1291
  * - `createTimeoutSecs`: 0 (no timeout)
1291
1292
  * - `recycleTimeoutSecs`: 10
1293
+ * - `foreignKeyMode`: `Enforced`
1292
1294
  * @param {string} connection_string
1293
1295
  * @returns {MysqlStorageConfig}
1294
1296
  */
@@ -1316,6 +1318,15 @@ export function defaultPostgresStorageConfig(connection_string) {
1316
1318
  return ret;
1317
1319
  }
1318
1320
 
1321
+ /**
1322
+ * @param {Network} network
1323
+ * @returns {Config}
1324
+ */
1325
+ export function defaultServerConfig(network) {
1326
+ const ret = wasm.defaultServerConfig(network);
1327
+ return ret;
1328
+ }
1329
+
1319
1330
  /**
1320
1331
  * Creates a default external signer from a mnemonic phrase.
1321
1332
  *
@@ -1361,14 +1372,13 @@ export function newRestChainService(url, network, api_type, credentials) {
1361
1372
  }
1362
1373
 
1363
1374
  /**
1364
- * @param {string | null} [user_agent]
1365
- * @returns {SspConnectionManager}
1375
+ * Constructs a [`WasmSdkContext`] from a `WasmSdkContextConfig`.
1376
+ * @param {WasmSdkContextConfig} config
1377
+ * @returns {Promise<WasmSdkContext>}
1366
1378
  */
1367
- export function newSspConnectionManager(user_agent) {
1368
- var ptr0 = isLikeNone(user_agent) ? 0 : passStringToWasm0(user_agent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1369
- var len0 = WASM_VECTOR_LEN;
1370
- const ret = wasm.newSspConnectionManager(ptr0, len0);
1371
- return SspConnectionManager.__wrap(ret);
1379
+ export function newSharedSdkContext(config) {
1380
+ const ret = wasm.newSharedSdkContext(config);
1381
+ return ret;
1372
1382
  }
1373
1383
 
1374
1384
  /**
@@ -1642,40 +1652,40 @@ function __wbg_get_imports() {
1642
1652
  const ret = createMysqlPool(arg0);
1643
1653
  return ret;
1644
1654
  }, arguments); },
1645
- __wbg_createMysqlSessionManagerWithPool_e4a41fa210a1c161: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1646
- const ret = createMysqlSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1655
+ __wbg_createMysqlSessionManagerWithPool_81f4147900a5a954: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1656
+ const ret = createMysqlSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1647
1657
  return ret;
1648
1658
  }, arguments); },
1649
- __wbg_createMysqlStorageWithPool_c92d8cd5f2ca6ade: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1650
- const ret = createMysqlStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1659
+ __wbg_createMysqlStorageWithPool_22d23b0d068eae47: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1660
+ const ret = createMysqlStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1651
1661
  return ret;
1652
1662
  }, arguments); },
1653
- __wbg_createMysqlTokenStoreWithPool_cb308b20dccd4b4e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1654
- const ret = createMysqlTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1663
+ __wbg_createMysqlTokenStoreWithPool_f59d99943757f602: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1664
+ const ret = createMysqlTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4, arg5 !== 0);
1655
1665
  return ret;
1656
1666
  }, arguments); },
1657
- __wbg_createMysqlTreeStoreWithPool_98638c799d6a967c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1658
- const ret = createMysqlTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1667
+ __wbg_createMysqlTreeStoreWithPool_4c6bcff518c7f9c4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1668
+ const ret = createMysqlTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4, arg5 !== 0);
1659
1669
  return ret;
1660
1670
  }, arguments); },
1661
1671
  __wbg_createPostgresPool_3c396c7ab2f0eab2: function() { return handleError(function (arg0) {
1662
1672
  const ret = createPostgresPool(arg0);
1663
1673
  return ret;
1664
1674
  }, arguments); },
1665
- __wbg_createPostgresSessionManagerWithPool_df33d3998bd54e5b: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1666
- const ret = createPostgresSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1675
+ __wbg_createPostgresSessionManagerWithPool_989bf80d96829c18: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1676
+ const ret = createPostgresSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1667
1677
  return ret;
1668
1678
  }, arguments); },
1669
- __wbg_createPostgresStorageWithPool_3fe1b7ee3ca10589: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1670
- const ret = createPostgresStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1679
+ __wbg_createPostgresStorageWithPool_9408116e32ab58f8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1680
+ const ret = createPostgresStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1671
1681
  return ret;
1672
1682
  }, arguments); },
1673
- __wbg_createPostgresTokenStoreWithPool_ebd4c54228196816: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1674
- const ret = createPostgresTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1683
+ __wbg_createPostgresTokenStoreWithPool_5e936f3aa8bd424a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1684
+ const ret = createPostgresTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1675
1685
  return ret;
1676
1686
  }, arguments); },
1677
- __wbg_createPostgresTreeStoreWithPool_6b43821b450142cb: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1678
- const ret = createPostgresTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1687
+ __wbg_createPostgresTreeStoreWithPool_03a03c4c0664703c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1688
+ const ret = createPostgresTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3, arg4 !== 0);
1679
1689
  return ret;
1680
1690
  }, arguments); },
1681
1691
  __wbg_crypto_38df2bab126b63dc: function(arg0) {
@@ -2095,10 +2105,6 @@ function __wbg_get_imports() {
2095
2105
  const ret = arg0.insertPayment(arg1);
2096
2106
  return ret;
2097
2107
  }, arguments); },
2098
- __wbg_insertTokenOutputs_11b256443d099417: function() { return handleError(function (arg0, arg1) {
2099
- const ret = arg0.insertTokenOutputs(arg1);
2100
- return ret;
2101
- }, arguments); },
2102
2108
  __wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
2103
2109
  let result;
2104
2110
  try {
@@ -2766,6 +2772,10 @@ function __wbg_get_imports() {
2766
2772
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2767
2773
  }
2768
2774
  }, arguments); },
2775
+ __wbg_updateTokenOutputs_d978e01c817e8230: function() { return handleError(function (arg0, arg1, arg2) {
2776
+ const ret = arg0.updateTokenOutputs(arg1, arg2);
2777
+ return ret;
2778
+ }, arguments); },
2769
2779
  __wbg_url_68fd9a221360e0db: function(arg0, arg1) {
2770
2780
  const ret = arg1.url;
2771
2781
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -2796,48 +2806,52 @@ function __wbg_get_imports() {
2796
2806
  const ret = arg0.wasClean;
2797
2807
  return ret;
2798
2808
  },
2809
+ __wbg_wasmsdkcontext_new: function(arg0) {
2810
+ const ret = WasmSdkContext.__wrap(arg0);
2811
+ return ret;
2812
+ },
2799
2813
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2800
2814
  // 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`.
2801
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c);
2815
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21);
2802
2816
  return ret;
2803
2817
  },
2804
2818
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2805
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 399, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2819
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2806
2820
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57);
2807
2821
  return ret;
2808
2822
  },
2809
2823
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2810
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 399, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2824
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2811
2825
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2);
2812
2826
  return ret;
2813
2827
  },
2814
2828
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2815
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 399, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2829
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2816
2830
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3);
2817
2831
  return ret;
2818
2832
  },
2819
2833
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2820
2834
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("SessionManager")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2821
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4);
2835
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4);
2822
2836
  return ret;
2823
2837
  },
2824
2838
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2825
2839
  // 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`.
2826
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5);
2840
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5);
2827
2841
  return ret;
2828
2842
  },
2829
2843
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2830
2844
  // 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`.
2831
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6);
2845
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6);
2832
2846
  return ret;
2833
2847
  },
2834
2848
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2835
2849
  // 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`.
2836
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7);
2850
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7);
2837
2851
  return ret;
2838
2852
  },
2839
2853
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
2840
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 404, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2854
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 408, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2841
2855
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h124479769cd429fd);
2842
2856
  return ret;
2843
2857
  },
@@ -2938,36 +2952,36 @@ function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, a
2938
2952
  wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, arg1, arg2);
2939
2953
  }
2940
2954
 
2941
- function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c(arg0, arg1, arg2) {
2942
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c(arg0, arg1, arg2);
2955
+ function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21(arg0, arg1, arg2) {
2956
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21(arg0, arg1, arg2);
2943
2957
  if (ret[1]) {
2944
2958
  throw takeFromExternrefTable0(ret[0]);
2945
2959
  }
2946
2960
  }
2947
2961
 
2948
- function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4(arg0, arg1, arg2) {
2949
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4(arg0, arg1, arg2);
2962
+ function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4(arg0, arg1, arg2) {
2963
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4(arg0, arg1, arg2);
2950
2964
  if (ret[1]) {
2951
2965
  throw takeFromExternrefTable0(ret[0]);
2952
2966
  }
2953
2967
  }
2954
2968
 
2955
- function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5(arg0, arg1, arg2) {
2956
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5(arg0, arg1, arg2);
2969
+ function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5(arg0, arg1, arg2) {
2970
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5(arg0, arg1, arg2);
2957
2971
  if (ret[1]) {
2958
2972
  throw takeFromExternrefTable0(ret[0]);
2959
2973
  }
2960
2974
  }
2961
2975
 
2962
- function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6(arg0, arg1, arg2) {
2963
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6(arg0, arg1, arg2);
2976
+ function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6(arg0, arg1, arg2) {
2977
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6(arg0, arg1, arg2);
2964
2978
  if (ret[1]) {
2965
2979
  throw takeFromExternrefTable0(ret[0]);
2966
2980
  }
2967
2981
  }
2968
2982
 
2969
- function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7(arg0, arg1, arg2) {
2970
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7(arg0, arg1, arg2);
2983
+ function wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7(arg0, arg1, arg2) {
2984
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7(arg0, arg1, arg2);
2971
2985
  if (ret[1]) {
2972
2986
  throw takeFromExternrefTable0(ret[0]);
2973
2987
  }
@@ -3027,12 +3041,12 @@ const PostgresConnectionPoolFinalization = (typeof FinalizationRegistry === 'und
3027
3041
  const SdkBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
3028
3042
  ? { register: () => {}, unregister: () => {} }
3029
3043
  : new FinalizationRegistry(ptr => wasm.__wbg_sdkbuilder_free(ptr, 1));
3030
- const SspConnectionManagerFinalization = (typeof FinalizationRegistry === 'undefined')
3031
- ? { register: () => {}, unregister: () => {} }
3032
- : new FinalizationRegistry(ptr => wasm.__wbg_sspconnectionmanager_free(ptr, 1));
3033
3044
  const TokenIssuerFinalization = (typeof FinalizationRegistry === 'undefined')
3034
3045
  ? { register: () => {}, unregister: () => {} }
3035
3046
  : new FinalizationRegistry(ptr => wasm.__wbg_tokenissuer_free(ptr, 1));
3047
+ const WasmSdkContextFinalization = (typeof FinalizationRegistry === 'undefined')
3048
+ ? { register: () => {}, unregister: () => {} }
3049
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsdkcontext_free(ptr, 1));
3036
3050
 
3037
3051
  function addToExternrefTable0(obj) {
3038
3052
  const idx = wasm.__externref_table_alloc();
Binary file
@@ -6,9 +6,10 @@ export const __wbg_breezsdk_free: (a: number, b: number) => void;
6
6
  export const __wbg_defaultsigner_free: (a: number, b: number) => void;
7
7
  export const __wbg_mysqlconnectionpool_free: (a: number, b: number) => void;
8
8
  export const __wbg_passkey_free: (a: number, b: number) => void;
9
+ export const __wbg_postgresconnectionpool_free: (a: number, b: number) => void;
9
10
  export const __wbg_sdkbuilder_free: (a: number, b: number) => void;
10
- export const __wbg_sspconnectionmanager_free: (a: number, b: number) => void;
11
11
  export const __wbg_tokenissuer_free: (a: number, b: number) => void;
12
+ export const __wbg_wasmsdkcontext_free: (a: number, b: number) => void;
12
13
  export const bitcoinchainservicehandle_broadcastTransaction: (a: number, b: number, c: number) => any;
13
14
  export const bitcoinchainservicehandle_getAddressUtxos: (a: number, b: number, c: number) => any;
14
15
  export const bitcoinchainservicehandle_getTransactionHex: (a: number, b: number, c: number) => any;
@@ -48,6 +49,7 @@ export const breezsdk_prepareSendPayment: (a: number, b: any) => any;
48
49
  export const breezsdk_receivePayment: (a: number, b: any) => any;
49
50
  export const breezsdk_recommendedFees: (a: number) => any;
50
51
  export const breezsdk_refundDeposit: (a: number, b: any) => any;
52
+ export const breezsdk_refundPendingConversions: (a: number) => any;
51
53
  export const breezsdk_registerLightningAddress: (a: number, b: any) => any;
52
54
  export const breezsdk_registerWebhook: (a: number, b: any) => any;
53
55
  export const breezsdk_removeEventListener: (a: number, b: number, c: number) => any;
@@ -65,6 +67,8 @@ export const createPostgresConnectionPool: (a: any) => [number, number, number];
65
67
  export const defaultConfig: (a: any) => any;
66
68
  export const defaultExternalSigner: (a: number, b: number, c: number, d: number, e: any, f: number) => [number, number, number];
67
69
  export const defaultMysqlStorageConfig: (a: number, b: number) => any;
70
+ export const defaultPostgresStorageConfig: (a: number, b: number) => any;
71
+ export const defaultServerConfig: (a: any) => any;
68
72
  export const defaultsigner_aggregateFrost: (a: number, b: any) => any;
69
73
  export const defaultsigner_decryptEcies: (a: number, b: number, c: number, d: number, e: number) => any;
70
74
  export const defaultsigner_derivePublicKey: (a: number, b: number, c: number) => any;
@@ -88,7 +92,7 @@ export const defaultsigner_subtractSecrets: (a: number, b: any, c: any) => any;
88
92
  export const getSparkStatus: () => any;
89
93
  export const initLogging: (a: any, b: number, c: number) => any;
90
94
  export const newRestChainService: (a: number, b: number, c: any, d: any, e: number) => any;
91
- export const newSspConnectionManager: (a: number, b: number) => number;
95
+ export const newSharedSdkContext: (a: any) => any;
92
96
  export const passkey_getWallet: (a: number, b: number, c: number) => any;
93
97
  export const passkey_isAvailable: (a: number) => any;
94
98
  export const passkey_listLabels: (a: number) => any;
@@ -108,8 +112,7 @@ export const sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
108
112
  export const sdkbuilder_withPostgresBackend: (a: number, b: any) => [number, number, number];
109
113
  export const sdkbuilder_withPostgresConnectionPool: (a: number, b: number) => number;
110
114
  export const sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
111
- export const sdkbuilder_withSessionManager: (a: number, b: any) => number;
112
- export const sdkbuilder_withSspConnectionManager: (a: number, b: number) => number;
115
+ export const sdkbuilder_withSharedContext: (a: number, b: number) => number;
113
116
  export const sdkbuilder_withStorage: (a: number, b: any) => number;
114
117
  export const tokenissuer_burnIssuerToken: (a: number, b: any) => any;
115
118
  export const tokenissuer_createIssuerToken: (a: number, b: any) => any;
@@ -136,13 +139,11 @@ export const intounderlyingsink_close: (a: number) => any;
136
139
  export const intounderlyingsink_write: (a: number, b: any) => any;
137
140
  export const intounderlyingsource_cancel: (a: number) => void;
138
141
  export const intounderlyingsource_pull: (a: number, b: any) => any;
139
- export const __wbg_postgresconnectionpool_free: (a: number, b: number) => void;
140
- export const defaultPostgresStorageConfig: (a: number, b: number) => any;
141
- export const wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c: (a: number, b: number, c: any) => [number, number];
142
- export const wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4: (a: number, b: number, c: any) => [number, number];
143
- export const wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5: (a: number, b: number, c: any) => [number, number];
144
- export const wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6: (a: number, b: number, c: any) => [number, number];
145
- export const wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7: (a: number, b: number, c: any) => [number, number];
142
+ export const wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21: (a: number, b: number, c: any) => [number, number];
143
+ export const wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_4: (a: number, b: number, c: any) => [number, number];
144
+ export const wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_5: (a: number, b: number, c: any) => [number, number];
145
+ export const wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_6: (a: number, b: number, c: any) => [number, number];
146
+ export const wasm_bindgen__convert__closures_____invoke__h013a98c02f3b4b21_7: (a: number, b: number, c: any) => [number, number];
146
147
  export const wasm_bindgen__convert__closures_____invoke__h41057d61edf43a32: (a: number, b: number, c: any, d: any) => void;
147
148
  export const wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57: (a: number, b: number, c: any) => void;
148
149
  export const wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2: (a: number, b: number, c: any) => void;