@breeztech/breez-sdk-spark 0.13.10-dev → 0.13.12-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 (49) hide show
  1. package/breez-sdk-spark.tgz +0 -0
  2. package/bundler/breez_sdk_spark_wasm.d.ts +157 -0
  3. package/bundler/breez_sdk_spark_wasm.js +1 -1
  4. package/bundler/breez_sdk_spark_wasm_bg.js +419 -41
  5. package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
  6. package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -7
  7. package/deno/breez_sdk_spark_wasm.d.ts +157 -0
  8. package/deno/breez_sdk_spark_wasm.js +419 -41
  9. package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
  10. package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -7
  11. package/nodejs/breez_sdk_spark_wasm.d.ts +157 -0
  12. package/nodejs/breez_sdk_spark_wasm.js +428 -41
  13. package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
  14. package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -7
  15. package/nodejs/index.js +56 -0
  16. package/nodejs/index.mjs +9 -0
  17. package/nodejs/mysql-session-manager/errors.cjs +13 -0
  18. package/nodejs/mysql-session-manager/index.cjs +144 -0
  19. package/nodejs/mysql-session-manager/migrations.cjs +102 -0
  20. package/nodejs/mysql-session-manager/package.json +9 -0
  21. package/nodejs/mysql-storage/errors.cjs +19 -0
  22. package/nodejs/mysql-storage/index.cjs +1367 -0
  23. package/nodejs/mysql-storage/migrations.cjs +387 -0
  24. package/nodejs/mysql-storage/package.json +9 -0
  25. package/nodejs/mysql-token-store/errors.cjs +9 -0
  26. package/nodejs/mysql-token-store/index.cjs +980 -0
  27. package/nodejs/mysql-token-store/migrations.cjs +255 -0
  28. package/nodejs/mysql-token-store/package.json +9 -0
  29. package/nodejs/mysql-tree-store/errors.cjs +9 -0
  30. package/nodejs/mysql-tree-store/index.cjs +941 -0
  31. package/nodejs/mysql-tree-store/migrations.cjs +221 -0
  32. package/nodejs/mysql-tree-store/package.json +9 -0
  33. package/nodejs/package.json +5 -0
  34. package/nodejs/postgres-session-manager/errors.cjs +13 -0
  35. package/nodejs/postgres-session-manager/index.cjs +165 -0
  36. package/nodejs/postgres-session-manager/migrations.cjs +126 -0
  37. package/nodejs/postgres-session-manager/package.json +9 -0
  38. package/nodejs/postgres-storage/index.cjs +147 -92
  39. package/nodejs/postgres-storage/migrations.cjs +85 -4
  40. package/nodejs/postgres-token-store/index.cjs +178 -102
  41. package/nodejs/postgres-token-store/migrations.cjs +92 -3
  42. package/nodejs/postgres-tree-store/index.cjs +168 -83
  43. package/nodejs/postgres-tree-store/migrations.cjs +80 -3
  44. package/package.json +1 -1
  45. package/ssr/index.js +53 -0
  46. package/web/breez_sdk_spark_wasm.d.ts +184 -7
  47. package/web/breez_sdk_spark_wasm.js +419 -41
  48. package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
  49. package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +27 -7
@@ -1,5 +1,81 @@
1
1
  /* @ts-self-types="./breez_sdk_spark_wasm.d.ts" */
2
2
 
