@fedify/fedify 2.1.30 → 2.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{builder-CTpfuuVp.mjs → builder-isMRh_I6.mjs} +3 -3
  2. package/dist/{client-CAM_bQXx.d.cts → client-BIBzqEIp.d.cts} +0 -1
  3. package/dist/{client-CjDMsn4a.mjs → client-BZr7TGyu.mjs} +113 -64
  4. package/dist/{client-CSddvgWN.d.ts → client-jE7oGvRh.d.ts} +0 -1
  5. package/dist/compat/mod.d.cts +1 -1
  6. package/dist/compat/mod.d.ts +1 -1
  7. package/dist/compat/transformers.test.mjs +1 -1
  8. package/dist/{context-DLLaDau8.d.ts → context-C0uGVzgk.d.ts} +28 -2
  9. package/dist/{context-BNwv9Q1v.d.cts → context-CLaLxi49.d.cts} +28 -2
  10. package/dist/{deno-BATJ1hq6.mjs → deno-CiaJqTcu.mjs} +1 -1
  11. package/dist/docloader-DOrwedT7.mjs +124 -0
  12. package/dist/federation/builder.test.mjs +1 -1
  13. package/dist/federation/handler.test.mjs +6 -6
  14. package/dist/federation/idempotency.test.mjs +2 -2
  15. package/dist/federation/inbox.test.mjs +1 -1
  16. package/dist/federation/middleware.test.mjs +380 -24
  17. package/dist/federation/mod.cjs +1 -1
  18. package/dist/federation/mod.d.cts +2 -2
  19. package/dist/federation/mod.d.ts +2 -2
  20. package/dist/federation/mod.js +1 -1
  21. package/dist/federation/send.test.mjs +445 -70
  22. package/dist/federation/temporal.test.mjs +1 -1
  23. package/dist/federation/webfinger.test.mjs +1 -1
  24. package/dist/{http-Dl00HXr4.d.ts → http-9IFUxdkp.d.cts} +1 -2
  25. package/dist/{http-Bjd6I92u.mjs → http-A9mP2uM7.mjs} +194 -96
  26. package/dist/{http-BoR1M3W7.cjs → http-CRiVlZd5.cjs} +172 -103
  27. package/dist/{http-CK3efjgM.js → http-Crml3gei.js} +171 -102
  28. package/dist/{http-DqZhyEso.d.cts → http-SbfezERn.d.ts} +1 -2
  29. package/dist/{inbox-9MlBGgs9.mjs → inbox-KESLudq4.mjs} +1 -1
  30. package/dist/{key-ClQh9Qqh.mjs → key-Dg6-DV_O.mjs} +1 -1
  31. package/dist/{kv-cache-BxSx_Iyp.cjs → kv-cache-Cqmm-yQa.cjs} +59 -17
  32. package/dist/{kv-cache-ImApO425.js → kv-cache-DQcyZL5T.js} +60 -18
  33. package/dist/{ld-Crg0Xmwr.mjs → ld-COjDN6Nb.mjs} +2 -2
  34. package/dist/{middleware-CmD3lpy4.cjs → middleware-BbgR7xOI.cjs} +184 -59
  35. package/dist/{middleware-jL9p9V9G.cjs → middleware-BtDQUCcz.cjs} +1 -1
  36. package/dist/{middleware-CE0b69gj.mjs → middleware-COFlKeYn.mjs} +78 -38
  37. package/dist/{middleware-Bi5D6DBT.mjs → middleware-CuQvczZd.mjs} +1 -1
  38. package/dist/{middleware-C2AJFk8W.js → middleware-DIW5S_5L.js} +184 -59
  39. package/dist/{mod-DNEgTI8M.d.ts → mod-BRnwh2oy.d.ts} +2 -7
  40. package/dist/{mod-BLDHhuW0.d.ts → mod-C7w-QVUv.d.ts} +1 -1
  41. package/dist/{mod-CWJNbyju.d.ts → mod-CFRocFeQ.d.ts} +1 -1
  42. package/dist/{mod-BmlfRBmU.d.cts → mod-CGUH8Ujp.d.cts} +1 -1
  43. package/dist/{mod-Cn9GJ5ex.d.cts → mod-Co7LEK9X.d.cts} +2 -7
  44. package/dist/{mod-DiuFTYUt.d.cts → mod-LOEOKbYd.d.cts} +1 -1
  45. package/dist/mod.cjs +5 -5
  46. package/dist/mod.d.cts +6 -6
  47. package/dist/mod.d.ts +6 -6
  48. package/dist/mod.js +5 -5
  49. package/dist/nodeinfo/client.test.mjs +337 -19
  50. package/dist/nodeinfo/handler.test.mjs +1 -1
  51. package/dist/nodeinfo/mod.cjs +1 -1
  52. package/dist/nodeinfo/mod.d.cts +1 -1
  53. package/dist/nodeinfo/mod.d.ts +1 -1
  54. package/dist/nodeinfo/mod.js +1 -1
  55. package/dist/otel/exporter.test.mjs +292 -30
  56. package/dist/otel/mod.cjs +36 -30
  57. package/dist/otel/mod.d.cts +13 -0
  58. package/dist/otel/mod.d.ts +13 -0
  59. package/dist/otel/mod.js +36 -30
  60. package/dist/{owner-BRoKojK1.mjs → owner-CFHq61cq.mjs} +2 -2
  61. package/dist/{proof-CHXVlsH_.cjs → proof-0JkSC_pT.cjs} +1 -1
  62. package/dist/{proof-7R4s10TJ.js → proof-DzksJFK7.js} +1 -1
  63. package/dist/{proof-DMIAezxz.mjs → proof-KSHlbPCG.mjs} +2 -2
  64. package/dist/{send-BHIt_8ia.mjs → send-DaDe2YCb.mjs} +117 -32
  65. package/dist/sig/http.test.mjs +506 -2
  66. package/dist/sig/key.test.mjs +2 -2
  67. package/dist/sig/ld.test.mjs +2 -2
  68. package/dist/sig/mod.cjs +2 -2
  69. package/dist/sig/mod.d.cts +2 -2
  70. package/dist/sig/mod.d.ts +2 -2
  71. package/dist/sig/mod.js +2 -2
  72. package/dist/sig/owner.test.mjs +1 -1
  73. package/dist/sig/proof.test.mjs +1 -1
  74. package/dist/{temporal-DR0JahMu.mjs → temporal-DNGH8o2E.mjs} +1 -1
  75. package/dist/testing/mod.d.mts +26 -1
  76. package/dist/{types-miAYfiGO.js → types-B1_pRFE_.js} +112 -63
  77. package/dist/{types-DRPjmHVV.cjs → types-DOvyymM4.cjs} +111 -62
  78. package/dist/utils/docloader.test.mjs +316 -32
  79. package/dist/utils/mod.cjs +1 -1
  80. package/dist/utils/mod.d.cts +1 -1
  81. package/dist/utils/mod.d.ts +1 -1
  82. package/dist/utils/mod.js +1 -1
  83. package/package.json +6 -6
  84. package/dist/docloader-OLWc7P2D.mjs +0 -82
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-CRNNMoPX.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
5
- import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-CK3efjgM.js";
6
- import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.js";
7
- import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-7R4s10TJ.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-ImApO425.js";
5
+ import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnockScoped, v as name, y as version } from "./http-Crml3gei.js";
6
+ import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-B1_pRFE_.js";
7
+ import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-DzksJFK7.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DQcyZL5T.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -13,10 +13,11 @@ import { cloneDeep, uniq } from "es-toolkit";
13
13
  import { Router } from "uri-template-router";
