@synonymdev/pubky 0.12.0 → 0.13.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 (5) hide show
  1. package/index.cjs +643 -495
  2. package/index.js +644 -496
  3. package/package.json +1 -1
  4. package/pubky.d.ts +218 -134
  5. package/pubky_bg.wasm +0 -0
package/index.cjs CHANGED
@@ -475,7 +475,6 @@ async function __pubkyGrantDeleteDelegatedKey(keyId) {
475
475
  */
476
476
  class AuthFlow {
477
477
  static __wrap(ptr) {
478
- ptr = ptr >>> 0;
479
478
  const obj = Object.create(AuthFlow.prototype);
480
479
  obj.__wbg_ptr = ptr;
481
480
  AuthFlowFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -649,7 +648,6 @@ exports.AuthFlow = AuthFlow;
649
648
  */
650
649
  class AuthFlowKind {
651
650
  static __wrap(ptr) {
652
- ptr = ptr >>> 0;
653
651
  const obj = Object.create(AuthFlowKind.prototype);
654
652
  obj.__wbg_ptr = ptr;
655
653
  AuthFlowKindFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -740,7 +738,6 @@ exports.AuthFlowKind = AuthFlowKind;
740
738
  */
741
739
  class AuthToken {
742
740
  static __wrap(ptr) {
743
- ptr = ptr >>> 0;
744
741
  const obj = Object.create(AuthToken.prototype);
745
742
  obj.__wbg_ptr = ptr;
746
743
  AuthTokenFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -769,7 +766,7 @@ class AuthToken {
769
766
  */
770
767
  get capabilities() {
771
768
  const ret = wasm.authtoken_capabilities(this.__wbg_ptr);
772
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
769
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
773
770
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
774
771
  return v1;
775
772
  }
@@ -855,7 +852,6 @@ exports.AuthToken = AuthToken;
855
852
  */
856
853
  class BrowserSessionStore {
857
854
  static __wrap(ptr) {
858
- ptr = ptr >>> 0;
859
855
  const obj = Object.create(BrowserSessionStore.prototype);
860
856
  obj.__wbg_ptr = ptr;
861
857
  BrowserSessionStoreFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -871,17 +867,6 @@ class BrowserSessionStore {
871
867
  const ptr = this.__destroy_into_raw();
872
868
  wasm.__wbg_browsersessionstore_free(ptr, 0);
873
869
  }
874
- /**
875
- * Clear all local stored session records for this origin.
876
- *
877
- * Delegated keys referenced by those stored session records are removed.
878
- * Delegated keys that only belong to pending grant flows are preserved.
879
- * @returns {Promise<void>}
880
- */
881
- clear() {
882
- const ret = wasm.browsersessionstore_clear(this.__wbg_ptr);
883
- return ret;
884
- }
885
870
  /**
886
871
  * Clear all browser auth persistence owned by this SDK origin.
887
872
  *
@@ -895,6 +880,17 @@ class BrowserSessionStore {
895
880
  const ret = wasm.browsersessionstore_clearAll(this.__wbg_ptr);
896
881
  return ret;
897
882
  }
883
+ /**
884
+ * Clear all local stored session records for this origin.
885
+ *
886
+ * Delegated keys referenced by those stored session records are removed.
887
+ * Delegated keys that only belong to pending grant flows are preserved.
888
+ * @returns {Promise<void>}
889
+ */
890
+ clear() {
891
+ const ret = wasm.browsersessionstore_clear(this.__wbg_ptr);
892
+ return ret;
893
+ }
898
894
  /**
899
895
  * Whether IndexedDB is available for durable session persistence.
900
896
  * @returns {Promise<boolean>}
@@ -955,7 +951,6 @@ exports.BrowserSessionStore = BrowserSessionStore;
955
951
  */
956
952
  class Client {
957
953
  static __wrap(ptr) {
958
- ptr = ptr >>> 0;
959
954
  const obj = Object.create(Client.prototype);
960
955
  obj.__wbg_ptr = ptr;
961
956
  ClientFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -995,19 +990,20 @@ class Client {
995
990
  * Create a Pubky HTTP client.
996
991
  *
997
992
  * @param {PubkyClientConfig} [config]
998
- * Optional transport overrides:
999
- * `{ pkarr?: { relays?: string[], request_timeout?: number } }`.
993
+ * Optional error-body limit and PKARR overrides:
994
+ * `{ maxErrorBodyBytes?: number, pkarr?: { relays?: string[], requestTimeout?: number } }`.
1000
995
  *
1001
996
  * @returns {Client}
1002
997
  * A configured low-level client. Prefer `new Pubky().client` unless you
1003
- * need custom relays/timeouts.
998
+ * need custom relays, timeouts or error-body limits.
1004
999
  *
1005
1000
  * @throws {InvalidInput}
1006
- * If any PKARR relay URL is invalid.
1001
+ * If a relay URL is invalid or the error-body limit is not an integer in 0..=4294967295.
1007
1002
  *
1008
1003
  * @example
1009
1004
  * const client = new Client({
1010
- * pkarr: { relays: ["https://relay1/","https://relay2/"], request_timeout: 8000 }
1005
+ * maxErrorBodyBytes: 1024,
1006
+ * pkarr: { relays: ["https://relay1/","https://relay2/"], requestTimeout: 8000 }
1011
1007
  * });
1012
1008
  * const pubky = Pubky.withClient(client);
1013
1009
  * @param {PubkyClientConfig | null} [config_opt]
@@ -1017,7 +1013,7 @@ class Client {
1017
1013
  if (ret[2]) {
1018
1014
  throw takeFromExternrefTable0(ret[1]);
1019
1015
  }
1020
- this.__wbg_ptr = ret[0] >>> 0;
1016
+ this.__wbg_ptr = ret[0];
1021
1017
  ClientFinalization.register(this, this.__wbg_ptr, this);
1022
1018
  return this;
1023
1019
  }
@@ -1063,7 +1059,6 @@ exports.Client = Client;
1063
1059
  */
1064
1060
  class CookieSession {
1065
1061
  static __wrap(ptr) {
1066
- ptr = ptr >>> 0;
1067
1062
  const obj = Object.create(CookieSession.prototype);
1068
1063
  obj.__wbg_ptr = ptr;
1069
1064
  CookieSessionFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1079,6 +1074,20 @@ class CookieSession {
1079
1074
  const ptr = this.__destroy_into_raw();
1080
1075
  wasm.__wbg_cookiesession_free(ptr, 0);
1081
1076
  }
1077
+ /**
1078
+ * Export the cookie secret needed to restore this cookie session.
1079
+ *
1080
+ * This is available when the SDK captured the cookie secret, such as in
1081
+ * Node.js. Browser sessions cannot read HTTP-only Set-Cookie values.
1082
+ *
1083
+ * @returns {Promise<string>}
1084
+ * @deprecated Use `GrantSession.exportLocalSecret()` instead.
1085
+ * @returns {Promise<string>}
1086
+ */
1087
+ exportSecret() {
1088
+ const ret = wasm.cookiesession_exportSecret(this.__wbg_ptr);
1089
+ return ret;
1090
+ }
1082
1091
  /**
1083
1092
  * Export session metadata for legacy cookie restore.
1084
1093
  *
@@ -1107,20 +1116,6 @@ class CookieSession {
1107
1116
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1108
1117
  }
1109
1118
  }
1110
- /**
1111
- * Export the cookie secret needed to restore this cookie session.
1112
- *
1113
- * This is available when the SDK captured the cookie secret, such as in
1114
- * Node.js. Browser sessions cannot read HTTP-only Set-Cookie values.
1115
- *
1116
- * @returns {Promise<string>}
1117
- * @deprecated Use `GrantSession.exportLocalSecret()` instead.
1118
- * @returns {Promise<string>}
1119
- */
1120
- exportSecret() {
1121
- const ret = wasm.cookiesession_exportSecret(this.__wbg_ptr);
1122
- return ret;
1123
- }
1124
1119
  }
1125
1120
  if (Symbol.dispose) CookieSession.prototype[Symbol.dispose] = CookieSession.prototype.free;
1126
1121
  exports.CookieSession = CookieSession;
@@ -1130,7 +1125,6 @@ exports.CookieSession = CookieSession;
1130
1125
  */
1131
1126
  class DirectSignupDeepLink {
1132
1127
  static __wrap(ptr) {
1133
- ptr = ptr >>> 0;
1134
1128
  const obj = Object.create(DirectSignupDeepLink.prototype);
1135
1129
  obj.__wbg_ptr = ptr;
1136
1130
  DirectSignupDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1176,7 +1170,7 @@ class DirectSignupDeepLink {
1176
1170
  const ret = wasm.directsignupdeeplink_signupToken(this.__wbg_ptr);
1177
1171
  let v1;
1178
1172
  if (ret[0] !== 0) {
1179
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1173
+ v1 = getStringFromWasm0(ret[0], ret[1]);
1180
1174
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1181
1175
  }
1182
1176
  return v1;
@@ -1233,7 +1227,6 @@ exports.DirectSignupDeepLink = DirectSignupDeepLink;
1233
1227
  */
1234
1228
  class Event {
1235
1229
  static __wrap(ptr) {
1236
- ptr = ptr >>> 0;
1237
1230
  const obj = Object.create(Event.prototype);
1238
1231
  obj.__wbg_ptr = ptr;
1239
1232
  EventFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1258,7 +1251,7 @@ class Event {
1258
1251
  const ret = wasm.event_contentHash(this.__wbg_ptr);
1259
1252
  let v1;
1260
1253
  if (ret[0] !== 0) {
1261
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1254
+ v1 = getStringFromWasm0(ret[0], ret[1]);
1262
1255
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1263
1256
  }
1264
1257
  return v1;
@@ -1311,6 +1304,7 @@ exports.Event = Event;
1311
1304
  * Builder for creating an event stream subscription.
1312
1305
  *
1313
1306
  * Construct via `Pubky.eventStreamForUser()` or `Pubky.eventStreamFor()`.
1307
+ * Configuration methods consume this builder unless documented otherwise.
1314
1308
  *
1315
1309
  * @example
1316
1310
  * ```typescript
@@ -1336,7 +1330,6 @@ exports.Event = Event;
1336
1330
  */
1337
1331
  class EventStreamBuilder {
1338
1332
  static __wrap(ptr) {
1339
- ptr = ptr >>> 0;
1340
1333
  const obj = Object.create(EventStreamBuilder.prototype);
1341
1334
  obj.__wbg_ptr = ptr;
1342
1335
  EventStreamBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1357,6 +1350,8 @@ class EventStreamBuilder {
1357
1350
  *
1358
1351
  * Each user can have an independent cursor position. If a user already exists,
1359
1352
  * their cursor value is overwritten.
1353
+ * Updates this builder and returns a copy for chaining. Rejected input
1354
+ * leaves this builder unchanged.
1360
1355
  *
1361
1356
  * @param {Array<[string, string | null]>} users - Array of [z32PublicKey, cursor] tuples
1362
1357
  * @returns {EventStreamBuilder} - Builder for chaining
@@ -1377,8 +1372,7 @@ class EventStreamBuilder {
1377
1372
  * @returns {EventStreamBuilder}
1378
1373
  */
1379
1374
  addUsers(users) {
1380
- const ptr = this.__destroy_into_raw();
1381
- const ret = wasm.eventstreambuilder_addUsers(ptr, users);
1375
+ const ret = wasm.eventstreambuilder_addUsers(this.__wbg_ptr, users);
1382
1376
  if (ret[2]) {
1383
1377
  throw takeFromExternrefTable0(ret[1]);
1384
1378
  }
@@ -1435,6 +1429,28 @@ class EventStreamBuilder {
1435
1429
  const ret = wasm.eventstreambuilder_live(ptr);
1436
1430
  return EventStreamBuilder.__wrap(ret);
1437
1431
  }
1432
+ /**
1433
+ * Set a client-side byte limit for SSE payloads. Unbounded by default.
1434
+ * Limits accumulated data (including newlines joining data fields), each
1435
+ * event name, and each ID separately in historical and live streams.
1436
+ * Comments, unknown fields and framing bytes are excluded.
1437
+ * There is no total block or stream byte limit.
1438
+ * Overflow cancels the response and errors the ReadableStream.
1439
+ * Updates this builder and returns a copy for chaining. Rejected input
1440
+ * leaves this builder unchanged.
1441
+ *
1442
+ * @param {number} limit - Integer in 1..=4294967295.
1443
+ * @throws {InvalidInput} If the limit is not a positive 32-bit integer.
1444
+ * @param {number} limit
1445
+ * @returns {EventStreamBuilder}
1446
+ */
1447
+ maxEventBytes(limit) {
1448
+ const ret = wasm.eventstreambuilder_maxEventBytes(this.__wbg_ptr, limit);
1449
+ if (ret[2]) {
1450
+ throw takeFromExternrefTable0(ret[1]);
1451
+ }
1452
+ return EventStreamBuilder.__wrap(ret[0]);
1453
+ }
1438
1454
  /**
1439
1455
  * Filter events by path. Call once per path to receive the
1440
1456
  * union of several scopes (e.g. `/pub/` plus a private `/priv/app/`).
@@ -1539,7 +1555,6 @@ exports.EventStreamBuilder = EventStreamBuilder;
1539
1555
  */
1540
1556
  class GrantAuthFlow {
1541
1557
  static __wrap(ptr) {
1542
- ptr = ptr >>> 0;
1543
1558
  const obj = Object.create(GrantAuthFlow.prototype);
1544
1559
  obj.__wbg_ptr = ptr;
1545
1560
  GrantAuthFlowFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1591,6 +1606,22 @@ class GrantAuthFlow {
1591
1606
  const ret = wasm.grantauthflow_isDelegationAvailable();
1592
1607
  return ret !== 0;
1593
1608
  }
1609
+ /**
1610
+ * Resume a previously saved pending delegated grant auth flow.
1611
+ *
1612
+ * Runtime: delegated grant keys require a secure browser context with
1613
+ * WebCrypto `crypto.subtle` and IndexedDB. The saved `keyId` must still
1614
+ * exist in IndexedDB for the same origin. Unsupported runtimes reject with
1615
+ * `ClientStateError`.
1616
+ * @param {string} saved_state
1617
+ * @returns {Promise<GrantAuthFlow>}
1618
+ */
1619
+ static resumeDelegated(saved_state) {
1620
+ const ptr0 = passStringToWasm0(saved_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1621
+ const len0 = WASM_VECTOR_LEN;
1622
+ const ret = wasm.grantauthflow_resumeDelegated(ptr0, len0);
1623
+ return ret;
1624
+ }
1594
1625
  /**
1595
1626
  * Resume a previously saved pending grant auth flow (standalone).
1596
1627
  * Prefer `pubky.resumeGrantAuthFlow()` to reuse a facade client.
@@ -1612,22 +1643,6 @@ class GrantAuthFlow {
1612
1643
  }
1613
1644
  return GrantAuthFlow.__wrap(ret[0]);
1614
1645
  }
1615
- /**
1616
- * Resume a previously saved pending delegated grant auth flow.
1617
- *
1618
- * Runtime: delegated grant keys require a secure browser context with
1619
- * WebCrypto `crypto.subtle` and IndexedDB. The saved `keyId` must still
1620
- * exist in IndexedDB for the same origin. Unsupported runtimes reject with
1621
- * `ClientStateError`.
1622
- * @param {string} saved_state
1623
- * @returns {Promise<GrantAuthFlow>}
1624
- */
1625
- static resumeDelegated(saved_state) {
1626
- const ptr0 = passStringToWasm0(saved_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1627
- const len0 = WASM_VECTOR_LEN;
1628
- const ret = wasm.grantauthflow_resumeDelegated(ptr0, len0);
1629
- return ret;
1630
- }
1631
1646
  /**
1632
1647
  * Save sensitive state required to resume this delegated pending grant flow.
1633
1648
  *
@@ -1679,6 +1694,28 @@ class GrantAuthFlow {
1679
1694
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1680
1695
  }
1681
1696
  }
1697
+ /**
1698
+ * Start a browser delegated grant-backed flow.
1699
+ *
1700
+ * The SDK creates a fresh non-extractable WebCrypto Ed25519 key in
1701
+ * IndexedDB and uses that key for grant Proof-of-Possession signing.
1702
+ *
1703
+ * Runtime: delegated grant keys require a secure browser context with
1704
+ * WebCrypto `crypto.subtle` and IndexedDB. Unsupported runtimes reject
1705
+ * with `ClientStateError`.
1706
+ * @param {Capabilities} capabilities
1707
+ * @param {AuthFlowKind} kind
1708
+ * @param {GrantAuthFlowOptions} options
1709
+ * @returns {Promise<GrantAuthFlow>}
1710
+ */
1711
+ static startDelegated(capabilities, kind, options) {
1712
+ const ptr0 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1713
+ const len0 = WASM_VECTOR_LEN;
1714
+ _assertClass(kind, AuthFlowKind);
1715
+ var ptr1 = kind.__destroy_into_raw();
1716
+ const ret = wasm.grantauthflow_startDelegated(ptr0, len0, ptr1, options);
1717
+ return ret;
1718
+ }
1682
1719
  /**
1683
1720
  * Start a grant-backed flow with a new DHT client.
1684
1721
  * Prefer `pubky.startGrantAuthFlow()` to reuse a facade DHT client.
@@ -1712,28 +1749,6 @@ class GrantAuthFlow {
1712
1749
  }
1713
1750
  return GrantAuthFlow.__wrap(ret[0]);
1714
1751
  }
1715
- /**
1716
- * Start a browser delegated grant-backed flow.
1717
- *
1718
- * The SDK creates a fresh non-extractable WebCrypto Ed25519 key in
1719
- * IndexedDB and uses that key for grant Proof-of-Possession signing.
1720
- *
1721
- * Runtime: delegated grant keys require a secure browser context with
1722
- * WebCrypto `crypto.subtle` and IndexedDB. Unsupported runtimes reject
1723
- * with `ClientStateError`.
1724
- * @param {Capabilities} capabilities
1725
- * @param {AuthFlowKind} kind
1726
- * @param {GrantAuthFlowOptions} options
1727
- * @returns {Promise<GrantAuthFlow>}
1728
- */
1729
- static startDelegated(capabilities, kind, options) {
1730
- const ptr0 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1731
- const len0 = WASM_VECTOR_LEN;
1732
- _assertClass(kind, AuthFlowKind);
1733
- var ptr1 = kind.__destroy_into_raw();
1734
- const ret = wasm.grantauthflow_startDelegated(ptr0, len0, ptr1, options);
1735
- return ret;
1736
- }
1737
1752
  /**
1738
1753
  * Non-blocking single poll step (advanced UIs).
1739
1754
  *
@@ -1753,7 +1768,6 @@ exports.GrantAuthFlow = GrantAuthFlow;
1753
1768
  */
1754
1769
  class GrantInfo {
1755
1770
  static __wrap(ptr) {
1756
- ptr = ptr >>> 0;
1757
1771
  const obj = Object.create(GrantInfo.prototype);
1758
1772
  obj.__wbg_ptr = ptr;
1759
1773
  GrantInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1874,7 +1888,7 @@ class GrantManager {
1874
1888
  constructor(session) {
1875
1889
  _assertClass(session, Session);
1876
1890
  const ret = wasm.grantmanager_new(session.__wbg_ptr);
1877
- this.__wbg_ptr = ret >>> 0;
1891
+ this.__wbg_ptr = ret;
1878
1892
  GrantManagerFinalization.register(this, this.__wbg_ptr, this);
1879
1893
  return this;
1880
1894
  }
@@ -1907,7 +1921,6 @@ exports.GrantManager = GrantManager;
1907
1921
  */
1908
1922
  class GrantSession {
1909
1923
  static __wrap(ptr) {
1910
- ptr = ptr >>> 0;
1911
1924
  const obj = Object.create(GrantSession.prototype);
1912
1925
  obj.__wbg_ptr = ptr;
1913
1926
  GrantSessionFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1965,7 +1978,6 @@ exports.GrantSession = GrantSession;
1965
1978
  */
1966
1979
  class GrantSessionInfo {
1967
1980
  static __wrap(ptr) {
1968
- ptr = ptr >>> 0;
1969
1981
  const obj = Object.create(GrantSessionInfo.prototype);
1970
1982
  obj.__wbg_ptr = ptr;
1971
1983
  GrantSessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1987,7 +1999,7 @@ class GrantSessionInfo {
1987
1999
  */
1988
2000
  get capabilities() {
1989
2001
  const ret = wasm.grantsessioninfo_capabilities(this.__wbg_ptr);
1990
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
2002
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
1991
2003
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1992
2004
  return v1;
1993
2005
  }
@@ -2114,6 +2126,52 @@ class IntoUnderlyingByteSource {
2114
2126
  if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
2115
2127
  exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
2116
2128
 
2129
+ class IntoUnderlyingByteSource2 {
2130
+ __destroy_into_raw() {
2131
+ const ptr = this.__wbg_ptr;
2132
+ this.__wbg_ptr = 0;
2133
+ IntoUnderlyingByteSource2Finalization.unregister(this);
2134
+ return ptr;
2135
+ }
2136
+ free() {
2137
+ const ptr = this.__destroy_into_raw();
2138
+ wasm.__wbg_intounderlyingbytesource2_free(ptr, 0);
2139
+ }
2140
+ /**
2141
+ * @returns {number}
2142
+ */
2143
+ get autoAllocateChunkSize() {
2144
+ const ret = wasm.intounderlyingbytesource2_autoAllocateChunkSize(this.__wbg_ptr);
2145
+ return ret >>> 0;
2146
+ }
2147
+ cancel() {
2148
+ const ptr = this.__destroy_into_raw();
2149
+ wasm.intounderlyingbytesource2_cancel(ptr);
2150
+ }
2151
+ /**
2152
+ * @param {ReadableByteStreamController} controller
2153
+ * @returns {Promise<any>}
2154
+ */
2155
+ pull(controller) {
2156
+ const ret = wasm.intounderlyingbytesource2_pull(this.__wbg_ptr, controller);
2157
+ return ret;
2158
+ }
2159
+ /**
2160
+ * @param {ReadableByteStreamController} controller
2161
+ */
2162
+ start(controller) {
2163
+ wasm.intounderlyingbytesource2_start(this.__wbg_ptr, controller);
2164
+ }
2165
+ /**
2166
+ * @returns {ReadableStreamType}
2167
+ */
2168
+ get type() {
2169
+ const ret = wasm.intounderlyingbytesource2_type(this.__wbg_ptr);
2170
+ return __wbindgen_enum_ReadableStreamType[ret];
2171
+ }
2172
+ }
2173
+ if (Symbol.dispose) IntoUnderlyingByteSource2.prototype[Symbol.dispose] = IntoUnderlyingByteSource2.prototype.free;
2174
+
2117
2175
  class IntoUnderlyingSink {
2118
2176
  __destroy_into_raw() {
2119
2177
  const ptr = this.__wbg_ptr;
@@ -2154,14 +2212,46 @@ class IntoUnderlyingSink {
2154
2212
  if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
2155
2213
  exports.IntoUnderlyingSink = IntoUnderlyingSink;
2156
2214
 
2157
- class IntoUnderlyingSource {
2158
- static __wrap(ptr) {
2159
- ptr = ptr >>> 0;
2160
- const obj = Object.create(IntoUnderlyingSource.prototype);
2161
- obj.__wbg_ptr = ptr;
2162
- IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
2163
- return obj;
2215
+ class IntoUnderlyingSink2 {
2216
+ __destroy_into_raw() {
2217
+ const ptr = this.__wbg_ptr;
2218
+ this.__wbg_ptr = 0;
2219
+ IntoUnderlyingSink2Finalization.unregister(this);
2220
+ return ptr;
2221
+ }
2222
+ free() {
2223
+ const ptr = this.__destroy_into_raw();
2224
+ wasm.__wbg_intounderlyingsink2_free(ptr, 0);
2225
+ }
2226
+ /**
2227
+ * @param {any} reason
2228
+ * @returns {Promise<any>}
2229
+ */
2230
+ abort(reason) {
2231
+ const ptr = this.__destroy_into_raw();
2232
+ const ret = wasm.intounderlyingsink2_abort(ptr, reason);
2233
+ return ret;
2234
+ }
2235
+ /**
2236
+ * @returns {Promise<any>}
2237
+ */
2238
+ close() {
2239
+ const ptr = this.__destroy_into_raw();
2240
+ const ret = wasm.intounderlyingsink2_close(ptr);
2241
+ return ret;
2164
2242
  }
2243
+ /**
2244
+ * @param {any} chunk
2245
+ * @returns {Promise<any>}
2246
+ */
2247
+ write(chunk) {
2248
+ const ret = wasm.intounderlyingsink2_write(this.__wbg_ptr, chunk);
2249
+ return ret;
2250
+ }
2251
+ }
2252
+ if (Symbol.dispose) IntoUnderlyingSink2.prototype[Symbol.dispose] = IntoUnderlyingSink2.prototype.free;
2253
+
2254
+ class IntoUnderlyingSource {
2165
2255
  __destroy_into_raw() {
2166
2256
  const ptr = this.__wbg_ptr;
2167
2257
  this.__wbg_ptr = 0;
@@ -2188,9 +2278,40 @@ class IntoUnderlyingSource {
2188
2278
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
2189
2279
  exports.IntoUnderlyingSource = IntoUnderlyingSource;
2190
2280
 
2281
+ class IntoUnderlyingSource2 {
2282
+ static __wrap(ptr) {
2283
+ const obj = Object.create(IntoUnderlyingSource2.prototype);
2284
+ obj.__wbg_ptr = ptr;
2285
+ IntoUnderlyingSource2Finalization.register(obj, obj.__wbg_ptr, obj);
2286
+ return obj;
2287
+ }
2288
+ __destroy_into_raw() {
2289
+ const ptr = this.__wbg_ptr;
2290
+ this.__wbg_ptr = 0;
2291
+ IntoUnderlyingSource2Finalization.unregister(this);
2292
+ return ptr;
2293
+ }
2294
+ free() {
2295
+ const ptr = this.__destroy_into_raw();
2296
+ wasm.__wbg_intounderlyingsource2_free(ptr, 0);
2297
+ }
2298
+ cancel() {
2299
+ const ptr = this.__destroy_into_raw();
2300
+ wasm.intounderlyingsource2_cancel(ptr);
2301
+ }
2302
+ /**
2303
+ * @param {ReadableStreamDefaultController} controller
2304
+ * @returns {Promise<any>}
2305
+ */
2306
+ pull(controller) {
2307
+ const ret = wasm.intounderlyingsource2_pull(this.__wbg_ptr, controller);
2308
+ return ret;
2309
+ }
2310
+ }
2311
+ if (Symbol.dispose) IntoUnderlyingSource2.prototype[Symbol.dispose] = IntoUnderlyingSource2.prototype.free;
2312
+
2191
2313
  class Keypair {
2192
2314
  static __wrap(ptr) {
2193
- ptr = ptr >>> 0;
2194
2315
  const obj = Object.create(Keypair.prototype);
2195
2316
  obj.__wbg_ptr = ptr;
2196
2317
  KeypairFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2288,7 +2409,6 @@ exports.Keypair = Keypair;
2288
2409
  */
2289
2410
  class Pkdns {
2290
2411
  static __wrap(ptr) {
2291
- ptr = ptr >>> 0;
2292
2412
  const obj = Object.create(Pkdns.prototype);
2293
2413
  obj.__wbg_ptr = ptr;
2294
2414
  PkdnsFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2317,18 +2437,6 @@ class Pkdns {
2317
2437
  }
2318
2438
  return Pkdns.__wrap(ret[0]);
2319
2439
  }
2320
- /**
2321
- * Resolve the homeserver for **this** user (requires keypair).
2322
- *
2323
- * @returns {Promise<PublicKey|undefined>} Homeserver public key or `undefined` if not found.
2324
- * @throws When no keypair is attached, Pkarr resolution fails, or a resolved `_pubky` target
2325
- * is malformed.
2326
- * @returns {Promise<PublicKey | undefined>}
2327
- */
2328
- getHomeserver() {
2329
- const ret = wasm.pkdns_getHomeserver(this.__wbg_ptr);
2330
- return ret;
2331
- }
2332
2440
  /**
2333
2441
  * Resolve the homeserver for a given public key (read-only).
2334
2442
  *
@@ -2344,6 +2452,18 @@ class Pkdns {
2344
2452
  const ret = wasm.pkdns_getHomeserverOf(this.__wbg_ptr, pubky.__wbg_ptr);
2345
2453
  return ret;
2346
2454
  }
2455
+ /**
2456
+ * Resolve the homeserver for **this** user (requires keypair).
2457
+ *
2458
+ * @returns {Promise<PublicKey|undefined>} Homeserver public key or `undefined` if not found.
2459
+ * @throws When no keypair is attached, Pkarr resolution fails, or a resolved `_pubky` target
2460
+ * is malformed.
2461
+ * @returns {Promise<PublicKey | undefined>}
2462
+ */
2463
+ getHomeserver() {
2464
+ const ret = wasm.pkdns_getHomeserver(this.__wbg_ptr);
2465
+ return ret;
2466
+ }
2347
2467
  /**
2348
2468
  * Read-only PKDNS actor (no keypair; resolve only).
2349
2469
  */
@@ -2352,7 +2472,7 @@ class Pkdns {
2352
2472
  if (ret[2]) {
2353
2473
  throw takeFromExternrefTable0(ret[1]);
2354
2474
  }
2355
- this.__wbg_ptr = ret[0] >>> 0;
2475
+ this.__wbg_ptr = ret[0];
2356
2476
  PkdnsFinalization.register(this, this.__wbg_ptr, this);
2357
2477
  return this;
2358
2478
  }
@@ -2403,7 +2523,6 @@ exports.Pkdns = Pkdns;
2403
2523
  */
2404
2524
  class Pubky {
2405
2525
  static __wrap(ptr) {
2406
- ptr = ptr >>> 0;
2407
2526
  const obj = Object.create(Pubky.prototype);
2408
2527
  obj.__wbg_ptr = ptr;
2409
2528
  PubkyFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2446,19 +2565,19 @@ class Pubky {
2446
2565
  return Client.__wrap(ret);
2447
2566
  }
2448
2567
  /**
2449
- * Create an event stream builder for a specific homeserver.
2568
+ * Create an event stream builder for a single user.
2450
2569
  *
2451
- * Use this when you already know the homeserver pubkey. This avoids
2452
- * Pkarr resolution overhead. Obtain a homeserver pubkey via `getHomeserverOf()`.
2570
+ * This is the simplest way to subscribe to events for one user. The homeserver
2571
+ * is automatically resolved from the user's Pkarr record.
2453
2572
  *
2454
- * @param {PublicKey} homeserver - The homeserver public key
2573
+ * @param {PublicKey} user - The user's public key
2574
+ * @param {string | null} cursor - Optional cursor position to start from
2455
2575
  * @returns {EventStreamBuilder} - Builder for configuring and subscribing to the stream
2456
2576
  *
2457
2577
  * @example
2458
2578
  * ```typescript
2459
- * const homeserver = await pubky.getHomeserverOf(user1);
2460
- * const stream = await pubky.eventStreamFor(homeserver)
2461
- * .addUsers([[user1.z32(), null], [user2.z32(), null]])
2579
+ * const user = PublicKey.from("o1gg96ewuojmopcjbz8895478wdtxtzzuxnfjjz8o8e77csa1ngo");
2580
+ * const stream = await pubky.eventStreamForUser(user, null)
2462
2581
  * .live()
2463
2582
  * .subscribe();
2464
2583
  *
@@ -2466,28 +2585,34 @@ class Pubky {
2466
2585
  * console.log(`${event.eventType}: ${event.resource.path}`);
2467
2586
  * }
2468
2587
  * ```
2469
- * @param {PublicKey} homeserver
2588
+ * @param {PublicKey} user
2589
+ * @param {string | null} [cursor]
2470
2590
  * @returns {EventStreamBuilder}
2471
2591
  */
2472
- eventStreamFor(homeserver) {
2473
- _assertClass(homeserver, PublicKey);
2474
- const ret = wasm.pubky_eventStreamFor(this.__wbg_ptr, homeserver.__wbg_ptr);
2475
- return EventStreamBuilder.__wrap(ret);
2592
+ eventStreamForUser(user, cursor) {
2593
+ _assertClass(user, PublicKey);
2594
+ var ptr0 = isLikeNone(cursor) ? 0 : passStringToWasm0(cursor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2595
+ var len0 = WASM_VECTOR_LEN;
2596
+ const ret = wasm.pubky_eventStreamForUser(this.__wbg_ptr, user.__wbg_ptr, ptr0, len0);
2597
+ if (ret[2]) {
2598
+ throw takeFromExternrefTable0(ret[1]);
2599
+ }
2600
+ return EventStreamBuilder.__wrap(ret[0]);
2476
2601
  }
2477
2602
  /**
2478
- * Create an event stream builder for a single user.
2603
+ * Create an event stream builder for a specific homeserver.
2479
2604
  *
2480
- * This is the simplest way to subscribe to events for one user. The homeserver
2481
- * is automatically resolved from the user's Pkarr record.
2605
+ * Use this when you already know the homeserver pubkey. This avoids
2606
+ * Pkarr resolution overhead. Obtain a homeserver pubkey via `getHomeserverOf()`.
2482
2607
  *
2483
- * @param {PublicKey} user - The user's public key
2484
- * @param {string | null} cursor - Optional cursor position to start from
2608
+ * @param {PublicKey} homeserver - The homeserver public key
2485
2609
  * @returns {EventStreamBuilder} - Builder for configuring and subscribing to the stream
2486
2610
  *
2487
2611
  * @example
2488
2612
  * ```typescript
2489
- * const user = PublicKey.from("o1gg96ewuojmopcjbz8895478wdtxtzzuxnfjjz8o8e77csa1ngo");
2490
- * const stream = await pubky.eventStreamForUser(user, null)
2613
+ * const homeserver = await pubky.getHomeserverOf(user1);
2614
+ * const stream = await pubky.eventStreamFor(homeserver)
2615
+ * .addUsers([[user1.z32(), null], [user2.z32(), null]])
2491
2616
  * .live()
2492
2617
  * .subscribe();
2493
2618
  *
@@ -2495,19 +2620,13 @@ class Pubky {
2495
2620
  * console.log(`${event.eventType}: ${event.resource.path}`);
2496
2621
  * }
2497
2622
  * ```
2498
- * @param {PublicKey} user
2499
- * @param {string | null} [cursor]
2623
+ * @param {PublicKey} homeserver
2500
2624
  * @returns {EventStreamBuilder}
2501
2625
  */
2502
- eventStreamForUser(user, cursor) {
2503
- _assertClass(user, PublicKey);
2504
- var ptr0 = isLikeNone(cursor) ? 0 : passStringToWasm0(cursor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2505
- var len0 = WASM_VECTOR_LEN;
2506
- const ret = wasm.pubky_eventStreamForUser(this.__wbg_ptr, user.__wbg_ptr, ptr0, len0);
2507
- if (ret[2]) {
2508
- throw takeFromExternrefTable0(ret[1]);
2509
- }
2510
- return EventStreamBuilder.__wrap(ret[0]);
2626
+ eventStreamFor(homeserver) {
2627
+ _assertClass(homeserver, PublicKey);
2628
+ const ret = wasm.pubky_eventStreamFor(this.__wbg_ptr, homeserver.__wbg_ptr);
2629
+ return EventStreamBuilder.__wrap(ret);
2511
2630
  }
2512
2631
  /**
2513
2632
  * Resolve the homeserver for a given public key (read-only).
@@ -2545,7 +2664,7 @@ class Pubky {
2545
2664
  if (ret[2]) {
2546
2665
  throw takeFromExternrefTable0(ret[1]);
2547
2666
  }
2548
- this.__wbg_ptr = ret[0] >>> 0;
2667
+ this.__wbg_ptr = ret[0];
2549
2668
  PubkyFinalization.register(this, this.__wbg_ptr, this);
2550
2669
  return this;
2551
2670
  }
@@ -2840,7 +2959,6 @@ exports.Pubky = Pubky;
2840
2959
  */
2841
2960
  class PubkyResource {
2842
2961
  static __wrap(ptr) {
2843
- ptr = ptr >>> 0;
2844
2962
  const obj = Object.create(PubkyResource.prototype);
2845
2963
  obj.__wbg_ptr = ptr;
2846
2964
  PubkyResourceFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2940,7 +3058,6 @@ exports.PubkyResource = PubkyResource;
2940
3058
 
2941
3059
  class PublicKey {
2942
3060
  static __wrap(ptr) {
2943
- ptr = ptr >>> 0;
2944
3061
  const obj = Object.create(PublicKey.prototype);
2945
3062
  obj.__wbg_ptr = ptr;
2946
3063
  PublicKeyFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3020,7 +3137,6 @@ exports.PublicKey = PublicKey;
3020
3137
  */
3021
3138
  class PublicStorage {
3022
3139
  static __wrap(ptr) {
3023
- ptr = ptr >>> 0;
3024
3140
  const obj = Object.create(PublicStorage.prototype);
3025
3141
  obj.__wbg_ptr = ptr;
3026
3142
  PublicStorageFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3050,20 +3166,6 @@ class PublicStorage {
3050
3166
  const ret = wasm.publicstorage_exists(this.__wbg_ptr, ptr0, len0);
3051
3167
  return ret;
3052
3168
  }
3053
- /**
3054
- * Perform a streaming `GET` and expose the raw `Response` object.
3055
- *
3056
- * @param {Address} address
3057
- * @returns {Promise<Response>}
3058
- * @param {Address} address
3059
- * @returns {Promise<Response>}
3060
- */
3061
- get(address) {
3062
- const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3063
- const len0 = WASM_VECTOR_LEN;
3064
- const ret = wasm.publicstorage_get(this.__wbg_ptr, ptr0, len0);
3065
- return ret;
3066
- }
3067
3169
  /**
3068
3170
  * Fetch bytes from an addressed path.
3069
3171
  *
@@ -3106,6 +3208,20 @@ class PublicStorage {
3106
3208
  const ret = wasm.publicstorage_getText(this.__wbg_ptr, ptr0, len0);
3107
3209
  return ret;
3108
3210
  }
3211
+ /**
3212
+ * Perform a streaming `GET` and expose the raw `Response` object.
3213
+ *
3214
+ * @param {Address} address
3215
+ * @returns {Promise<Response>}
3216
+ * @param {Address} address
3217
+ * @returns {Promise<Response>}
3218
+ */
3219
+ get(address) {
3220
+ const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3221
+ const len0 = WASM_VECTOR_LEN;
3222
+ const ret = wasm.publicstorage_get(this.__wbg_ptr, ptr0, len0);
3223
+ return ret;
3224
+ }
3109
3225
  /**
3110
3226
  * List a directory. Results are `pubky://…` identifier URLs.
3111
3227
  *
@@ -3138,7 +3254,7 @@ class PublicStorage {
3138
3254
  if (ret[2]) {
3139
3255
  throw takeFromExternrefTable0(ret[1]);
3140
3256
  }
3141
- this.__wbg_ptr = ret[0] >>> 0;
3257
+ this.__wbg_ptr = ret[0];
3142
3258
  PublicStorageFinalization.register(this, this.__wbg_ptr, this);
3143
3259
  return this;
3144
3260
  }
@@ -3163,7 +3279,6 @@ exports.PublicStorage = PublicStorage;
3163
3279
 
3164
3280
  class SeedExportDeepLink {
3165
3281
  static __wrap(ptr) {
3166
- ptr = ptr >>> 0;
3167
3282
  const obj = Object.create(SeedExportDeepLink.prototype);
3168
3283
  obj.__wbg_ptr = ptr;
3169
3284
  SeedExportDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3236,7 +3351,6 @@ exports.SeedExportDeepLink = SeedExportDeepLink;
3236
3351
  */
3237
3352
  class Session {
3238
3353
  static __wrap(ptr) {
3239
- ptr = ptr >>> 0;
3240
3354
  const obj = Object.create(Session.prototype);
3241
3355
  obj.__wbg_ptr = ptr;
3242
3356
  SessionFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3265,6 +3379,25 @@ class Session {
3265
3379
  const ret = wasm.session_cookie(this.__wbg_ptr);
3266
3380
  return ret === 0 ? undefined : CookieSession.__wrap(ret);
3267
3381
  }
3382
+ /**
3383
+ * Export the local secret material needed to restore this session.
3384
+ *
3385
+ * For local grant sessions this exports the grant JWS and PoP client secret;
3386
+ * restoring mints a fresh bearer. For legacy cookie sessions this exports the
3387
+ * cookie secret when the SDK owns it. Delegated browser grant sessions cannot
3388
+ * export raw secret material; use `BrowserSessionStore`.
3389
+ *
3390
+ * Treat the returned string as a bearer-equivalent secret until the grant or
3391
+ * cookie session expires or is revoked.
3392
+ *
3393
+ * @returns {Promise<string>}
3394
+ * A secret token that can be passed to `pubky.restoreSession()`.
3395
+ * @returns {Promise<string>}
3396
+ */
3397
+ exportLocalSecret() {
3398
+ const ret = wasm.session_exportLocalSecret(this.__wbg_ptr);
3399
+ return ret;
3400
+ }
3268
3401
  /**
3269
3402
  * Export the session metadata so it can be restored after a tab refresh.
3270
3403
  *
@@ -3289,25 +3422,6 @@ class Session {
3289
3422
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3290
3423
  }
3291
3424
  }
3292
- /**
3293
- * Export the local secret material needed to restore this session.
3294
- *
3295
- * For local grant sessions this exports the grant JWS and PoP client secret;
3296
- * restoring mints a fresh bearer. For legacy cookie sessions this exports the
3297
- * cookie secret when the SDK owns it. Delegated browser grant sessions cannot
3298
- * export raw secret material; use `BrowserSessionStore`.
3299
- *
3300
- * Treat the returned string as a bearer-equivalent secret until the grant or
3301
- * cookie session expires or is revoked.
3302
- *
3303
- * @returns {Promise<string>}
3304
- * A secret token that can be passed to `pubky.restoreSession()`.
3305
- * @returns {Promise<string>}
3306
- */
3307
- exportLocalSecret() {
3308
- const ret = wasm.session_exportLocalSecret(this.__wbg_ptr);
3309
- return ret;
3310
- }
3311
3425
  /**
3312
3426
  * Grant-only management view for grant-backed sessions.
3313
3427
  *
@@ -3388,7 +3502,6 @@ exports.Session = Session;
3388
3502
  */
3389
3503
  class SessionInfo {
3390
3504
  static __wrap(ptr) {
3391
- ptr = ptr >>> 0;
3392
3505
  const obj = Object.create(SessionInfo.prototype);
3393
3506
  obj.__wbg_ptr = ptr;
3394
3507
  SessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3412,7 +3525,7 @@ class SessionInfo {
3412
3525
  */
3413
3526
  get capabilities() {
3414
3527
  const ret = wasm.sessioninfo_capabilities(this.__wbg_ptr);
3415
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
3528
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
3416
3529
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
3417
3530
  return v1;
3418
3531
  }
@@ -3438,10 +3551,19 @@ exports.SessionInfo = SessionInfo;
3438
3551
 
3439
3552
  /**
3440
3553
  * Read/write storage scoped to **your** session (absolute paths: `/pub/...` or `/priv/...`).
3554
+ *
3555
+ * Failures reject with a {@link PubkyError}. Path validation, transport, and HTTP
3556
+ * failures use `RequestError`; only HTTP errors include `data.statusCode`.
3557
+ * URL parsing failures use `InvalidInput`. Credential preparation, refresh,
3558
+ * and reading response bodies can also fail.
3559
+ *
3560
+ * Only {@link SessionStorage.exists} and {@link SessionStorage.stats} treat
3561
+ * HTTP 404/410 as missing. Other HTTP failures, including 401/403 and 5xx, reject.
3562
+ * Writes require write permission and can fail on directory targets (400),
3563
+ * file/directory path conflicts (409), or exceeded quotas (507).
3441
3564
  */
3442
3565
  class SessionStorage {
3443
3566
  static __wrap(ptr) {
3444
- ptr = ptr >>> 0;
3445
3567
  const obj = Object.create(SessionStorage.prototype);
3446
3568
  obj.__wbg_ptr = ptr;
3447
3569
  SessionStorageFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3458,10 +3580,12 @@ class SessionStorage {
3458
3580
  wasm.__wbg_sessionstorage_free(ptr, 0);
3459
3581
  }
3460
3582
  /**
3461
- * Delete a path (file or empty directory).
3583
+ * Delete a file. Directory targets are unsupported.
3462
3584
  *
3463
- * @param {Path} path
3585
+ * @param {Path} path File path; must not end with `/`.
3464
3586
  * @returns {Promise<void>}
3587
+ * @throws {PubkyError} Missing file (404), directory target (400), or shared errors
3588
+ * (see {@link SessionStorage}).
3465
3589
  * @param {Path} path
3466
3590
  * @returns {Promise<void>}
3467
3591
  */
@@ -3472,10 +3596,11 @@ class SessionStorage {
3472
3596
  return ret;
3473
3597
  }
3474
3598
  /**
3475
- * Check existence.
3599
+ * Check existence with a HEAD request.
3476
3600
  *
3477
3601
  * @param {Path} path
3478
- * @returns {Promise<boolean>}
3602
+ * @returns {Promise<boolean>} `true` on success; `false` for HTTP 404/410.
3603
+ * @throws {PubkyError} All other failures (see {@link SessionStorage}).
3479
3604
  * @param {Path} path
3480
3605
  * @returns {Promise<boolean>}
3481
3606
  */
@@ -3485,25 +3610,12 @@ class SessionStorage {
3485
3610
  const ret = wasm.sessionstorage_exists(this.__wbg_ptr, ptr0, len0);
3486
3611
  return ret;
3487
3612
  }
3488
- /**
3489
- * GET a streaming response for an absolute session path.
3490
- *
3491
- * @param {Path} path
3492
- * @returns {Promise<Response>}
3493
- * @param {Path} path
3494
- * @returns {Promise<Response>}
3495
- */
3496
- get(path) {
3497
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3498
- const len0 = WASM_VECTOR_LEN;
3499
- const ret = wasm.sessionstorage_get(this.__wbg_ptr, ptr0, len0);
3500
- return ret;
3501
- }
3502
3613
  /**
3503
3614
  * GET bytes from an absolute session path.
3504
3615
  *
3505
3616
  * @param {Path} path
3506
- * @returns {Promise<Uint8Array>}
3617
+ * @returns {Promise<Uint8Array>} The complete response body.
3618
+ * @throws {PubkyError} Missing resource (404/410) or shared errors (see {@link SessionStorage}).
3507
3619
  * @param {Path} path
3508
3620
  * @returns {Promise<Uint8Array>}
3509
3621
  */
@@ -3517,7 +3629,9 @@ class SessionStorage {
3517
3629
  * GET JSON from an absolute session path.
3518
3630
  *
3519
3631
  * @param {Path} path
3520
- * @returns {Promise<any>}
3632
+ * @returns {Promise<any>} The parsed JSON value.
3633
+ * @throws {PubkyError} Missing resource (404/410), JSON parsing/conversion failures,
3634
+ * or shared errors (see {@link SessionStorage}).
3521
3635
  * @param {Path} path
3522
3636
  * @returns {Promise<any>}
3523
3637
  */
@@ -3531,7 +3645,8 @@ class SessionStorage {
3531
3645
  * GET text from an absolute session path.
3532
3646
  *
3533
3647
  * @param {Path} path
3534
- * @returns {Promise<string>}
3648
+ * @returns {Promise<string>} The complete response body decoded as text.
3649
+ * @throws {PubkyError} Missing resource (404/410) or shared errors (see {@link SessionStorage}).
3535
3650
  * @param {Path} path
3536
3651
  * @returns {Promise<string>}
3537
3652
  */
@@ -3542,14 +3657,34 @@ class SessionStorage {
3542
3657
  return ret;
3543
3658
  }
3544
3659
  /**
3545
- * List a directory (absolute session path). Returns `pubky://…` URLs.
3660
+ * GET a streaming response for an absolute session path.
3661
+ *
3662
+ * Reading the returned response body can still fail after this resolves.
3663
+ *
3664
+ * @param {Path} path
3665
+ * @returns {Promise<Response>} A successful response with an unread body.
3666
+ * @throws {PubkyError} Missing resource (404/410) or other request/response errors.
3667
+ * See {@link SessionStorage} for shared errors.
3668
+ * @param {Path} path
3669
+ * @returns {Promise<Response>}
3670
+ */
3671
+ get(path) {
3672
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3673
+ const len0 = WASM_VECTOR_LEN;
3674
+ const ret = wasm.sessionstorage_get(this.__wbg_ptr, ptr0, len0);
3675
+ return ret;
3676
+ }
3677
+ /**
3678
+ * List a directory (absolute session path).
3546
3679
  *
3547
3680
  * @param {Path} path Must end with `/`.
3548
- * @param {string|null=} cursor Optional suffix or full URL to start **after**.
3681
+ * @param {string|null=} cursor Optional last entry URL to start **after**.
3549
3682
  * @param {boolean=} reverse Default `false`.
3550
3683
  * @param {number=} limit Optional result limit.
3551
3684
  * @param {boolean=} shallow Default `false`.
3552
- * @returns {Promise<string[]>}
3685
+ * @returns {Promise<string[]>} `pubky://…` entry URLs, or an empty array for an empty page.
3686
+ * @throws {PubkyError} Missing directory (404), invalid cursor (400), invalid response
3687
+ * entries, or shared errors (see {@link SessionStorage}).
3553
3688
  * @param {Path} path
3554
3689
  * @param {string | null} [cursor]
3555
3690
  * @param {boolean | null} [reverse]
@@ -3566,11 +3701,12 @@ class SessionStorage {
3566
3701
  return ret;
3567
3702
  }
3568
3703
  /**
3569
- * PUT binary at an absolute session path.
3704
+ * Create or replace a file with binary data at an absolute session path.
3570
3705
  *
3571
- * @param {Path} path
3572
- * @param {Uint8Array} bytes
3706
+ * @param {Path} path File path; must not end with `/`.
3707
+ * @param {Uint8Array} body
3573
3708
  * @returns {Promise<void>}
3709
+ * @throws {PubkyError} Upload or shared write/request errors (see {@link SessionStorage}).
3574
3710
  * @param {Path} path
3575
3711
  * @param {Uint8Array} body
3576
3712
  * @returns {Promise<void>}
@@ -3584,11 +3720,13 @@ class SessionStorage {
3584
3720
  return ret;
3585
3721
  }
3586
3722
  /**
3587
- * PUT JSON at an absolute session path.
3723
+ * Create or replace a file with JSON at an absolute session path.
3588
3724
  *
3589
- * @param {Path} path Absolute path (e.g. `"/pub/app/data.json"`).
3590
- * @param {any} value JSON-serializable value.
3725
+ * @param {Path} path File path (e.g. `"/pub/app/data.json"`); must not end with `/`.
3726
+ * @param {any} body JSON-serializable value.
3591
3727
  * @returns {Promise<void>}
3728
+ * @throws {PubkyError} `InvalidInput` if `body` cannot be converted to JSON;
3729
+ * otherwise serialization, upload, or shared write/request errors (see {@link SessionStorage}).
3592
3730
  * @param {Path} path
3593
3731
  * @param {any} body
3594
3732
  * @returns {Promise<void>}
@@ -3600,11 +3738,12 @@ class SessionStorage {
3600
3738
  return ret;
3601
3739
  }
3602
3740
  /**
3603
- * PUT text at an absolute session path.
3741
+ * Create or replace a file with text at an absolute session path.
3604
3742
  *
3605
- * @param {Path} path
3606
- * @param {string} text
3743
+ * @param {Path} path File path; must not end with `/`.
3744
+ * @param {string} body
3607
3745
  * @returns {Promise<void>}
3746
+ * @throws {PubkyError} Upload or shared write/request errors (see {@link SessionStorage}).
3608
3747
  * @param {Path} path
3609
3748
  * @param {string} body
3610
3749
  * @returns {Promise<void>}
@@ -3620,9 +3759,11 @@ class SessionStorage {
3620
3759
  /**
3621
3760
  * Get metadata for an absolute, session-scoped path (e.g. `"/pub/app/file.json"`).
3622
3761
  *
3762
+ * On success, missing or unparseable metadata headers leave their properties absent.
3763
+ *
3623
3764
  * @param {Path} path Absolute path under your user (starts with `/`).
3624
- * @returns {Promise<ResourceStats|undefined>} `undefined` if the resource does not exist.
3625
- * @throws {PubkyError} On invalid input or transport/server errors.
3765
+ * @returns {Promise<ResourceStats|undefined>} Metadata on success; `undefined` for HTTP 404/410.
3766
+ * @throws {PubkyError} All other failures (see {@link SessionStorage}).
3626
3767
  * @param {Path} path
3627
3768
  * @returns {Promise<ResourceStats | undefined>}
3628
3769
  */
@@ -3645,7 +3786,6 @@ exports.SessionStorage = SessionStorage;
3645
3786
  */
3646
3787
  class Signer {
3647
3788
  static __wrap(ptr) {
3648
- ptr = ptr >>> 0;
3649
3789
  const obj = Object.create(Signer.prototype);
3650
3790
  obj.__wbg_ptr = ptr;
3651
3791
  SignerFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3726,39 +3866,30 @@ class Signer {
3726
3866
  return PublicKey.__wrap(ret);
3727
3867
  }
3728
3868
  /**
3729
- * Fast sign-in for a returning user. Publishes PKDNS in the background.
3869
+ * Blocking sign-in. Waits for PKDNS publish to complete (slower; safer).
3730
3870
  *
3731
3871
  * Creates a valid grant-backed homeserver Session with root capabilities.
3732
3872
  * `clientId` is shown in the user's grant/session list.
3733
3873
  * @param {string} clientId App identifier, typically a domain.
3734
3874
  *
3735
3875
  * @returns {Promise<Session>}
3736
- *
3737
- * @throws {PubkyError}
3738
3876
  * @param {string} client_id
3739
3877
  * @returns {Promise<Session>}
3740
3878
  */
3741
- signin(client_id) {
3879
+ signinBlocking(client_id) {
3742
3880
  const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3743
3881
  const len0 = WASM_VECTOR_LEN;
3744
- const ret = wasm.signer_signin(this.__wbg_ptr, ptr0, len0);
3882
+ const ret = wasm.signer_signinBlocking(this.__wbg_ptr, ptr0, len0);
3745
3883
  return ret;
3746
3884
  }
3747
3885
  /**
3748
- * Blocking sign-in. Waits for PKDNS publish to complete (slower; safer).
3749
- *
3750
- * Creates a valid grant-backed homeserver Session with root capabilities.
3751
- * `clientId` is shown in the user's grant/session list.
3752
- * @param {string} clientId App identifier, typically a domain.
3886
+ * Legacy cookie blocking signin. Prefer `signinBlocking(clientId)`.
3753
3887
  *
3754
- * @returns {Promise<Session>}
3755
- * @param {string} client_id
3888
+ * @deprecated Prefer `signinBlocking(clientId)`.
3756
3889
  * @returns {Promise<Session>}
3757
3890
  */
3758
- signinBlocking(client_id) {
3759
- const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3760
- const len0 = WASM_VECTOR_LEN;
3761
- const ret = wasm.signer_signinBlocking(this.__wbg_ptr, ptr0, len0);
3891
+ signinCookieBlocking() {
3892
+ const ret = wasm.signer_signinCookieBlocking(this.__wbg_ptr);
3762
3893
  return ret;
3763
3894
  }
3764
3895
  /**
@@ -3772,13 +3903,37 @@ class Signer {
3772
3903
  return ret;
3773
3904
  }
3774
3905
  /**
3775
- * Legacy cookie blocking signin. Prefer `signinBlocking(clientId)`.
3906
+ * Fast sign-in for a returning user. Publishes PKDNS in the background.
3776
3907
  *
3777
- * @deprecated Prefer `signinBlocking(clientId)`.
3908
+ * Creates a valid grant-backed homeserver Session with root capabilities.
3909
+ * `clientId` is shown in the user's grant/session list.
3910
+ * @param {string} clientId App identifier, typically a domain.
3911
+ *
3912
+ * @returns {Promise<Session>}
3913
+ *
3914
+ * @throws {PubkyError}
3915
+ * @param {string} client_id
3778
3916
  * @returns {Promise<Session>}
3779
3917
  */
3780
- signinCookieBlocking() {
3781
- const ret = wasm.signer_signinCookieBlocking(this.__wbg_ptr);
3918
+ signin(client_id) {
3919
+ const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3920
+ const len0 = WASM_VECTOR_LEN;
3921
+ const ret = wasm.signer_signin(this.__wbg_ptr, ptr0, len0);
3922
+ return ret;
3923
+ }
3924
+ /**
3925
+ * Legacy cookie signup. Prefer `signup()` plus `signin(clientId)`.
3926
+ *
3927
+ * @deprecated Prefer `signup()` followed by `signin(clientId)`.
3928
+ * @param {PublicKey} homeserver
3929
+ * @param {string | null} [signup_token]
3930
+ * @returns {Promise<Session>}
3931
+ */
3932
+ signupCookie(homeserver, signup_token) {
3933
+ _assertClass(homeserver, PublicKey);
3934
+ var ptr0 = isLikeNone(signup_token) ? 0 : passStringToWasm0(signup_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3935
+ var len0 = WASM_VECTOR_LEN;
3936
+ const ret = wasm.signer_signupCookie(this.__wbg_ptr, homeserver.__wbg_ptr, ptr0, len0);
3782
3937
  return ret;
3783
3938
  }
3784
3939
  /**
@@ -3804,28 +3959,12 @@ class Signer {
3804
3959
  const ret = wasm.signer_signup(this.__wbg_ptr, homeserver.__wbg_ptr, ptr0, len0);
3805
3960
  return ret;
3806
3961
  }
3807
- /**
3808
- * Legacy cookie signup. Prefer `signup()` plus `signin(clientId)`.
3809
- *
3810
- * @deprecated Prefer `signup()` followed by `signin(clientId)`.
3811
- * @param {PublicKey} homeserver
3812
- * @param {string | null} [signup_token]
3813
- * @returns {Promise<Session>}
3814
- */
3815
- signupCookie(homeserver, signup_token) {
3816
- _assertClass(homeserver, PublicKey);
3817
- var ptr0 = isLikeNone(signup_token) ? 0 : passStringToWasm0(signup_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3818
- var len0 = WASM_VECTOR_LEN;
3819
- const ret = wasm.signer_signupCookie(this.__wbg_ptr, homeserver.__wbg_ptr, ptr0, len0);
3820
- return ret;
3821
- }
3822
3962
  }
3823
3963
  if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
3824
3964
  exports.Signer = Signer;
3825
3965
 
3826
3966
  class SigninDeepLink {
3827
3967
  static __wrap(ptr) {
3828
- ptr = ptr >>> 0;
3829
3968
  const obj = Object.create(SigninDeepLink.prototype);
3830
3969
  obj.__wbg_ptr = ptr;
3831
3970
  SigninDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3929,7 +4068,6 @@ exports.SigninDeepLink = SigninDeepLink;
3929
4068
  */
3930
4069
  class SigninGrantDeepLink {
3931
4070
  static __wrap(ptr) {
3932
- ptr = ptr >>> 0;
3933
4071
  const obj = Object.create(SigninGrantDeepLink.prototype);
3934
4072
  obj.__wbg_ptr = ptr;
3935
4073
  SigninGrantDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4074,7 +4212,6 @@ exports.SigninGrantDeepLink = SigninGrantDeepLink;
4074
4212
 
4075
4213
  class SignupDeepLink {
4076
4214
  static __wrap(ptr) {
4077
- ptr = ptr >>> 0;
4078
4215
  const obj = Object.create(SignupDeepLink.prototype);
4079
4216
  obj.__wbg_ptr = ptr;
4080
4217
  SignupDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4154,7 +4291,7 @@ class SignupDeepLink {
4154
4291
  const ret = wasm.signupdeeplink_signupToken(this.__wbg_ptr);
4155
4292
  let v1;
4156
4293
  if (ret[0] !== 0) {
4157
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
4294
+ v1 = getStringFromWasm0(ret[0], ret[1]);
4158
4295
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4159
4296
  }
4160
4297
  return v1;
@@ -4197,7 +4334,6 @@ exports.SignupDeepLink = SignupDeepLink;
4197
4334
  */
4198
4335
  class SignupGrantDeepLink {
4199
4336
  static __wrap(ptr) {
4200
- ptr = ptr >>> 0;
4201
4337
  const obj = Object.create(SignupGrantDeepLink.prototype);
4202
4338
  obj.__wbg_ptr = ptr;
4203
4339
  SignupGrantDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4327,7 +4463,7 @@ class SignupGrantDeepLink {
4327
4463
  const ret = wasm.signupgrantdeeplink_signupToken(this.__wbg_ptr);
4328
4464
  let v1;
4329
4465
  if (ret[0] !== 0) {
4330
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
4466
+ v1 = getStringFromWasm0(ret[0], ret[1]);
4331
4467
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4332
4468
  }
4333
4469
  return v1;
@@ -4370,7 +4506,6 @@ exports.SignupGrantDeepLink = SignupGrantDeepLink;
4370
4506
  */
4371
4507
  class StoredSessionInfo {
4372
4508
  static __wrap(ptr) {
4373
- ptr = ptr >>> 0;
4374
4509
  const obj = Object.create(StoredSessionInfo.prototype);
4375
4510
  obj.__wbg_ptr = ptr;
4376
4511
  StoredSessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4392,7 +4527,7 @@ class StoredSessionInfo {
4392
4527
  */
4393
4528
  get capabilities() {
4394
4529
  const ret = wasm.storedsessioninfo_capabilities(this.__wbg_ptr);
4395
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4530
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
4396
4531
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4397
4532
  return v1;
4398
4533
  }
@@ -4671,10 +4806,14 @@ const import7 = {
4671
4806
  function __wbg_get_imports() {
4672
4807
  const import0 = {
4673
4808
  __proto__: null,
4674
- __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
4809
+ __wbg_Error_67e7344beaa85059: function(arg0, arg1) {
4675
4810
  const ret = Error(getStringFromWasm0(arg0, arg1));
4676
4811
  return ret;
4677
4812
  },
4813
+ __wbg_Number_c54e7112a3fa7e3e: function(arg0) {
4814
+ const ret = Number(arg0);
4815
+ return ret;
4816
+ },
4678
4817
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
4679
4818
  const ret = String(arg1);
4680
4819
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -4682,7 +4821,7 @@ function __wbg_get_imports() {
4682
4821
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4683
4822
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4684
4823
  },
4685
- __wbg___pubkyGrantDelegatedSign_87e16b32eae17a22: function(arg0, arg1, arg2, arg3) {
4824
+ __wbg___pubkyGrantDelegatedSign_ecb9671d177b1233: function(arg0, arg1, arg2, arg3) {
4686
4825
  let deferred0_0;
4687
4826
  let deferred0_1;
4688
4827
  let deferred1_0;
@@ -4699,7 +4838,7 @@ function __wbg_get_imports() {
4699
4838
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
4700
4839
  }
4701
4840
  },
4702
- __wbg___pubkyGrantDeleteDelegatedKey_7d7da7cd71dce615: function(arg0, arg1) {
4841
+ __wbg___pubkyGrantDeleteDelegatedKey_0f2c0fecfd2e66cf: function(arg0, arg1) {
4703
4842
  let deferred0_0;
4704
4843
  let deferred0_1;
4705
4844
  try {
@@ -4711,16 +4850,16 @@ function __wbg_get_imports() {
4711
4850
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4712
4851
  }
4713
4852
  },
4714
- __wbg___pubkyGrantEnsureDelegatedKey_34881f231299cc4a: function(arg0, arg1) {
4853
+ __wbg___pubkyGrantEnsureDelegatedKey_41025ea43dcb2326: function(arg0, arg1) {
4715
4854
  let v0;
4716
4855
  if (arg0 !== 0) {
4717
- v0 = getStringFromWasm0(arg0, arg1).slice();
4856
+ v0 = getStringFromWasm0(arg0, arg1);
4718
4857
  wasm.__wbindgen_free(arg0, arg1 * 1, 1);
4719
4858
  }
4720
4859
  const ret = __pubkyGrantEnsureDelegatedKey(v0);
4721
4860
  return ret;
4722
4861
  },
4723
- __wbg___pubkyGrantLoadDelegatedPublicKey_16f016956b406b8c: function(arg0, arg1) {
4862
+ __wbg___pubkyGrantLoadDelegatedPublicKey_bc05e38e83a67feb: function(arg0, arg1) {
4724
4863
  let deferred0_0;
4725
4864
  let deferred0_1;
4726
4865
  try {
@@ -4732,7 +4871,7 @@ function __wbg_get_imports() {
4732
4871
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4733
4872
  }
4734
4873
  },
4735
- __wbg___pubkySessionStoreDelete_2e61bae48f1d8ad3: function(arg0, arg1) {
4874
+ __wbg___pubkySessionStoreDelete_d4689978f1155614: function(arg0, arg1) {
4736
4875
  let deferred0_0;
4737
4876
  let deferred0_1;
4738
4877
  try {
@@ -4744,7 +4883,7 @@ function __wbg_get_imports() {
4744
4883
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4745
4884
  }
4746
4885
  },
4747
- __wbg___pubkySessionStoreGet_407c7588524a0336: function(arg0, arg1) {
4886
+ __wbg___pubkySessionStoreGet_bcd46ba3e7ab2ce6: function(arg0, arg1) {
4748
4887
  let deferred0_0;
4749
4888
  let deferred0_1;
4750
4889
  try {
@@ -4756,68 +4895,68 @@ function __wbg_get_imports() {
4756
4895
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4757
4896
  }
4758
4897
  },
4759
- __wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51: function(arg0, arg1) {
4898
+ __wbg___wbindgen_bigint_get_as_i64_b482365c149396c8: function(arg0, arg1) {
4760
4899
  const v = arg1;
4761
4900
  const ret = typeof(v) === 'bigint' ? v : undefined;
4762
4901
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
4763
4902
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
4764
4903
  },
4765
- __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
4904
+ __wbg___wbindgen_boolean_get_7a12af2b3f899c5a: function(arg0) {
4766
4905
  const v = arg0;
4767
4906
  const ret = typeof(v) === 'boolean' ? v : undefined;
4768
4907
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
4769
4908
  },
4770
- __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
4909
+ __wbg___wbindgen_debug_string_0e68cf47c9cbd9b0: function(arg0, arg1) {
4771
4910
  const ret = debugString(arg1);
4772
4911
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4773
4912
  const len1 = WASM_VECTOR_LEN;
4774
4913
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4775
4914
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4776
4915
  },
4777
- __wbg___wbindgen_in_a5d8b22e52b24dd1: function(arg0, arg1) {
4916
+ __wbg___wbindgen_in_50072d4d6e45c193: function(arg0, arg1) {
4778
4917
  const ret = arg0 in arg1;
4779
4918
  return ret;
4780
4919
  },
4781
- __wbg___wbindgen_is_bigint_ec25c7f91b4d9e93: function(arg0) {
4920
+ __wbg___wbindgen_is_bigint_60fc0336cb14f5d7: function(arg0) {
4782
4921
  const ret = typeof(arg0) === 'bigint';
4783
4922
  return ret;
4784
4923
  },
4785
- __wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
4924
+ __wbg___wbindgen_is_function_fcda5e3902d732fe: function(arg0) {
4786
4925
  const ret = typeof(arg0) === 'function';
4787
4926
  return ret;
4788
4927
  },
4789
- __wbg___wbindgen_is_null_52ff4ec04186736f: function(arg0) {
4928
+ __wbg___wbindgen_is_null_5160b3e381865372: function(arg0) {
4790
4929
  const ret = arg0 === null;
4791
4930
  return ret;
4792
4931
  },
4793
- __wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
4932
+ __wbg___wbindgen_is_object_edb6b15aa3afe12e: function(arg0) {
4794
4933
  const val = arg0;
4795
4934
  const ret = typeof(val) === 'object' && val !== null;
4796
4935
  return ret;
4797
4936
  },
4798
- __wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
4937
+ __wbg___wbindgen_is_string_c4f7cb494a2a21f1: function(arg0) {
4799
4938
  const ret = typeof(arg0) === 'string';
4800
4939
  return ret;
4801
4940
  },
4802
- __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
4941
+ __wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
4803
4942
  const ret = arg0 === undefined;
4804
4943
  return ret;
4805
4944
  },
4806
- __wbg___wbindgen_jsval_eq_d3465d8a07697228: function(arg0, arg1) {
4945
+ __wbg___wbindgen_jsval_eq_9fdcd3c0a860dd3b: function(arg0, arg1) {
4807
4946
  const ret = arg0 === arg1;
4808
4947
  return ret;
4809
4948
  },
4810
- __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c: function(arg0, arg1) {
4949
+ __wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd: function(arg0, arg1) {
4811
4950
  const ret = arg0 == arg1;
4812
4951
  return ret;
4813
4952
  },
4814
- __wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
4953
+ __wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
4815
4954
  const obj = arg1;
4816
4955
  const ret = typeof(obj) === 'number' ? obj : undefined;
4817
4956
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
4818
4957
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
4819
4958
  },
4820
- __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
4959
+ __wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
4821
4960
  const obj = arg1;
4822
4961
  const ret = typeof(obj) === 'string' ? obj : undefined;
4823
4962
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -4825,22 +4964,22 @@ function __wbg_get_imports() {
4825
4964
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4826
4965
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4827
4966
  },
4828
- __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
4967
+ __wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
4829
4968
  throw new Error(getStringFromWasm0(arg0, arg1));
4830
4969
  },
4831
- __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
4970
+ __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
4832
4971
  arg0._wbg_cb_unref();
4833
4972
  },
4834
- __wbg_abort_4ce5b484434ef6fd: function(arg0) {
4835
- arg0.abort();
4836
- },
4837
- __wbg_abort_d53712380a54cc81: function(arg0, arg1) {
4973
+ __wbg_abort_03f8c5804715cb9a: function(arg0, arg1) {
4838
4974
  arg0.abort(arg1);
4839
4975
  },
4840
- __wbg_append_e8fc56ce7c00e874: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4976
+ __wbg_abort_76dea11221098ae5: function(arg0) {
4977
+ arg0.abort();
4978
+ },
4979
+ __wbg_append_8e87c13f0f08f8cd: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4841
4980
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
4842
4981
  }, arguments); },
4843
- __wbg_arrayBuffer_848c392b70c67d3d: function() { return handleError(function (arg0) {
4982
+ __wbg_arrayBuffer_06f3da76f071d37f: function() { return handleError(function (arg0) {
4844
4983
  const ret = arg0.arrayBuffer();
4845
4984
  return ret;
4846
4985
  }, arguments); },
@@ -4848,39 +4987,39 @@ function __wbg_get_imports() {
4848
4987
  const ret = AuthToken.__wrap(arg0);
4849
4988
  return ret;
4850
4989
  },
4851
- __wbg_body_0c3a51aec038a31a: function(arg0) {
4990
+ __wbg_body_9ee03724e9ad0639: function(arg0) {
4852
4991
  const ret = arg0.body;
4853
4992
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4854
4993
  },
4855
- __wbg_buffer_d0f5ea0926a691fd: function(arg0) {
4994
+ __wbg_buffer_4a989bded7035f57: function(arg0) {
4856
4995
  const ret = arg0.buffer;
4857
4996
  return ret;
4858
4997
  },
4859
- __wbg_byobRequest_dc6aed9db01b12c6: function(arg0) {
4998
+ __wbg_byobRequest_f161fc37241dd3d4: function(arg0) {
4860
4999
  const ret = arg0.byobRequest;
4861
5000
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4862
5001
  },
4863
- __wbg_byteLength_3e660e5661f3327e: function(arg0) {
5002
+ __wbg_byteLength_0ddb1795e2c7e689: function(arg0) {
4864
5003
  const ret = arg0.byteLength;
4865
5004
  return ret;
4866
5005
  },
4867
- __wbg_byteOffset_ecd62abe44dd28d4: function(arg0) {
5006
+ __wbg_byteOffset_46eb015f52b6ad7d: function(arg0) {
4868
5007
  const ret = arg0.byteOffset;
4869
5008
  return ret;
4870
5009
  },
4871
- __wbg_call_14b169f759b26747: function() { return handleError(function (arg0, arg1) {
5010
+ __wbg_call_269c5566fbede3eb: function() { return handleError(function (arg0, arg1) {
4872
5011
  const ret = arg0.call(arg1);
4873
5012
  return ret;
4874
5013
  }, arguments); },
4875
- __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
5014
+ __wbg_call_6bcf8d3e20937e46: function() { return handleError(function (arg0, arg1, arg2) {
4876
5015
  const ret = arg0.call(arg1, arg2);
4877
5016
  return ret;
4878
5017
  }, arguments); },
4879
- __wbg_cancel_ceb1bda02e29f0a9: function(arg0) {
5018
+ __wbg_cancel_c076350a7e8954be: function(arg0) {
4880
5019
  const ret = arg0.cancel();
4881
5020
  return ret;
4882
5021
  },
4883
- __wbg_catch_e9362815fd0b24cf: function(arg0, arg1) {
5022
+ __wbg_catch_e2134ef6dcdb69ed: function(arg0, arg1) {
4884
5023
  const ret = arg0.catch(arg1);
4885
5024
  return ret;
4886
5025
  },
@@ -4888,35 +5027,35 @@ function __wbg_get_imports() {
4888
5027
  const ret = clearTimeout(arg0);
4889
5028
  return ret;
4890
5029
  },
4891
- __wbg_close_e6c8977a002e9e13: function() { return handleError(function (arg0) {
5030
+ __wbg_close_22882088c136df25: function() { return handleError(function (arg0) {
4892
5031
  arg0.close();
4893
5032
  }, arguments); },
4894
- __wbg_close_fb954dfaf67b5732: function() { return handleError(function (arg0) {
5033
+ __wbg_close_8b609460dd26e367: function() { return handleError(function (arg0) {
4895
5034
  arg0.close();
4896
5035
  }, arguments); },
4897
5036
  __wbg_crypto_38df2bab126b63dc: function(arg0) {
4898
5037
  const ret = arg0.crypto;
4899
5038
  return ret;
4900
5039
  },
4901
- __wbg_debug_4e190d233ee2e0d8: function(arg0, arg1, arg2, arg3) {
5040
+ __wbg_debug_d6d1b899018fb5ec: function(arg0, arg1, arg2, arg3) {
4902
5041
  console.debug(arg0, arg1, arg2, arg3);
4903
5042
  },
4904
- __wbg_done_9158f7cc8751ba32: function(arg0) {
5043
+ __wbg_done_cffed884d87aa22e: function(arg0) {
4905
5044
  const ret = arg0.done;
4906
5045
  return ret;
4907
5046
  },
4908
- __wbg_enqueue_4767ce322820c94d: function() { return handleError(function (arg0, arg1) {
5047
+ __wbg_enqueue_6cb545d22db14f33: function() { return handleError(function (arg0, arg1) {
4909
5048
  arg0.enqueue(arg1);
4910
5049
  }, arguments); },
4911
- __wbg_entries_bf727fcd7bf35a41: function(arg0) {
4912
- const ret = arg0.entries();
5050
+ __wbg_entries_972a87586902cf87: function(arg0) {
5051
+ const ret = Object.entries(arg0);
4913
5052
  return ret;
4914
5053
  },
4915
- __wbg_entries_e0b73aa8571ddb56: function(arg0) {
4916
- const ret = Object.entries(arg0);
5054
+ __wbg_entries_f9de04c09a57314e: function(arg0) {
5055
+ const ret = arg0.entries();
4917
5056
  return ret;
4918
5057
  },
4919
- __wbg_error_a6a4bb2525a88971: function(arg0, arg1, arg2, arg3) {
5058
+ __wbg_error_83ae2b0e77197298: function(arg0, arg1, arg2, arg3) {
4920
5059
  console.error(arg0, arg1, arg2, arg3);
4921
5060
  },
4922
5061
  __wbg_event_new: function(arg0) {
@@ -4927,49 +5066,49 @@ function __wbg_get_imports() {
4927
5066
  const ret = fetch(arg0);
4928
5067
  return ret;
4929
5068
  },
4930
- __wbg_fetch_0d322c0aed196b8b: function(arg0, arg1) {
4931
- const ret = arg0.fetch(arg1);
5069
+ __wbg_fetch_6eb1b0b731234c3e: function(arg0) {
5070
+ const ret = fetch(arg0);
4932
5071
  return ret;
4933
5072
  },
4934
- __wbg_fetch_95c377e5d416f01c: function(arg0) {
4935
- const ret = fetch(arg0);
5073
+ __wbg_fetch_920242d59bac2026: function(arg0, arg1) {
5074
+ const ret = arg0.fetch(arg1);
4936
5075
  return ret;
4937
5076
  },
4938
- __wbg_from_0dbf29f09e7fb200: function(arg0) {
5077
+ __wbg_from_a39669ce566077da: function(arg0) {
4939
5078
  const ret = Array.from(arg0);
4940
5079
  return ret;
4941
5080
  },
5081
+ __wbg_getRandomValues_436a51d0629d84e1: function() { return handleError(function (arg0, arg1) {
5082
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
5083
+ }, arguments); },
4942
5084
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
4943
5085
  arg0.getRandomValues(arg1);
4944
5086
  }, arguments); },
4945
- __wbg_getRandomValues_cc7f052a444bb2ce: function() { return handleError(function (arg0, arg1) {
4946
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
4947
- }, arguments); },
4948
5087
  __wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
4949
5088
  const ret = arg0.getReader();
4950
5089
  return ret;
4951
5090
  }, arguments); },
4952
- __wbg_get_1affdbdd5573b16a: function() { return handleError(function (arg0, arg1) {
5091
+ __wbg_get_6cf5a4d4d8ad3c5a: function() { return handleError(function (arg0, arg1) {
4953
5092
  const ret = Reflect.get(arg0, arg1);
4954
5093
  return ret;
4955
5094
  }, arguments); },
4956
- __wbg_get_6011fa3a58f61074: function() { return handleError(function (arg0, arg1) {
5095
+ __wbg_get_989d0a1309644f2b: function() { return handleError(function (arg0, arg1) {
4957
5096
  const ret = Reflect.get(arg0, arg1);
4958
5097
  return ret;
4959
5098
  }, arguments); },
4960
- __wbg_get_8360291721e2339f: function(arg0, arg1) {
5099
+ __wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
4961
5100
  const ret = arg0[arg1 >>> 0];
4962
5101
  return ret;
4963
5102
  },
4964
- __wbg_get_done_282bca5d3f90e0a8: function(arg0) {
5103
+ __wbg_get_done_a668aa62d81fad70: function(arg0) {
4965
5104
  const ret = arg0.done;
4966
5105
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
4967
5106
  },
4968
- __wbg_get_unchecked_17f53dad852b9588: function(arg0, arg1) {
5107
+ __wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
4969
5108
  const ret = arg0[arg1 >>> 0];
4970
5109
  return ret;
4971
5110
  },
4972
- __wbg_get_value_65a7a2c60b42fd75: function(arg0) {
5111
+ __wbg_get_value_6c62a77c168d825a: function(arg0) {
4973
5112
  const ret = arg0.value;
4974
5113
  return ret;
4975
5114
  },
@@ -4989,18 +5128,18 @@ function __wbg_get_imports() {
4989
5128
  const ret = GrantSessionInfo.__wrap(arg0);
4990
5129
  return ret;
4991
5130
  },
4992
- __wbg_has_880f1d472f7cecba: function() { return handleError(function (arg0, arg1) {
5131
+ __wbg_has_464f8b9416279d65: function() { return handleError(function (arg0, arg1) {
4993
5132
  const ret = Reflect.has(arg0, arg1);
4994
5133
  return ret;
4995
5134
  }, arguments); },
4996
- __wbg_headers_6022deb4e576fb8e: function(arg0) {
5135
+ __wbg_headers_2594464ff62969f3: function(arg0) {
4997
5136
  const ret = arg0.headers;
4998
5137
  return ret;
4999
5138
  },
5000
- __wbg_info_e1c3400f7bf783dc: function(arg0, arg1, arg2, arg3) {
5139
+ __wbg_info_01cb0b0ae0fde22f: function(arg0, arg1, arg2, arg3) {
5001
5140
  console.info(arg0, arg1, arg2, arg3);
5002
5141
  },
5003
- __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
5142
+ __wbg_instanceof_ArrayBuffer_d4ff01f8247925ae: function(arg0) {
5004
5143
  let result;
5005
5144
  try {
5006
5145
  result = arg0 instanceof ArrayBuffer;
@@ -5010,7 +5149,7 @@ function __wbg_get_imports() {
5010
5149
  const ret = result;
5011
5150
  return ret;
5012
5151
  },
5013
- __wbg_instanceof_Error_6872d63ba7922898: function(arg0) {
5152
+ __wbg_instanceof_Error_fe6fa771c78ee4cf: function(arg0) {
5014
5153
  let result;
5015
5154
  try {
5016
5155
  result = arg0 instanceof Error;
@@ -5020,7 +5159,7 @@ function __wbg_get_imports() {
5020
5159
  const ret = result;
5021
5160
  return ret;
5022
5161
  },
5023
- __wbg_instanceof_Headers_6026d655161c2300: function(arg0) {
5162
+ __wbg_instanceof_Headers_b1a833e675bdf12d: function(arg0) {
5024
5163
  let result;
5025
5164
  try {
5026
5165
  result = arg0 instanceof Headers;
@@ -5030,7 +5169,7 @@ function __wbg_get_imports() {
5030
5169
  const ret = result;
5031
5170
  return ret;
5032
5171
  },
5033
- __wbg_instanceof_Map_1b76fd4635be43eb: function(arg0) {
5172
+ __wbg_instanceof_Map_1ff6a2b54c899f0d: function(arg0) {
5034
5173
  let result;
5035
5174
  try {
5036
5175
  result = arg0 instanceof Map;
@@ -5040,7 +5179,7 @@ function __wbg_get_imports() {
5040
5179
  const ret = result;
5041
5180
  return ret;
5042
5181
  },
5043
- __wbg_instanceof_Response_9b2d111407865ff2: function(arg0) {
5182
+ __wbg_instanceof_Response_6366a785e400039b: function(arg0) {
5044
5183
  let result;
5045
5184
  try {
5046
5185
  result = arg0 instanceof Response;
@@ -5050,7 +5189,7 @@ function __wbg_get_imports() {
5050
5189
  const ret = result;
5051
5190
  return ret;
5052
5191
  },
5053
- __wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
5192
+ __wbg_instanceof_Uint8Array_598adc0fef426aa8: function(arg0) {
5054
5193
  let result;
5055
5194
  try {
5056
5195
  result = arg0 instanceof Uint8Array;
@@ -5060,73 +5199,73 @@ function __wbg_get_imports() {
5060
5199
  const ret = result;
5061
5200
  return ret;
5062
5201
  },
5063
- __wbg_isArray_c3109d14ffc06469: function(arg0) {
5202
+ __wbg_isArray_5674713bb7b79043: function(arg0) {
5064
5203
  const ret = Array.isArray(arg0);
5065
5204
  return ret;
5066
5205
  },
5067
- __wbg_isSafeInteger_4fc213d1989d6d2a: function(arg0) {
5206
+ __wbg_isSafeInteger_8f51c743827d1ec5: function(arg0) {
5068
5207
  const ret = Number.isSafeInteger(arg0);
5069
5208
  return ret;
5070
5209
  },
5071
- __wbg_iterator_013bc09ec998c2a7: function() {
5210
+ __wbg_iterator_22ddeb808cf55a6f: function() {
5072
5211
  const ret = Symbol.iterator;
5073
5212
  return ret;
5074
5213
  },
5075
- __wbg_length_3d4ecd04bd8d22f1: function(arg0) {
5214
+ __wbg_length_31bdaf014f5fbde2: function(arg0) {
5076
5215
  const ret = arg0.length;
5077
5216
  return ret;
5078
5217
  },
5079
- __wbg_length_9f1775224cf1d815: function(arg0) {
5218
+ __wbg_length_4e1adc0d42e23620: function(arg0) {
5080
5219
  const ret = arg0.length;
5081
5220
  return ret;
5082
5221
  },
5083
- __wbg_log_465fe3993e4051bf: function(arg0, arg1, arg2, arg3) {
5222
+ __wbg_log_d4082f66a52944c3: function(arg0, arg1, arg2, arg3) {
5084
5223
  console.log(arg0, arg1, arg2, arg3);
5085
5224
  },
5086
5225
  __wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
5087
5226
  const ret = arg0.msCrypto;
5088
5227
  return ret;
5089
5228
  },
5090
- __wbg_new_0c7403db6e782f19: function(arg0) {
5091
- const ret = new Uint8Array(arg0);
5092
- return ret;
5093
- },
5094
- __wbg_new_15a4889b4b90734d: function() { return handleError(function () {
5229
+ __wbg_new_0afe64b4dc16ab74: function() { return handleError(function () {
5095
5230
  const ret = new Headers();
5096
5231
  return ret;
5097
5232
  }, arguments); },
5098
- __wbg_new_34d45cc8e36aaead: function() {
5099
- const ret = new Map();
5233
+ __wbg_new_1da3429bc3c4541c: function(arg0) {
5234
+ const ret = new Uint8Array(arg0);
5100
5235
  return ret;
5101
5236
  },
5102
- __wbg_new_5e360d2ff7b9e1c3: function(arg0, arg1) {
5103
- const ret = new Error(getStringFromWasm0(arg0, arg1));
5237
+ __wbg_new_8d36e20aa758e411: function() {
5238
+ const ret = new Map();
5104
5239
  return ret;
5105
5240
  },
5106
- __wbg_new_682678e2f47e32bc: function() {
5107
- const ret = new Array();
5241
+ __wbg_new_a32a1ab6c6655abe: function(arg0, arg1) {
5242
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
5108
5243
  return ret;
5109
5244
  },
5110
- __wbg_new_98c22165a42231aa: function() { return handleError(function () {
5245
+ __wbg_new_baa0a0207935dd43: function() { return handleError(function () {
5111
5246
  const ret = new AbortController();
5112
5247
  return ret;
5113
5248
  }, arguments); },
5114
- __wbg_new_aa8d0fa9762c29bd: function() {
5249
+ __wbg_new_bebc3f4757acf305: function() {
5115
5250
  const ret = new Object();
5116
5251
  return ret;
5117
5252
  },
5118
- __wbg_new_from_slice_b5ea43e23f6008c0: function(arg0, arg1) {
5253
+ __wbg_new_ffa92086ea89f79c: function() {
5254
+ const ret = new Array();
5255
+ return ret;
5256
+ },
5257
+ __wbg_new_from_slice_4ee02165f9de919e: function(arg0, arg1) {
5119
5258
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
5120
5259
  return ret;
5121
5260
  },
5122
- __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
5261
+ __wbg_new_typed_6f8b0d724fe26c07: function(arg0, arg1) {
5123
5262
  try {
5124
5263
  var state0 = {a: arg0, b: arg1};
5125
5264
  var cb0 = (arg0, arg1) => {
5126
5265
  const a = state0.a;
5127
5266
  state0.a = 0;
5128
5267
  try {
5129
- return wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___js_sys_c85ed8012f263b9d___Function_fn_wasm_bindgen_48024d4b44a05752___JsValue_____wasm_bindgen_48024d4b44a05752___sys__Undefined___js_sys_c85ed8012f263b9d___Function_fn_wasm_bindgen_48024d4b44a05752___JsValue_____wasm_bindgen_48024d4b44a05752___sys__Undefined_______true_(a, state0.b, arg0, arg1);
5268
+ return wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___js_sys_7dff043ea0f15dbc___Function_fn_wasm_bindgen_10e0805e8af38836___JsValue_____wasm_bindgen_10e0805e8af38836___sys__Undefined___js_sys_7dff043ea0f15dbc___Function_fn_wasm_bindgen_10e0805e8af38836___JsValue_____wasm_bindgen_10e0805e8af38836___sys__Undefined_______true_(a, state0.b, arg0, arg1);
5130
5269
  } finally {
5131
5270
  state0.a = a;
5132
5271
  }
@@ -5137,39 +5276,39 @@ function __wbg_get_imports() {
5137
5276
  state0.a = 0;
5138
5277
  }
5139
5278
  },
5140
- __wbg_new_with_byte_offset_and_length_01848e8d6a3d49ad: function(arg0, arg1, arg2) {
5279
+ __wbg_new_with_byte_offset_and_length_492c969e8b5da8a4: function(arg0, arg1, arg2) {
5141
5280
  const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
5142
5281
  return ret;
5143
5282
  },
5144
- __wbg_new_with_into_underlying_source_fd904252f385f59c: function(arg0, arg1) {
5145
- const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
5283
+ __wbg_new_with_into_underlying_source_a57cfcc7c705351c: function(arg0, arg1) {
5284
+ const ret = new ReadableStream(IntoUnderlyingSource2.__wrap(arg0), arg1);
5146
5285
  return ret;
5147
5286
  },
5148
- __wbg_new_with_length_8c854e41ea4dae9b: function(arg0) {
5287
+ __wbg_new_with_length_5ffeddb9d9fbb96f: function(arg0) {
5149
5288
  const ret = new Uint8Array(arg0 >>> 0);
5150
5289
  return ret;
5151
5290
  },
5152
- __wbg_new_with_opt_readable_stream_and_init_38c96167c370948a: function() { return handleError(function (arg0, arg1) {
5291
+ __wbg_new_with_opt_readable_stream_and_init_652b1d60607d75aa: function() { return handleError(function (arg0, arg1) {
5153
5292
  const ret = new Response(arg0, arg1);
5154
5293
  return ret;
5155
5294
  }, arguments); },
5156
- __wbg_new_with_str_and_init_897be1708e42f39d: function() { return handleError(function (arg0, arg1, arg2) {
5295
+ __wbg_new_with_str_and_init_2f31a77deda127fd: function() { return handleError(function (arg0, arg1, arg2) {
5157
5296
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
5158
5297
  return ret;
5159
5298
  }, arguments); },
5160
- __wbg_next_0340c4ae324393c3: function() { return handleError(function (arg0) {
5161
- const ret = arg0.next();
5162
- return ret;
5163
- }, arguments); },
5164
- __wbg_next_7646edaa39458ef7: function(arg0) {
5299
+ __wbg_next_95053e306b1c3aed: function(arg0) {
5165
5300
  const ret = arg0.next;
5166
5301
  return ret;
5167
5302
  },
5303
+ __wbg_next_f31ecb8646d2c605: function() { return handleError(function (arg0) {
5304
+ const ret = arg0.next();
5305
+ return ret;
5306
+ }, arguments); },
5168
5307
  __wbg_node_84ea875411254db1: function(arg0) {
5169
5308
  const ret = arg0.node;
5170
5309
  return ret;
5171
5310
  },
5172
- __wbg_now_a9b7df1cbee90986: function() {
5311
+ __wbg_now_d1fb6650485d7f3e: function() {
5173
5312
  const ret = Date.now();
5174
5313
  return ret;
5175
5314
  },
@@ -5177,7 +5316,7 @@ function __wbg_get_imports() {
5177
5316
  const ret = arg0.now();
5178
5317
  return ret;
5179
5318
  },
5180
- __wbg_parse_1bbc9c053611d0a7: function() { return handleError(function (arg0, arg1) {
5319
+ __wbg_parse_6937a9050adfb0e1: function() { return handleError(function (arg0, arg1) {
5181
5320
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
5182
5321
  return ret;
5183
5322
  }, arguments); },
@@ -5189,39 +5328,39 @@ function __wbg_get_imports() {
5189
5328
  const ret = arg0.process;
5190
5329
  return ret;
5191
5330
  },
5192
- __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
5331
+ __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
5193
5332
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
5194
5333
  },
5195
5334
  __wbg_publickey_new: function(arg0) {
5196
5335
  const ret = PublicKey.__wrap(arg0);
5197
5336
  return ret;
5198
5337
  },
5199
- __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
5200
- queueMicrotask(arg0);
5201
- },
5202
- __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
5338
+ __wbg_queueMicrotask_85c90f6987555d65: function(arg0) {
5203
5339
  const ret = arg0.queueMicrotask;
5204
5340
  return ret;
5205
5341
  },
5342
+ __wbg_queueMicrotask_f6a1fa10b81d1fc0: function(arg0) {
5343
+ queueMicrotask(arg0);
5344
+ },
5206
5345
  __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
5207
5346
  arg0.randomFillSync(arg1);
5208
5347
  }, arguments); },
5209
- __wbg_read_ddc2d178d2e57272: function(arg0) {
5348
+ __wbg_read_31091533ffadf971: function(arg0) {
5210
5349
  const ret = arg0.read();
5211
5350
  return ret;
5212
5351
  },
5213
- __wbg_releaseLock_9baaf3ccc5cfad69: function(arg0) {
5352
+ __wbg_releaseLock_1538945f5f183d9f: function(arg0) {
5214
5353
  arg0.releaseLock();
5215
5354
  },
5216
5355
  __wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
5217
5356
  const ret = module.require;
5218
5357
  return ret;
5219
5358
  }, arguments); },
5220
- __wbg_resolve_e6c466bc1052f16c: function(arg0) {
5359
+ __wbg_resolve_35ec7e0c6af4c82c: function(arg0) {
5221
5360
  const ret = Promise.resolve(arg0);
5222
5361
  return ret;
5223
5362
  },
5224
- __wbg_respond_008ca9525ae22847: function() { return handleError(function (arg0, arg1) {
5363
+ __wbg_respond_83a71686e927ca32: function() { return handleError(function (arg0, arg1) {
5225
5364
  arg0.respond(arg1 >>> 0);
5226
5365
  }, arguments); },
5227
5366
  __wbg_session_new: function(arg0) {
@@ -5232,83 +5371,83 @@ function __wbg_get_imports() {
5232
5371
  const ret = setTimeout(arg0, arg1);
5233
5372
  return ret;
5234
5373
  },
5235
- __wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
5236
- const ret = Reflect.set(arg0, arg1, arg2);
5237
- return ret;
5238
- }, arguments); },
5239
- __wbg_set_1ffc463d4c541483: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5240
- arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
5241
- }, arguments); },
5242
- __wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
5374
+ __wbg_set_13d25b81ab403f5e: function(arg0, arg1, arg2) {
5243
5375
  arg0[arg1 >>> 0] = arg2;
5244
5376
  },
5245
- __wbg_set_3d484eb794afec82: function(arg0, arg1, arg2) {
5377
+ __wbg_set_5f2ad37e5e02dc7b: function(arg0, arg1, arg2) {
5246
5378
  arg0.set(getArrayU8FromWasm0(arg1, arg2));
5247
5379
  },
5248
5380
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
5249
5381
  arg0[arg1] = arg2;
5250
5382
  },
5251
- __wbg_set_body_be11680f34217f75: function(arg0, arg1) {
5383
+ __wbg_set_7923e5ea63b41e6b: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5384
+ arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
5385
+ }, arguments); },
5386
+ __wbg_set_a377297433dfea63: function() { return handleError(function (arg0, arg1, arg2) {
5387
+ const ret = Reflect.set(arg0, arg1, arg2);
5388
+ return ret;
5389
+ }, arguments); },
5390
+ __wbg_set_bf6dde4923b9b059: function(arg0, arg1, arg2) {
5391
+ const ret = arg0.set(arg1, arg2);
5392
+ return ret;
5393
+ },
5394
+ __wbg_set_body_f39cee72c74a5b02: function(arg0, arg1) {
5252
5395
  arg0.body = arg1;
5253
5396
  },
5254
- __wbg_set_cache_968edea422613d1b: function(arg0, arg1) {
5397
+ __wbg_set_cache_6e8c35a5ed76edb1: function(arg0, arg1) {
5255
5398
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
5256
5399
  },
5257
- __wbg_set_credentials_6577be90e0e85eb6: function(arg0, arg1) {
5400
+ __wbg_set_credentials_bf1d3e014213a571: function(arg0, arg1) {
5258
5401
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
5259
5402
  },
5260
- __wbg_set_fde2cec06c23692b: function(arg0, arg1, arg2) {
5261
- const ret = arg0.set(arg1, arg2);
5262
- return ret;
5263
- },
5264
- __wbg_set_headers_50fc01786240a440: function(arg0, arg1) {
5403
+ __wbg_set_headers_31d373f68f28bf76: function(arg0, arg1) {
5265
5404
  arg0.headers = arg1;
5266
5405
  },
5267
- __wbg_set_headers_d567a640ab3a7735: function(arg0, arg1) {
5406
+ __wbg_set_headers_dfe6a763facd3dcc: function(arg0, arg1) {
5268
5407
  arg0.headers = arg1;
5269
5408
  },
5270
- __wbg_set_high_water_mark_0ac7cc8f39856bad: function(arg0, arg1) {
5409
+ __wbg_set_high_water_mark_089e3476522036ad: function(arg0, arg1) {
5271
5410
  arg0.highWaterMark = arg1;
5272
5411
  },
5273
- __wbg_set_method_c9f1f985f6b6c427: function(arg0, arg1, arg2) {
5412
+ __wbg_set_method_82e6c3c083da0734: function(arg0, arg1, arg2) {
5274
5413
  arg0.method = getStringFromWasm0(arg1, arg2);
5275
5414
  },
5276
- __wbg_set_mode_5e08d503428c06b9: function(arg0, arg1) {
5415
+ __wbg_set_mode_f7e56ed768d0ade0: function(arg0, arg1) {
5277
5416
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
5278
5417
  },
5279
- __wbg_set_name_f49c6e6bbfc8a63b: function(arg0, arg1, arg2) {
5418
+ __wbg_set_name_6e2a5da46a9ae1e7: function(arg0, arg1, arg2) {
5280
5419
  arg0.name = getStringFromWasm0(arg1, arg2);
5281
5420
  },
5282
- __wbg_set_signal_1d4e73c2305a0e7c: function(arg0, arg1) {
5421
+ __wbg_set_signal_f4b32f40f19786f4: function(arg0, arg1) {
5283
5422
  arg0.signal = arg1;
5284
5423
  },
5285
- __wbg_set_status_384b9a831b2c0723: function(arg0, arg1) {
5424
+ __wbg_set_status_74351f5228412c33: function(arg0, arg1) {
5286
5425
  arg0.status = arg1;
5287
5426
  },
5288
- __wbg_set_status_text_6e9fbc237df0665f: function(arg0, arg1, arg2) {
5427
+ __wbg_set_status_text_c443c5fe14fd551d: function(arg0, arg1, arg2) {
5289
5428
  arg0.statusText = getStringFromWasm0(arg1, arg2);
5290
5429
  },
5291
- __wbg_signal_fdc54643b47bf85b: function(arg0) {
5430
+ __wbg_signal_45367c6c2255877a: function(arg0) {
5292
5431
  const ret = arg0.signal;
5293
5432
  return ret;
5294
5433
  },
5295
- __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
5434
+ __wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
5296
5435
  const ret = typeof global === 'undefined' ? null : global;
5297
5436
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5298
5437
  },
5299
- __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
5438
+ __wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db: function() {
5300
5439
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
5301
5440
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5302
5441
  },
5303
- __wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
5442
+ __wbg_static_accessor_SELF_d8b50611246a6d92: function() {
5304
5443
  const ret = typeof self === 'undefined' ? null : self;
5305
5444
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5306
5445
  },
5307
- __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
5446
+ __wbg_static_accessor_WINDOW_fd0bc376bf0f8b42: function() {
5308
5447
  const ret = typeof window === 'undefined' ? null : window;
5309
5448
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5310
5449
  },
5311
- __wbg_status_43e0d2f15b22d69f: function(arg0) {
5450
+ __wbg_status_88ccc72fe7bea621: function(arg0) {
5312
5451
  const ret = arg0.status;
5313
5452
  return ret;
5314
5453
  },
@@ -5316,38 +5455,38 @@ function __wbg_get_imports() {
5316
5455
  const ret = StoredSessionInfo.__wrap(arg0);
5317
5456
  return ret;
5318
5457
  },
5319
- __wbg_stringify_91082ed7a5a5769e: function() { return handleError(function (arg0) {
5458
+ __wbg_stringify_54b3d9b61602aee6: function() { return handleError(function (arg0) {
5320
5459
  const ret = JSON.stringify(arg0);
5321
5460
  return ret;
5322
5461
  }, arguments); },
5323
- __wbg_subarray_f8ca46a25b1f5e0d: function(arg0, arg1, arg2) {
5462
+ __wbg_subarray_1daff70dde20c145: function(arg0, arg1, arg2) {
5324
5463
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
5325
5464
  return ret;
5326
5465
  },
5327
- __wbg_text_595ef75535aa25c1: function() { return handleError(function (arg0) {
5466
+ __wbg_text_b00323a194b10fa8: function() { return handleError(function (arg0) {
5328
5467
  const ret = arg0.text();
5329
5468
  return ret;
5330
5469
  }, arguments); },
5331
- __wbg_then_792e0c862b060889: function(arg0, arg1, arg2) {
5470
+ __wbg_then_7a850dae4493f353: function(arg0, arg1, arg2) {
5332
5471
  const ret = arg0.then(arg1, arg2);
5333
5472
  return ret;
5334
5473
  },
5335
- __wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
5474
+ __wbg_then_b830475380919203: function(arg0, arg1) {
5336
5475
  const ret = arg0.then(arg1);
5337
5476
  return ret;
5338
5477
  },
5339
- __wbg_toString_6dc1a94e0bdba378: function(arg0) {
5478
+ __wbg_toString_beee8ad71195e063: function(arg0) {
5340
5479
  const ret = arg0.toString();
5341
5480
  return ret;
5342
5481
  },
5343
- __wbg_url_2bf741820e6563a0: function(arg0, arg1) {
5482
+ __wbg_url_f1948b0d7f881e02: function(arg0, arg1) {
5344
5483
  const ret = arg1.url;
5345
5484
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5346
5485
  const len1 = WASM_VECTOR_LEN;
5347
5486
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5348
5487
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5349
5488
  },
5350
- __wbg_value_ee3a06f4579184fa: function(arg0) {
5489
+ __wbg_value_c227f843d21da141: function(arg0) {
5351
5490
  const ret = arg0.value;
5352
5491
  return ret;
5353
5492
  },
@@ -5355,71 +5494,71 @@ function __wbg_get_imports() {
5355
5494
  const ret = arg0.versions;
5356
5495
  return ret;
5357
5496
  },
5358
- __wbg_view_701664ffb3b1ce67: function(arg0) {
5497
+ __wbg_view_d8c7b26e4d4650f1: function(arg0) {
5359
5498
  const ret = arg0.view;
5360
5499
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5361
5500
  },
5362
- __wbg_warn_ad997e36628bd23a: function(arg0, arg1, arg2, arg3) {
5501
+ __wbg_warn_0dba8b87d6637549: function(arg0, arg1, arg2, arg3) {
5363
5502
  console.warn(arg0, arg1, arg2, arg3);
5364
5503
  },
5365
- __wbindgen_cast_0000000000000001: function(arg0, arg1) {
5366
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 132, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5367
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___wasm_bindgen_48024d4b44a05752___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_48024d4b44a05752___JsError___true_);
5504
+ __wbindgen_generic_0000000000000001: function(arg0, arg1) {
5505
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 133, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5506
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___wasm_bindgen_10e0805e8af38836___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_10e0805e8af38836___JsError___true_);
5368
5507
  return ret;
5369
5508
  },
5370
- __wbindgen_cast_0000000000000002: function(arg0, arg1) {
5371
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 272, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5372
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___wasm_bindgen_48024d4b44a05752___JsValue______true_);
5509
+ __wbindgen_generic_0000000000000002: function(arg0, arg1) {
5510
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 275, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5511
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___wasm_bindgen_10e0805e8af38836___JsValue______true_);
5373
5512
  return ret;
5374
5513
  },
5375
- __wbindgen_cast_0000000000000003: function(arg0, arg1) {
5376
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 270, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5377
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_48024d4b44a05752___convert__closures_____invoke_______true_);
5514
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
5515
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 273, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5516
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_10e0805e8af38836___convert__closures_____invoke_______true_);
5378
5517
  return ret;
5379
5518
  },
5380
- __wbindgen_cast_0000000000000004: function(arg0) {
5519
+ __wbindgen_generic_0000000000000004: function(arg0) {
5381
5520
  // Cast intrinsic for `F64 -> Externref`.
5382
5521
  const ret = arg0;
5383
5522
  return ret;
5384
5523
  },
5385
- __wbindgen_cast_0000000000000005: function(arg0) {
5524
+ __wbindgen_generic_0000000000000005: function(arg0) {
5386
5525
  // Cast intrinsic for `I64 -> Externref`.
5387
5526
  const ret = arg0;
5388
5527
  return ret;
5389
5528
  },
5390
- __wbindgen_cast_0000000000000006: function(arg0, arg1) {
5529
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
5391
5530
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5392
5531
  const ret = getArrayU8FromWasm0(arg0, arg1);
5393
5532
  return ret;
5394
5533
  },
5395
- __wbindgen_cast_0000000000000007: function(arg0, arg1) {
5534
+ __wbindgen_generic_0000000000000007: function(arg0, arg1) {
5396
5535
  // Cast intrinsic for `Ref(String) -> Externref`.
5397
5536
  const ret = getStringFromWasm0(arg0, arg1);
5398
5537
  return ret;
5399
5538
  },
5400
- __wbindgen_cast_0000000000000008: function(arg0) {
5539
+ __wbindgen_generic_0000000000000008: function(arg0) {
5401
5540
  // Cast intrinsic for `U64 -> Externref`.
5402
5541
  const ret = BigInt.asUintN(64, arg0);
5403
5542
  return ret;
5404
5543
  },
5405
- __wbindgen_cast_0000000000000009: function(arg0, arg1) {
5406
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5544
+ __wbindgen_generic_0000000000000009: function(arg0, arg1) {
5545
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1);
5407
5546
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5408
- // Cast intrinsic for `Vector(NamedExternref("GrantInfo")) -> Externref`.
5547
+ // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
5409
5548
  const ret = v0;
5410
5549
  return ret;
5411
5550
  },
5412
- __wbindgen_cast_000000000000000a: function(arg0, arg1) {
5413
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5551
+ __wbindgen_generic_000000000000000a: function(arg0, arg1) {
5552
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1);
5414
5553
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5415
- // Cast intrinsic for `Vector(NamedExternref("StoredSessionInfo")) -> Externref`.
5554
+ // Cast intrinsic for `Vector(RustStruct { name: "GrantInfo", unique_crate_identifier: "pubky-wasm-7913b60c8bbffe29" }) -> Externref`.
5416
5555
  const ret = v0;
5417
5556
  return ret;
5418
5557
  },
5419
- __wbindgen_cast_000000000000000b: function(arg0, arg1) {
5420
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5558
+ __wbindgen_generic_000000000000000b: function(arg0, arg1) {
5559
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1);
5421
5560
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5422
- // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
5561
+ // Cast intrinsic for `Vector(RustStruct { name: "StoredSessionInfo", unique_crate_identifier: "pubky-wasm-7913b60c8bbffe29" }) -> Externref`.
5423
5562
  const ret = v0;
5424
5563
  return ret;
5425
5564
  },
@@ -5436,33 +5575,33 @@ function __wbg_get_imports() {
5436
5575
  return {
5437
5576
  __proto__: null,
5438
5577
  "./pubky_bg.js": import0,
5439
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline1.js": import1,
5440
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline0.js": import2,
5441
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline0.js": import3,
5442
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline0.js": import4,
5443
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline0.js": import5,
5444
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline0.js": import6,
5445
- "./snippets/pubky-wasm-25477c7ca91d0b66/inline1.js": import7,
5578
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline1.js": import1,
5579
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline0.js": import2,
5580
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline0.js": import3,
5581
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline0.js": import4,
5582
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline0.js": import5,
5583
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline0.js": import6,
5584
+ "./snippets/pubky-wasm-7913b60c8bbffe29/inline1.js": import7,
5446
5585
  };
5447
5586
  }
5448
5587
 
5449
- function wasm_bindgen_48024d4b44a05752___convert__closures_____invoke_______true_(arg0, arg1) {
5450
- wasm.wasm_bindgen_48024d4b44a05752___convert__closures_____invoke_______true_(arg0, arg1);
5588
+ function wasm_bindgen_10e0805e8af38836___convert__closures_____invoke_______true_(arg0, arg1) {
5589
+ wasm.wasm_bindgen_10e0805e8af38836___convert__closures_____invoke_______true_(arg0, arg1);
5451
5590
  }
5452
5591
 
5453
- function wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___wasm_bindgen_48024d4b44a05752___JsValue______true_(arg0, arg1, arg2) {
5454
- wasm.wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___wasm_bindgen_48024d4b44a05752___JsValue______true_(arg0, arg1, arg2);
5592
+ function wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___wasm_bindgen_10e0805e8af38836___JsValue______true_(arg0, arg1, arg2) {
5593
+ wasm.wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___wasm_bindgen_10e0805e8af38836___JsValue______true_(arg0, arg1, arg2);
5455
5594
  }
5456
5595
 
5457
- function wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___wasm_bindgen_48024d4b44a05752___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_48024d4b44a05752___JsError___true_(arg0, arg1, arg2) {
5458
- const ret = wasm.wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___wasm_bindgen_48024d4b44a05752___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_48024d4b44a05752___JsError___true_(arg0, arg1, arg2);
5596
+ function wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___wasm_bindgen_10e0805e8af38836___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_10e0805e8af38836___JsError___true_(arg0, arg1, arg2) {
5597
+ const ret = wasm.wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___wasm_bindgen_10e0805e8af38836___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_10e0805e8af38836___JsError___true_(arg0, arg1, arg2);
5459
5598
  if (ret[1]) {
5460
5599
  throw takeFromExternrefTable0(ret[0]);
5461
5600
  }
5462
5601
  }
5463
5602
 
5464
- function wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___js_sys_c85ed8012f263b9d___Function_fn_wasm_bindgen_48024d4b44a05752___JsValue_____wasm_bindgen_48024d4b44a05752___sys__Undefined___js_sys_c85ed8012f263b9d___Function_fn_wasm_bindgen_48024d4b44a05752___JsValue_____wasm_bindgen_48024d4b44a05752___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
5465
- wasm.wasm_bindgen_48024d4b44a05752___convert__closures_____invoke___js_sys_c85ed8012f263b9d___Function_fn_wasm_bindgen_48024d4b44a05752___JsValue_____wasm_bindgen_48024d4b44a05752___sys__Undefined___js_sys_c85ed8012f263b9d___Function_fn_wasm_bindgen_48024d4b44a05752___JsValue_____wasm_bindgen_48024d4b44a05752___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
5603
+ function wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___js_sys_7dff043ea0f15dbc___Function_fn_wasm_bindgen_10e0805e8af38836___JsValue_____wasm_bindgen_10e0805e8af38836___sys__Undefined___js_sys_7dff043ea0f15dbc___Function_fn_wasm_bindgen_10e0805e8af38836___JsValue_____wasm_bindgen_10e0805e8af38836___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
5604
+ wasm.wasm_bindgen_10e0805e8af38836___convert__closures_____invoke___js_sys_7dff043ea0f15dbc___Function_fn_wasm_bindgen_10e0805e8af38836___JsValue_____wasm_bindgen_10e0805e8af38836___sys__Undefined___js_sys_7dff043ea0f15dbc___Function_fn_wasm_bindgen_10e0805e8af38836___JsValue_____wasm_bindgen_10e0805e8af38836___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
5466
5605
  }
5467
5606
 
5468
5607
 
@@ -5481,103 +5620,112 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
5481
5620
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
5482
5621
  const AuthFlowFinalization = (typeof FinalizationRegistry === 'undefined')
5483
5622
  ? { register: () => {}, unregister: () => {} }
5484
- : new FinalizationRegistry(ptr => wasm.__wbg_authflow_free(ptr >>> 0, 1));
5623
+ : new FinalizationRegistry(ptr => wasm.__wbg_authflow_free(ptr, 1));
5485
5624
  const AuthFlowKindFinalization = (typeof FinalizationRegistry === 'undefined')
5486
5625
  ? { register: () => {}, unregister: () => {} }
5487
- : new FinalizationRegistry(ptr => wasm.__wbg_authflowkind_free(ptr >>> 0, 1));
5626
+ : new FinalizationRegistry(ptr => wasm.__wbg_authflowkind_free(ptr, 1));
5488
5627
  const AuthTokenFinalization = (typeof FinalizationRegistry === 'undefined')
5489
5628
  ? { register: () => {}, unregister: () => {} }
5490
- : new FinalizationRegistry(ptr => wasm.__wbg_authtoken_free(ptr >>> 0, 1));
5629
+ : new FinalizationRegistry(ptr => wasm.__wbg_authtoken_free(ptr, 1));
5491
5630
  const BrowserSessionStoreFinalization = (typeof FinalizationRegistry === 'undefined')
5492
5631
  ? { register: () => {}, unregister: () => {} }
5493
- : new FinalizationRegistry(ptr => wasm.__wbg_browsersessionstore_free(ptr >>> 0, 1));
5632
+ : new FinalizationRegistry(ptr => wasm.__wbg_browsersessionstore_free(ptr, 1));
5494
5633
  const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
5495
5634
  ? { register: () => {}, unregister: () => {} }
5496
- : new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr >>> 0, 1));
5635
+ : new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr, 1));
5497
5636
  const CookieSessionFinalization = (typeof FinalizationRegistry === 'undefined')
5498
5637
  ? { register: () => {}, unregister: () => {} }
5499
- : new FinalizationRegistry(ptr => wasm.__wbg_cookiesession_free(ptr >>> 0, 1));
5638
+ : new FinalizationRegistry(ptr => wasm.__wbg_cookiesession_free(ptr, 1));
5500
5639
  const DirectSignupDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5501
5640
  ? { register: () => {}, unregister: () => {} }
5502
- : new FinalizationRegistry(ptr => wasm.__wbg_directsignupdeeplink_free(ptr >>> 0, 1));
5641
+ : new FinalizationRegistry(ptr => wasm.__wbg_directsignupdeeplink_free(ptr, 1));
5503
5642
  const EventFinalization = (typeof FinalizationRegistry === 'undefined')
5504
5643
  ? { register: () => {}, unregister: () => {} }
5505
- : new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr >>> 0, 1));
5644
+ : new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr, 1));
5506
5645
  const EventStreamBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
5507
5646
  ? { register: () => {}, unregister: () => {} }
5508
- : new FinalizationRegistry(ptr => wasm.__wbg_eventstreambuilder_free(ptr >>> 0, 1));
5647
+ : new FinalizationRegistry(ptr => wasm.__wbg_eventstreambuilder_free(ptr, 1));
5509
5648
  const GrantAuthFlowFinalization = (typeof FinalizationRegistry === 'undefined')
5510
5649
  ? { register: () => {}, unregister: () => {} }
5511
- : new FinalizationRegistry(ptr => wasm.__wbg_grantauthflow_free(ptr >>> 0, 1));
5650
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantauthflow_free(ptr, 1));
5512
5651
  const GrantInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5513
5652
  ? { register: () => {}, unregister: () => {} }
5514
- : new FinalizationRegistry(ptr => wasm.__wbg_grantinfo_free(ptr >>> 0, 1));
5653
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantinfo_free(ptr, 1));
5515
5654
  const GrantManagerFinalization = (typeof FinalizationRegistry === 'undefined')
5516
5655
  ? { register: () => {}, unregister: () => {} }
5517
- : new FinalizationRegistry(ptr => wasm.__wbg_grantmanager_free(ptr >>> 0, 1));
5656
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantmanager_free(ptr, 1));
5518
5657
  const GrantSessionFinalization = (typeof FinalizationRegistry === 'undefined')
5519
5658
  ? { register: () => {}, unregister: () => {} }
5520
- : new FinalizationRegistry(ptr => wasm.__wbg_grantsession_free(ptr >>> 0, 1));
5659
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantsession_free(ptr, 1));
5521
5660
  const GrantSessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5522
5661
  ? { register: () => {}, unregister: () => {} }
5523
- : new FinalizationRegistry(ptr => wasm.__wbg_grantsessioninfo_free(ptr >>> 0, 1));
5662
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantsessioninfo_free(ptr, 1));
5524
5663
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
5525
5664
  ? { register: () => {}, unregister: () => {} }
5526
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
5665
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr, 1));
5666
+ const IntoUnderlyingByteSource2Finalization = (typeof FinalizationRegistry === 'undefined')
5667
+ ? { register: () => {}, unregister: () => {} }
5668
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource2_free(ptr, 1));
5527
5669
  const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
5528
5670
  ? { register: () => {}, unregister: () => {} }
5529
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
5671
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr, 1));
5672
+ const IntoUnderlyingSink2Finalization = (typeof FinalizationRegistry === 'undefined')
5673
+ ? { register: () => {}, unregister: () => {} }
5674
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink2_free(ptr, 1));
5530
5675
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
5531
5676
  ? { register: () => {}, unregister: () => {} }
5532
- : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
5677
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr, 1));
5678
+ const IntoUnderlyingSource2Finalization = (typeof FinalizationRegistry === 'undefined')
5679
+ ? { register: () => {}, unregister: () => {} }
5680
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource2_free(ptr, 1));
5533
5681
  const KeypairFinalization = (typeof FinalizationRegistry === 'undefined')
5534
5682
  ? { register: () => {}, unregister: () => {} }
5535
- : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0, 1));
5683
+ : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr, 1));
5536
5684
  const PkdnsFinalization = (typeof FinalizationRegistry === 'undefined')
5537
5685
  ? { register: () => {}, unregister: () => {} }
5538
- : new FinalizationRegistry(ptr => wasm.__wbg_pkdns_free(ptr >>> 0, 1));
5686
+ : new FinalizationRegistry(ptr => wasm.__wbg_pkdns_free(ptr, 1));
5539
5687
  const PubkyFinalization = (typeof FinalizationRegistry === 'undefined')
5540
5688
  ? { register: () => {}, unregister: () => {} }
5541
- : new FinalizationRegistry(ptr => wasm.__wbg_pubky_free(ptr >>> 0, 1));
5689
+ : new FinalizationRegistry(ptr => wasm.__wbg_pubky_free(ptr, 1));
5542
5690
  const PubkyResourceFinalization = (typeof FinalizationRegistry === 'undefined')
5543
5691
  ? { register: () => {}, unregister: () => {} }
5544
- : new FinalizationRegistry(ptr => wasm.__wbg_pubkyresource_free(ptr >>> 0, 1));
5692
+ : new FinalizationRegistry(ptr => wasm.__wbg_pubkyresource_free(ptr, 1));
5545
5693
  const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
5546
5694
  ? { register: () => {}, unregister: () => {} }
5547
- : new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr >>> 0, 1));
5695
+ : new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr, 1));
5548
5696
  const PublicStorageFinalization = (typeof FinalizationRegistry === 'undefined')
5549
5697
  ? { register: () => {}, unregister: () => {} }
5550
- : new FinalizationRegistry(ptr => wasm.__wbg_publicstorage_free(ptr >>> 0, 1));
5698
+ : new FinalizationRegistry(ptr => wasm.__wbg_publicstorage_free(ptr, 1));
5551
5699
  const SeedExportDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5552
5700
  ? { register: () => {}, unregister: () => {} }
5553
- : new FinalizationRegistry(ptr => wasm.__wbg_seedexportdeeplink_free(ptr >>> 0, 1));
5701
+ : new FinalizationRegistry(ptr => wasm.__wbg_seedexportdeeplink_free(ptr, 1));
5554
5702
  const SessionFinalization = (typeof FinalizationRegistry === 'undefined')
5555
5703
  ? { register: () => {}, unregister: () => {} }
5556
- : new FinalizationRegistry(ptr => wasm.__wbg_session_free(ptr >>> 0, 1));
5704
+ : new FinalizationRegistry(ptr => wasm.__wbg_session_free(ptr, 1));
5557
5705
  const SessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5558
5706
  ? { register: () => {}, unregister: () => {} }
5559
- : new FinalizationRegistry(ptr => wasm.__wbg_sessioninfo_free(ptr >>> 0, 1));
5707
+ : new FinalizationRegistry(ptr => wasm.__wbg_sessioninfo_free(ptr, 1));
5560
5708
  const SessionStorageFinalization = (typeof FinalizationRegistry === 'undefined')
5561
5709
  ? { register: () => {}, unregister: () => {} }
5562
- : new FinalizationRegistry(ptr => wasm.__wbg_sessionstorage_free(ptr >>> 0, 1));
5710
+ : new FinalizationRegistry(ptr => wasm.__wbg_sessionstorage_free(ptr, 1));
5563
5711
  const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
5564
5712
  ? { register: () => {}, unregister: () => {} }
5565
- : new FinalizationRegistry(ptr => wasm.__wbg_signer_free(ptr >>> 0, 1));
5713
+ : new FinalizationRegistry(ptr => wasm.__wbg_signer_free(ptr, 1));
5566
5714
  const SigninDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5567
5715
  ? { register: () => {}, unregister: () => {} }
5568
- : new FinalizationRegistry(ptr => wasm.__wbg_signindeeplink_free(ptr >>> 0, 1));
5716
+ : new FinalizationRegistry(ptr => wasm.__wbg_signindeeplink_free(ptr, 1));
5569
5717
  const SigninGrantDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5570
5718
  ? { register: () => {}, unregister: () => {} }
5571
- : new FinalizationRegistry(ptr => wasm.__wbg_signingrantdeeplink_free(ptr >>> 0, 1));
5719
+ : new FinalizationRegistry(ptr => wasm.__wbg_signingrantdeeplink_free(ptr, 1));
5572
5720
  const SignupDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5573
5721
  ? { register: () => {}, unregister: () => {} }
5574
- : new FinalizationRegistry(ptr => wasm.__wbg_signupdeeplink_free(ptr >>> 0, 1));
5722
+ : new FinalizationRegistry(ptr => wasm.__wbg_signupdeeplink_free(ptr, 1));
5575
5723
  const SignupGrantDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5576
5724
  ? { register: () => {}, unregister: () => {} }
5577
- : new FinalizationRegistry(ptr => wasm.__wbg_signupgrantdeeplink_free(ptr >>> 0, 1));
5725
+ : new FinalizationRegistry(ptr => wasm.__wbg_signupgrantdeeplink_free(ptr, 1));
5578
5726
  const StoredSessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5579
5727
  ? { register: () => {}, unregister: () => {} }
5580
- : new FinalizationRegistry(ptr => wasm.__wbg_storedsessioninfo_free(ptr >>> 0, 1));
5728
+ : new FinalizationRegistry(ptr => wasm.__wbg_storedsessioninfo_free(ptr, 1));
5581
5729
 
5582
5730
  function addToExternrefTable0(obj) {
5583
5731
  const idx = wasm.__externref_table_alloc();
@@ -5685,8 +5833,7 @@ function getDataViewMemory0() {
5685
5833
  }
5686
5834
 
5687
5835
  function getStringFromWasm0(ptr, len) {
5688
- ptr = ptr >>> 0;
5689
- return decodeText(ptr, len);
5836
+ return decodeText(ptr >>> 0, len);
5690
5837
  }
5691
5838
 
5692
5839
  let cachedUint8ArrayMemory0 = null;
@@ -5812,5 +5959,6 @@ let WASM_VECTOR_LEN = 0;
5812
5959
  const wasmPath = `${__dirname}/pubky_bg.wasm`;
5813
5960
  const wasmBytes = require('fs').readFileSync(wasmPath);
5814
5961
  const wasmModule = new WebAssembly.Module(wasmBytes);
5815
- let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
5962
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
5963
+ let wasm = wasmInstance.exports;
5816
5964
  wasm.__wbindgen_start();