3
+ /**
4
+ * Rust-built implementation of the JS `BitcoinChainService` interface.
5
+ *
6
+ * Returned by factories like [`new_rest_chain_service`]; users see it as a
7
+ * `BitcoinChainService` and pass it to `withChainService`. Pass the same
8
+ * instance to multiple `SdkBuilder`s to share a single underlying HTTP
9
+ * client (and its connection pool) across SDK instances.
10
+ */
11
+ class BitcoinChainServiceHandle {
12
+ static __wrap(ptr) {
13
+ const obj = Object.create(BitcoinChainServiceHandle.prototype);
14
+ obj.__wbg_ptr = ptr;
15
+ BitcoinChainServiceHandleFinalization.register(obj, obj.__wbg_ptr, obj);
16
+ return obj;
17
+ }
18
+ __destroy_into_raw() {
19
+ const ptr = this.__wbg_ptr;
20
+ this.__wbg_ptr = 0;
21
+ BitcoinChainServiceHandleFinalization.unregister(this);
22
+ return ptr;
23
+ }
24
+ free() {
25
+ const ptr = this.__destroy_into_raw();
26
+ wasm.__wbg_bitcoinchainservicehandle_free(ptr, 0);
27
+ }
28
+ /**
29
+ * @param {string} tx
30
+ * @returns {Promise<void>}
31
+ */
32
+ broadcastTransaction(tx) {
33
+ const ptr0 = passStringToWasm0(tx, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
34
+ const len0 = WASM_VECTOR_LEN;
35
+ const ret = wasm.bitcoinchainservicehandle_broadcastTransaction(this.__wbg_ptr, ptr0, len0);
36
+ return ret;
37
+ }
38
+ /**
39
+ * @param {string} address
40
+ * @returns {Promise<any>}
41
+ */
42
+ getAddressUtxos(address) {
43
+ const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
44
+ const len0 = WASM_VECTOR_LEN;
45
+ const ret = wasm.bitcoinchainservicehandle_getAddressUtxos(this.__wbg_ptr, ptr0, len0);
46
+ return ret;
47
+ }
48
+ /**
49
+ * @param {string} txid
50
+ * @returns {Promise<any>}
51
+ */
52
+ getTransactionHex(txid) {
53
+ const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
54
+ const len0 = WASM_VECTOR_LEN;
55
+ const ret = wasm.bitcoinchainservicehandle_getTransactionHex(this.__wbg_ptr, ptr0, len0);
56
+ return ret;
57
+ }
58
+ /**
59
+ * @param {string} txid
60
+ * @returns {Promise<any>}
61
+ */
62
+ getTransactionStatus(txid) {
63
+ const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
64
+ const len0 = WASM_VECTOR_LEN;
65
+ const ret = wasm.bitcoinchainservicehandle_getTransactionStatus(this.__wbg_ptr, ptr0, len0);
66
+ return ret;
67
+ }
68
+ /**
69
+ * @returns {Promise<any>}
70
+ */
71
+ recommendedFees() {
72
+ const ret = wasm.bitcoinchainservicehandle_recommendedFees(this.__wbg_ptr);
73
+ return ret;
74
+ }
75
+ }
76
+ if (Symbol.dispose) BitcoinChainServiceHandle.prototype[Symbol.dispose] = BitcoinChainServiceHandle.prototype.free;
77
+ exports.BitcoinChainServiceHandle = BitcoinChainServiceHandle;
78
+
3
79
  class BreezSdk {
4
80
  static __wrap(ptr) {
5
81
  const obj = Object.create(BreezSdk.prototype);
@@ -698,6 +774,31 @@ class IntoUnderlyingSource {
698
774
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
699
775
  exports.IntoUnderlyingSource = IntoUnderlyingSource;
700
776
 
777
+ /**
778
+ * A shareable MySQL connection pool. See [`PostgresConnectionPool`](super::postgres_pool::PostgresConnectionPool)
779
+ * for sharing semantics and lifecycle.
780
+ */
781
+ class MysqlConnectionPool {
782
+ static __wrap(ptr) {
783
+ const obj = Object.create(MysqlConnectionPool.prototype);
784
+ obj.__wbg_ptr = ptr;
785
+ MysqlConnectionPoolFinalization.register(obj, obj.__wbg_ptr, obj);
786
+ return obj;
787
+ }
788
+ __destroy_into_raw() {
789
+ const ptr = this.__wbg_ptr;
790
+ this.__wbg_ptr = 0;
791
+ MysqlConnectionPoolFinalization.unregister(this);
792
+ return ptr;
793
+ }
794
+ free() {
795
+ const ptr = this.__destroy_into_raw();
796
+ wasm.__wbg_mysqlconnectionpool_free(ptr, 0);
797
+ }
798
+ }
799
+ if (Symbol.dispose) MysqlConnectionPool.prototype[Symbol.dispose] = MysqlConnectionPool.prototype.free;
800
+ exports.MysqlConnectionPool = MysqlConnectionPool;
801
+
701
802
  /**
702
803
  * Passkey-based wallet operations using WebAuthn PRF extension.
703
804
  *
@@ -780,6 +881,37 @@ class Passkey {
780
881
  if (Symbol.dispose) Passkey.prototype[Symbol.dispose] = Passkey.prototype.free;
781
882
  exports.Passkey = Passkey;
782
883
 
884
+ /**
885
+ * A shareable Postgres connection pool.
886
+ *
887
+ * Construct via [`create_postgres_connection_pool`] and pass the same handle to multiple
888
+ * `SdkBuilder`s via `withPostgresConnectionPool` to share connections across SDKs.
889
+ * Per-tenant scoping is derived from each SDK's seed.
890
+ *
891
+ * The pool's lifecycle is controlled by the integrator: it stays alive as
892
+ * long as any reference is held. `disconnect()` does **not** close the pool.
893
+ */
894
+ class PostgresConnectionPool {
895
+ static __wrap(ptr) {
896
+ const obj = Object.create(PostgresConnectionPool.prototype);
897
+ obj.__wbg_ptr = ptr;
898
+ PostgresConnectionPoolFinalization.register(obj, obj.__wbg_ptr, obj);
899
+ return obj;
900
+ }
901
+ __destroy_into_raw() {
902
+ const ptr = this.__wbg_ptr;
903
+ this.__wbg_ptr = 0;
904
+ PostgresConnectionPoolFinalization.unregister(this);
905
+ return ptr;
906
+ }
907
+ free() {
908
+ const ptr = this.__destroy_into_raw();
909
+ wasm.__wbg_postgresconnectionpool_free(ptr, 0);
910
+ }
911
+ }
912
+ if (Symbol.dispose) PostgresConnectionPool.prototype[Symbol.dispose] = PostgresConnectionPool.prototype.free;
913
+ exports.PostgresConnectionPool = PostgresConnectionPool;
914
+
783
915
  class SdkBuilder {
784
916
  static __wrap(ptr) {
785
917
  const obj = Object.create(SdkBuilder.prototype);
@@ -870,6 +1002,32 @@ class SdkBuilder {
870
1002
  const ret = wasm.sdkbuilder_withLnurlClient(ptr, lnurl_client);
871
1003
  return SdkBuilder.__wrap(ret);
872
1004
  }
1005
+ /**
1006
+ * **Deprecated.** Call `withMysqlConnectionPool(config)` and `withMysqlConnectionPool(pool)` instead.
1007
+ * @param {MysqlStorageConfig} config
1008
+ * @returns {SdkBuilder}
1009
+ */
1010
+ withMysqlBackend(config) {
1011
+ const ptr = this.__destroy_into_raw();
1012
+ const ret = wasm.sdkbuilder_withMysqlBackend(ptr, config);
1013
+ if (ret[2]) {
1014
+ throw takeFromExternrefTable0(ret[1]);
1015
+ }
1016
+ return SdkBuilder.__wrap(ret[0]);
1017
+ }
1018
+ /**
1019
+ * Sets a shared `MySQL` connection pool as the backend for all stores.
1020
+ * Construct via `createMysqlConnectionPool` and pass the same handle to multiple
1021
+ * `SdkBuilder`s to share connections across SDKs.
1022
+ * @param {MysqlConnectionPool} pool
1023
+ * @returns {SdkBuilder}
1024
+ */
1025
+ withMysqlConnectionPool(pool) {
1026
+ const ptr = this.__destroy_into_raw();
1027
+ _assertClass(pool, MysqlConnectionPool);
1028
+ const ret = wasm.sdkbuilder_withMysqlConnectionPool(ptr, pool.__wbg_ptr);
1029
+ return SdkBuilder.__wrap(ret);
1030
+ }
873
1031
  /**
874
1032
  * @param {PaymentObserver} payment_observer
875
1033
  * @returns {SdkBuilder}
@@ -880,12 +1038,29 @@ class SdkBuilder {
880
1038
  return SdkBuilder.__wrap(ret);
881
1039
  }
882
1040
  /**
1041
+ * **Deprecated.** Call `withPostgresConnectionPool(config)` and `withPostgresConnectionPool(pool)` instead.
883
1042
  * @param {PostgresStorageConfig} config
884
1043
  * @returns {SdkBuilder}
885
1044
  */
886
1045
  withPostgresBackend(config) {
887
1046
  const ptr = this.__destroy_into_raw();
888
1047
  const ret = wasm.sdkbuilder_withPostgresBackend(ptr, config);
1048
+ if (ret[2]) {
1049
+ throw takeFromExternrefTable0(ret[1]);
1050
+ }
1051
+ return SdkBuilder.__wrap(ret[0]);
1052
+ }
1053
+ /**
1054
+ * Sets a shared `PostgreSQL` connection pool as the backend for all
1055
+ * stores. Construct via `createPostgresConnectionPool` and pass the same handle
1056
+ * to multiple `SdkBuilder`s to share connections across SDKs.
1057
+ * @param {PostgresConnectionPool} pool
1058
+ * @returns {SdkBuilder}
1059
+ */
1060
+ withPostgresConnectionPool(pool) {
1061
+ const ptr = this.__destroy_into_raw();
1062
+ _assertClass(pool, PostgresConnectionPool);
1063
+ const ret = wasm.sdkbuilder_withPostgresConnectionPool(ptr, pool.__wbg_ptr);
889
1064
  return SdkBuilder.__wrap(ret);
890
1065
  }
891
1066
  /**
@@ -901,6 +1076,33 @@ class SdkBuilder {
901
1076
  const ret = wasm.sdkbuilder_withRestChainService(ptr, ptr0, len0, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
902
1077
  return SdkBuilder.__wrap(ret);
903
1078
  }
1079
+ /**
1080
+ * Sets a custom session manager used to persist authentication sessions.
1081
+ *
1082
+ * Provide a shared, persistent implementation (e.g. backed by `PostgreSQL`
1083
+ * or Redis) to let multiple SDK instances share authentication state and
1084
+ * bootstrap quickly. If not set, an in-memory session manager is used.
1085
+ * @param {SessionManager} session_manager
1086
+ * @returns {SdkBuilder}
1087
+ */
1088
+ withSessionManager(session_manager) {
1089
+ const ptr = this.__destroy_into_raw();
1090
+ const ret = wasm.sdkbuilder_withSessionManager(ptr, session_manager);
1091
+ return SdkBuilder.__wrap(ret);
1092
+ }
1093
+ /**
1094
+ * Reuses a shared SSP connection across SDK instances. Pass the same
1095
+ * manager to every `SdkBuilder` whose SSP traffic should share an
1096
+ * underlying HTTP client.
1097
+ * @param {SspConnectionManager} manager
1098
+ * @returns {SdkBuilder}
1099
+ */
1100
+ withSspConnectionManager(manager) {
1101
+ const ptr = this.__destroy_into_raw();
1102
+ _assertClass(manager, SspConnectionManager);
1103
+ const ret = wasm.sdkbuilder_withSspConnectionManager(ptr, manager.__wbg_ptr);
1104
+ return SdkBuilder.__wrap(ret);
1105
+ }
904
1106
  /**
905
1107
  * @param {Storage} storage
906
1108
  * @returns {SdkBuilder}
@@ -914,6 +1116,33 @@ class SdkBuilder {
914
1116
  if (Symbol.dispose) SdkBuilder.prototype[Symbol.dispose] = SdkBuilder.prototype.free;
915
1117
  exports.SdkBuilder = SdkBuilder;
916
1118
 
1119
+ /**
1120
+ * Shared transport for SSP GraphQL traffic across SDK instances.
1121
+ *
1122
+ * All SDK instances built with the same `SspConnectionManager` share a single
1123
+ * underlying HTTP client (and its h2 connection pool) for SSP requests.
1124
+ */
1125
+ class SspConnectionManager {
1126
+ static __wrap(ptr) {
1127
+ const obj = Object.create(SspConnectionManager.prototype);
1128
+ obj.__wbg_ptr = ptr;
1129
+ SspConnectionManagerFinalization.register(obj, obj.__wbg_ptr, obj);
1130
+ return obj;
1131
+ }
1132
+ __destroy_into_raw() {
1133
+ const ptr = this.__wbg_ptr;
1134
+ this.__wbg_ptr = 0;
1135
+ SspConnectionManagerFinalization.unregister(this);
1136
+ return ptr;
1137
+ }
1138
+ free() {
1139
+ const ptr = this.__destroy_into_raw();
1140
+ wasm.__wbg_sspconnectionmanager_free(ptr, 0);
1141
+ }
1142
+ }
1143
+ if (Symbol.dispose) SspConnectionManager.prototype[Symbol.dispose] = SspConnectionManager.prototype.free;
1144
+ exports.SspConnectionManager = SspConnectionManager;
1145
+
917
1146
  class TokenIssuer {
918
1147
  static __wrap(ptr) {
919
1148
  const obj = Object.create(TokenIssuer.prototype);
@@ -1013,6 +1242,34 @@ function connectWithSigner(config, signer, storage_dir) {
1013
1242
  }
1014
1243
  exports.connectWithSigner = connectWithSigner;
1015
1244
 
1245
+ /**
1246
+ * Creates a shareable MySQL connection pool from the given config.
1247
+ * @param {MysqlStorageConfig} config
1248
+ * @returns {MysqlConnectionPool}
1249
+ */
1250
+ function createMysqlConnectionPool(config) {
1251
+ const ret = wasm.createMysqlConnectionPool(config);
1252
+ if (ret[2]) {
1253
+ throw takeFromExternrefTable0(ret[1]);
1254
+ }
1255
+ return MysqlConnectionPool.__wrap(ret[0]);
1256
+ }
1257
+ exports.createMysqlConnectionPool = createMysqlConnectionPool;
1258
+
1259
+ /**
1260
+ * Creates a shareable Postgres connection pool from the given config.
1261
+ * @param {PostgresStorageConfig} config
1262
+ * @returns {PostgresConnectionPool}
1263
+ */
1264
+ function createPostgresConnectionPool(config) {
1265
+ const ret = wasm.createPostgresConnectionPool(config);
1266
+ if (ret[2]) {
1267
+ throw takeFromExternrefTable0(ret[1]);
1268
+ }
1269
+ return PostgresConnectionPool.__wrap(ret[0]);
1270
+ }
1271
+ exports.createPostgresConnectionPool = createPostgresConnectionPool;
1272
+
1016
1273
  /**
1017
1274
  * @param {Network} network
1018
1275
  * @returns {Config}
@@ -1043,6 +1300,24 @@ function defaultExternalSigner(mnemonic, passphrase, network, key_set_config) {
1043
1300
  }
1044
1301
  exports.defaultExternalSigner = defaultExternalSigner;
1045
1302
 
1303
+ /**
1304
+ * Creates a default MySQL storage configuration with sensible defaults.
1305
+ *
1306
+ * Default values:
1307
+ * - `maxPoolSize`: 10
1308
+ * - `createTimeoutSecs`: 0 (no timeout)
1309
+ * - `recycleTimeoutSecs`: 10
1310
+ * @param {string} connection_string
1311
+ * @returns {MysqlStorageConfig}
1312
+ */
1313
+ function defaultMysqlStorageConfig(connection_string) {
1314
+ const ptr0 = passStringToWasm0(connection_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1315
+ const len0 = WASM_VECTOR_LEN;
1316
+ const ret = wasm.defaultMysqlStorageConfig(ptr0, len0);
1317
+ return ret;
1318
+ }
1319
+ exports.defaultMysqlStorageConfig = defaultMysqlStorageConfig;
1320
+
1046
1321
  /**
1047
1322
  * Creates a default PostgreSQL storage configuration with sensible defaults.
1048
1323
  *
@@ -1086,6 +1361,40 @@ function initLogging(logger, filter) {
1086
1361
  }
1087
1362
  exports.initLogging = initLogging;
1088
1363
 
1364
+ /**
1365
+ * Constructs a shareable REST-based Bitcoin chain service.
1366
+ *
1367
+ * Pass the returned chain service to multiple `SdkBuilder`s via
1368
+ * `withChainService` to reuse one HTTP client across SDK instances. All
1369
+ * SDKs sharing the chain service must use the same `network`.
1370
+ *
1371
+ * For one-off, non-shared use, prefer `withRestChainService`.
1372
+ * @param {string} url
1373
+ * @param {Network} network
1374
+ * @param {ChainApiType} api_type
1375
+ * @param {Credentials | null} [credentials]
1376
+ * @returns {BitcoinChainService}
1377
+ */
1378
+ function newRestChainService(url, network, api_type, credentials) {
1379
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1380
+ const len0 = WASM_VECTOR_LEN;
1381
+ const ret = wasm.newRestChainService(ptr0, len0, network, api_type, isLikeNone(credentials) ? 0 : addToExternrefTable0(credentials));
1382
+ return BitcoinChainServiceHandle.__wrap(ret);
1383
+ }
1384
+ exports.newRestChainService = newRestChainService;
1385
+
1386
+ /**
1387
+ * @param {string | null} [user_agent]
1388
+ * @returns {SspConnectionManager}
1389
+ */
1390
+ function newSspConnectionManager(user_agent) {
1391
+ var ptr0 = isLikeNone(user_agent) ? 0 : passStringToWasm0(user_agent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1392
+ var len0 = WASM_VECTOR_LEN;
1393
+ const ret = wasm.newSspConnectionManager(ptr0, len0);
1394
+ return SspConnectionManager.__wrap(ret);
1395
+ }
1396
+ exports.newSspConnectionManager = newSspConnectionManager;
1397
+
1089
1398
  /**
1090
1399
  * Entry point invoked by JavaScript in a worker.
1091
1400
  * @param {number} ptr
@@ -1350,20 +1659,44 @@ function __wbg_get_imports() {
1350
1659
  const ret = createDefaultStorage(getStringFromWasm0(arg0, arg1), arg2);
1351
1660
  return ret;
1352
1661
  }, arguments); },
1662
+ __wbg_createMysqlPool_8927bff3a28fcef9: function() { return handleError(function (arg0) {
1663
+ const ret = createMysqlPool(arg0);
1664
+ return ret;
1665
+ }, arguments); },
1666
+ __wbg_createMysqlSessionManagerWithPool_e4a41fa210a1c161: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1667
+ const ret = createMysqlSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1668
+ return ret;
1669
+ }, arguments); },
1670
+ __wbg_createMysqlStorageWithPool_c92d8cd5f2ca6ade: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1671
+ const ret = createMysqlStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1672
+ return ret;
1673
+ }, arguments); },
1674
+ __wbg_createMysqlTokenStoreWithPool_cb308b20dccd4b4e: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1675
+ const ret = createMysqlTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1676
+ return ret;
1677
+ }, arguments); },
1678
+ __wbg_createMysqlTreeStoreWithPool_98638c799d6a967c: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1679
+ const ret = createMysqlTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1680
+ return ret;
1681
+ }, arguments); },
1353
1682
  __wbg_createPostgresPool_3c396c7ab2f0eab2: function() { return handleError(function (arg0) {
1354
1683
  const ret = createPostgresPool(arg0);
1355
1684
  return ret;
1356
1685
  }, arguments); },
1357
- __wbg_createPostgresStorageWithPool_9effb8c7315e402a: function() { return handleError(function (arg0, arg1) {
1358
- const ret = createPostgresStorageWithPool(arg0, arg1);
1686
+ __wbg_createPostgresSessionManagerWithPool_df33d3998bd54e5b: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1687
+ const ret = createPostgresSessionManagerWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1688
+ return ret;
1689
+ }, arguments); },
1690
+ __wbg_createPostgresStorageWithPool_3fe1b7ee3ca10589: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1691
+ const ret = createPostgresStorageWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1359
1692
  return ret;
1360
1693
  }, arguments); },
1361
- __wbg_createPostgresTokenStoreWithPool_810f67a7b8eced70: function() { return handleError(function (arg0, arg1) {
1362
- const ret = createPostgresTokenStoreWithPool(arg0, arg1);
1694
+ __wbg_createPostgresTokenStoreWithPool_ebd4c54228196816: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1695
+ const ret = createPostgresTokenStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1363
1696
  return ret;
1364
1697
  }, arguments); },
1365
- __wbg_createPostgresTreeStoreWithPool_d6f7ade37b9e1ecc: function() { return handleError(function (arg0, arg1) {
1366
- const ret = createPostgresTreeStoreWithPool(arg0, arg1);
1698
+ __wbg_createPostgresTreeStoreWithPool_6b43821b450142cb: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1699
+ const ret = createPostgresTreeStoreWithPool(arg0, getArrayU8FromWasm0(arg1, arg2), arg3);
1367
1700
  return ret;
1368
1701
  }, arguments); },
1369
1702
  __wbg_crypto_38df2bab126b63dc: function(arg0) {
@@ -1494,7 +1827,7 @@ function __wbg_get_imports() {
1494
1827
  const ret = Object.entries(arg0);
1495
1828
  return ret;
1496
1829
  },
1497
- __wbg_error_ba2b2915aeba36d8: function(arg0, arg1) {
1830
+ __wbg_error_145dadf4216d70bc: function(arg0, arg1) {
1498
1831
  console.error(getStringFromWasm0(arg0, arg1));
1499
1832
  },
1500
1833
  __wbg_fetchFiatCurrencies_8afa0468f01bf013: function() { return handleError(function (arg0) {
@@ -1657,6 +1990,18 @@ function __wbg_get_imports() {
1657
1990
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1658
1991
  }
1659
1992
  }, arguments); },
1993
+ __wbg_getSession_05b1be4bb146adcf: function() { return handleError(function (arg0, arg1, arg2) {
1994
+ let deferred0_0;
1995
+ let deferred0_1;
1996
+ try {
1997
+ deferred0_0 = arg1;
1998
+ deferred0_1 = arg2;
1999
+ const ret = arg0.getSession(getStringFromWasm0(arg1, arg2));
2000
+ return ret;
2001
+ } finally {
2002
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2003
+ }
2004
+ }, arguments); },
1660
2005
  __wbg_getStaticDepositPrivateKey_82943f7a0fe1208d: function() { return handleError(function (arg0, arg1) {
1661
2006
  const ret = arg0.getStaticDepositPrivateKey(arg1 >>> 0);
1662
2007
  return ret;
@@ -2171,7 +2516,19 @@ function __wbg_get_imports() {
2171
2516
  const ret = arg0.setLnurlMetadata(v0);
2172
2517
  return ret;
2173
2518
  }, arguments); },
2174
- __wbg_setTimeout_3b5e32486c12c54e: function(arg0, arg1) {
2519
+ __wbg_setSession_35cb471ae7537391: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2520
+ let deferred0_0;
2521
+ let deferred0_1;
2522
+ try {
2523
+ deferred0_0 = arg1;
2524
+ deferred0_1 = arg2;
2525
+ const ret = arg0.setSession(getStringFromWasm0(arg1, arg2), arg3);
2526
+ return ret;
2527
+ } finally {
2528
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
2529
+ }
2530
+ }, arguments); },
2531
+ __wbg_setTimeout_631eb4eafbc308a9: function(arg0, arg1) {
2175
2532
  globalThis.setTimeout(arg0, arg1);
2176
2533
  },
2177
2534
  __wbg_setTimeout_ef24d2fc3ad97385: function() { return handleError(function (arg0, arg1) {
@@ -2462,103 +2819,108 @@ function __wbg_get_imports() {
2462
2819
  },
2463
2820
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2464
2821
  // 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`.
2465
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84);
2822
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c);
2466
2823
  return ret;
2467
2824
  },
2468
2825
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2469
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2826
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 399, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2470
2827
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57);
2471
2828
  return ret;
2472
2829
  },
2473
2830
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2474
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2831
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 399, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2475
2832
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_2);
2476
2833
  return ret;
2477
2834
  },
2478
2835
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
2479
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 403, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2836
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 399, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2480
2837
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3);
2481
2838
  return ret;
2482
2839
  },
2483
2840
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
2484
- // 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`.
2485
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4);
2841
+ // 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`.
2842
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4);
2486
2843
  return ret;
2487
2844
  },
2488
2845
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
2489
- // 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`.
2490
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5);
2846
+ // 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`.
2847
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5);
2491
2848
  return ret;
2492
2849
  },
2493
2850
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
2494
- // 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`.
2495
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6);
2851
+ // 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`.
2852
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6);
2496
2853
  return ret;
2497
2854
  },
2498
2855
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
2499
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 408, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2500
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7);
2856
+ // 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`.
2857
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7);
2858
+ return ret;
2859
+ },
2860
+ __wbindgen_cast_0000000000000009: function(arg0, arg1) {
2861
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 404, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2862
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h124479769cd429fd);
2501
2863
  return ret;
2502
2864
  },
2503
- __wbindgen_cast_0000000000000009: function(arg0) {
2865
+ __wbindgen_cast_000000000000000a: function(arg0) {
2504
2866
  // Cast intrinsic for `F64 -> Externref`.
2505
2867
  const ret = arg0;
2506
2868
  return ret;
2507
2869
  },
2508
- __wbindgen_cast_000000000000000a: function(arg0) {
2870
+ __wbindgen_cast_000000000000000b: function(arg0) {
2509
2871
  // Cast intrinsic for `I64 -> Externref`.
2510
2872
  const ret = arg0;
2511
2873
  return ret;
2512
2874
  },
2513
- __wbindgen_cast_000000000000000b: function(arg0, arg1) {
2875
+ __wbindgen_cast_000000000000000c: function(arg0, arg1) {
2514
2876
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
2515
2877
  const ret = getArrayU8FromWasm0(arg0, arg1);
2516
2878
  return ret;
2517
2879
  },
2518
- __wbindgen_cast_000000000000000c: function(arg0, arg1) {
2880
+ __wbindgen_cast_000000000000000d: function(arg0, arg1) {
2519
2881
  // Cast intrinsic for `Ref(String) -> Externref`.
2520
2882
  const ret = getStringFromWasm0(arg0, arg1);
2521
2883
  return ret;
2522
2884
  },
2523
- __wbindgen_cast_000000000000000d: function(arg0, arg1) {
2885
+ __wbindgen_cast_000000000000000e: function(arg0, arg1) {
2524
2886
  // Cast intrinsic for `U128 -> Externref`.
2525
2887
  const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
2526
2888
  return ret;
2527
2889
  },
2528
- __wbindgen_cast_000000000000000e: function(arg0) {
2890
+ __wbindgen_cast_000000000000000f: function(arg0) {
2529
2891
  // Cast intrinsic for `U64 -> Externref`.
2530
2892
  const ret = BigInt.asUintN(64, arg0);
2531
2893
  return ret;
2532
2894
  },
2533
- __wbindgen_cast_000000000000000f: function(arg0, arg1) {
2895
+ __wbindgen_cast_0000000000000010: function(arg0, arg1) {
2534
2896
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2535
2897
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2536
2898
  // Cast intrinsic for `Vector(NamedExternref("Contact")) -> Externref`.
2537
2899
  const ret = v0;
2538
2900
  return ret;
2539
2901
  },
2540
- __wbindgen_cast_0000000000000010: function(arg0, arg1) {
2902
+ __wbindgen_cast_0000000000000011: function(arg0, arg1) {
2541
2903
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2542
2904
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2543
2905
  // Cast intrinsic for `Vector(NamedExternref("ExternalVerifiableSecretShare")) -> Externref`.
2544
2906
  const ret = v0;
2545
2907
  return ret;
2546
2908
  },
2547
- __wbindgen_cast_0000000000000011: function(arg0, arg1) {
2909
+ __wbindgen_cast_0000000000000012: function(arg0, arg1) {
2548
2910
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2549
2911
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2550
2912
  // Cast intrinsic for `Vector(NamedExternref("Webhook")) -> Externref`.
2551
2913
  const ret = v0;
2552
2914
  return ret;
2553
2915
  },
2554
- __wbindgen_cast_0000000000000012: function(arg0, arg1) {
2916
+ __wbindgen_cast_0000000000000013: function(arg0, arg1) {
2555
2917
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
2556
2918
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
2557
2919
  // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
2558
2920
  const ret = v0;
2559
2921
  return ret;
2560
2922
  },
2561
- __wbindgen_cast_0000000000000013: function(arg0, arg1) {
2923
+ __wbindgen_cast_0000000000000014: function(arg0, arg1) {
2562
2924
  var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2563
2925
  wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2564
2926
  // Cast intrinsic for `Vector(U8) -> Externref`.
@@ -2581,8 +2943,8 @@ function __wbg_get_imports() {
2581
2943
  };
2582
2944
  }
2583
2945
 
2584
- function wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1) {
2585
- wasm.wasm_bindgen__convert__closures_____invoke__h484cd36e13f37bd7(arg0, arg1);
2946
+ function wasm_bindgen__convert__closures_____invoke__h124479769cd429fd(arg0, arg1) {
2947
+ wasm.wasm_bindgen__convert__closures_____invoke__h124479769cd429fd(arg0, arg1);
2586
2948
  }
2587
2949
 
2588
2950
  function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57(arg0, arg1, arg2) {
@@ -2597,29 +2959,36 @@ function wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, a
2597
2959
  wasm.wasm_bindgen__convert__closures_____invoke__h4819aba3eed2db57_3(arg0, arg1, arg2);
2598
2960
  }
2599
2961
 
2600
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84(arg0, arg1, arg2) {
2601
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84(arg0, arg1, arg2);
2962
+ function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c(arg0, arg1, arg2) {
2963
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c(arg0, arg1, arg2);
2964
+ if (ret[1]) {
2965
+ throw takeFromExternrefTable0(ret[0]);
2966
+ }
2967
+ }
2968
+
2969
+ function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4(arg0, arg1, arg2) {
2970
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_4(arg0, arg1, arg2);
2602
2971
  if (ret[1]) {
2603
2972
  throw takeFromExternrefTable0(ret[0]);
2604
2973
  }
2605
2974
  }
2606
2975
 
2607
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4(arg0, arg1, arg2) {
2608
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_4(arg0, arg1, arg2);
2976
+ function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5(arg0, arg1, arg2) {
2977
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_5(arg0, arg1, arg2);
2609
2978
  if (ret[1]) {
2610
2979
  throw takeFromExternrefTable0(ret[0]);
2611
2980
  }
2612
2981
  }
2613
2982
 
2614
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5(arg0, arg1, arg2) {
2615
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_5(arg0, arg1, arg2);
2983
+ function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6(arg0, arg1, arg2) {
2984
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_6(arg0, arg1, arg2);
2616
2985
  if (ret[1]) {
2617
2986
  throw takeFromExternrefTable0(ret[0]);
2618
2987
  }
2619
2988
  }
2620
2989
 
2621
- function wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6(arg0, arg1, arg2) {
2622
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4fc1641481bc1d84_6(arg0, arg1, arg2);
2990
+ function wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7(arg0, arg1, arg2) {
2991
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h459c42c6ffe5f52c_7(arg0, arg1, arg2);
2623
2992
  if (ret[1]) {
2624
2993
  throw takeFromExternrefTable0(ret[0]);
2625
2994
  }
@@ -2649,6 +3018,9 @@ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate
2649
3018
 
2650
3019
 
2651
3020
  const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
3021
+ const BitcoinChainServiceHandleFinalization = (typeof FinalizationRegistry === 'undefined')
3022
+ ? { register: () => {}, unregister: () => {} }
3023
+ : new FinalizationRegistry(ptr => wasm.__wbg_bitcoinchainservicehandle_free(ptr, 1));
2652
3024
  const BreezSdkFinalization = (typeof FinalizationRegistry === 'undefined')
2653
3025
  ? { register: () => {}, unregister: () => {} }
2654
3026
  : new FinalizationRegistry(ptr => wasm.__wbg_breezsdk_free(ptr, 1));
@@ -2664,12 +3036,21 @@ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefin
2664
3036
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
2665
3037
  ? { register: () => {}, unregister: () => {} }
2666
3038
  : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
3039
+ const MysqlConnectionPoolFinalization = (typeof FinalizationRegistry === 'undefined')
3040
+ ? { register: () => {}, unregister: () => {} }
3041
+ : new FinalizationRegistry(ptr => wasm.__wbg_mysqlconnectionpool_free(ptr, 1));
2667
3042
  const PasskeyFinalization = (typeof FinalizationRegistry === 'undefined')
2668
3043
  ? { register: () => {}, unregister: () => {} }
2669
3044
  : new FinalizationRegistry(ptr => wasm.__wbg_passkey_free(ptr, 1));
3045
+ const PostgresConnectionPoolFinalization = (typeof FinalizationRegistry === 'undefined')
3046
+ ? { register: () => {}, unregister: () => {} }
3047
+ : new FinalizationRegistry(ptr => wasm.__wbg_postgresconnectionpool_free(ptr, 1));
2670
3048
  const SdkBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
2671
3049
  ? { register: () => {}, unregister: () => {} }
2672
3050
  : new FinalizationRegistry(ptr => wasm.__wbg_sdkbuilder_free(ptr, 1));
3051
+ const SspConnectionManagerFinalization = (typeof FinalizationRegistry === 'undefined')
3052
+ ? { register: () => {}, unregister: () => {} }
3053
+ : new FinalizationRegistry(ptr => wasm.__wbg_sspconnectionmanager_free(ptr, 1));
2673
3054
  const TokenIssuerFinalization = (typeof FinalizationRegistry === 'undefined')
2674
3055
  ? { register: () => {}, unregister: () => {} }
2675
3056
  : new FinalizationRegistry(ptr => wasm.__wbg_tokenissuer_free(ptr, 1));
@@ -2680,6 +3061,12 @@ function addToExternrefTable0(obj) {
2680
3061
  return idx;
2681
3062
  }
2682
3063
 
3064
+ function _assertClass(instance, klass) {
3065
+ if (!(instance instanceof klass)) {
3066
+ throw new Error(`expected instance of ${klass.name}`);
3067
+ }
3068
+ }
3069
+
2683
3070
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2684
3071
  ? { register: () => {}, unregister: () => {} }
2685
3072
  : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));