14
14
  import { parseTemplate } from "url-template";
15
15
  import { encodeHex } from "byte-encodings/hex";
16
- import { FetchError, UrlError, getDocumentLoader, validatePublicUrl } from "@fedify/vocab-runtime";
16
+ import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
17
17
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
18
18
  import jsonld from "@fedify/vocab-runtime/jsonld";
19
19
  import { lookupWebFinger } from "@fedify/webfinger";
20
+ import { openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
20
21
  import { domainToASCII } from "node:url";
21
22
  //#region src/federation/inbox.ts
22
23
  var InboxListenerSet = class InboxListenerSet {
@@ -2477,9 +2478,10 @@ function extractInboxes({ recipients, preferSharedInbox, excludeBaseUris }) {
2477
2478
  *
2478
2479
  * @param parameters The parameters for sending the activity.
2479
2480
  * See also {@link SendActivityParameters}.
2481
+ * @param deps The dependencies, for tests.
2480
2482
  * @throws {Error} If the activity fails to send.
2481
2483
  */
2482
- function sendActivity(options) {
2484
+ function sendActivity(options, deps = {}) {
2483
2485
  const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
2484
2486
  return tracerProvider.getTracer(name, version).startActiveSpan("activitypub.send_activity", {
2485
2487
  kind: SpanKind.CLIENT,
@@ -2491,7 +2493,7 @@ function sendActivity(options) {
2491
2493
  await sendActivityInternal({
2492
2494
  ...options,
2493
2495
  tracerProvider
2494
- }, span);
2496
+ }, span, deps);
2495
2497
  } catch (e) {
2496
2498
  span.setStatus({
2497
2499
  code: SpanStatusCode.ERROR,
@@ -2525,21 +2527,25 @@ async function readLimitedResponseBody(response, maxBytes) {
2525
2527
  totalBytes += value.length;
2526
2528
  }
2527
2529
  } finally {
2530
+ if (truncated) reader.cancel().catch(() => {});
2528
2531
  reader.releaseLock();
2529
2532
  }
2530
2533
  let result = chunks.join("");
2531
2534
  if (truncated) result += "… (truncated)";
2532
2535
  return result;
2533
2536
  }
2534
- async function sendActivityInternal({ activity, activityId, keys, inbox, allowPrivateAddress, headers, specDeterminer, tracerProvider }, span) {
2537
+ async function sendActivityInternal({ activity, activityId, keys, inbox, allowPrivateAddress, headers, specDeterminer, tracerProvider }, span, deps) {
2535
2538
  const logger = getLogger([
2536
2539
  "fedify",
2537
2540
  "federation",
2538
2541
  "outbox"
2539
2542
  ]);
2540
- async function validateUrl(url) {
2541
- if (!allowPrivateAddress) try {
2542
- await validatePublicUrl(url);
2543
+ const openUnvalidatedHop = deps.openHop ?? (allowPrivateAddress ? openDirectFetch : (url) => openPublicFetch(url));
2544
+ let opened = false;
2545
+ async function openHop(url) {
2546
+ let session;
2547
+ try {
2548
+ session = await openUnvalidatedHop(url);
2543
2549
  } catch (error) {
2544
2550
  if (error instanceof UrlError && error.reason === "dns") {
2545
2551
  logger.error("DNS resolution failed for URL: {url}", {
@@ -2556,8 +2562,9 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, allowPr
2556
2562
  });
2557
2563
  throw error;
2558
2564
  }
2565
+ opened = true;
2566
+ return session;
2559
2567
  }
2560
- await validateUrl(inbox.href);
2561
2568
  headers = new Headers(headers);
2562
2569
  headers.set("Content-Type", "application/activity+json");
2563
2570
  const request = new Request(inbox, {
@@ -2578,36 +2585,30 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, allowPr
2578
2585
  privateKey: pair.privateKey
2579
2586
  }))
2580
2587
  });
2581
- let response;
2588
+ let outcome;
2582
2589
  try {
2583
- response = rsaKey == null ? await fetchWithValidatedRedirects(request, validateUrl) : await doubleKnock(request, rsaKey, {
2590
+ outcome = rsaKey == null ? await fetchWithValidatedRedirects(request, openHop, (response) => consumeSendActivityResponse(response, inbox)) : await doubleKnockScoped(request, rsaKey, {
2584
2591
  tracerProvider,
2585
- specDeterminer,
2586
- validateRedirect: validateUrl
2587
- });
2592
+ specDeterminer
2593
+ }, openHop, (response) => consumeSendActivityResponse(response, inbox));
2588
2594
  } catch (error) {
2589
- logger.error("Failed to send activity {activityId} to {inbox}:\n{error}", {
2595
+ if (opened) logger.error("Failed to send activity {activityId} to {inbox}:\n{error}", {
2590
2596
  activityId,
2591
2597
  inbox: inbox.href,
2592
2598
  error
2593
2599
  });
2594
2600
  throw error;
2595
2601
  }
2596
- if (!response.ok) {
2597
- let error;
2598
- try {
2599
- error = await readLimitedResponseBody(response, MAX_ERROR_RESPONSE_BODY_BYTES);
2600
- } catch (_) {
2601
- error = "";
2602
- }
2602
+ if (!outcome.ok) {
2603
+ const { status, statusText, error } = outcome;
2603
2604
  logger.error("Failed to send activity {activityId} to {inbox} ({status} {statusText}):\n{error}", {
2604
2605
  activityId,
2605
2606
  inbox: inbox.href,
2606
- status: response.status,
2607
- statusText: response.statusText,
2607
+ status,
2608
+ statusText,
2608
2609
  error
2609
2610
  });
2610
- throw new SendActivityError(inbox, response.status, `Failed to send activity ${activityId} to ${inbox.href} (${response.status} ${response.statusText}):\n${error}`, error);
2611
+ throw new SendActivityError(inbox, status, `Failed to send activity ${activityId} to ${inbox.href} (${status} ${statusText}):\n${error}`, error);
2611
2612
  }
2612
2613
  span.addEvent("activitypub.activity.sent", {
2613
2614
  "activitypub.activity.json": JSON.stringify(activity),
@@ -2615,10 +2616,74 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, allowPr
2615
2616
  "activitypub.activity.id": activityId ?? ""
2616
2617
  });
2617
2618
  }
2618
- async function fetchWithValidatedRedirects(request, validateUrl) {
2619
+ /**
2620
+ * Starts cancelling the body of a response without waiting for it to settle.
2621
+ * The cancellation of a branch of a tee (e.g., a body cloned by a fetch mock)
2622
+ * settles only after the other branch is cancelled too, per the Streams
2623
+ * standard, so awaiting it could block forever. Failures are only logged.
2624
+ */
2625
+ function cancelResponseBody(response, url) {
2626
+ response.body?.cancel().catch((error) => {
2627
+ getLogger([
2628
+ "fedify",
2629
+ "federation",
2630
+ "outbox"
2631
+ ]).debug("Failed to cancel the response body from {url}: {error}", {
2632
+ url,
2633
+ error
2634
+ });
2635
+ });
2636
+ }
2637
+ /**
2638
+ * Reads what is needed from the final response of a delivery while its
2639
+ * session is open: the body of a successful response is cancelled, and at
2640
+ * most 1 KiB of an error response body is read.
2641
+ */
2642
+ async function consumeSendActivityResponse(response, inbox) {
2643
+ if (response.ok) {
2644
+ cancelResponseBody(response, response.url || inbox.href);
2645
+ return { ok: true };
2646
+ }
2647
+ let error;
2648
+ try {
2649
+ error = await readLimitedResponseBody(response, MAX_ERROR_RESPONSE_BODY_BYTES);
2650
+ } catch (_) {
2651
+ error = "";
2652
+ }
2653
+ return {
2654
+ ok: false,
2655
+ status: response.status,
2656
+ statusText: response.statusText,
2657
+ error
2658
+ };
2659
+ }
2660
+ /**
2661
+ * Sends a request without signing it, following redirects manually like the
2662
+ * Fetch standard does. Every hop is opened with `openHop()`, which validates
2663
+ * the destination, after the previous hop is closed. The final response is
2664
+ * passed to `consume()`, and its session is closed after that.
2665
+ * This is exported only for tests; it is not exported from any entry point.
2666
+ * @param request The request to send.
2667
+ * @param openHop The function to open a session for each hop.
2668
+ * @param consume The function to consume the final response.
2669
+ * @returns The value returned by `consume`.
2670
+ */
2671
+ async function fetchWithValidatedRedirects(request, openHop, consume) {
2672
+ const logger = getLogger([
2673
+ "fedify",
2674
+ "federation",
2675
+ "outbox"
2676
+ ]);
2619
2677
  let body = await request.clone().text();
2620
2678
  for (let redirects = 0;; redirects++) {
2621
- const response = await fetch(request, { redirect: "manual" });
2679
+ const session = await openHop(request.url);
2680
+ let response;
2681
+ try {
2682
+ response = await session.fetch(request, { redirect: "manual" });
2683
+ } catch (error) {
2684
+ await closeAfterError(session, logger);
2685
+ throw error;
2686
+ }
2622
2687
  const location = response.headers.get("Location");
2623
2688
  if (![
2624
2689
  301,
@@ -2626,11 +2691,21 @@ async function fetchWithValidatedRedirects(request, validateUrl) {
2626
2691
  303,
2627
2692
  307,
2628
2693
  308
2629
- ].includes(response.status) || location == null) return response;
2630
- await response.body?.cancel();
2694
+ ].includes(response.status) || location == null) try {
2695
+ return await consume(response);
2696
+ } catch (error) {
2697
+ logger.debug("Failed to consume the response from {url}; closing the session: {error}", {
2698
+ url: request.url,
2699
+ error
2700
+ });
2701
+ throw error;
2702
+ } finally {
2703
+ await session.close();
2704
+ }
2705
+ cancelResponseBody(response, request.url);
2706
+ await session.close();
2631
2707
  if (redirects >= 20) throw new TypeError("Too many redirects");
2632
2708
  const url = new URL(location, request.url);
2633
- await validateUrl(url.href);
2634
2709
  const headers = new Headers(request.headers);
2635
2710
  if (url.origin !== new URL(request.url).origin) {
2636
2711
  headers.delete("Authorization");
@@ -2658,6 +2733,16 @@ async function fetchWithValidatedRedirects(request, validateUrl) {
2658
2733
  });
2659
2734
  }
2660
2735
  }
2736
+ async function closeAfterError(session, logger) {
2737
+ try {
2738
+ await session.close();
2739
+ } catch (error) {
2740
+ logger.debug("Failed to close the session for {url}: {error}", {
2741
+ url: session.url.href,
2742
+ error
2743
+ });
2744
+ }
2745
+ }
2661
2746
  /**
2662
2747
  * An error that is thrown when an activity fails to send to a remote inbox.
2663
2748
  * It contains structured information about the failure, including the HTTP
@@ -4597,43 +4682,83 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
4597
4682
  }
4598
4683
  }), values);
4599
4684
  }
4600
- #signedKey = void 0;
4685
+ #signedKey = null;
4686
+ #signedKeyOwner = null;
4687
+ #signatureChecks = /* @__PURE__ */ new WeakMap();
4688
+ #getSignatureCheck(documentLoader, contextLoader) {
4689
+ let checks = this.#signatureChecks.get(documentLoader);
4690
+ if (checks == null) {
4691
+ checks = /* @__PURE__ */ new WeakMap();
4692
+ this.#signatureChecks.set(documentLoader, checks);
4693
+ }
4694
+ let check = checks.get(contextLoader);
4695
+ if (check == null) {
4696
+ check = {};
4697
+ checks.set(contextLoader, check);
4698
+ }
4699
+ return check;
4700
+ }
4601
4701
  async getSignedKey(options = {}) {
4602
4702
  if (this.#signedKey != null) return this.#signedKey;
4603
- return this.#signedKey = await verifyRequest(this.request, {
4703
+ const documentLoader = options.documentLoader ?? this.documentLoader;
4704
+ const contextLoader = options.contextLoader ?? this.contextLoader;
4705
+ const check = this.#getSignatureCheck(documentLoader, contextLoader);
4706
+ if (check.key != null) return check.key;
4707
+ const promise = verifyRequest(this.request, {
4604
4708
  ...this,
4605
- contextLoader: options.contextLoader ?? this.contextLoader,
4606
- documentLoader: options.documentLoader ?? this.documentLoader,
4709
+ contextLoader,
4710
+ documentLoader,
4607
4711
  timeWindow: this.federation.signatureTimeWindow,
4608
4712
  tracerProvider: options.tracerProvider ?? this.tracerProvider
4713
+ }).then((key) => {
4714
+ if (key != null) this.#signedKey ??= key;
4715
+ return key;
4716
+ }).catch((error) => {
4717
+ if (check.key === promise) check.key = void 0;
4718
+ throw error;
4609
4719
  });
4720
+ check.key = promise;
4721
+ return await promise;
4610
4722
  }
4611
- #signedKeyOwner = void 0;
4612
4723
  async getSignedKeyOwner(options = {}) {
4613
4724
  if (this.#signedKeyOwner != null) return this.#signedKeyOwner;
4614
- const key = await this.getSignedKey(options);
4615
- if (key == null) return this.#signedKeyOwner = null;
4616
- try {
4617
- return this.#signedKeyOwner = await getKeyOwner(key, {
4618
- contextLoader: options.contextLoader ?? this.contextLoader,
4619
- documentLoader: options.documentLoader ?? this.documentLoader,
4620
- tracerProvider: options.tracerProvider ?? this.tracerProvider
4621
- });
4622
- } catch (error) {
4623
- if (error instanceof FetchError) {
4624
- getLogger([
4625
- "fedify",
4626
- "federation",
4627
- "actor"
4628
- ]).warn("Failed to fetch the key owner {keyOwner} of {keyId} while verifying the request signature; treating the request as unauthenticated: {error}", {
4629
- keyId: key.id?.href,
4630
- keyOwner: error.url.href,
4631
- error
4632
- });
4633
- return this.#signedKeyOwner = null;
4725
+ const normalizedOptions = {
4726
+ documentLoader: options.documentLoader ?? this.documentLoader,
4727
+ contextLoader: options.contextLoader ?? this.contextLoader,
4728
+ tracerProvider: options.tracerProvider ?? this.tracerProvider
4729
+ };
4730
+ const check = this.#getSignatureCheck(normalizedOptions.documentLoader, normalizedOptions.contextLoader);
4731
+ if (check.owner != null) return check.owner;
4732
+ const promise = this.getSignedKey(normalizedOptions).then(async (key) => {
4733
+ if (key == null) {
4734
+ if (check.owner === promise) check.owner = void 0;
4735
+ return null;
4634
4736
  }
4737
+ try {
4738
+ const owner = await getKeyOwner(key, normalizedOptions);
4739
+ if (owner != null) this.#signedKeyOwner ??= owner;
4740
+ return owner;
4741
+ } catch (error) {
4742
+ if (error instanceof FetchError) {
4743
+ getLogger([
4744
+ "fedify",
4745
+ "federation",
4746
+ "actor"
4747
+ ]).warn("Failed to fetch the key owner {keyOwner} of {keyId} while verifying the request signature; treating the request as unauthenticated: {error}", {
4748
+ keyId: key.id?.href,
4749
+ keyOwner: error.url.href,
4750
+ error
4751
+ });
4752
+ return null;
4753
+ }
4754
+ throw error;
4755
+ }
4756
+ }).catch((error) => {
4757
+ if (check.owner === promise) check.owner = void 0;
4635
4758
  throw error;
4636
- }
4759
+ });
4760
+ check.owner = promise;
4761
+ return await promise;
4637
4762
  }
4638
4763
  };
4639
4764
  var InboxContextImpl = class InboxContextImpl extends ContextImpl {
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-Dl00HXr4.js";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-SbfezERn.js";
3
3
  import { n as KvStore, t as KvKey } from "./kv-CxaI4eGo.js";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
@@ -42,12 +42,7 @@ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOpt
42
42
  declare function getAuthenticatedDocumentLoader(identity: {
43
43
  keyId: URL;
44
44
  privateKey: CryptoKey;
45
- }, {
46
- allowPrivateAddress,
47
- userAgent,
48
- specDeterminer,
49
- tracerProvider
50
- }?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
45
+ }, options?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
51
46
  //#endregion
52
47
  //#region src/utils/kv-cache.d.ts
53
48
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { S as KeyCache } from "./http-Dl00HXr4.js";
2
+ import { S as KeyCache } from "./http-SbfezERn.js";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
5
  import { DocumentLoader } from "@fedify/vocab-runtime";
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-DLLaDau8.js";
2
+ import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-C0uGVzgk.js";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-BNwv9Q1v.cjs";
2
+ import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-CLaLxi49.cjs";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DqZhyEso.cjs";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-9IFUxdkp.cjs";
3
3
  import { n as KvStore, t as KvKey } from "./kv-CZKl1IUS.cjs";
4
4
  import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
5
5
  import { TracerProvider } from "@opentelemetry/api";
@@ -42,12 +42,7 @@ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOpt
42
42
  declare function getAuthenticatedDocumentLoader(identity: {
43
43
  keyId: URL;
44
44
  privateKey: CryptoKey;
45
- }, {
46
- allowPrivateAddress,
47
- userAgent,
48
- specDeterminer,
49
- tracerProvider
50
- }?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
45
+ }, options?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
51
46
  //#endregion
52
47
  //#region src/utils/kv-cache.d.ts
53
48
  /**
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { S as KeyCache } from "./http-DqZhyEso.cjs";
2
+ import { S as KeyCache } from "./http-9IFUxdkp.cjs";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
4
  import { DocumentLoader } from "@fedify/vocab-runtime";
5
5
  import { TracerProvider } from "@opentelemetry/api";
package/dist/mod.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("./chunk-DDcVe30Y.cjs");
5
5
  const require_transformers = require("./transformers-NeAONrAq.cjs");
6
6
  require("./compat/mod.cjs");
7
- const require_http = require("./http-BoR1M3W7.cjs");
8
- const require_middleware = require("./middleware-CmD3lpy4.cjs");
9
- const require_types = require("./types-DRPjmHVV.cjs");
10
- const require_proof = require("./proof-CHXVlsH_.cjs");
11
- const require_kv_cache = require("./kv-cache-BxSx_Iyp.cjs");
7
+ const require_http = require("./http-CRiVlZd5.cjs");
8
+ const require_middleware = require("./middleware-BbgR7xOI.cjs");
9
+ const require_types = require("./types-DOvyymM4.cjs");
10
+ const require_proof = require("./proof-0JkSC_pT.cjs");
11
+ const require_kv_cache = require("./kv-cache-Cqmm-yQa.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CAM_bQXx.cjs";
3
- import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-DqZhyEso.cjs";
2
+ import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-BIBzqEIp.cjs";
3
+ import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-9IFUxdkp.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
5
- import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-BNwv9Q1v.cjs";
5
+ import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-CLaLxi49.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CZKl1IUS.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-BmlfRBmU.cjs";
9
- import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-DiuFTYUt.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Cn9GJ5ex.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CGUH8Ujp.cjs";
9
+ import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-LOEOKbYd.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Co7LEK9X.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
package/dist/mod.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CSddvgWN.js";
3
- import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-Dl00HXr4.js";
2
+ import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-jE7oGvRh.js";
3
+ import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-SbfezERn.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CiBPcC6F.js";
5
- import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-DLLaDau8.js";
5
+ import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-C0uGVzgk.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CxaI4eGo.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CWJNbyju.js";
9
- import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-BLDHhuW0.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DNEgTI8M.js";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CFRocFeQ.js";
9
+ import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-C7w-QVUv.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BRnwh2oy.js";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./chunk-CRNNMoPX.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
5
5
  import "./compat/mod.js";
6
- import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-CK3efjgM.js";
7
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-C2AJFk8W.js";
8
- import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-miAYfiGO.js";
9
- import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-7R4s10TJ.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-ImApO425.js";
6
+ import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-Crml3gei.js";
7
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-DIW5S_5L.js";
8
+ import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-B1_pRFE_.js";
9
+ import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-DzksJFK7.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DQcyZL5T.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";