@synonymdev/pubky 0.16.1 → 0.17.1

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/README.md CHANGED
@@ -517,6 +517,7 @@ const s = session.storage;
517
517
  await s.putJson("/pub/example.com/data.json", { ok: true });
518
518
  await s.putText("/pub/example.com/note.txt", "hello");
519
519
  await s.putBytes("/pub/example.com/img.bin", new Uint8Array([1, 2, 3]));
520
+ await s.putBlob("/pub/example.com/file.bin", new Blob(["file contents"]));
520
521
 
521
522
  // Reads
522
523
  const response = await s.get("/pub/example.com/data.json"); // -> Response (stream it)
@@ -541,12 +542,15 @@ lock.token; // -> "opaquelocktoken:<uuid>"
541
542
  lock.timeoutSeconds; // -> what the homeserver granted (it caps the lifetime)
542
543
  await s.putTextLocked(lock, JSON.stringify({ count: 1 })); // only the holder can write; no putJsonLocked
543
544
  await s.putBytesLocked(lock, new Uint8Array([1, 2, 3]));
545
+ await s.putBlobLocked(lock, new Blob(["updated contents"]));
544
546
  await s.deleteLocked(lock);
545
547
  await s.refreshLock(lock, 30); // restart the lifetime
546
548
  await s.unlock(lock);
547
549
  ```
548
550
 
549
- While a lock lives, a plain `putJson`/`putText`/`putBytes`/`delete` on that path rejects with `423 Locked`, and so does a second `lock()`. Once the lock is gone, the old value is refused with `412` (write, delete, refresh) and `409` on `unlock()`; take a new lock and read the file again. A homeserver without lock support answers `405`.
551
+ `putBlob()` and `putBlobLocked()` accept a `Blob` or `File` without copying its contents into WASM memory.
552
+
553
+ While a lock lives, a plain `putJson`/`putText`/`putBytes`/`putBlob`/`delete` on that path rejects with `423 Locked`, and so does a second `lock()`. Once the lock is gone, the old value is refused with `412` (write, delete, refresh) and `409` on `unlock()`; take a new lock and read the file again. A homeserver without lock support answers `405`.
550
554
 
551
555
  `timeoutSeconds` is rounded down to whole seconds, with a minimum of 1. If `lock()` rejects without a status code (a lost connection, say), the homeserver may still have granted the lock; nothing can release it, so the path answers `423` until it times out.
552
556
 
@@ -639,15 +643,35 @@ All async methods throw a structured `PubkyError`:
639
643
  interface PubkyError extends Error {
640
644
  name:
641
645
  | "RequestError" // network/server/validation/JSON
646
+ | "CredentialRefreshError" // grant refresh request failed
642
647
  | "InvalidInput"
643
648
  | "AuthenticationError"
644
649
  | "PkarrError"
645
650
  | "InternalError";
646
651
  message: string;
647
- data?: unknown; // structured context when available (e.g. { statusCode: number })
652
+ data?: unknown; // structured context when available; RequestErrorData for RequestError
653
+ }
654
+ ```
655
+
656
+ `RequestError` carries a `RequestErrorData`: `reason` (`Http`, `Timeout`,
657
+ `Connection`, `Body`, `Decode`, `InvalidRequest` or `Other`) and, for HTTP
658
+ failures, `statusCode`. Browser Fetch may only report `Other`. A reason
659
+ describes the failure, not whether retrying a write is safe.
660
+
661
+ ```ts
662
+ import type { PubkyError, RequestErrorData } from "@synonymdev/pubky";
663
+
664
+ if (error.name === "RequestError") {
665
+ const { reason, statusCode } = error.data as RequestErrorData;
648
666
  }
649
667
  ```
650
668
 
669
+ `CredentialRefreshError` represents secret-safe refresh request failures. It
670
+ includes `data: { statusCode: number }` when the refresh endpoint responded, while
671
+ transport failures omit `data`. Local authentication, resolution, parsing, and
672
+ build failures keep their normal error names. This distinguishes unavailable
673
+ grant refresh from a failure returned by the requested storage operation.
674
+
651
675
  Example:
652
676
 
653
677
  ```js
package/index.cjs CHANGED
@@ -5,22 +5,6 @@ globalThis.fetch = makeFetchCookie(originalFetch);
5
5
 
6
6
  /* @ts-self-types="./pubky.d.ts" */
7
7
 
8
- function __pubkyRecoveredEncryptionKeys(publicKey, grantId, keys) {
9
- return { publicKey, grantId, keys };
10
- }
11
-
12
- async function __pubkyImportEncryptionCryptoKey(bytes) {
13
- try {
14
- if (!globalThis.crypto?.subtle) {
15
- throw new Error("WebCrypto is unavailable; use a secure context.");
16
- }
17
- return await globalThis.crypto.subtle.importKey(
18
- "raw", bytes, "AES-GCM", false, ["encrypt", "decrypt"]);
19
- } finally {
20
- bytes.fill(0);
21
- }
22
- }
23
-
24
8
  const PUBKY_SESSIONS_DB_NAME = "pubky-auth";
25
9
  const PUBKY_SESSIONS_DB_VERSION = 1;
26
10
  const PUBKY_SESSIONS_STORE_NAME = "storedSessions";
@@ -569,6 +553,22 @@ async function __pubkyGrantDelegatedSign(keyId, signingInput) {
569
553
  }
570
554
 
571
555
 
556
+ function __pubkyRecoveredEncryptionKeys(publicKey, grantId, keys) {
557
+ return { publicKey, grantId, keys };
558
+ }
559
+
560
+ async function __pubkyImportEncryptionCryptoKey(bytes) {
561
+ try {
562
+ if (!globalThis.crypto?.subtle) {
563
+ throw new Error("WebCrypto is unavailable; use a secure context.");
564
+ }
565
+ return await globalThis.crypto.subtle.importKey(
566
+ "raw", bytes, "AES-GCM", false, ["encrypt", "decrypt"]);
567
+ } finally {
568
+ bytes.fill(0);
569
+ }
570
+ }
571
+
572
572
  /**
573
573
  * Start and control a pubkyauth authorization flow.
574
574
  *
@@ -3801,8 +3801,10 @@ exports.SessionInfo = SessionInfo;
3801
3801
  *
3802
3802
  * Failures reject with a {@link PubkyError}. Path validation, transport, and HTTP
3803
3803
  * failures use `RequestError`; only HTTP errors include `data.statusCode`.
3804
- * URL parsing failures use `InvalidInput`. Credential preparation, refresh,
3805
- * and reading response bodies can also fail.
3804
+ * Automatic grant refresh failures use `CredentialRefreshError`, with the
3805
+ * refresh HTTP status in `data.statusCode` when available. URL parsing failures
3806
+ * use `InvalidInput`. Other credential preparation and reading response bodies
3807
+ * can also fail.
3806
3808
  *
3807
3809
  * Only {@link SessionStorage.exists} and {@link SessionStorage.stats} treat
3808
3810
  * HTTP 404/410 as missing. Other HTTP failures, including 401/403 and 5xx, reject.
@@ -3990,6 +3992,53 @@ class SessionStorage {
3990
3992
  const ret = wasm.sessionstorage_lock(this.__wbg_ptr, ptr0, len0, timeout_seconds);
3991
3993
  return ret;
3992
3994
  }
3995
+ /**
3996
+ * Upload a Blob or File to a locked path without copying its contents into
3997
+ * WASM memory.
3998
+ *
3999
+ * @param {StorageLock} lock A lock you hold. The upload uses the lock's path.
4000
+ * @param {Blob} body A Blob or File to upload.
4001
+ * @returns {Promise<void>}
4002
+ * @throws {PubkyError} An expired or released lock rejects with status `412`.
4003
+ * A file that changed since the write was prepared rejects with status `409`.
4004
+ * See {@link SessionStorage.putBytesLocked} for recovery and
4005
+ * {@link SessionStorage.putBlob} for input validation and shared errors.
4006
+ * @example
4007
+ * const lock = await session.storage.lock("/pub/example.com/file.bin", 30);
4008
+ * try {
4009
+ * await session.storage.putBlobLocked(lock, file);
4010
+ * } finally {
4011
+ * await session.storage.unlock(lock);
4012
+ * }
4013
+ * @param {StorageLock} lock
4014
+ * @param {Blob} body
4015
+ * @returns {Promise<void>}
4016
+ */
4017
+ putBlobLocked(lock, body) {
4018
+ _assertClass(lock, StorageLock);
4019
+ const ret = wasm.sessionstorage_putBlobLocked(this.__wbg_ptr, lock.__wbg_ptr, body);
4020
+ return ret;
4021
+ }
4022
+ /**
4023
+ * Upload a Blob or File without copying its contents into WASM memory.
4024
+ *
4025
+ * @param {Path} path File path; must not end with `/`.
4026
+ * @param {Blob} body A Blob or File to upload.
4027
+ * @returns {Promise<void>}
4028
+ * @throws {PubkyError} `InvalidInput` if body is not a Blob or File;
4029
+ * otherwise upload or shared write/request errors (see {@link SessionStorage}).
4030
+ * @example
4031
+ * await session.storage.putBlob("/pub/example.com/file.bin", file);
4032
+ * @param {Path} path
4033
+ * @param {Blob} body
4034
+ * @returns {Promise<void>}
4035
+ */
4036
+ putBlob(path, body) {
4037
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4038
+ const len0 = WASM_VECTOR_LEN;
4039
+ const ret = wasm.sessionstorage_putBlob(this.__wbg_ptr, ptr0, len0, body);
4040
+ return ret;
4041
+ }
3993
4042
  /**
3994
4043
  * `PUT` binary data to the path of a lock this client holds.
3995
4044
  *
@@ -3997,8 +4046,10 @@ class SessionStorage {
3997
4046
  * @param {Uint8Array} body
3998
4047
  * @returns {Promise<void>}
3999
4048
  * @throws {PubkyError} A lock that has expired or was unlocked rejects with
4000
- * `RequestError` and status `412`; take a new one and read the file again.
4001
- * Otherwise as {@link SessionStorage.putBytes}.
4049
+ * `RequestError` and status `412`; take a new one and read the file again. A file
4050
+ * that changed since the write was prepared rejects with status `409`, which can
4051
+ * happen when an earlier change the storage backend ran late lands first; read it
4052
+ * again and retry. Otherwise as {@link SessionStorage.putBytes}.
4002
4053
  * @param {StorageLock} lock
4003
4054
  * @param {Uint8Array} body
4004
4055
  * @returns {Promise<void>}
@@ -4054,8 +4105,10 @@ class SessionStorage {
4054
4105
  * @param {string} body
4055
4106
  * @returns {Promise<void>}
4056
4107
  * @throws {PubkyError} A lock that has expired or was unlocked rejects with
4057
- * `RequestError` and status `412`; take a new one and read the file again.
4058
- * Otherwise as {@link SessionStorage.putText}.
4108
+ * `RequestError` and status `412`; take a new one and read the file again. A file
4109
+ * that changed since the write was prepared rejects with status `409`, which can
4110
+ * happen when an earlier change the storage backend ran late lands first; read it
4111
+ * again and retry. Otherwise as {@link SessionStorage.putText}.
4059
4112
  * @param {StorageLock} lock
4060
4113
  * @param {string} body
4061
4114
  * @returns {Promise<void>}
@@ -5405,7 +5458,7 @@ function __wbg_get_imports() {
5405
5458
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5406
5459
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5407
5460
  },
5408
- __wbg___pubkyGrantDelegatedSign_78f7f9da0ae4d1e7: function(arg0, arg1, arg2, arg3) {
5461
+ __wbg___pubkyGrantDelegatedSign_2cb517ac273ab8a9: function(arg0, arg1, arg2, arg3) {
5409
5462
  let deferred0_0;
5410
5463
  let deferred0_1;
5411
5464
  let deferred1_0;
@@ -5422,7 +5475,7 @@ function __wbg_get_imports() {
5422
5475
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5423
5476
  }
5424
5477
  },
5425
- __wbg___pubkyGrantEnsureDelegatedKey_8db39436266230bf: function(arg0, arg1) {
5478
+ __wbg___pubkyGrantEnsureDelegatedKey_56c34ce13ce7c1f7: function(arg0, arg1) {
5426
5479
  let v0;
5427
5480
  if (arg0 !== 0) {
5428
5481
  v0 = getStringFromWasm0(arg0, arg1);
@@ -5431,7 +5484,7 @@ function __wbg_get_imports() {
5431
5484
  const ret = __pubkyGrantEnsureDelegatedKey(v0);
5432
5485
  return ret;
5433
5486
  },
5434
- __wbg___pubkyGrantLoadDelegatedPublicKey_e68eaea44047aa67: function(arg0, arg1) {
5487
+ __wbg___pubkyGrantLoadDelegatedPublicKey_dc300b9aa9b06496: function(arg0, arg1) {
5435
5488
  let deferred0_0;
5436
5489
  let deferred0_1;
5437
5490
  try {
@@ -5443,18 +5496,18 @@ function __wbg_get_imports() {
5443
5496
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5444
5497
  }
5445
5498
  },
5446
- __wbg___pubkyRecoveredEncryptionKeys_b1fcbbfa114eb3ca: function(arg0, arg1, arg2, arg3, arg4) {
5499
+ __wbg___pubkyRecoveredEncryptionKeys_2ab5b407cc701787: function(arg0, arg1, arg2, arg3, arg4) {
5447
5500
  const ret = __pubkyRecoveredEncryptionKeys(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), EncryptionKeys.__wrap(arg4));
5448
5501
  return ret;
5449
5502
  },
5450
- __wbg___pubkySessionAcquire_de9717d53c8b9829: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5503
+ __wbg___pubkySessionAcquire_1cc5b1d8d7b8e789: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
5451
5504
  const ret = __pubkySessionAcquire(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4 !== 0);
5452
5505
  return ret;
5453
5506
  }, arguments); },
5454
- __wbg___pubkySessionRelease_0cc80a30918c48e4: function(arg0) {
5507
+ __wbg___pubkySessionRelease_83fe6f3b50380e1d: function(arg0) {
5455
5508
  __pubkySessionRelease(arg0 >>> 0);
5456
5509
  },
5457
- __wbg___pubkySessionStoreGet_4212c4496bdd7e95: function(arg0, arg1) {
5510
+ __wbg___pubkySessionStoreGet_c1c17f0b85261cfc: function(arg0, arg1) {
5458
5511
  let deferred0_0;
5459
5512
  let deferred0_1;
5460
5513
  try {
@@ -5466,7 +5519,7 @@ function __wbg_get_imports() {
5466
5519
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5467
5520
  }
5468
5521
  },
5469
- __wbg___pubkySessionStoreMetadata_1ca42b0124ac7bda: function(arg0, arg1) {
5522
+ __wbg___pubkySessionStoreMetadata_2c9607f2edb4000c: function(arg0, arg1) {
5470
5523
  let deferred0_0;
5471
5524
  let deferred0_1;
5472
5525
  try {
@@ -5478,23 +5531,23 @@ function __wbg_get_imports() {
5478
5531
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5479
5532
  }
5480
5533
  },
5481
- __wbg___pubkySessionStorePut_950dc07537c9b99b: function(arg0, arg1) {
5534
+ __wbg___pubkySessionStorePut_288607c1b799c745: function(arg0, arg1) {
5482
5535
  const ret = __pubkySessionStorePut(arg0, arg1 >>> 0);
5483
5536
  return ret;
5484
5537
  },
5485
- __wbg___pubkySessionWait_0b154edd2f3697be: function(arg0) {
5538
+ __wbg___pubkySessionWait_9c78a92218de4722: function(arg0) {
5486
5539
  const ret = __pubkySessionWait(arg0 >>> 0);
5487
5540
  return ret;
5488
5541
  },
5489
- __wbg___pubkySharedSessionLoad_e99bffd1e2cbc147: function(arg0) {
5542
+ __wbg___pubkySharedSessionLoad_daafcca70227cf8b: function(arg0) {
5490
5543
  const ret = __pubkySharedSessionLoad(arg0 >>> 0);
5491
5544
  return ret;
5492
5545
  },
5493
- __wbg___pubkySharedSessionRemove_ba5487e63035a9a9: function(arg0) {
5546
+ __wbg___pubkySharedSessionRemove_95c78eea66763eb1: function(arg0) {
5494
5547
  const ret = __pubkySharedSessionRemove(arg0 >>> 0);
5495
5548
  return ret;
5496
5549
  },
5497
- __wbg___pubkySharedSessionStore_507e41f8a033dcc1: function(arg0, arg1) {
5550
+ __wbg___pubkySharedSessionStore_07fae001cc466bcb: function(arg0, arg1) {
5498
5551
  const ret = __pubkySharedSessionStore(arg0 >>> 0, arg1);
5499
5552
  return ret;
5500
5553
  },
@@ -5669,10 +5722,6 @@ function __wbg_get_imports() {
5669
5722
  const ret = Event.__wrap(arg0);
5670
5723
  return ret;
5671
5724
  },
5672
- __wbg_fetch_66895227032f0bdf: function(arg0) {
5673
- const ret = fetch(arg0);
5674
- return ret;
5675
- },
5676
5725
  __wbg_fetch_7a37768ab67c5bd8: function(arg0) {
5677
5726
  const ret = fetch(arg0);
5678
5727
  return ret;
@@ -5681,6 +5730,10 @@ function __wbg_get_imports() {
5681
5730
  const ret = arg0.fetch(arg1);
5682
5731
  return ret;
5683
5732
  },
5733
+ __wbg_fetch_ec1f91271c53ee0f: function(arg0) {
5734
+ const ret = fetch(arg0);
5735
+ return ret;
5736
+ },
5684
5737
  __wbg_from_a39669ce566077da: function(arg0) {
5685
5738
  const ret = Array.from(arg0);
5686
5739
  return ret;
@@ -5695,6 +5748,10 @@ function __wbg_get_imports() {
5695
5748
  const ret = arg0.getReader();
5696
5749
  return ret;
5697
5750
  }, arguments); },
5751
+ __wbg_getReader_bf34f92ee19c42b4: function() { return handleError(function (arg0) {
5752
+ const ret = arg0.getReader();
5753
+ return ret;
5754
+ }, arguments); },
5698
5755
  __wbg_get_6cf5a4d4d8ad3c5a: function() { return handleError(function (arg0, arg1) {
5699
5756
  const ret = Reflect.get(arg0, arg1);
5700
5757
  return ret;
@@ -5756,6 +5813,16 @@ function __wbg_get_imports() {
5756
5813
  const ret = result;
5757
5814
  return ret;
5758
5815
  },
5816
+ __wbg_instanceof_Blob_38df052cf775f822: function(arg0) {
5817
+ let result;
5818
+ try {
5819
+ result = arg0 instanceof Blob;
5820
+ } catch (_) {
5821
+ result = false;
5822
+ }
5823
+ const ret = result;
5824
+ return ret;
5825
+ },
5759
5826
  __wbg_instanceof_CryptoKey_98e09fab6f03bfea: function(arg0) {
5760
5827
  let result;
5761
5828
  try {
@@ -5886,7 +5953,7 @@ function __wbg_get_imports() {
5886
5953
  const a = state0.a;
5887
5954
  state0.a = 0;
5888
5955
  try {
5889
- return wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___js_sys_5fd4844d262c835b___Function_fn_wasm_bindgen_6fb33c0245079662___JsValue_____wasm_bindgen_6fb33c0245079662___sys__Undefined___js_sys_5fd4844d262c835b___Function_fn_wasm_bindgen_6fb33c0245079662___JsValue_____wasm_bindgen_6fb33c0245079662___sys__Undefined_______true_(a, state0.b, arg0, arg1);
5956
+ return wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___js_sys_4f215e94ce6fd9b5___Function_fn_wasm_bindgen_b6e7149e39ccd96a___JsValue_____wasm_bindgen_b6e7149e39ccd96a___sys__Undefined___js_sys_4f215e94ce6fd9b5___Function_fn_wasm_bindgen_b6e7149e39ccd96a___JsValue_____wasm_bindgen_b6e7149e39ccd96a___sys__Undefined_______true_(a, state0.b, arg0, arg1);
5890
5957
  } finally {
5891
5958
  state0.a = a;
5892
5959
  }
@@ -6133,18 +6200,18 @@ function __wbg_get_imports() {
6133
6200
  console.warn(arg0, arg1, arg2, arg3);
6134
6201
  },
6135
6202
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
6136
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 125, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6137
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___wasm_bindgen_6fb33c0245079662___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_6fb33c0245079662___JsError___true_);
6203
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 128, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
6204
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___wasm_bindgen_b6e7149e39ccd96a___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_b6e7149e39ccd96a___JsError___true_);
6138
6205
  return ret;
6139
6206
  },
6140
6207
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
6141
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 281, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6142
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___wasm_bindgen_6fb33c0245079662___JsValue______true_);
6208
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 289, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6209
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___wasm_bindgen_b6e7149e39ccd96a___JsValue______true_);
6143
6210
  return ret;
6144
6211
  },
6145
6212
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
6146
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 279, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6147
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6fb33c0245079662___convert__closures_____invoke_______true_);
6213
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 287, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
6214
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke_______true_);
6148
6215
  return ret;
6149
6216
  },
6150
6217
  __wbindgen_generic_0000000000000004: function(arg0) {
@@ -6182,14 +6249,14 @@ function __wbg_get_imports() {
6182
6249
  __wbindgen_generic_000000000000000a: function(arg0, arg1) {
6183
6250
  var v0 = getArrayJsValueFromWasm0(arg0, arg1);
6184
6251
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
6185
- // Cast intrinsic for `Vector(RustStruct { name: "GrantInfo", unique_crate_identifier: "pubky-wasm-6e41d7b4dc13a4fc" }) -> Externref`.
6252
+ // Cast intrinsic for `Vector(RustStruct { name: "GrantInfo", unique_crate_identifier: "pubky-wasm-c7e50de8b679e9dd" }) -> Externref`.
6186
6253
  const ret = v0;
6187
6254
  return ret;
6188
6255
  },
6189
6256
  __wbindgen_generic_000000000000000b: function(arg0, arg1) {
6190
6257
  var v0 = getArrayJsValueFromWasm0(arg0, arg1);
6191
6258
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
6192
- // Cast intrinsic for `Vector(RustStruct { name: "StoredSessionInfo", unique_crate_identifier: "pubky-wasm-6e41d7b4dc13a4fc" }) -> Externref`.
6259
+ // Cast intrinsic for `Vector(RustStruct { name: "StoredSessionInfo", unique_crate_identifier: "pubky-wasm-c7e50de8b679e9dd" }) -> Externref`.
6193
6260
  const ret = v0;
6194
6261
  return ret;
6195
6262
  },
@@ -6206,33 +6273,33 @@ function __wbg_get_imports() {
6206
6273
  return {
6207
6274
  __proto__: null,
6208
6275
  "./pubky_bg.js": import0,
6209
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline1.js": import1,
6210
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline1.js": import2,
6211
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline1.js": import3,
6212
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline1.js": import4,
6213
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline2.js": import5,
6214
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline0.js": import6,
6215
- "./snippets/pubky-wasm-6e41d7b4dc13a4fc/inline2.js": import7,
6276
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline0.js": import1,
6277
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline0.js": import2,
6278
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline0.js": import3,
6279
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline0.js": import4,
6280
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline1.js": import5,
6281
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline2.js": import6,
6282
+ "./snippets/pubky-wasm-c7e50de8b679e9dd/inline1.js": import7,
6216
6283
  };
6217
6284
  }
6218
6285
 
6219
- function wasm_bindgen_6fb33c0245079662___convert__closures_____invoke_______true_(arg0, arg1) {
6220
- wasm.wasm_bindgen_6fb33c0245079662___convert__closures_____invoke_______true_(arg0, arg1);
6286
+ function wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke_______true_(arg0, arg1) {
6287
+ wasm.wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke_______true_(arg0, arg1);
6221
6288
  }
6222
6289
 
6223
- function wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___wasm_bindgen_6fb33c0245079662___JsValue______true_(arg0, arg1, arg2) {
6224
- wasm.wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___wasm_bindgen_6fb33c0245079662___JsValue______true_(arg0, arg1, arg2);
6290
+ function wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___wasm_bindgen_b6e7149e39ccd96a___JsValue______true_(arg0, arg1, arg2) {
6291
+ wasm.wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___wasm_bindgen_b6e7149e39ccd96a___JsValue______true_(arg0, arg1, arg2);
6225
6292
  }
6226
6293
 
6227
- function wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___wasm_bindgen_6fb33c0245079662___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_6fb33c0245079662___JsError___true_(arg0, arg1, arg2) {
6228
- const ret = wasm.wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___wasm_bindgen_6fb33c0245079662___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_6fb33c0245079662___JsError___true_(arg0, arg1, arg2);
6294
+ function wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___wasm_bindgen_b6e7149e39ccd96a___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_b6e7149e39ccd96a___JsError___true_(arg0, arg1, arg2) {
6295
+ const ret = wasm.wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___wasm_bindgen_b6e7149e39ccd96a___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_b6e7149e39ccd96a___JsError___true_(arg0, arg1, arg2);
6229
6296
  if (ret[1]) {
6230
6297
  throw takeFromExternrefTable0(ret[0]);
6231
6298
  }
6232
6299
  }
6233
6300
 
6234
- function wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___js_sys_5fd4844d262c835b___Function_fn_wasm_bindgen_6fb33c0245079662___JsValue_____wasm_bindgen_6fb33c0245079662___sys__Undefined___js_sys_5fd4844d262c835b___Function_fn_wasm_bindgen_6fb33c0245079662___JsValue_____wasm_bindgen_6fb33c0245079662___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
6235
- wasm.wasm_bindgen_6fb33c0245079662___convert__closures_____invoke___js_sys_5fd4844d262c835b___Function_fn_wasm_bindgen_6fb33c0245079662___JsValue_____wasm_bindgen_6fb33c0245079662___sys__Undefined___js_sys_5fd4844d262c835b___Function_fn_wasm_bindgen_6fb33c0245079662___JsValue_____wasm_bindgen_6fb33c0245079662___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
6301
+ function wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___js_sys_4f215e94ce6fd9b5___Function_fn_wasm_bindgen_b6e7149e39ccd96a___JsValue_____wasm_bindgen_b6e7149e39ccd96a___sys__Undefined___js_sys_4f215e94ce6fd9b5___Function_fn_wasm_bindgen_b6e7149e39ccd96a___JsValue_____wasm_bindgen_b6e7149e39ccd96a___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
6302
+ wasm.wasm_bindgen_b6e7149e39ccd96a___convert__closures_____invoke___js_sys_4f215e94ce6fd9b5___Function_fn_wasm_bindgen_b6e7149e39ccd96a___JsValue_____wasm_bindgen_b6e7149e39ccd96a___sys__Undefined___js_sys_4f215e94ce6fd9b5___Function_fn_wasm_bindgen_b6e7149e39ccd96a___JsValue_____wasm_bindgen_b6e7149e39ccd96a___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
6236
6303
  }
6237
6304
 
6238
6305