@synonymdev/pubky 0.11.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.
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);
@@ -559,6 +558,8 @@ class AuthFlow {
559
558
  * @returns {AuthFlow} A flow reconnected to the original relay channel.
560
559
  * @throws {PubkyError}
561
560
  * - `{ name: "AuthenticationError" }` if the URL is invalid or not a signin/signup link
561
+ *
562
+ * @deprecated Use `GrantAuthFlow.resume(...)` instead.
562
563
  * @param {string} authorization_url
563
564
  * @returns {AuthFlow}
564
565
  */
@@ -647,7 +648,6 @@ exports.AuthFlow = AuthFlow;
647
648
  */
648
649
  class AuthFlowKind {
649
650
  static __wrap(ptr) {
650
- ptr = ptr >>> 0;
651
651
  const obj = Object.create(AuthFlowKind.prototype);
652
652
  obj.__wbg_ptr = ptr;
653
653
  AuthFlowKindFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -738,7 +738,6 @@ exports.AuthFlowKind = AuthFlowKind;
738
738
  */
739
739
  class AuthToken {
740
740
  static __wrap(ptr) {
741
- ptr = ptr >>> 0;
742
741
  const obj = Object.create(AuthToken.prototype);
743
742
  obj.__wbg_ptr = ptr;
744
743
  AuthTokenFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -767,7 +766,7 @@ class AuthToken {
767
766
  */
768
767
  get capabilities() {
769
768
  const ret = wasm.authtoken_capabilities(this.__wbg_ptr);
770
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
769
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
771
770
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
772
771
  return v1;
773
772
  }
@@ -853,7 +852,6 @@ exports.AuthToken = AuthToken;
853
852
  */
854
853
  class BrowserSessionStore {
855
854
  static __wrap(ptr) {
856
- ptr = ptr >>> 0;
857
855
  const obj = Object.create(BrowserSessionStore.prototype);
858
856
  obj.__wbg_ptr = ptr;
859
857
  BrowserSessionStoreFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -869,17 +867,6 @@ class BrowserSessionStore {
869
867
  const ptr = this.__destroy_into_raw();
870
868
  wasm.__wbg_browsersessionstore_free(ptr, 0);
871
869
  }
872
- /**
873
- * Clear all local stored session records for this origin.
874
- *
875
- * Delegated keys referenced by those stored session records are removed.
876
- * Delegated keys that only belong to pending grant flows are preserved.
877
- * @returns {Promise<void>}
878
- */
879
- clear() {
880
- const ret = wasm.browsersessionstore_clear(this.__wbg_ptr);
881
- return ret;
882
- }
883
870
  /**
884
871
  * Clear all browser auth persistence owned by this SDK origin.
885
872
  *
@@ -893,6 +880,17 @@ class BrowserSessionStore {
893
880
  const ret = wasm.browsersessionstore_clearAll(this.__wbg_ptr);
894
881
  return ret;
895
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
+ }
896
894
  /**
897
895
  * Whether IndexedDB is available for durable session persistence.
898
896
  * @returns {Promise<boolean>}
@@ -953,7 +951,6 @@ exports.BrowserSessionStore = BrowserSessionStore;
953
951
  */
954
952
  class Client {
955
953
  static __wrap(ptr) {
956
- ptr = ptr >>> 0;
957
954
  const obj = Object.create(Client.prototype);
958
955
  obj.__wbg_ptr = ptr;
959
956
  ClientFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -978,7 +975,7 @@ class Client {
978
975
  *
979
976
  * @example
980
977
  * const client = pubky.client;
981
- * const res = await client.fetch(`https://_pubky.${user}/pub/app/file.txt`, { method: "PUT", body: "hi", credentials: "include" });
978
+ * const res = await client.fetch(`https://_pubky.${user}/storage/${user}/pub/app/file.txt`, { method: "PUT", body: "hi", credentials: "include" });
982
979
  * @param {string} url
983
980
  * @param {RequestInit | null} [init]
984
981
  * @returns {Promise<Response>}
@@ -993,19 +990,20 @@ class Client {
993
990
  * Create a Pubky HTTP client.
994
991
  *
995
992
  * @param {PubkyClientConfig} [config]
996
- * Optional transport overrides:
997
- * `{ pkarr?: { relays?: string[], request_timeout?: number } }`.
993
+ * Optional error-body limit and PKARR overrides:
994
+ * `{ maxErrorBodyBytes?: number, pkarr?: { relays?: string[], requestTimeout?: number } }`.
998
995
  *
999
996
  * @returns {Client}
1000
997
  * A configured low-level client. Prefer `new Pubky().client` unless you
1001
- * need custom relays/timeouts.
998
+ * need custom relays, timeouts or error-body limits.
1002
999
  *
1003
1000
  * @throws {InvalidInput}
1004
- * 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.
1005
1002
  *
1006
1003
  * @example
1007
1004
  * const client = new Client({
1008
- * pkarr: { relays: ["https://relay1/","https://relay2/"], request_timeout: 8000 }
1005
+ * maxErrorBodyBytes: 1024,
1006
+ * pkarr: { relays: ["https://relay1/","https://relay2/"], requestTimeout: 8000 }
1009
1007
  * });
1010
1008
  * const pubky = Pubky.withClient(client);
1011
1009
  * @param {PubkyClientConfig | null} [config_opt]
@@ -1015,7 +1013,7 @@ class Client {
1015
1013
  if (ret[2]) {
1016
1014
  throw takeFromExternrefTable0(ret[1]);
1017
1015
  }
1018
- this.__wbg_ptr = ret[0] >>> 0;
1016
+ this.__wbg_ptr = ret[0];
1019
1017
  ClientFinalization.register(this, this.__wbg_ptr, this);
1020
1018
  return this;
1021
1019
  }
@@ -1055,12 +1053,12 @@ exports.Client = Client;
1055
1053
  /**
1056
1054
  * Cookie-only view over a cookie-backed `Session`.
1057
1055
  *
1058
- * Grant-backed sessions do not expose this view; use `session.cookie` and
1059
- * check for `undefined` before calling cookie-specific methods.
1056
+ * New applications should use `session.grant` and `GrantSession`.
1057
+ *
1058
+ * @deprecated Use `GrantSession` instead.
1060
1059
  */
1061
1060
  class CookieSession {
1062
1061
  static __wrap(ptr) {
1063
- ptr = ptr >>> 0;
1064
1062
  const obj = Object.create(CookieSession.prototype);
1065
1063
  obj.__wbg_ptr = ptr;
1066
1064
  CookieSessionFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1076,6 +1074,20 @@ class CookieSession {
1076
1074
  const ptr = this.__destroy_into_raw();
1077
1075
  wasm.__wbg_cookiesession_free(ptr, 0);
1078
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
+ }
1079
1091
  /**
1080
1092
  * Export session metadata for legacy cookie restore.
1081
1093
  *
@@ -1083,6 +1095,7 @@ class CookieSession {
1083
1095
  * still hold the HTTP-only cookie.
1084
1096
  *
1085
1097
  * @returns {string}
1098
+ * @deprecated Use `GrantSession.exportLocalSecret()` instead.
1086
1099
  * @returns {string}
1087
1100
  */
1088
1101
  export() {
@@ -1103,19 +1116,6 @@ class CookieSession {
1103
1116
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1104
1117
  }
1105
1118
  }
1106
- /**
1107
- * Export the cookie secret needed to restore this cookie session.
1108
- *
1109
- * This is available when the SDK captured the cookie secret, such as in
1110
- * Node.js. Browser sessions cannot read HTTP-only Set-Cookie values.
1111
- *
1112
- * @returns {Promise<string>}
1113
- * @returns {Promise<string>}
1114
- */
1115
- exportSecret() {
1116
- const ret = wasm.cookiesession_exportSecret(this.__wbg_ptr);
1117
- return ret;
1118
- }
1119
1119
  }
1120
1120
  if (Symbol.dispose) CookieSession.prototype[Symbol.dispose] = CookieSession.prototype.free;
1121
1121
  exports.CookieSession = CookieSession;
@@ -1125,7 +1125,6 @@ exports.CookieSession = CookieSession;
1125
1125
  */
1126
1126
  class DirectSignupDeepLink {
1127
1127
  static __wrap(ptr) {
1128
- ptr = ptr >>> 0;
1129
1128
  const obj = Object.create(DirectSignupDeepLink.prototype);
1130
1129
  obj.__wbg_ptr = ptr;
1131
1130
  DirectSignupDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1171,7 +1170,7 @@ class DirectSignupDeepLink {
1171
1170
  const ret = wasm.directsignupdeeplink_signupToken(this.__wbg_ptr);
1172
1171
  let v1;
1173
1172
  if (ret[0] !== 0) {
1174
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1173
+ v1 = getStringFromWasm0(ret[0], ret[1]);
1175
1174
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1176
1175
  }
1177
1176
  return v1;
@@ -1197,7 +1196,10 @@ class DirectSignupDeepLink {
1197
1196
  */
1198
1197
  get xCallback() {
1199
1198
  const ret = wasm.directsignupdeeplink_xCallback(this.__wbg_ptr);
1200
- return ret;
1199
+ if (ret[2]) {
1200
+ throw takeFromExternrefTable0(ret[1]);
1201
+ }
1202
+ return takeFromExternrefTable0(ret[0]);
1201
1203
  }
1202
1204
  }
1203
1205
  if (Symbol.dispose) DirectSignupDeepLink.prototype[Symbol.dispose] = DirectSignupDeepLink.prototype.free;
@@ -1225,7 +1227,6 @@ exports.DirectSignupDeepLink = DirectSignupDeepLink;
1225
1227
  */
1226
1228
  class Event {
1227
1229
  static __wrap(ptr) {
1228
- ptr = ptr >>> 0;
1229
1230
  const obj = Object.create(Event.prototype);
1230
1231
  obj.__wbg_ptr = ptr;
1231
1232
  EventFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1250,7 +1251,7 @@ class Event {
1250
1251
  const ret = wasm.event_contentHash(this.__wbg_ptr);
1251
1252
  let v1;
1252
1253
  if (ret[0] !== 0) {
1253
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
1254
+ v1 = getStringFromWasm0(ret[0], ret[1]);
1254
1255
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1255
1256
  }
1256
1257
  return v1;
@@ -1303,6 +1304,7 @@ exports.Event = Event;
1303
1304
  * Builder for creating an event stream subscription.
1304
1305
  *
1305
1306
  * Construct via `Pubky.eventStreamForUser()` or `Pubky.eventStreamFor()`.
1307
+ * Configuration methods consume this builder unless documented otherwise.
1306
1308
  *
1307
1309
  * @example
1308
1310
  * ```typescript
@@ -1328,7 +1330,6 @@ exports.Event = Event;
1328
1330
  */
1329
1331
  class EventStreamBuilder {
1330
1332
  static __wrap(ptr) {
1331
- ptr = ptr >>> 0;
1332
1333
  const obj = Object.create(EventStreamBuilder.prototype);
1333
1334
  obj.__wbg_ptr = ptr;
1334
1335
  EventStreamBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1349,6 +1350,8 @@ class EventStreamBuilder {
1349
1350
  *
1350
1351
  * Each user can have an independent cursor position. If a user already exists,
1351
1352
  * their cursor value is overwritten.
1353
+ * Updates this builder and returns a copy for chaining. Rejected input
1354
+ * leaves this builder unchanged.
1352
1355
  *
1353
1356
  * @param {Array<[string, string | null]>} users - Array of [z32PublicKey, cursor] tuples
1354
1357
  * @returns {EventStreamBuilder} - Builder for chaining
@@ -1369,8 +1372,7 @@ class EventStreamBuilder {
1369
1372
  * @returns {EventStreamBuilder}
1370
1373
  */
1371
1374
  addUsers(users) {
1372
- const ptr = this.__destroy_into_raw();
1373
- const ret = wasm.eventstreambuilder_addUsers(ptr, users);
1375
+ const ret = wasm.eventstreambuilder_addUsers(this.__wbg_ptr, users);
1374
1376
  if (ret[2]) {
1375
1377
  throw takeFromExternrefTable0(ret[1]);
1376
1378
  }
@@ -1427,6 +1429,28 @@ class EventStreamBuilder {
1427
1429
  const ret = wasm.eventstreambuilder_live(ptr);
1428
1430
  return EventStreamBuilder.__wrap(ret);
1429
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
+ }
1430
1454
  /**
1431
1455
  * Filter events by path. Call once per path to receive the
1432
1456
  * union of several scopes (e.g. `/pub/` plus a private `/priv/app/`).
@@ -1531,7 +1555,6 @@ exports.EventStreamBuilder = EventStreamBuilder;
1531
1555
  */
1532
1556
  class GrantAuthFlow {
1533
1557
  static __wrap(ptr) {
1534
- ptr = ptr >>> 0;
1535
1558
  const obj = Object.create(GrantAuthFlow.prototype);
1536
1559
  obj.__wbg_ptr = ptr;
1537
1560
  GrantAuthFlowFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1583,6 +1606,22 @@ class GrantAuthFlow {
1583
1606
  const ret = wasm.grantauthflow_isDelegationAvailable();
1584
1607
  return ret !== 0;
1585
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
+ }
1586
1625
  /**
1587
1626
  * Resume a previously saved pending grant auth flow (standalone).
1588
1627
  * Prefer `pubky.resumeGrantAuthFlow()` to reuse a facade client.
@@ -1604,22 +1643,6 @@ class GrantAuthFlow {
1604
1643
  }
1605
1644
  return GrantAuthFlow.__wrap(ret[0]);
1606
1645
  }
1607
- /**
1608
- * Resume a previously saved pending delegated grant auth flow.
1609
- *
1610
- * Runtime: delegated grant keys require a secure browser context with
1611
- * WebCrypto `crypto.subtle` and IndexedDB. The saved `keyId` must still
1612
- * exist in IndexedDB for the same origin. Unsupported runtimes reject with
1613
- * `ClientStateError`.
1614
- * @param {string} saved_state
1615
- * @returns {Promise<GrantAuthFlow>}
1616
- */
1617
- static resumeDelegated(saved_state) {
1618
- const ptr0 = passStringToWasm0(saved_state, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1619
- const len0 = WASM_VECTOR_LEN;
1620
- const ret = wasm.grantauthflow_resumeDelegated(ptr0, len0);
1621
- return ret;
1622
- }
1623
1646
  /**
1624
1647
  * Save sensitive state required to resume this delegated pending grant flow.
1625
1648
  *
@@ -1671,6 +1694,28 @@ class GrantAuthFlow {
1671
1694
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1672
1695
  }
1673
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
+ }
1674
1719
  /**
1675
1720
  * Start a grant-backed flow with a new DHT client.
1676
1721
  * Prefer `pubky.startGrantAuthFlow()` to reuse a facade DHT client.
@@ -1704,28 +1749,6 @@ class GrantAuthFlow {
1704
1749
  }
1705
1750
  return GrantAuthFlow.__wrap(ret[0]);
1706
1751
  }
1707
- /**
1708
- * Start a browser delegated grant-backed flow.
1709
- *
1710
- * The SDK creates a fresh non-extractable WebCrypto Ed25519 key in
1711
- * IndexedDB and uses that key for grant Proof-of-Possession signing.
1712
- *
1713
- * Runtime: delegated grant keys require a secure browser context with
1714
- * WebCrypto `crypto.subtle` and IndexedDB. Unsupported runtimes reject
1715
- * with `ClientStateError`.
1716
- * @param {Capabilities} capabilities
1717
- * @param {AuthFlowKind} kind
1718
- * @param {GrantAuthFlowOptions} options
1719
- * @returns {Promise<GrantAuthFlow>}
1720
- */
1721
- static startDelegated(capabilities, kind, options) {
1722
- const ptr0 = passStringToWasm0(capabilities, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1723
- const len0 = WASM_VECTOR_LEN;
1724
- _assertClass(kind, AuthFlowKind);
1725
- var ptr1 = kind.__destroy_into_raw();
1726
- const ret = wasm.grantauthflow_startDelegated(ptr0, len0, ptr1, options);
1727
- return ret;
1728
- }
1729
1752
  /**
1730
1753
  * Non-blocking single poll step (advanced UIs).
1731
1754
  *
@@ -1745,7 +1768,6 @@ exports.GrantAuthFlow = GrantAuthFlow;
1745
1768
  */
1746
1769
  class GrantInfo {
1747
1770
  static __wrap(ptr) {
1748
- ptr = ptr >>> 0;
1749
1771
  const obj = Object.create(GrantInfo.prototype);
1750
1772
  obj.__wbg_ptr = ptr;
1751
1773
  GrantInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1866,7 +1888,7 @@ class GrantManager {
1866
1888
  constructor(session) {
1867
1889
  _assertClass(session, Session);
1868
1890
  const ret = wasm.grantmanager_new(session.__wbg_ptr);
1869
- this.__wbg_ptr = ret >>> 0;
1891
+ this.__wbg_ptr = ret;
1870
1892
  GrantManagerFinalization.register(this, this.__wbg_ptr, this);
1871
1893
  return this;
1872
1894
  }
@@ -1899,7 +1921,6 @@ exports.GrantManager = GrantManager;
1899
1921
  */
1900
1922
  class GrantSession {
1901
1923
  static __wrap(ptr) {
1902
- ptr = ptr >>> 0;
1903
1924
  const obj = Object.create(GrantSession.prototype);
1904
1925
  obj.__wbg_ptr = ptr;
1905
1926
  GrantSessionFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1957,7 +1978,6 @@ exports.GrantSession = GrantSession;
1957
1978
  */
1958
1979
  class GrantSessionInfo {
1959
1980
  static __wrap(ptr) {
1960
- ptr = ptr >>> 0;
1961
1981
  const obj = Object.create(GrantSessionInfo.prototype);
1962
1982
  obj.__wbg_ptr = ptr;
1963
1983
  GrantSessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -1979,7 +1999,7 @@ class GrantSessionInfo {
1979
1999
  */
1980
2000
  get capabilities() {
1981
2001
  const ret = wasm.grantsessioninfo_capabilities(this.__wbg_ptr);
1982
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
2002
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
1983
2003
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1984
2004
  return v1;
1985
2005
  }
@@ -2106,6 +2126,52 @@ class IntoUnderlyingByteSource {
2106
2126
  if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
2107
2127
  exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
2108
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
+
2109
2175
  class IntoUnderlyingSink {
2110
2176
  __destroy_into_raw() {
2111
2177
  const ptr = this.__wbg_ptr;
@@ -2146,14 +2212,46 @@ class IntoUnderlyingSink {
2146
2212
  if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
2147
2213
  exports.IntoUnderlyingSink = IntoUnderlyingSink;
2148
2214
 
2149
- class IntoUnderlyingSource {
2150
- static __wrap(ptr) {
2151
- ptr = ptr >>> 0;
2152
- const obj = Object.create(IntoUnderlyingSource.prototype);
2153
- obj.__wbg_ptr = ptr;
2154
- IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
2155
- 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;
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;
2156
2250
  }
2251
+ }
2252
+ if (Symbol.dispose) IntoUnderlyingSink2.prototype[Symbol.dispose] = IntoUnderlyingSink2.prototype.free;
2253
+
2254
+ class IntoUnderlyingSource {
2157
2255
  __destroy_into_raw() {
2158
2256
  const ptr = this.__wbg_ptr;
2159
2257
  this.__wbg_ptr = 0;
@@ -2180,9 +2278,40 @@ class IntoUnderlyingSource {
2180
2278
  if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
2181
2279
  exports.IntoUnderlyingSource = IntoUnderlyingSource;
2182
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
+
2183
2313
  class Keypair {
2184
2314
  static __wrap(ptr) {
2185
- ptr = ptr >>> 0;
2186
2315
  const obj = Object.create(Keypair.prototype);
2187
2316
  obj.__wbg_ptr = ptr;
2188
2317
  KeypairFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2280,7 +2409,6 @@ exports.Keypair = Keypair;
2280
2409
  */
2281
2410
  class Pkdns {
2282
2411
  static __wrap(ptr) {
2283
- ptr = ptr >>> 0;
2284
2412
  const obj = Object.create(Pkdns.prototype);
2285
2413
  obj.__wbg_ptr = ptr;
2286
2414
  PkdnsFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2309,18 +2437,6 @@ class Pkdns {
2309
2437
  }
2310
2438
  return Pkdns.__wrap(ret[0]);
2311
2439
  }
2312
- /**
2313
- * Resolve the homeserver for **this** user (requires keypair).
2314
- *
2315
- * @returns {Promise<PublicKey|undefined>} Homeserver public key or `undefined` if not found.
2316
- * @throws When no keypair is attached, Pkarr resolution fails, or a resolved `_pubky` target
2317
- * is malformed.
2318
- * @returns {Promise<PublicKey | undefined>}
2319
- */
2320
- getHomeserver() {
2321
- const ret = wasm.pkdns_getHomeserver(this.__wbg_ptr);
2322
- return ret;
2323
- }
2324
2440
  /**
2325
2441
  * Resolve the homeserver for a given public key (read-only).
2326
2442
  *
@@ -2336,6 +2452,18 @@ class Pkdns {
2336
2452
  const ret = wasm.pkdns_getHomeserverOf(this.__wbg_ptr, pubky.__wbg_ptr);
2337
2453
  return ret;
2338
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
+ }
2339
2467
  /**
2340
2468
  * Read-only PKDNS actor (no keypair; resolve only).
2341
2469
  */
@@ -2344,7 +2472,7 @@ class Pkdns {
2344
2472
  if (ret[2]) {
2345
2473
  throw takeFromExternrefTable0(ret[1]);
2346
2474
  }
2347
- this.__wbg_ptr = ret[0] >>> 0;
2475
+ this.__wbg_ptr = ret[0];
2348
2476
  PkdnsFinalization.register(this, this.__wbg_ptr, this);
2349
2477
  return this;
2350
2478
  }
@@ -2395,7 +2523,6 @@ exports.Pkdns = Pkdns;
2395
2523
  */
2396
2524
  class Pubky {
2397
2525
  static __wrap(ptr) {
2398
- ptr = ptr >>> 0;
2399
2526
  const obj = Object.create(Pubky.prototype);
2400
2527
  obj.__wbg_ptr = ptr;
2401
2528
  PubkyFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2437,35 +2564,6 @@ class Pubky {
2437
2564
  const ret = wasm.pubky_client(this.__wbg_ptr);
2438
2565
  return Client.__wrap(ret);
2439
2566
  }
2440
- /**
2441
- * Create an event stream builder for a specific homeserver.
2442
- *
2443
- * Use this when you already know the homeserver pubkey. This avoids
2444
- * Pkarr resolution overhead. Obtain a homeserver pubkey via `getHomeserverOf()`.
2445
- *
2446
- * @param {PublicKey} homeserver - The homeserver public key
2447
- * @returns {EventStreamBuilder} - Builder for configuring and subscribing to the stream
2448
- *
2449
- * @example
2450
- * ```typescript
2451
- * const homeserver = await pubky.getHomeserverOf(user1);
2452
- * const stream = await pubky.eventStreamFor(homeserver)
2453
- * .addUsers([[user1.z32(), null], [user2.z32(), null]])
2454
- * .live()
2455
- * .subscribe();
2456
- *
2457
- * for await (const event of stream) {
2458
- * console.log(`${event.eventType}: ${event.resource.path}`);
2459
- * }
2460
- * ```
2461
- * @param {PublicKey} homeserver
2462
- * @returns {EventStreamBuilder}
2463
- */
2464
- eventStreamFor(homeserver) {
2465
- _assertClass(homeserver, PublicKey);
2466
- const ret = wasm.pubky_eventStreamFor(this.__wbg_ptr, homeserver.__wbg_ptr);
2467
- return EventStreamBuilder.__wrap(ret);
2468
- }
2469
2567
  /**
2470
2568
  * Create an event stream builder for a single user.
2471
2569
  *
@@ -2501,6 +2599,35 @@ class Pubky {
2501
2599
  }
2502
2600
  return EventStreamBuilder.__wrap(ret[0]);
2503
2601
  }
2602
+ /**
2603
+ * Create an event stream builder for a specific homeserver.
2604
+ *
2605
+ * Use this when you already know the homeserver pubkey. This avoids
2606
+ * Pkarr resolution overhead. Obtain a homeserver pubkey via `getHomeserverOf()`.
2607
+ *
2608
+ * @param {PublicKey} homeserver - The homeserver public key
2609
+ * @returns {EventStreamBuilder} - Builder for configuring and subscribing to the stream
2610
+ *
2611
+ * @example
2612
+ * ```typescript
2613
+ * const homeserver = await pubky.getHomeserverOf(user1);
2614
+ * const stream = await pubky.eventStreamFor(homeserver)
2615
+ * .addUsers([[user1.z32(), null], [user2.z32(), null]])
2616
+ * .live()
2617
+ * .subscribe();
2618
+ *
2619
+ * for await (const event of stream) {
2620
+ * console.log(`${event.eventType}: ${event.resource.path}`);
2621
+ * }
2622
+ * ```
2623
+ * @param {PublicKey} homeserver
2624
+ * @returns {EventStreamBuilder}
2625
+ */
2626
+ eventStreamFor(homeserver) {
2627
+ _assertClass(homeserver, PublicKey);
2628
+ const ret = wasm.pubky_eventStreamFor(this.__wbg_ptr, homeserver.__wbg_ptr);
2629
+ return EventStreamBuilder.__wrap(ret);
2630
+ }
2504
2631
  /**
2505
2632
  * Resolve the homeserver for a given public key (read-only).
2506
2633
  *
@@ -2537,7 +2664,7 @@ class Pubky {
2537
2664
  if (ret[2]) {
2538
2665
  throw takeFromExternrefTable0(ret[1]);
2539
2666
  }
2540
- this.__wbg_ptr = ret[0] >>> 0;
2667
+ this.__wbg_ptr = ret[0];
2541
2668
  PubkyFinalization.register(this, this.__wbg_ptr, this);
2542
2669
  return this;
2543
2670
  }
@@ -2617,6 +2744,8 @@ class Pubky {
2617
2744
  * sessionStorage.removeItem("pubky-auth-url");
2618
2745
  * }
2619
2746
  * }
2747
+ *
2748
+ * @deprecated Use `resumeGrantAuthFlow(...)` instead.
2620
2749
  * @param {string} authorization_url
2621
2750
  * @returns {AuthFlow}
2622
2751
  */
@@ -2715,6 +2844,8 @@ class Pubky {
2715
2844
  * const flow = pubky.startCookieAuthFlow("/pub/my-cool-app/:rw");
2716
2845
  * renderQr(flow.authorizationUrl);
2717
2846
  * const session = await flow.awaitApproval();
2847
+ *
2848
+ * @deprecated Use `startGrantAuthFlow(...)` instead.
2718
2849
  * @param {Capabilities} capabilities
2719
2850
  * @param {AuthFlowKind} kind
2720
2851
  * @param {string | null} [relay]
@@ -2828,7 +2959,6 @@ exports.Pubky = Pubky;
2828
2959
  */
2829
2960
  class PubkyResource {
2830
2961
  static __wrap(ptr) {
2831
- ptr = ptr >>> 0;
2832
2962
  const obj = Object.create(PubkyResource.prototype);
2833
2963
  obj.__wbg_ptr = ptr;
2834
2964
  PubkyResourceFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -2928,7 +3058,6 @@ exports.PubkyResource = PubkyResource;
2928
3058
 
2929
3059
  class PublicKey {
2930
3060
  static __wrap(ptr) {
2931
- ptr = ptr >>> 0;
2932
3061
  const obj = Object.create(PublicKey.prototype);
2933
3062
  obj.__wbg_ptr = ptr;
2934
3063
  PublicKeyFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3008,7 +3137,6 @@ exports.PublicKey = PublicKey;
3008
3137
  */
3009
3138
  class PublicStorage {
3010
3139
  static __wrap(ptr) {
3011
- ptr = ptr >>> 0;
3012
3140
  const obj = Object.create(PublicStorage.prototype);
3013
3141
  obj.__wbg_ptr = ptr;
3014
3142
  PublicStorageFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3022,34 +3150,20 @@ class PublicStorage {
3022
3150
  }
3023
3151
  free() {
3024
3152
  const ptr = this.__destroy_into_raw();
3025
- wasm.__wbg_publicstorage_free(ptr, 0);
3026
- }
3027
- /**
3028
- * Check if a path exists.
3029
- *
3030
- * @param {Address} address
3031
- * @returns {Promise<boolean>}
3032
- * @param {Address} address
3033
- * @returns {Promise<boolean>}
3034
- */
3035
- exists(address) {
3036
- const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3037
- const len0 = WASM_VECTOR_LEN;
3038
- const ret = wasm.publicstorage_exists(this.__wbg_ptr, ptr0, len0);
3039
- return ret;
3153
+ wasm.__wbg_publicstorage_free(ptr, 0);
3040
3154
  }
3041
3155
  /**
3042
- * Perform a streaming `GET` and expose the raw `Response` object.
3156
+ * Check if a path exists.
3043
3157
  *
3044
3158
  * @param {Address} address
3045
- * @returns {Promise<Response>}
3159
+ * @returns {Promise<boolean>}
3046
3160
  * @param {Address} address
3047
- * @returns {Promise<Response>}
3161
+ * @returns {Promise<boolean>}
3048
3162
  */
3049
- get(address) {
3163
+ exists(address) {
3050
3164
  const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3051
3165
  const len0 = WASM_VECTOR_LEN;
3052
- const ret = wasm.publicstorage_get(this.__wbg_ptr, ptr0, len0);
3166
+ const ret = wasm.publicstorage_exists(this.__wbg_ptr, ptr0, len0);
3053
3167
  return ret;
3054
3168
  }
3055
3169
  /**
@@ -3094,6 +3208,20 @@ class PublicStorage {
3094
3208
  const ret = wasm.publicstorage_getText(this.__wbg_ptr, ptr0, len0);
3095
3209
  return ret;
3096
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
+ }
3097
3225
  /**
3098
3226
  * List a directory. Results are `pubky://…` identifier URLs.
3099
3227
  *
@@ -3126,7 +3254,7 @@ class PublicStorage {
3126
3254
  if (ret[2]) {
3127
3255
  throw takeFromExternrefTable0(ret[1]);
3128
3256
  }
3129
- this.__wbg_ptr = ret[0] >>> 0;
3257
+ this.__wbg_ptr = ret[0];
3130
3258
  PublicStorageFinalization.register(this, this.__wbg_ptr, this);
3131
3259
  return this;
3132
3260
  }
@@ -3151,7 +3279,6 @@ exports.PublicStorage = PublicStorage;
3151
3279
 
3152
3280
  class SeedExportDeepLink {
3153
3281
  static __wrap(ptr) {
3154
- ptr = ptr >>> 0;
3155
3282
  const obj = Object.create(SeedExportDeepLink.prototype);
3156
3283
  obj.__wbg_ptr = ptr;
3157
3284
  SeedExportDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3208,7 +3335,10 @@ class SeedExportDeepLink {
3208
3335
  */
3209
3336
  get xCallback() {
3210
3337
  const ret = wasm.seedexportdeeplink_xCallback(this.__wbg_ptr);
3211
- return ret;
3338
+ if (ret[2]) {
3339
+ throw takeFromExternrefTable0(ret[1]);
3340
+ }
3341
+ return takeFromExternrefTable0(ret[0]);
3212
3342
  }
3213
3343
  }
3214
3344
  if (Symbol.dispose) SeedExportDeepLink.prototype[Symbol.dispose] = SeedExportDeepLink.prototype.free;
@@ -3221,7 +3351,6 @@ exports.SeedExportDeepLink = SeedExportDeepLink;
3221
3351
  */
3222
3352
  class Session {
3223
3353
  static __wrap(ptr) {
3224
- ptr = ptr >>> 0;
3225
3354
  const obj = Object.create(Session.prototype);
3226
3355
  obj.__wbg_ptr = ptr;
3227
3356
  SessionFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3243,12 +3372,32 @@ class Session {
3243
3372
  * Grant-backed sessions return `undefined`.
3244
3373
  *
3245
3374
  * @returns {CookieSession|undefined}
3375
+ * @deprecated Use `session.grant` and `GrantSession` instead.
3246
3376
  * @returns {CookieSession | undefined}
3247
3377
  */
3248
3378
  get cookie() {
3249
3379
  const ret = wasm.session_cookie(this.__wbg_ptr);
3250
3380
  return ret === 0 ? undefined : CookieSession.__wrap(ret);
3251
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
+ }
3252
3401
  /**
3253
3402
  * Export the session metadata so it can be restored after a tab refresh.
3254
3403
  *
@@ -3258,7 +3407,7 @@ class Session {
3258
3407
  * @returns {string}
3259
3408
  * A base64 string to store (e.g. in `localStorage`).
3260
3409
  *
3261
- * @deprecated Prefer `exportLocalSecret()` for grant sessions.
3410
+ * @deprecated Use `GrantSession.exportLocalSecret()` instead.
3262
3411
  * @returns {string}
3263
3412
  */
3264
3413
  export() {
@@ -3273,25 +3422,6 @@ class Session {
3273
3422
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3274
3423
  }
3275
3424
  }
3276
- /**
3277
- * Export the local secret material needed to restore this session.
3278
- *
3279
- * For local grant sessions this exports the grant JWS and PoP client secret;
3280
- * restoring mints a fresh bearer. For legacy cookie sessions this exports the
3281
- * cookie secret when the SDK owns it. Delegated browser grant sessions cannot
3282
- * export raw secret material; use `BrowserSessionStore`.
3283
- *
3284
- * Treat the returned string as a bearer-equivalent secret until the grant or
3285
- * cookie session expires or is revoked.
3286
- *
3287
- * @returns {Promise<string>}
3288
- * A secret token that can be passed to `pubky.restoreSession()`.
3289
- * @returns {Promise<string>}
3290
- */
3291
- exportLocalSecret() {
3292
- const ret = wasm.session_exportLocalSecret(this.__wbg_ptr);
3293
- return ret;
3294
- }
3295
3425
  /**
3296
3426
  * Grant-only management view for grant-backed sessions.
3297
3427
  *
@@ -3326,7 +3456,7 @@ class Session {
3326
3456
  * Optional client to reuse transport configuration.
3327
3457
  * @returns {Promise<Session>}
3328
3458
  *
3329
- * @deprecated Prefer `Pubky.restoreSession(...)`.
3459
+ * @deprecated Use `Pubky.restoreSession(...)` with a grant secret.
3330
3460
  * @param {string} exported
3331
3461
  * @param {Client | null} [client]
3332
3462
  * @returns {Promise<Session>}
@@ -3372,7 +3502,6 @@ exports.Session = Session;
3372
3502
  */
3373
3503
  class SessionInfo {
3374
3504
  static __wrap(ptr) {
3375
- ptr = ptr >>> 0;
3376
3505
  const obj = Object.create(SessionInfo.prototype);
3377
3506
  obj.__wbg_ptr = ptr;
3378
3507
  SessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3396,7 +3525,7 @@ class SessionInfo {
3396
3525
  */
3397
3526
  get capabilities() {
3398
3527
  const ret = wasm.sessioninfo_capabilities(this.__wbg_ptr);
3399
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
3528
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
3400
3529
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
3401
3530
  return v1;
3402
3531
  }
@@ -3422,10 +3551,19 @@ exports.SessionInfo = SessionInfo;
3422
3551
 
3423
3552
  /**
3424
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).
3425
3564
  */
3426
3565
  class SessionStorage {
3427
3566
  static __wrap(ptr) {
3428
- ptr = ptr >>> 0;
3429
3567
  const obj = Object.create(SessionStorage.prototype);
3430
3568
  obj.__wbg_ptr = ptr;
3431
3569
  SessionStorageFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3442,10 +3580,12 @@ class SessionStorage {
3442
3580
  wasm.__wbg_sessionstorage_free(ptr, 0);
3443
3581
  }
3444
3582
  /**
3445
- * Delete a path (file or empty directory).
3583
+ * Delete a file. Directory targets are unsupported.
3446
3584
  *
3447
- * @param {Path} path
3585
+ * @param {Path} path File path; must not end with `/`.
3448
3586
  * @returns {Promise<void>}
3587
+ * @throws {PubkyError} Missing file (404), directory target (400), or shared errors
3588
+ * (see {@link SessionStorage}).
3449
3589
  * @param {Path} path
3450
3590
  * @returns {Promise<void>}
3451
3591
  */
@@ -3456,10 +3596,11 @@ class SessionStorage {
3456
3596
  return ret;
3457
3597
  }
3458
3598
  /**
3459
- * Check existence.
3599
+ * Check existence with a HEAD request.
3460
3600
  *
3461
3601
  * @param {Path} path
3462
- * @returns {Promise<boolean>}
3602
+ * @returns {Promise<boolean>} `true` on success; `false` for HTTP 404/410.
3603
+ * @throws {PubkyError} All other failures (see {@link SessionStorage}).
3463
3604
  * @param {Path} path
3464
3605
  * @returns {Promise<boolean>}
3465
3606
  */
@@ -3469,25 +3610,12 @@ class SessionStorage {
3469
3610
  const ret = wasm.sessionstorage_exists(this.__wbg_ptr, ptr0, len0);
3470
3611
  return ret;
3471
3612
  }
3472
- /**
3473
- * GET a streaming response for an absolute session path.
3474
- *
3475
- * @param {Path} path
3476
- * @returns {Promise<Response>}
3477
- * @param {Path} path
3478
- * @returns {Promise<Response>}
3479
- */
3480
- get(path) {
3481
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3482
- const len0 = WASM_VECTOR_LEN;
3483
- const ret = wasm.sessionstorage_get(this.__wbg_ptr, ptr0, len0);
3484
- return ret;
3485
- }
3486
3613
  /**
3487
3614
  * GET bytes from an absolute session path.
3488
3615
  *
3489
3616
  * @param {Path} path
3490
- * @returns {Promise<Uint8Array>}
3617
+ * @returns {Promise<Uint8Array>} The complete response body.
3618
+ * @throws {PubkyError} Missing resource (404/410) or shared errors (see {@link SessionStorage}).
3491
3619
  * @param {Path} path
3492
3620
  * @returns {Promise<Uint8Array>}
3493
3621
  */
@@ -3501,7 +3629,9 @@ class SessionStorage {
3501
3629
  * GET JSON from an absolute session path.
3502
3630
  *
3503
3631
  * @param {Path} path
3504
- * @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}).
3505
3635
  * @param {Path} path
3506
3636
  * @returns {Promise<any>}
3507
3637
  */
@@ -3515,7 +3645,8 @@ class SessionStorage {
3515
3645
  * GET text from an absolute session path.
3516
3646
  *
3517
3647
  * @param {Path} path
3518
- * @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}).
3519
3650
  * @param {Path} path
3520
3651
  * @returns {Promise<string>}
3521
3652
  */
@@ -3526,14 +3657,34 @@ class SessionStorage {
3526
3657
  return ret;
3527
3658
  }
3528
3659
  /**
3529
- * 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).
3530
3679
  *
3531
3680
  * @param {Path} path Must end with `/`.
3532
- * @param {string|null=} cursor Optional suffix or full URL to start **after**.
3681
+ * @param {string|null=} cursor Optional last entry URL to start **after**.
3533
3682
  * @param {boolean=} reverse Default `false`.
3534
3683
  * @param {number=} limit Optional result limit.
3535
3684
  * @param {boolean=} shallow Default `false`.
3536
- * @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}).
3537
3688
  * @param {Path} path
3538
3689
  * @param {string | null} [cursor]
3539
3690
  * @param {boolean | null} [reverse]
@@ -3550,11 +3701,12 @@ class SessionStorage {
3550
3701
  return ret;
3551
3702
  }
3552
3703
  /**
3553
- * PUT binary at an absolute session path.
3704
+ * Create or replace a file with binary data at an absolute session path.
3554
3705
  *
3555
- * @param {Path} path
3556
- * @param {Uint8Array} bytes
3706
+ * @param {Path} path File path; must not end with `/`.
3707
+ * @param {Uint8Array} body
3557
3708
  * @returns {Promise<void>}
3709
+ * @throws {PubkyError} Upload or shared write/request errors (see {@link SessionStorage}).
3558
3710
  * @param {Path} path
3559
3711
  * @param {Uint8Array} body
3560
3712
  * @returns {Promise<void>}
@@ -3568,11 +3720,13 @@ class SessionStorage {
3568
3720
  return ret;
3569
3721
  }
3570
3722
  /**
3571
- * PUT JSON at an absolute session path.
3723
+ * Create or replace a file with JSON at an absolute session path.
3572
3724
  *
3573
- * @param {Path} path Absolute path (e.g. `"/pub/app/data.json"`).
3574
- * @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.
3575
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}).
3576
3730
  * @param {Path} path
3577
3731
  * @param {any} body
3578
3732
  * @returns {Promise<void>}
@@ -3584,11 +3738,12 @@ class SessionStorage {
3584
3738
  return ret;
3585
3739
  }
3586
3740
  /**
3587
- * PUT text at an absolute session path.
3741
+ * Create or replace a file with text at an absolute session path.
3588
3742
  *
3589
- * @param {Path} path
3590
- * @param {string} text
3743
+ * @param {Path} path File path; must not end with `/`.
3744
+ * @param {string} body
3591
3745
  * @returns {Promise<void>}
3746
+ * @throws {PubkyError} Upload or shared write/request errors (see {@link SessionStorage}).
3592
3747
  * @param {Path} path
3593
3748
  * @param {string} body
3594
3749
  * @returns {Promise<void>}
@@ -3604,9 +3759,11 @@ class SessionStorage {
3604
3759
  /**
3605
3760
  * Get metadata for an absolute, session-scoped path (e.g. `"/pub/app/file.json"`).
3606
3761
  *
3762
+ * On success, missing or unparseable metadata headers leave their properties absent.
3763
+ *
3607
3764
  * @param {Path} path Absolute path under your user (starts with `/`).
3608
- * @returns {Promise<ResourceStats|undefined>} `undefined` if the resource does not exist.
3609
- * @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}).
3610
3767
  * @param {Path} path
3611
3768
  * @returns {Promise<ResourceStats | undefined>}
3612
3769
  */
@@ -3629,7 +3786,6 @@ exports.SessionStorage = SessionStorage;
3629
3786
  */
3630
3787
  class Signer {
3631
3788
  static __wrap(ptr) {
3632
- ptr = ptr >>> 0;
3633
3789
  const obj = Object.create(Signer.prototype);
3634
3790
  obj.__wbg_ptr = ptr;
3635
3791
  SignerFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3710,39 +3866,30 @@ class Signer {
3710
3866
  return PublicKey.__wrap(ret);
3711
3867
  }
3712
3868
  /**
3713
- * Fast sign-in for a returning user. Publishes PKDNS in the background.
3869
+ * Blocking sign-in. Waits for PKDNS publish to complete (slower; safer).
3714
3870
  *
3715
3871
  * Creates a valid grant-backed homeserver Session with root capabilities.
3716
3872
  * `clientId` is shown in the user's grant/session list.
3717
3873
  * @param {string} clientId App identifier, typically a domain.
3718
3874
  *
3719
3875
  * @returns {Promise<Session>}
3720
- *
3721
- * @throws {PubkyError}
3722
3876
  * @param {string} client_id
3723
3877
  * @returns {Promise<Session>}
3724
3878
  */
3725
- signin(client_id) {
3879
+ signinBlocking(client_id) {
3726
3880
  const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3727
3881
  const len0 = WASM_VECTOR_LEN;
3728
- const ret = wasm.signer_signin(this.__wbg_ptr, ptr0, len0);
3882
+ const ret = wasm.signer_signinBlocking(this.__wbg_ptr, ptr0, len0);
3729
3883
  return ret;
3730
3884
  }
3731
3885
  /**
3732
- * Blocking sign-in. Waits for PKDNS publish to complete (slower; safer).
3733
- *
3734
- * Creates a valid grant-backed homeserver Session with root capabilities.
3735
- * `clientId` is shown in the user's grant/session list.
3736
- * @param {string} clientId App identifier, typically a domain.
3886
+ * Legacy cookie blocking signin. Prefer `signinBlocking(clientId)`.
3737
3887
  *
3738
- * @returns {Promise<Session>}
3739
- * @param {string} client_id
3888
+ * @deprecated Prefer `signinBlocking(clientId)`.
3740
3889
  * @returns {Promise<Session>}
3741
3890
  */
3742
- signinBlocking(client_id) {
3743
- const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3744
- const len0 = WASM_VECTOR_LEN;
3745
- const ret = wasm.signer_signinBlocking(this.__wbg_ptr, ptr0, len0);
3891
+ signinCookieBlocking() {
3892
+ const ret = wasm.signer_signinCookieBlocking(this.__wbg_ptr);
3746
3893
  return ret;
3747
3894
  }
3748
3895
  /**
@@ -3756,13 +3903,37 @@ class Signer {
3756
3903
  return ret;
3757
3904
  }
3758
3905
  /**
3759
- * Legacy cookie blocking signin. Prefer `signinBlocking(clientId)`.
3906
+ * Fast sign-in for a returning user. Publishes PKDNS in the background.
3760
3907
  *
3761
- * @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
3762
3916
  * @returns {Promise<Session>}
3763
3917
  */
3764
- signinCookieBlocking() {
3765
- 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);
3766
3937
  return ret;
3767
3938
  }
3768
3939
  /**
@@ -3788,28 +3959,12 @@ class Signer {
3788
3959
  const ret = wasm.signer_signup(this.__wbg_ptr, homeserver.__wbg_ptr, ptr0, len0);
3789
3960
  return ret;
3790
3961
  }
3791
- /**
3792
- * Legacy cookie signup. Prefer `signup()` plus `signin(clientId)`.
3793
- *
3794
- * @deprecated Prefer `signup()` followed by `signin(clientId)`.
3795
- * @param {PublicKey} homeserver
3796
- * @param {string | null} [signup_token]
3797
- * @returns {Promise<Session>}
3798
- */
3799
- signupCookie(homeserver, signup_token) {
3800
- _assertClass(homeserver, PublicKey);
3801
- var ptr0 = isLikeNone(signup_token) ? 0 : passStringToWasm0(signup_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3802
- var len0 = WASM_VECTOR_LEN;
3803
- const ret = wasm.signer_signupCookie(this.__wbg_ptr, homeserver.__wbg_ptr, ptr0, len0);
3804
- return ret;
3805
- }
3806
3962
  }
3807
3963
  if (Symbol.dispose) Signer.prototype[Symbol.dispose] = Signer.prototype.free;
3808
3964
  exports.Signer = Signer;
3809
3965
 
3810
3966
  class SigninDeepLink {
3811
3967
  static __wrap(ptr) {
3812
- ptr = ptr >>> 0;
3813
3968
  const obj = Object.create(SigninDeepLink.prototype);
3814
3969
  obj.__wbg_ptr = ptr;
3815
3970
  SigninDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -3896,7 +4051,10 @@ class SigninDeepLink {
3896
4051
  */
3897
4052
  get xCallback() {
3898
4053
  const ret = wasm.signindeeplink_xCallback(this.__wbg_ptr);
3899
- return ret;
4054
+ if (ret[2]) {
4055
+ throw takeFromExternrefTable0(ret[1]);
4056
+ }
4057
+ return takeFromExternrefTable0(ret[0]);
3900
4058
  }
3901
4059
  }
3902
4060
  if (Symbol.dispose) SigninDeepLink.prototype[Symbol.dispose] = SigninDeepLink.prototype.free;
@@ -3910,7 +4068,6 @@ exports.SigninDeepLink = SigninDeepLink;
3910
4068
  */
3911
4069
  class SigninGrantDeepLink {
3912
4070
  static __wrap(ptr) {
3913
- ptr = ptr >>> 0;
3914
4071
  const obj = Object.create(SigninGrantDeepLink.prototype);
3915
4072
  obj.__wbg_ptr = ptr;
3916
4073
  SigninGrantDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4044,7 +4201,10 @@ class SigninGrantDeepLink {
4044
4201
  */
4045
4202
  get xCallback() {
4046
4203
  const ret = wasm.signingrantdeeplink_xCallback(this.__wbg_ptr);
4047
- return ret;
4204
+ if (ret[2]) {
4205
+ throw takeFromExternrefTable0(ret[1]);
4206
+ }
4207
+ return takeFromExternrefTable0(ret[0]);
4048
4208
  }
4049
4209
  }
4050
4210
  if (Symbol.dispose) SigninGrantDeepLink.prototype[Symbol.dispose] = SigninGrantDeepLink.prototype.free;
@@ -4052,7 +4212,6 @@ exports.SigninGrantDeepLink = SigninGrantDeepLink;
4052
4212
 
4053
4213
  class SignupDeepLink {
4054
4214
  static __wrap(ptr) {
4055
- ptr = ptr >>> 0;
4056
4215
  const obj = Object.create(SignupDeepLink.prototype);
4057
4216
  obj.__wbg_ptr = ptr;
4058
4217
  SignupDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4132,7 +4291,7 @@ class SignupDeepLink {
4132
4291
  const ret = wasm.signupdeeplink_signupToken(this.__wbg_ptr);
4133
4292
  let v1;
4134
4293
  if (ret[0] !== 0) {
4135
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
4294
+ v1 = getStringFromWasm0(ret[0], ret[1]);
4136
4295
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4137
4296
  }
4138
4297
  return v1;
@@ -4158,7 +4317,10 @@ class SignupDeepLink {
4158
4317
  */
4159
4318
  get xCallback() {
4160
4319
  const ret = wasm.signupdeeplink_xCallback(this.__wbg_ptr);
4161
- return ret;
4320
+ if (ret[2]) {
4321
+ throw takeFromExternrefTable0(ret[1]);
4322
+ }
4323
+ return takeFromExternrefTable0(ret[0]);
4162
4324
  }
4163
4325
  }
4164
4326
  if (Symbol.dispose) SignupDeepLink.prototype[Symbol.dispose] = SignupDeepLink.prototype.free;
@@ -4172,7 +4334,6 @@ exports.SignupDeepLink = SignupDeepLink;
4172
4334
  */
4173
4335
  class SignupGrantDeepLink {
4174
4336
  static __wrap(ptr) {
4175
- ptr = ptr >>> 0;
4176
4337
  const obj = Object.create(SignupGrantDeepLink.prototype);
4177
4338
  obj.__wbg_ptr = ptr;
4178
4339
  SignupGrantDeepLinkFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4302,7 +4463,7 @@ class SignupGrantDeepLink {
4302
4463
  const ret = wasm.signupgrantdeeplink_signupToken(this.__wbg_ptr);
4303
4464
  let v1;
4304
4465
  if (ret[0] !== 0) {
4305
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
4466
+ v1 = getStringFromWasm0(ret[0], ret[1]);
4306
4467
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4307
4468
  }
4308
4469
  return v1;
@@ -4331,7 +4492,10 @@ class SignupGrantDeepLink {
4331
4492
  */
4332
4493
  get xCallback() {
4333
4494
  const ret = wasm.signupgrantdeeplink_xCallback(this.__wbg_ptr);
4334
- return ret;
4495
+ if (ret[2]) {
4496
+ throw takeFromExternrefTable0(ret[1]);
4497
+ }
4498
+ return takeFromExternrefTable0(ret[0]);
4335
4499
  }
4336
4500
  }
4337
4501
  if (Symbol.dispose) SignupGrantDeepLink.prototype[Symbol.dispose] = SignupGrantDeepLink.prototype.free;
@@ -4342,7 +4506,6 @@ exports.SignupGrantDeepLink = SignupGrantDeepLink;
4342
4506
  */
4343
4507
  class StoredSessionInfo {
4344
4508
  static __wrap(ptr) {
4345
- ptr = ptr >>> 0;
4346
4509
  const obj = Object.create(StoredSessionInfo.prototype);
4347
4510
  obj.__wbg_ptr = ptr;
4348
4511
  StoredSessionInfoFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -4364,7 +4527,7 @@ class StoredSessionInfo {
4364
4527
  */
4365
4528
  get capabilities() {
4366
4529
  const ret = wasm.storedsessioninfo_capabilities(this.__wbg_ptr);
4367
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
4530
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
4368
4531
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
4369
4532
  return v1;
4370
4533
  }
@@ -4488,7 +4651,7 @@ exports.StoredSessionInfo = StoredSessionInfo;
4488
4651
  * Resolve a `pubky://` or `pubky<pk>/…` identifier into the homeserver transport URL.
4489
4652
  *
4490
4653
  * @param {string} identifier Either `pubky<pk>/...` (preferred) or `pubky://<pk>/...`.
4491
- * @returns {string} HTTPS URL in the form `https://_pubky.<pk>/...`.
4654
+ * @returns {string} HTTPS URL in the form `https://_pubky.<pk>/storage/<pk>/...`.
4492
4655
  * @param {string} identifier
4493
4656
  * @returns {string}
4494
4657
  */
@@ -4643,10 +4806,14 @@ const import7 = {
4643
4806
  function __wbg_get_imports() {
4644
4807
  const import0 = {
4645
4808
  __proto__: null,
4646
- __wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
4809
+ __wbg_Error_67e7344beaa85059: function(arg0, arg1) {
4647
4810
  const ret = Error(getStringFromWasm0(arg0, arg1));
4648
4811
  return ret;
4649
4812
  },
4813
+ __wbg_Number_c54e7112a3fa7e3e: function(arg0) {
4814
+ const ret = Number(arg0);
4815
+ return ret;
4816
+ },
4650
4817
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
4651
4818
  const ret = String(arg1);
4652
4819
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -4654,7 +4821,7 @@ function __wbg_get_imports() {
4654
4821
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4655
4822
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4656
4823
  },
4657
- __wbg___pubkyGrantDelegatedSign_5cb443da0321d209: function(arg0, arg1, arg2, arg3) {
4824
+ __wbg___pubkyGrantDelegatedSign_ecb9671d177b1233: function(arg0, arg1, arg2, arg3) {
4658
4825
  let deferred0_0;
4659
4826
  let deferred0_1;
4660
4827
  let deferred1_0;
@@ -4671,7 +4838,7 @@ function __wbg_get_imports() {
4671
4838
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
4672
4839
  }
4673
4840
  },
4674
- __wbg___pubkyGrantDeleteDelegatedKey_0f4d62b84caef0fa: function(arg0, arg1) {
4841
+ __wbg___pubkyGrantDeleteDelegatedKey_0f2c0fecfd2e66cf: function(arg0, arg1) {
4675
4842
  let deferred0_0;
4676
4843
  let deferred0_1;
4677
4844
  try {
@@ -4683,16 +4850,16 @@ function __wbg_get_imports() {
4683
4850
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4684
4851
  }
4685
4852
  },
4686
- __wbg___pubkyGrantEnsureDelegatedKey_8e535d8d53f48fdc: function(arg0, arg1) {
4853
+ __wbg___pubkyGrantEnsureDelegatedKey_41025ea43dcb2326: function(arg0, arg1) {
4687
4854
  let v0;
4688
4855
  if (arg0 !== 0) {
4689
- v0 = getStringFromWasm0(arg0, arg1).slice();
4856
+ v0 = getStringFromWasm0(arg0, arg1);
4690
4857
  wasm.__wbindgen_free(arg0, arg1 * 1, 1);
4691
4858
  }
4692
4859
  const ret = __pubkyGrantEnsureDelegatedKey(v0);
4693
4860
  return ret;
4694
4861
  },
4695
- __wbg___pubkyGrantLoadDelegatedPublicKey_501aaeb6b721477e: function(arg0, arg1) {
4862
+ __wbg___pubkyGrantLoadDelegatedPublicKey_bc05e38e83a67feb: function(arg0, arg1) {
4696
4863
  let deferred0_0;
4697
4864
  let deferred0_1;
4698
4865
  try {
@@ -4704,7 +4871,7 @@ function __wbg_get_imports() {
4704
4871
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4705
4872
  }
4706
4873
  },
4707
- __wbg___pubkySessionStoreDelete_9809101d930e5c86: function(arg0, arg1) {
4874
+ __wbg___pubkySessionStoreDelete_d4689978f1155614: function(arg0, arg1) {
4708
4875
  let deferred0_0;
4709
4876
  let deferred0_1;
4710
4877
  try {
@@ -4716,7 +4883,7 @@ function __wbg_get_imports() {
4716
4883
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4717
4884
  }
4718
4885
  },
4719
- __wbg___pubkySessionStoreGet_c67e79fe9c058d05: function(arg0, arg1) {
4886
+ __wbg___pubkySessionStoreGet_bcd46ba3e7ab2ce6: function(arg0, arg1) {
4720
4887
  let deferred0_0;
4721
4888
  let deferred0_1;
4722
4889
  try {
@@ -4728,68 +4895,68 @@ function __wbg_get_imports() {
4728
4895
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4729
4896
  }
4730
4897
  },
4731
- __wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51: function(arg0, arg1) {
4898
+ __wbg___wbindgen_bigint_get_as_i64_b482365c149396c8: function(arg0, arg1) {
4732
4899
  const v = arg1;
4733
4900
  const ret = typeof(v) === 'bigint' ? v : undefined;
4734
4901
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
4735
4902
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
4736
4903
  },
4737
- __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
4904
+ __wbg___wbindgen_boolean_get_7a12af2b3f899c5a: function(arg0) {
4738
4905
  const v = arg0;
4739
4906
  const ret = typeof(v) === 'boolean' ? v : undefined;
4740
4907
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
4741
4908
  },
4742
- __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
4909
+ __wbg___wbindgen_debug_string_0e68cf47c9cbd9b0: function(arg0, arg1) {
4743
4910
  const ret = debugString(arg1);
4744
4911
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4745
4912
  const len1 = WASM_VECTOR_LEN;
4746
4913
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4747
4914
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4748
4915
  },
4749
- __wbg___wbindgen_in_a5d8b22e52b24dd1: function(arg0, arg1) {
4916
+ __wbg___wbindgen_in_50072d4d6e45c193: function(arg0, arg1) {
4750
4917
  const ret = arg0 in arg1;
4751
4918
  return ret;
4752
4919
  },
4753
- __wbg___wbindgen_is_bigint_ec25c7f91b4d9e93: function(arg0) {
4920
+ __wbg___wbindgen_is_bigint_60fc0336cb14f5d7: function(arg0) {
4754
4921
  const ret = typeof(arg0) === 'bigint';
4755
4922
  return ret;
4756
4923
  },
4757
- __wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
4924
+ __wbg___wbindgen_is_function_fcda5e3902d732fe: function(arg0) {
4758
4925
  const ret = typeof(arg0) === 'function';
4759
4926
  return ret;
4760
4927
  },
4761
- __wbg___wbindgen_is_null_52ff4ec04186736f: function(arg0) {
4928
+ __wbg___wbindgen_is_null_5160b3e381865372: function(arg0) {
4762
4929
  const ret = arg0 === null;
4763
4930
  return ret;
4764
4931
  },
4765
- __wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
4932
+ __wbg___wbindgen_is_object_edb6b15aa3afe12e: function(arg0) {
4766
4933
  const val = arg0;
4767
4934
  const ret = typeof(val) === 'object' && val !== null;
4768
4935
  return ret;
4769
4936
  },
4770
- __wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
4937
+ __wbg___wbindgen_is_string_c4f7cb494a2a21f1: function(arg0) {
4771
4938
  const ret = typeof(arg0) === 'string';
4772
4939
  return ret;
4773
4940
  },
4774
- __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
4941
+ __wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) {
4775
4942
  const ret = arg0 === undefined;
4776
4943
  return ret;
4777
4944
  },
4778
- __wbg___wbindgen_jsval_eq_d3465d8a07697228: function(arg0, arg1) {
4945
+ __wbg___wbindgen_jsval_eq_9fdcd3c0a860dd3b: function(arg0, arg1) {
4779
4946
  const ret = arg0 === arg1;
4780
4947
  return ret;
4781
4948
  },
4782
- __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c: function(arg0, arg1) {
4949
+ __wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd: function(arg0, arg1) {
4783
4950
  const ret = arg0 == arg1;
4784
4951
  return ret;
4785
4952
  },
4786
- __wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
4953
+ __wbg___wbindgen_number_get_1dc732b810cb937c: function(arg0, arg1) {
4787
4954
  const obj = arg1;
4788
4955
  const ret = typeof(obj) === 'number' ? obj : undefined;
4789
4956
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
4790
4957
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
4791
4958
  },
4792
- __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
4959
+ __wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) {
4793
4960
  const obj = arg1;
4794
4961
  const ret = typeof(obj) === 'string' ? obj : undefined;
4795
4962
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -4797,22 +4964,22 @@ function __wbg_get_imports() {
4797
4964
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4798
4965
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4799
4966
  },
4800
- __wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
4967
+ __wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
4801
4968
  throw new Error(getStringFromWasm0(arg0, arg1));
4802
4969
  },
4803
- __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
4970
+ __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
4804
4971
  arg0._wbg_cb_unref();
4805
4972
  },
4806
- __wbg_abort_4ce5b484434ef6fd: function(arg0) {
4807
- arg0.abort();
4808
- },
4809
- __wbg_abort_d53712380a54cc81: function(arg0, arg1) {
4973
+ __wbg_abort_03f8c5804715cb9a: function(arg0, arg1) {
4810
4974
  arg0.abort(arg1);
4811
4975
  },
4812
- __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) {
4813
4980
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
4814
4981
  }, arguments); },
4815
- __wbg_arrayBuffer_848c392b70c67d3d: function() { return handleError(function (arg0) {
4982
+ __wbg_arrayBuffer_06f3da76f071d37f: function() { return handleError(function (arg0) {
4816
4983
  const ret = arg0.arrayBuffer();
4817
4984
  return ret;
4818
4985
  }, arguments); },
@@ -4820,39 +4987,39 @@ function __wbg_get_imports() {
4820
4987
  const ret = AuthToken.__wrap(arg0);
4821
4988
  return ret;
4822
4989
  },
4823
- __wbg_body_0c3a51aec038a31a: function(arg0) {
4990
+ __wbg_body_9ee03724e9ad0639: function(arg0) {
4824
4991
  const ret = arg0.body;
4825
4992
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4826
4993
  },
4827
- __wbg_buffer_d0f5ea0926a691fd: function(arg0) {
4994
+ __wbg_buffer_4a989bded7035f57: function(arg0) {
4828
4995
  const ret = arg0.buffer;
4829
4996
  return ret;
4830
4997
  },
4831
- __wbg_byobRequest_dc6aed9db01b12c6: function(arg0) {
4998
+ __wbg_byobRequest_f161fc37241dd3d4: function(arg0) {
4832
4999
  const ret = arg0.byobRequest;
4833
5000
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4834
5001
  },
4835
- __wbg_byteLength_3e660e5661f3327e: function(arg0) {
5002
+ __wbg_byteLength_0ddb1795e2c7e689: function(arg0) {
4836
5003
  const ret = arg0.byteLength;
4837
5004
  return ret;
4838
5005
  },
4839
- __wbg_byteOffset_ecd62abe44dd28d4: function(arg0) {
5006
+ __wbg_byteOffset_46eb015f52b6ad7d: function(arg0) {
4840
5007
  const ret = arg0.byteOffset;
4841
5008
  return ret;
4842
5009
  },
4843
- __wbg_call_14b169f759b26747: function() { return handleError(function (arg0, arg1) {
5010
+ __wbg_call_269c5566fbede3eb: function() { return handleError(function (arg0, arg1) {
4844
5011
  const ret = arg0.call(arg1);
4845
5012
  return ret;
4846
5013
  }, arguments); },
4847
- __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
5014
+ __wbg_call_6bcf8d3e20937e46: function() { return handleError(function (arg0, arg1, arg2) {
4848
5015
  const ret = arg0.call(arg1, arg2);
4849
5016
  return ret;
4850
5017
  }, arguments); },
4851
- __wbg_cancel_ceb1bda02e29f0a9: function(arg0) {
5018
+ __wbg_cancel_c076350a7e8954be: function(arg0) {
4852
5019
  const ret = arg0.cancel();
4853
5020
  return ret;
4854
5021
  },
4855
- __wbg_catch_e9362815fd0b24cf: function(arg0, arg1) {
5022
+ __wbg_catch_e2134ef6dcdb69ed: function(arg0, arg1) {
4856
5023
  const ret = arg0.catch(arg1);
4857
5024
  return ret;
4858
5025
  },
@@ -4860,35 +5027,35 @@ function __wbg_get_imports() {
4860
5027
  const ret = clearTimeout(arg0);
4861
5028
  return ret;
4862
5029
  },
4863
- __wbg_close_e6c8977a002e9e13: function() { return handleError(function (arg0) {
5030
+ __wbg_close_22882088c136df25: function() { return handleError(function (arg0) {
4864
5031
  arg0.close();
4865
5032
  }, arguments); },
4866
- __wbg_close_fb954dfaf67b5732: function() { return handleError(function (arg0) {
5033
+ __wbg_close_8b609460dd26e367: function() { return handleError(function (arg0) {
4867
5034
  arg0.close();
4868
5035
  }, arguments); },
4869
5036
  __wbg_crypto_38df2bab126b63dc: function(arg0) {
4870
5037
  const ret = arg0.crypto;
4871
5038
  return ret;
4872
5039
  },
4873
- __wbg_debug_4e190d233ee2e0d8: function(arg0, arg1, arg2, arg3) {
5040
+ __wbg_debug_d6d1b899018fb5ec: function(arg0, arg1, arg2, arg3) {
4874
5041
  console.debug(arg0, arg1, arg2, arg3);
4875
5042
  },
4876
- __wbg_done_9158f7cc8751ba32: function(arg0) {
5043
+ __wbg_done_cffed884d87aa22e: function(arg0) {
4877
5044
  const ret = arg0.done;
4878
5045
  return ret;
4879
5046
  },
4880
- __wbg_enqueue_4767ce322820c94d: function() { return handleError(function (arg0, arg1) {
5047
+ __wbg_enqueue_6cb545d22db14f33: function() { return handleError(function (arg0, arg1) {
4881
5048
  arg0.enqueue(arg1);
4882
5049
  }, arguments); },
4883
- __wbg_entries_bf727fcd7bf35a41: function(arg0) {
4884
- const ret = arg0.entries();
5050
+ __wbg_entries_972a87586902cf87: function(arg0) {
5051
+ const ret = Object.entries(arg0);
4885
5052
  return ret;
4886
5053
  },
4887
- __wbg_entries_e0b73aa8571ddb56: function(arg0) {
4888
- const ret = Object.entries(arg0);
5054
+ __wbg_entries_f9de04c09a57314e: function(arg0) {
5055
+ const ret = arg0.entries();
4889
5056
  return ret;
4890
5057
  },
4891
- __wbg_error_a6a4bb2525a88971: function(arg0, arg1, arg2, arg3) {
5058
+ __wbg_error_83ae2b0e77197298: function(arg0, arg1, arg2, arg3) {
4892
5059
  console.error(arg0, arg1, arg2, arg3);
4893
5060
  },
4894
5061
  __wbg_event_new: function(arg0) {
@@ -4899,19 +5066,19 @@ function __wbg_get_imports() {
4899
5066
  const ret = fetch(arg0);
4900
5067
  return ret;
4901
5068
  },
4902
- __wbg_fetch_0d322c0aed196b8b: function(arg0, arg1) {
4903
- const ret = arg0.fetch(arg1);
5069
+ __wbg_fetch_6eb1b0b731234c3e: function(arg0) {
5070
+ const ret = fetch(arg0);
4904
5071
  return ret;
4905
5072
  },
4906
- __wbg_fetch_7888dbbb5aebe24d: function(arg0) {
4907
- const ret = fetch(arg0);
5073
+ __wbg_fetch_920242d59bac2026: function(arg0, arg1) {
5074
+ const ret = arg0.fetch(arg1);
4908
5075
  return ret;
4909
5076
  },
4910
- __wbg_from_0dbf29f09e7fb200: function(arg0) {
5077
+ __wbg_from_a39669ce566077da: function(arg0) {
4911
5078
  const ret = Array.from(arg0);
4912
5079
  return ret;
4913
5080
  },
4914
- __wbg_getRandomValues_76dfc69825c9c552: function() { return handleError(function (arg0, arg1) {
5081
+ __wbg_getRandomValues_436a51d0629d84e1: function() { return handleError(function (arg0, arg1) {
4915
5082
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
4916
5083
  }, arguments); },
4917
5084
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
@@ -4921,27 +5088,27 @@ function __wbg_get_imports() {
4921
5088
  const ret = arg0.getReader();
4922
5089
  return ret;
4923
5090
  }, arguments); },
4924
- __wbg_get_1affdbdd5573b16a: function() { return handleError(function (arg0, arg1) {
5091
+ __wbg_get_6cf5a4d4d8ad3c5a: function() { return handleError(function (arg0, arg1) {
4925
5092
  const ret = Reflect.get(arg0, arg1);
4926
5093
  return ret;
4927
5094
  }, arguments); },
4928
- __wbg_get_6011fa3a58f61074: function() { return handleError(function (arg0, arg1) {
5095
+ __wbg_get_989d0a1309644f2b: function() { return handleError(function (arg0, arg1) {
4929
5096
  const ret = Reflect.get(arg0, arg1);
4930
5097
  return ret;
4931
5098
  }, arguments); },
4932
- __wbg_get_8360291721e2339f: function(arg0, arg1) {
5099
+ __wbg_get_b1f0ab13c737f856: function(arg0, arg1) {
4933
5100
  const ret = arg0[arg1 >>> 0];
4934
5101
  return ret;
4935
5102
  },
4936
- __wbg_get_done_282bca5d3f90e0a8: function(arg0) {
5103
+ __wbg_get_done_a668aa62d81fad70: function(arg0) {
4937
5104
  const ret = arg0.done;
4938
5105
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
4939
5106
  },
4940
- __wbg_get_unchecked_17f53dad852b9588: function(arg0, arg1) {
5107
+ __wbg_get_unchecked_363572bdd397d473: function(arg0, arg1) {
4941
5108
  const ret = arg0[arg1 >>> 0];
4942
5109
  return ret;
4943
5110
  },
4944
- __wbg_get_value_65a7a2c60b42fd75: function(arg0) {
5111
+ __wbg_get_value_6c62a77c168d825a: function(arg0) {
4945
5112
  const ret = arg0.value;
4946
5113
  return ret;
4947
5114
  },
@@ -4961,18 +5128,18 @@ function __wbg_get_imports() {
4961
5128
  const ret = GrantSessionInfo.__wrap(arg0);
4962
5129
  return ret;
4963
5130
  },
4964
- __wbg_has_880f1d472f7cecba: function() { return handleError(function (arg0, arg1) {
5131
+ __wbg_has_464f8b9416279d65: function() { return handleError(function (arg0, arg1) {
4965
5132
  const ret = Reflect.has(arg0, arg1);
4966
5133
  return ret;
4967
5134
  }, arguments); },
4968
- __wbg_headers_6022deb4e576fb8e: function(arg0) {
5135
+ __wbg_headers_2594464ff62969f3: function(arg0) {
4969
5136
  const ret = arg0.headers;
4970
5137
  return ret;
4971
5138
  },
4972
- __wbg_info_e1c3400f7bf783dc: function(arg0, arg1, arg2, arg3) {
5139
+ __wbg_info_01cb0b0ae0fde22f: function(arg0, arg1, arg2, arg3) {
4973
5140
  console.info(arg0, arg1, arg2, arg3);
4974
5141
  },
4975
- __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
5142
+ __wbg_instanceof_ArrayBuffer_d4ff01f8247925ae: function(arg0) {
4976
5143
  let result;
4977
5144
  try {
4978
5145
  result = arg0 instanceof ArrayBuffer;
@@ -4982,7 +5149,7 @@ function __wbg_get_imports() {
4982
5149
  const ret = result;
4983
5150
  return ret;
4984
5151
  },
4985
- __wbg_instanceof_Error_6872d63ba7922898: function(arg0) {
5152
+ __wbg_instanceof_Error_fe6fa771c78ee4cf: function(arg0) {
4986
5153
  let result;
4987
5154
  try {
4988
5155
  result = arg0 instanceof Error;
@@ -4992,7 +5159,7 @@ function __wbg_get_imports() {
4992
5159
  const ret = result;
4993
5160
  return ret;
4994
5161
  },
4995
- __wbg_instanceof_Headers_6026d655161c2300: function(arg0) {
5162
+ __wbg_instanceof_Headers_b1a833e675bdf12d: function(arg0) {
4996
5163
  let result;
4997
5164
  try {
4998
5165
  result = arg0 instanceof Headers;
@@ -5002,7 +5169,7 @@ function __wbg_get_imports() {
5002
5169
  const ret = result;
5003
5170
  return ret;
5004
5171
  },
5005
- __wbg_instanceof_Map_1b76fd4635be43eb: function(arg0) {
5172
+ __wbg_instanceof_Map_1ff6a2b54c899f0d: function(arg0) {
5006
5173
  let result;
5007
5174
  try {
5008
5175
  result = arg0 instanceof Map;
@@ -5012,7 +5179,7 @@ function __wbg_get_imports() {
5012
5179
  const ret = result;
5013
5180
  return ret;
5014
5181
  },
5015
- __wbg_instanceof_Response_9b2d111407865ff2: function(arg0) {
5182
+ __wbg_instanceof_Response_6366a785e400039b: function(arg0) {
5016
5183
  let result;
5017
5184
  try {
5018
5185
  result = arg0 instanceof Response;
@@ -5022,7 +5189,7 @@ function __wbg_get_imports() {
5022
5189
  const ret = result;
5023
5190
  return ret;
5024
5191
  },
5025
- __wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
5192
+ __wbg_instanceof_Uint8Array_598adc0fef426aa8: function(arg0) {
5026
5193
  let result;
5027
5194
  try {
5028
5195
  result = arg0 instanceof Uint8Array;
@@ -5032,73 +5199,73 @@ function __wbg_get_imports() {
5032
5199
  const ret = result;
5033
5200
  return ret;
5034
5201
  },
5035
- __wbg_isArray_c3109d14ffc06469: function(arg0) {
5202
+ __wbg_isArray_5674713bb7b79043: function(arg0) {
5036
5203
  const ret = Array.isArray(arg0);
5037
5204
  return ret;
5038
5205
  },
5039
- __wbg_isSafeInteger_4fc213d1989d6d2a: function(arg0) {
5206
+ __wbg_isSafeInteger_8f51c743827d1ec5: function(arg0) {
5040
5207
  const ret = Number.isSafeInteger(arg0);
5041
5208
  return ret;
5042
5209
  },
5043
- __wbg_iterator_013bc09ec998c2a7: function() {
5210
+ __wbg_iterator_22ddeb808cf55a6f: function() {
5044
5211
  const ret = Symbol.iterator;
5045
5212
  return ret;
5046
5213
  },
5047
- __wbg_length_3d4ecd04bd8d22f1: function(arg0) {
5214
+ __wbg_length_31bdaf014f5fbde2: function(arg0) {
5048
5215
  const ret = arg0.length;
5049
5216
  return ret;
5050
5217
  },
5051
- __wbg_length_9f1775224cf1d815: function(arg0) {
5218
+ __wbg_length_4e1adc0d42e23620: function(arg0) {
5052
5219
  const ret = arg0.length;
5053
5220
  return ret;
5054
5221
  },
5055
- __wbg_log_465fe3993e4051bf: function(arg0, arg1, arg2, arg3) {
5222
+ __wbg_log_d4082f66a52944c3: function(arg0, arg1, arg2, arg3) {
5056
5223
  console.log(arg0, arg1, arg2, arg3);
5057
5224
  },
5058
5225
  __wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
5059
5226
  const ret = arg0.msCrypto;
5060
5227
  return ret;
5061
5228
  },
5062
- __wbg_new_0c7403db6e782f19: function(arg0) {
5063
- const ret = new Uint8Array(arg0);
5064
- return ret;
5065
- },
5066
- __wbg_new_15a4889b4b90734d: function() { return handleError(function () {
5229
+ __wbg_new_0afe64b4dc16ab74: function() { return handleError(function () {
5067
5230
  const ret = new Headers();
5068
5231
  return ret;
5069
5232
  }, arguments); },
5070
- __wbg_new_34d45cc8e36aaead: function() {
5071
- const ret = new Map();
5233
+ __wbg_new_1da3429bc3c4541c: function(arg0) {
5234
+ const ret = new Uint8Array(arg0);
5072
5235
  return ret;
5073
5236
  },
5074
- __wbg_new_5e360d2ff7b9e1c3: function(arg0, arg1) {
5075
- const ret = new Error(getStringFromWasm0(arg0, arg1));
5237
+ __wbg_new_8d36e20aa758e411: function() {
5238
+ const ret = new Map();
5076
5239
  return ret;
5077
5240
  },
5078
- __wbg_new_682678e2f47e32bc: function() {
5079
- const ret = new Array();
5241
+ __wbg_new_a32a1ab6c6655abe: function(arg0, arg1) {
5242
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
5080
5243
  return ret;
5081
5244
  },
5082
- __wbg_new_98c22165a42231aa: function() { return handleError(function () {
5245
+ __wbg_new_baa0a0207935dd43: function() { return handleError(function () {
5083
5246
  const ret = new AbortController();
5084
5247
  return ret;
5085
5248
  }, arguments); },
5086
- __wbg_new_aa8d0fa9762c29bd: function() {
5249
+ __wbg_new_bebc3f4757acf305: function() {
5087
5250
  const ret = new Object();
5088
5251
  return ret;
5089
5252
  },
5090
- __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) {
5091
5258
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
5092
5259
  return ret;
5093
5260
  },
5094
- __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
5261
+ __wbg_new_typed_6f8b0d724fe26c07: function(arg0, arg1) {
5095
5262
  try {
5096
5263
  var state0 = {a: arg0, b: arg1};
5097
5264
  var cb0 = (arg0, arg1) => {
5098
5265
  const a = state0.a;
5099
5266
  state0.a = 0;
5100
5267
  try {
5101
- return wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___js_sys_4b0493a0be09c0f___Function_fn_wasm_bindgen_77cee878d4ea2fd9___JsValue_____wasm_bindgen_77cee878d4ea2fd9___sys__Undefined___js_sys_4b0493a0be09c0f___Function_fn_wasm_bindgen_77cee878d4ea2fd9___JsValue_____wasm_bindgen_77cee878d4ea2fd9___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);
5102
5269
  } finally {
5103
5270
  state0.a = a;
5104
5271
  }
@@ -5109,39 +5276,39 @@ function __wbg_get_imports() {
5109
5276
  state0.a = 0;
5110
5277
  }
5111
5278
  },
5112
- __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) {
5113
5280
  const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
5114
5281
  return ret;
5115
5282
  },
5116
- __wbg_new_with_into_underlying_source_fd904252f385f59c: function(arg0, arg1) {
5117
- 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);
5118
5285
  return ret;
5119
5286
  },
5120
- __wbg_new_with_length_8c854e41ea4dae9b: function(arg0) {
5287
+ __wbg_new_with_length_5ffeddb9d9fbb96f: function(arg0) {
5121
5288
  const ret = new Uint8Array(arg0 >>> 0);
5122
5289
  return ret;
5123
5290
  },
5124
- __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) {
5125
5292
  const ret = new Response(arg0, arg1);
5126
5293
  return ret;
5127
5294
  }, arguments); },
5128
- __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) {
5129
5296
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
5130
5297
  return ret;
5131
5298
  }, arguments); },
5132
- __wbg_next_0340c4ae324393c3: function() { return handleError(function (arg0) {
5133
- const ret = arg0.next();
5134
- return ret;
5135
- }, arguments); },
5136
- __wbg_next_7646edaa39458ef7: function(arg0) {
5299
+ __wbg_next_95053e306b1c3aed: function(arg0) {
5137
5300
  const ret = arg0.next;
5138
5301
  return ret;
5139
5302
  },
5303
+ __wbg_next_f31ecb8646d2c605: function() { return handleError(function (arg0) {
5304
+ const ret = arg0.next();
5305
+ return ret;
5306
+ }, arguments); },
5140
5307
  __wbg_node_84ea875411254db1: function(arg0) {
5141
5308
  const ret = arg0.node;
5142
5309
  return ret;
5143
5310
  },
5144
- __wbg_now_a9b7df1cbee90986: function() {
5311
+ __wbg_now_d1fb6650485d7f3e: function() {
5145
5312
  const ret = Date.now();
5146
5313
  return ret;
5147
5314
  },
@@ -5149,7 +5316,7 @@ function __wbg_get_imports() {
5149
5316
  const ret = arg0.now();
5150
5317
  return ret;
5151
5318
  },
5152
- __wbg_parse_1bbc9c053611d0a7: function() { return handleError(function (arg0, arg1) {
5319
+ __wbg_parse_6937a9050adfb0e1: function() { return handleError(function (arg0, arg1) {
5153
5320
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
5154
5321
  return ret;
5155
5322
  }, arguments); },
@@ -5161,39 +5328,39 @@ function __wbg_get_imports() {
5161
5328
  const ret = arg0.process;
5162
5329
  return ret;
5163
5330
  },
5164
- __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
5331
+ __wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
5165
5332
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
5166
5333
  },
5167
5334
  __wbg_publickey_new: function(arg0) {
5168
5335
  const ret = PublicKey.__wrap(arg0);
5169
5336
  return ret;
5170
5337
  },
5171
- __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
5172
- queueMicrotask(arg0);
5173
- },
5174
- __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
5338
+ __wbg_queueMicrotask_85c90f6987555d65: function(arg0) {
5175
5339
  const ret = arg0.queueMicrotask;
5176
5340
  return ret;
5177
5341
  },
5342
+ __wbg_queueMicrotask_f6a1fa10b81d1fc0: function(arg0) {
5343
+ queueMicrotask(arg0);
5344
+ },
5178
5345
  __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
5179
5346
  arg0.randomFillSync(arg1);
5180
5347
  }, arguments); },
5181
- __wbg_read_ddc2d178d2e57272: function(arg0) {
5348
+ __wbg_read_31091533ffadf971: function(arg0) {
5182
5349
  const ret = arg0.read();
5183
5350
  return ret;
5184
5351
  },
5185
- __wbg_releaseLock_9baaf3ccc5cfad69: function(arg0) {
5352
+ __wbg_releaseLock_1538945f5f183d9f: function(arg0) {
5186
5353
  arg0.releaseLock();
5187
5354
  },
5188
5355
  __wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
5189
5356
  const ret = module.require;
5190
5357
  return ret;
5191
5358
  }, arguments); },
5192
- __wbg_resolve_e6c466bc1052f16c: function(arg0) {
5359
+ __wbg_resolve_35ec7e0c6af4c82c: function(arg0) {
5193
5360
  const ret = Promise.resolve(arg0);
5194
5361
  return ret;
5195
5362
  },
5196
- __wbg_respond_008ca9525ae22847: function() { return handleError(function (arg0, arg1) {
5363
+ __wbg_respond_83a71686e927ca32: function() { return handleError(function (arg0, arg1) {
5197
5364
  arg0.respond(arg1 >>> 0);
5198
5365
  }, arguments); },
5199
5366
  __wbg_session_new: function(arg0) {
@@ -5204,83 +5371,83 @@ function __wbg_get_imports() {
5204
5371
  const ret = setTimeout(arg0, arg1);
5205
5372
  return ret;
5206
5373
  },
5207
- __wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
5208
- const ret = Reflect.set(arg0, arg1, arg2);
5209
- return ret;
5210
- }, arguments); },
5211
- __wbg_set_1ffc463d4c541483: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5212
- arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
5213
- }, arguments); },
5214
- __wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
5374
+ __wbg_set_13d25b81ab403f5e: function(arg0, arg1, arg2) {
5215
5375
  arg0[arg1 >>> 0] = arg2;
5216
5376
  },
5217
- __wbg_set_3d484eb794afec82: function(arg0, arg1, arg2) {
5377
+ __wbg_set_5f2ad37e5e02dc7b: function(arg0, arg1, arg2) {
5218
5378
  arg0.set(getArrayU8FromWasm0(arg1, arg2));
5219
5379
  },
5220
5380
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
5221
5381
  arg0[arg1] = arg2;
5222
5382
  },
5223
- __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) {
5224
5395
  arg0.body = arg1;
5225
5396
  },
5226
- __wbg_set_cache_968edea422613d1b: function(arg0, arg1) {
5397
+ __wbg_set_cache_6e8c35a5ed76edb1: function(arg0, arg1) {
5227
5398
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
5228
5399
  },
5229
- __wbg_set_credentials_6577be90e0e85eb6: function(arg0, arg1) {
5400
+ __wbg_set_credentials_bf1d3e014213a571: function(arg0, arg1) {
5230
5401
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
5231
5402
  },
5232
- __wbg_set_fde2cec06c23692b: function(arg0, arg1, arg2) {
5233
- const ret = arg0.set(arg1, arg2);
5234
- return ret;
5235
- },
5236
- __wbg_set_headers_50fc01786240a440: function(arg0, arg1) {
5403
+ __wbg_set_headers_31d373f68f28bf76: function(arg0, arg1) {
5237
5404
  arg0.headers = arg1;
5238
5405
  },
5239
- __wbg_set_headers_d567a640ab3a7735: function(arg0, arg1) {
5406
+ __wbg_set_headers_dfe6a763facd3dcc: function(arg0, arg1) {
5240
5407
  arg0.headers = arg1;
5241
5408
  },
5242
- __wbg_set_high_water_mark_0ac7cc8f39856bad: function(arg0, arg1) {
5409
+ __wbg_set_high_water_mark_089e3476522036ad: function(arg0, arg1) {
5243
5410
  arg0.highWaterMark = arg1;
5244
5411
  },
5245
- __wbg_set_method_c9f1f985f6b6c427: function(arg0, arg1, arg2) {
5412
+ __wbg_set_method_82e6c3c083da0734: function(arg0, arg1, arg2) {
5246
5413
  arg0.method = getStringFromWasm0(arg1, arg2);
5247
5414
  },
5248
- __wbg_set_mode_5e08d503428c06b9: function(arg0, arg1) {
5415
+ __wbg_set_mode_f7e56ed768d0ade0: function(arg0, arg1) {
5249
5416
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
5250
5417
  },
5251
- __wbg_set_name_f49c6e6bbfc8a63b: function(arg0, arg1, arg2) {
5418
+ __wbg_set_name_6e2a5da46a9ae1e7: function(arg0, arg1, arg2) {
5252
5419
  arg0.name = getStringFromWasm0(arg1, arg2);
5253
5420
  },
5254
- __wbg_set_signal_1d4e73c2305a0e7c: function(arg0, arg1) {
5421
+ __wbg_set_signal_f4b32f40f19786f4: function(arg0, arg1) {
5255
5422
  arg0.signal = arg1;
5256
5423
  },
5257
- __wbg_set_status_384b9a831b2c0723: function(arg0, arg1) {
5424
+ __wbg_set_status_74351f5228412c33: function(arg0, arg1) {
5258
5425
  arg0.status = arg1;
5259
5426
  },
5260
- __wbg_set_status_text_6e9fbc237df0665f: function(arg0, arg1, arg2) {
5427
+ __wbg_set_status_text_c443c5fe14fd551d: function(arg0, arg1, arg2) {
5261
5428
  arg0.statusText = getStringFromWasm0(arg1, arg2);
5262
5429
  },
5263
- __wbg_signal_fdc54643b47bf85b: function(arg0) {
5430
+ __wbg_signal_45367c6c2255877a: function(arg0) {
5264
5431
  const ret = arg0.signal;
5265
5432
  return ret;
5266
5433
  },
5267
- __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
5434
+ __wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() {
5268
5435
  const ret = typeof global === 'undefined' ? null : global;
5269
5436
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5270
5437
  },
5271
- __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
5438
+ __wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db: function() {
5272
5439
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
5273
5440
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5274
5441
  },
5275
- __wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
5442
+ __wbg_static_accessor_SELF_d8b50611246a6d92: function() {
5276
5443
  const ret = typeof self === 'undefined' ? null : self;
5277
5444
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5278
5445
  },
5279
- __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
5446
+ __wbg_static_accessor_WINDOW_fd0bc376bf0f8b42: function() {
5280
5447
  const ret = typeof window === 'undefined' ? null : window;
5281
5448
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5282
5449
  },
5283
- __wbg_status_43e0d2f15b22d69f: function(arg0) {
5450
+ __wbg_status_88ccc72fe7bea621: function(arg0) {
5284
5451
  const ret = arg0.status;
5285
5452
  return ret;
5286
5453
  },
@@ -5288,38 +5455,38 @@ function __wbg_get_imports() {
5288
5455
  const ret = StoredSessionInfo.__wrap(arg0);
5289
5456
  return ret;
5290
5457
  },
5291
- __wbg_stringify_91082ed7a5a5769e: function() { return handleError(function (arg0) {
5458
+ __wbg_stringify_54b3d9b61602aee6: function() { return handleError(function (arg0) {
5292
5459
  const ret = JSON.stringify(arg0);
5293
5460
  return ret;
5294
5461
  }, arguments); },
5295
- __wbg_subarray_f8ca46a25b1f5e0d: function(arg0, arg1, arg2) {
5462
+ __wbg_subarray_1daff70dde20c145: function(arg0, arg1, arg2) {
5296
5463
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
5297
5464
  return ret;
5298
5465
  },
5299
- __wbg_text_595ef75535aa25c1: function() { return handleError(function (arg0) {
5466
+ __wbg_text_b00323a194b10fa8: function() { return handleError(function (arg0) {
5300
5467
  const ret = arg0.text();
5301
5468
  return ret;
5302
5469
  }, arguments); },
5303
- __wbg_then_792e0c862b060889: function(arg0, arg1, arg2) {
5470
+ __wbg_then_7a850dae4493f353: function(arg0, arg1, arg2) {
5304
5471
  const ret = arg0.then(arg1, arg2);
5305
5472
  return ret;
5306
5473
  },
5307
- __wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
5474
+ __wbg_then_b830475380919203: function(arg0, arg1) {
5308
5475
  const ret = arg0.then(arg1);
5309
5476
  return ret;
5310
5477
  },
5311
- __wbg_toString_6dc1a94e0bdba378: function(arg0) {
5478
+ __wbg_toString_beee8ad71195e063: function(arg0) {
5312
5479
  const ret = arg0.toString();
5313
5480
  return ret;
5314
5481
  },
5315
- __wbg_url_2bf741820e6563a0: function(arg0, arg1) {
5482
+ __wbg_url_f1948b0d7f881e02: function(arg0, arg1) {
5316
5483
  const ret = arg1.url;
5317
5484
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5318
5485
  const len1 = WASM_VECTOR_LEN;
5319
5486
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5320
5487
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5321
5488
  },
5322
- __wbg_value_ee3a06f4579184fa: function(arg0) {
5489
+ __wbg_value_c227f843d21da141: function(arg0) {
5323
5490
  const ret = arg0.value;
5324
5491
  return ret;
5325
5492
  },
@@ -5327,71 +5494,71 @@ function __wbg_get_imports() {
5327
5494
  const ret = arg0.versions;
5328
5495
  return ret;
5329
5496
  },
5330
- __wbg_view_701664ffb3b1ce67: function(arg0) {
5497
+ __wbg_view_d8c7b26e4d4650f1: function(arg0) {
5331
5498
  const ret = arg0.view;
5332
5499
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
5333
5500
  },
5334
- __wbg_warn_ad997e36628bd23a: function(arg0, arg1, arg2, arg3) {
5501
+ __wbg_warn_0dba8b87d6637549: function(arg0, arg1, arg2, arg3) {
5335
5502
  console.warn(arg0, arg1, arg2, arg3);
5336
5503
  },
5337
- __wbindgen_cast_0000000000000001: function(arg0, arg1) {
5338
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 130, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5339
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___wasm_bindgen_77cee878d4ea2fd9___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_77cee878d4ea2fd9___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_);
5340
5507
  return ret;
5341
5508
  },
5342
- __wbindgen_cast_0000000000000002: function(arg0, arg1) {
5343
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 266, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5344
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___wasm_bindgen_77cee878d4ea2fd9___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_);
5345
5512
  return ret;
5346
5513
  },
5347
- __wbindgen_cast_0000000000000003: function(arg0, arg1) {
5348
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 264, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5349
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_77cee878d4ea2fd9___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_);
5350
5517
  return ret;
5351
5518
  },
5352
- __wbindgen_cast_0000000000000004: function(arg0) {
5519
+ __wbindgen_generic_0000000000000004: function(arg0) {
5353
5520
  // Cast intrinsic for `F64 -> Externref`.
5354
5521
  const ret = arg0;
5355
5522
  return ret;
5356
5523
  },
5357
- __wbindgen_cast_0000000000000005: function(arg0) {
5524
+ __wbindgen_generic_0000000000000005: function(arg0) {
5358
5525
  // Cast intrinsic for `I64 -> Externref`.
5359
5526
  const ret = arg0;
5360
5527
  return ret;
5361
5528
  },
5362
- __wbindgen_cast_0000000000000006: function(arg0, arg1) {
5529
+ __wbindgen_generic_0000000000000006: function(arg0, arg1) {
5363
5530
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5364
5531
  const ret = getArrayU8FromWasm0(arg0, arg1);
5365
5532
  return ret;
5366
5533
  },
5367
- __wbindgen_cast_0000000000000007: function(arg0, arg1) {
5534
+ __wbindgen_generic_0000000000000007: function(arg0, arg1) {
5368
5535
  // Cast intrinsic for `Ref(String) -> Externref`.
5369
5536
  const ret = getStringFromWasm0(arg0, arg1);
5370
5537
  return ret;
5371
5538
  },
5372
- __wbindgen_cast_0000000000000008: function(arg0) {
5539
+ __wbindgen_generic_0000000000000008: function(arg0) {
5373
5540
  // Cast intrinsic for `U64 -> Externref`.
5374
5541
  const ret = BigInt.asUintN(64, arg0);
5375
5542
  return ret;
5376
5543
  },
5377
- __wbindgen_cast_0000000000000009: function(arg0, arg1) {
5378
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5544
+ __wbindgen_generic_0000000000000009: function(arg0, arg1) {
5545
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1);
5379
5546
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5380
- // Cast intrinsic for `Vector(NamedExternref("GrantInfo")) -> Externref`.
5547
+ // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
5381
5548
  const ret = v0;
5382
5549
  return ret;
5383
5550
  },
5384
- __wbindgen_cast_000000000000000a: function(arg0, arg1) {
5385
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5551
+ __wbindgen_generic_000000000000000a: function(arg0, arg1) {
5552
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1);
5386
5553
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5387
- // Cast intrinsic for `Vector(NamedExternref("StoredSessionInfo")) -> Externref`.
5554
+ // Cast intrinsic for `Vector(RustStruct { name: "GrantInfo", unique_crate_identifier: "pubky-wasm-7913b60c8bbffe29" }) -> Externref`.
5388
5555
  const ret = v0;
5389
5556
  return ret;
5390
5557
  },
5391
- __wbindgen_cast_000000000000000b: function(arg0, arg1) {
5392
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5558
+ __wbindgen_generic_000000000000000b: function(arg0, arg1) {
5559
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1);
5393
5560
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5394
- // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
5561
+ // Cast intrinsic for `Vector(RustStruct { name: "StoredSessionInfo", unique_crate_identifier: "pubky-wasm-7913b60c8bbffe29" }) -> Externref`.
5395
5562
  const ret = v0;
5396
5563
  return ret;
5397
5564
  },
@@ -5408,33 +5575,33 @@ function __wbg_get_imports() {
5408
5575
  return {
5409
5576
  __proto__: null,
5410
5577
  "./pubky_bg.js": import0,
5411
- "./snippets/pubky-wasm-aeccd1286880adbb/inline1.js": import1,
5412
- "./snippets/pubky-wasm-aeccd1286880adbb/inline0.js": import2,
5413
- "./snippets/pubky-wasm-aeccd1286880adbb/inline0.js": import3,
5414
- "./snippets/pubky-wasm-aeccd1286880adbb/inline0.js": import4,
5415
- "./snippets/pubky-wasm-aeccd1286880adbb/inline0.js": import5,
5416
- "./snippets/pubky-wasm-aeccd1286880adbb/inline0.js": import6,
5417
- "./snippets/pubky-wasm-aeccd1286880adbb/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,
5418
5585
  };
5419
5586
  }
5420
5587
 
5421
- function wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke_______true_(arg0, arg1) {
5422
- wasm.wasm_bindgen_77cee878d4ea2fd9___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);
5423
5590
  }
5424
5591
 
5425
- function wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___wasm_bindgen_77cee878d4ea2fd9___JsValue______true_(arg0, arg1, arg2) {
5426
- wasm.wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___wasm_bindgen_77cee878d4ea2fd9___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);
5427
5594
  }
5428
5595
 
5429
- function wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___wasm_bindgen_77cee878d4ea2fd9___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_77cee878d4ea2fd9___JsError___true_(arg0, arg1, arg2) {
5430
- const ret = wasm.wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___wasm_bindgen_77cee878d4ea2fd9___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_77cee878d4ea2fd9___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);
5431
5598
  if (ret[1]) {
5432
5599
  throw takeFromExternrefTable0(ret[0]);
5433
5600
  }
5434
5601
  }
5435
5602
 
5436
- function wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___js_sys_4b0493a0be09c0f___Function_fn_wasm_bindgen_77cee878d4ea2fd9___JsValue_____wasm_bindgen_77cee878d4ea2fd9___sys__Undefined___js_sys_4b0493a0be09c0f___Function_fn_wasm_bindgen_77cee878d4ea2fd9___JsValue_____wasm_bindgen_77cee878d4ea2fd9___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
5437
- wasm.wasm_bindgen_77cee878d4ea2fd9___convert__closures_____invoke___js_sys_4b0493a0be09c0f___Function_fn_wasm_bindgen_77cee878d4ea2fd9___JsValue_____wasm_bindgen_77cee878d4ea2fd9___sys__Undefined___js_sys_4b0493a0be09c0f___Function_fn_wasm_bindgen_77cee878d4ea2fd9___JsValue_____wasm_bindgen_77cee878d4ea2fd9___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);
5438
5605
  }
5439
5606
 
5440
5607
 
@@ -5453,103 +5620,112 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
5453
5620
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
5454
5621
  const AuthFlowFinalization = (typeof FinalizationRegistry === 'undefined')
5455
5622
  ? { register: () => {}, unregister: () => {} }
5456
- : new FinalizationRegistry(ptr => wasm.__wbg_authflow_free(ptr >>> 0, 1));
5623
+ : new FinalizationRegistry(ptr => wasm.__wbg_authflow_free(ptr, 1));
5457
5624
  const AuthFlowKindFinalization = (typeof FinalizationRegistry === 'undefined')
5458
5625
  ? { register: () => {}, unregister: () => {} }
5459
- : new FinalizationRegistry(ptr => wasm.__wbg_authflowkind_free(ptr >>> 0, 1));
5626
+ : new FinalizationRegistry(ptr => wasm.__wbg_authflowkind_free(ptr, 1));
5460
5627
  const AuthTokenFinalization = (typeof FinalizationRegistry === 'undefined')
5461
5628
  ? { register: () => {}, unregister: () => {} }
5462
- : new FinalizationRegistry(ptr => wasm.__wbg_authtoken_free(ptr >>> 0, 1));
5629
+ : new FinalizationRegistry(ptr => wasm.__wbg_authtoken_free(ptr, 1));
5463
5630
  const BrowserSessionStoreFinalization = (typeof FinalizationRegistry === 'undefined')
5464
5631
  ? { register: () => {}, unregister: () => {} }
5465
- : new FinalizationRegistry(ptr => wasm.__wbg_browsersessionstore_free(ptr >>> 0, 1));
5632
+ : new FinalizationRegistry(ptr => wasm.__wbg_browsersessionstore_free(ptr, 1));
5466
5633
  const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
5467
5634
  ? { register: () => {}, unregister: () => {} }
5468
- : new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr >>> 0, 1));
5635
+ : new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr, 1));
5469
5636
  const CookieSessionFinalization = (typeof FinalizationRegistry === 'undefined')
5470
5637
  ? { register: () => {}, unregister: () => {} }
5471
- : new FinalizationRegistry(ptr => wasm.__wbg_cookiesession_free(ptr >>> 0, 1));
5638
+ : new FinalizationRegistry(ptr => wasm.__wbg_cookiesession_free(ptr, 1));
5472
5639
  const DirectSignupDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5473
5640
  ? { register: () => {}, unregister: () => {} }
5474
- : new FinalizationRegistry(ptr => wasm.__wbg_directsignupdeeplink_free(ptr >>> 0, 1));
5641
+ : new FinalizationRegistry(ptr => wasm.__wbg_directsignupdeeplink_free(ptr, 1));
5475
5642
  const EventFinalization = (typeof FinalizationRegistry === 'undefined')
5476
5643
  ? { register: () => {}, unregister: () => {} }
5477
- : new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr >>> 0, 1));
5644
+ : new FinalizationRegistry(ptr => wasm.__wbg_event_free(ptr, 1));
5478
5645
  const EventStreamBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
5479
5646
  ? { register: () => {}, unregister: () => {} }
5480
- : new FinalizationRegistry(ptr => wasm.__wbg_eventstreambuilder_free(ptr >>> 0, 1));
5647
+ : new FinalizationRegistry(ptr => wasm.__wbg_eventstreambuilder_free(ptr, 1));
5481
5648
  const GrantAuthFlowFinalization = (typeof FinalizationRegistry === 'undefined')
5482
5649
  ? { register: () => {}, unregister: () => {} }
5483
- : new FinalizationRegistry(ptr => wasm.__wbg_grantauthflow_free(ptr >>> 0, 1));
5650
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantauthflow_free(ptr, 1));
5484
5651
  const GrantInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5485
5652
  ? { register: () => {}, unregister: () => {} }
5486
- : new FinalizationRegistry(ptr => wasm.__wbg_grantinfo_free(ptr >>> 0, 1));
5653
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantinfo_free(ptr, 1));
5487
5654
  const GrantManagerFinalization = (typeof FinalizationRegistry === 'undefined')
5488
5655
  ? { register: () => {}, unregister: () => {} }
5489
- : new FinalizationRegistry(ptr => wasm.__wbg_grantmanager_free(ptr >>> 0, 1));
5656
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantmanager_free(ptr, 1));
5490
5657
  const GrantSessionFinalization = (typeof FinalizationRegistry === 'undefined')
5491
5658
  ? { register: () => {}, unregister: () => {} }
5492
- : new FinalizationRegistry(ptr => wasm.__wbg_grantsession_free(ptr >>> 0, 1));
5659
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantsession_free(ptr, 1));
5493
5660
  const GrantSessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5494
5661
  ? { register: () => {}, unregister: () => {} }
5495
- : new FinalizationRegistry(ptr => wasm.__wbg_grantsessioninfo_free(ptr >>> 0, 1));
5662
+ : new FinalizationRegistry(ptr => wasm.__wbg_grantsessioninfo_free(ptr, 1));
5496
5663
  const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
5497
5664
  ? { register: () => {}, unregister: () => {} }
5498
- : 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));
5499
5669
  const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
5500
5670
  ? { register: () => {}, unregister: () => {} }
5501
- : 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));
5502
5675
  const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
5503
5676
  ? { register: () => {}, unregister: () => {} }
5504
- : 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));
5505
5681
  const KeypairFinalization = (typeof FinalizationRegistry === 'undefined')
5506
5682
  ? { register: () => {}, unregister: () => {} }
5507
- : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr >>> 0, 1));
5683
+ : new FinalizationRegistry(ptr => wasm.__wbg_keypair_free(ptr, 1));
5508
5684
  const PkdnsFinalization = (typeof FinalizationRegistry === 'undefined')
5509
5685
  ? { register: () => {}, unregister: () => {} }
5510
- : new FinalizationRegistry(ptr => wasm.__wbg_pkdns_free(ptr >>> 0, 1));
5686
+ : new FinalizationRegistry(ptr => wasm.__wbg_pkdns_free(ptr, 1));
5511
5687
  const PubkyFinalization = (typeof FinalizationRegistry === 'undefined')
5512
5688
  ? { register: () => {}, unregister: () => {} }
5513
- : new FinalizationRegistry(ptr => wasm.__wbg_pubky_free(ptr >>> 0, 1));
5689
+ : new FinalizationRegistry(ptr => wasm.__wbg_pubky_free(ptr, 1));
5514
5690
  const PubkyResourceFinalization = (typeof FinalizationRegistry === 'undefined')
5515
5691
  ? { register: () => {}, unregister: () => {} }
5516
- : new FinalizationRegistry(ptr => wasm.__wbg_pubkyresource_free(ptr >>> 0, 1));
5692
+ : new FinalizationRegistry(ptr => wasm.__wbg_pubkyresource_free(ptr, 1));
5517
5693
  const PublicKeyFinalization = (typeof FinalizationRegistry === 'undefined')
5518
5694
  ? { register: () => {}, unregister: () => {} }
5519
- : new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr >>> 0, 1));
5695
+ : new FinalizationRegistry(ptr => wasm.__wbg_publickey_free(ptr, 1));
5520
5696
  const PublicStorageFinalization = (typeof FinalizationRegistry === 'undefined')
5521
5697
  ? { register: () => {}, unregister: () => {} }
5522
- : new FinalizationRegistry(ptr => wasm.__wbg_publicstorage_free(ptr >>> 0, 1));
5698
+ : new FinalizationRegistry(ptr => wasm.__wbg_publicstorage_free(ptr, 1));
5523
5699
  const SeedExportDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5524
5700
  ? { register: () => {}, unregister: () => {} }
5525
- : new FinalizationRegistry(ptr => wasm.__wbg_seedexportdeeplink_free(ptr >>> 0, 1));
5701
+ : new FinalizationRegistry(ptr => wasm.__wbg_seedexportdeeplink_free(ptr, 1));
5526
5702
  const SessionFinalization = (typeof FinalizationRegistry === 'undefined')
5527
5703
  ? { register: () => {}, unregister: () => {} }
5528
- : new FinalizationRegistry(ptr => wasm.__wbg_session_free(ptr >>> 0, 1));
5704
+ : new FinalizationRegistry(ptr => wasm.__wbg_session_free(ptr, 1));
5529
5705
  const SessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5530
5706
  ? { register: () => {}, unregister: () => {} }
5531
- : new FinalizationRegistry(ptr => wasm.__wbg_sessioninfo_free(ptr >>> 0, 1));
5707
+ : new FinalizationRegistry(ptr => wasm.__wbg_sessioninfo_free(ptr, 1));
5532
5708
  const SessionStorageFinalization = (typeof FinalizationRegistry === 'undefined')
5533
5709
  ? { register: () => {}, unregister: () => {} }
5534
- : new FinalizationRegistry(ptr => wasm.__wbg_sessionstorage_free(ptr >>> 0, 1));
5710
+ : new FinalizationRegistry(ptr => wasm.__wbg_sessionstorage_free(ptr, 1));
5535
5711
  const SignerFinalization = (typeof FinalizationRegistry === 'undefined')
5536
5712
  ? { register: () => {}, unregister: () => {} }
5537
- : new FinalizationRegistry(ptr => wasm.__wbg_signer_free(ptr >>> 0, 1));
5713
+ : new FinalizationRegistry(ptr => wasm.__wbg_signer_free(ptr, 1));
5538
5714
  const SigninDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5539
5715
  ? { register: () => {}, unregister: () => {} }
5540
- : new FinalizationRegistry(ptr => wasm.__wbg_signindeeplink_free(ptr >>> 0, 1));
5716
+ : new FinalizationRegistry(ptr => wasm.__wbg_signindeeplink_free(ptr, 1));
5541
5717
  const SigninGrantDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5542
5718
  ? { register: () => {}, unregister: () => {} }
5543
- : new FinalizationRegistry(ptr => wasm.__wbg_signingrantdeeplink_free(ptr >>> 0, 1));
5719
+ : new FinalizationRegistry(ptr => wasm.__wbg_signingrantdeeplink_free(ptr, 1));
5544
5720
  const SignupDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5545
5721
  ? { register: () => {}, unregister: () => {} }
5546
- : new FinalizationRegistry(ptr => wasm.__wbg_signupdeeplink_free(ptr >>> 0, 1));
5722
+ : new FinalizationRegistry(ptr => wasm.__wbg_signupdeeplink_free(ptr, 1));
5547
5723
  const SignupGrantDeepLinkFinalization = (typeof FinalizationRegistry === 'undefined')
5548
5724
  ? { register: () => {}, unregister: () => {} }
5549
- : new FinalizationRegistry(ptr => wasm.__wbg_signupgrantdeeplink_free(ptr >>> 0, 1));
5725
+ : new FinalizationRegistry(ptr => wasm.__wbg_signupgrantdeeplink_free(ptr, 1));
5550
5726
  const StoredSessionInfoFinalization = (typeof FinalizationRegistry === 'undefined')
5551
5727
  ? { register: () => {}, unregister: () => {} }
5552
- : new FinalizationRegistry(ptr => wasm.__wbg_storedsessioninfo_free(ptr >>> 0, 1));
5728
+ : new FinalizationRegistry(ptr => wasm.__wbg_storedsessioninfo_free(ptr, 1));
5553
5729
 
5554
5730
  function addToExternrefTable0(obj) {
5555
5731
  const idx = wasm.__externref_table_alloc();
@@ -5657,8 +5833,7 @@ function getDataViewMemory0() {
5657
5833
  }
5658
5834
 
5659
5835
  function getStringFromWasm0(ptr, len) {
5660
- ptr = ptr >>> 0;
5661
- return decodeText(ptr, len);
5836
+ return decodeText(ptr >>> 0, len);
5662
5837
  }
5663
5838
 
5664
5839
  let cachedUint8ArrayMemory0 = null;
@@ -5784,5 +5959,6 @@ let WASM_VECTOR_LEN = 0;
5784
5959
  const wasmPath = `${__dirname}/pubky_bg.wasm`;
5785
5960
  const wasmBytes = require('fs').readFileSync(wasmPath);
5786
5961
  const wasmModule = new WebAssembly.Module(wasmBytes);
5787
- 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;
5788
5964
  wasm.__wbindgen_start();