@fedify/fedify 2.0.36-dev.2653 → 2.0.36-dev.2729

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 (71) hide show
  1. package/dist/{builder-D6LGNjSj.mjs → builder-DifMW7os.mjs} +3 -3
  2. package/dist/callback-CJd-aCRE.d.mts +2223 -0
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{context-C00pWP8x.d.ts → context-CgpkmUFq.d.ts} +23 -12
  7. package/dist/{context-ao-qb3eP.d.cts → context-DGC1C_UU.d.cts} +23 -12
  8. package/dist/{deno-DnlTCwP9.mjs → deno-CZYDJcbZ.mjs} +1 -1
  9. package/dist/{docloader-ClA1cBXp.mjs → docloader-DXZDJeg3.mjs} +2 -2
  10. package/dist/federation/builder.test.mjs +1 -1
  11. package/dist/federation/handler.test.mjs +6 -6
  12. package/dist/federation/idempotency.test.mjs +2 -2
  13. package/dist/federation/inbox.test.mjs +1 -1
  14. package/dist/federation/middleware.test.mjs +7 -7
  15. package/dist/federation/mod.cjs +1 -1
  16. package/dist/federation/mod.d.cts +2 -2
  17. package/dist/federation/mod.d.ts +2 -2
  18. package/dist/federation/mod.js +1 -1
  19. package/dist/federation/send.test.mjs +3 -3
  20. package/dist/federation/temporal.test.mjs +1 -1
  21. package/dist/federation/webfinger.test.mjs +1 -1
  22. package/dist/{http-Cqbz1vSQ.js → http-6beU7KiN.js} +6 -4
  23. package/dist/{http-Cd8UD1ym.d.ts → http-B57wVmZ3.d.cts} +3 -3
  24. package/dist/{http-pcUSzQJO.mjs → http-BEyjd3P7.mjs} +6 -4
  25. package/dist/{http-CUyMHX68.cjs → http-CU9dab8F.cjs} +6 -4
  26. package/dist/{http-DFqAb11b.d.cts → http-CURWmZlP.d.ts} +3 -3
  27. package/dist/{inbox-Dvd92fR4.mjs → inbox-DO4a9FKE.mjs} +1 -1
  28. package/dist/{key-WbbcbEg2.mjs → key-DjCiTRyO.mjs} +3 -2
  29. package/dist/{kv-cache-C2CZ0wo0.cjs → kv-cache-DFybNxHG.cjs} +1 -1
  30. package/dist/{kv-cache-CFnt0ze9.js → kv-cache-DPBGlPnW.js} +1 -1
  31. package/dist/{ld-CQIFcE4D.mjs → ld-B5pG0yhd.mjs} +20 -7
  32. package/dist/{middleware-CNSvd_Yd.cjs → middleware-Bdvdue5B.cjs} +1 -1
  33. package/dist/{middleware-C1wIK-Eo.js → middleware-BqQbaTiu.js} +14 -6
  34. package/dist/{middleware-BW7yDR0N.cjs → middleware-ClxSuYs7.cjs} +15 -7
  35. package/dist/{middleware-pG3fni-8.mjs → middleware-DnnYzTPv.mjs} +22 -13
  36. package/dist/{middleware-DdgQlj3K.mjs → middleware-Dsw0i5sQ.mjs} +1 -1
  37. package/dist/{mod-DtRh015i.d.ts → mod-BqnolIm8.d.ts} +1 -1
  38. package/dist/{mod-6uJWdCc0.d.cts → mod-BzKteaAe.d.cts} +1 -1
  39. package/dist/{mod-DGP89q0u.d.ts → mod-CIjZ1RmH.d.ts} +3 -3
  40. package/dist/{mod-BPDfu4Ey.d.cts → mod-DaQ6pIH3.d.cts} +3 -3
  41. package/dist/{mod-CL9Ep0uo.d.ts → mod-DmmcsbU8.d.cts} +12 -7
  42. package/dist/{mod-BA6vqC2S.d.cts → mod-fnE_D0lV.d.ts} +12 -7
  43. package/dist/mod.cjs +4 -4
  44. package/dist/mod.d.cts +7 -7
  45. package/dist/mod.d.ts +7 -7
  46. package/dist/mod.js +4 -4
  47. package/dist/nodeinfo/handler.test.mjs +1 -1
  48. package/dist/{owner-U2uzi8vw.mjs → owner-Dmlm2oR_.mjs} +2 -2
  49. package/dist/{proof-Czu16ywv.cjs → proof-BGPhmUJL.cjs} +20 -7
  50. package/dist/{proof-DlcTuXU1.js → proof-iPBfQoMT.js} +20 -7
  51. package/dist/{proof-DuGHbMbs.mjs → proof-v76wU5Lv.mjs} +4 -3
  52. package/dist/{send-JCtYxtYm.mjs → send-C830qz95.mjs} +2 -2
  53. package/dist/sig/http.test.mjs +2 -2
  54. package/dist/sig/key-types.test.d.mts +218 -0
  55. package/dist/sig/key-types.test.mjs +8 -0
  56. package/dist/sig/key.test.mjs +2 -2
  57. package/dist/sig/ld.test.mjs +156 -4
  58. package/dist/sig/mod.cjs +2 -2
  59. package/dist/sig/mod.d.cts +3 -3
  60. package/dist/sig/mod.d.ts +3 -3
  61. package/dist/sig/mod.js +2 -2
  62. package/dist/sig/owner.test.mjs +1 -1
  63. package/dist/sig/proof.test.mjs +2 -2
  64. package/dist/{temporal-B7Rg3f1o.mjs → temporal-Bm5DL5mq.mjs} +1 -1
  65. package/dist/testing/mod.d.mts +2 -2123
  66. package/dist/utils/docloader.test.mjs +2 -2
  67. package/dist/utils/mod.cjs +1 -1
  68. package/dist/utils/mod.d.cts +1 -1
  69. package/dist/utils/mod.d.ts +1 -1
  70. package/dist/utils/mod.js +1 -1
  71. package/package.json +5 -5
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
4
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
5
5
  import { Activity, getTypeId } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
@@ -1,10 +1,11 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
4
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
5
5
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
8
+ import { asCryptoKey } from "@fedify/vocab-runtime/internal";
8
9
  import { getLogger } from "@logtape/logtape";
9
10
  //#region src/sig/key.ts
10
11
  /** Classifies decoding failures without hiding unexpected loader errors. */
@@ -99,7 +100,7 @@ function generateCryptoKeyPair(algorithm) {
99
100
  */
100
101
  async function exportJwk(key) {
101
102
  validateCryptoKey(key);
102
- const jwk = await crypto.subtle.exportKey("jwk", key);
103
+ const jwk = await crypto.subtle.exportKey("jwk", asCryptoKey(key));
103
104
  if (jwk.crv === "Ed25519") jwk.alg = "Ed25519";
104
105
  return jwk;
105
106
  }
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-CUyMHX68.cjs");
4
+ const require_http = require("./http-CU9dab8F.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let es_toolkit = require("es-toolkit");
7
7
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { l as validateCryptoKey, t as doubleKnockScoped } from "./http-Cqbz1vSQ.js";
3
+ import { l as validateCryptoKey, t as doubleKnockScoped } from "./http-6beU7KiN.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { curry } from "es-toolkit";
6
6
  import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts } from "@fedify/vocab-runtime";
@@ -1,11 +1,12 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-WbbcbEg2.mjs";
4
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-DjCiTRyO.mjs";
6
6
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
9
+ import { asCryptoKey } from "@fedify/vocab-runtime/internal";
9
10
  import { getLogger } from "@logtape/logtape";
10
11
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
11
12
  import { encodeHex } from "byte-encodings/hex";
@@ -423,7 +424,7 @@ async function createSignature(jsonLd, privateKey, keyId, { contextLoader, creat
423
424
  ...options
424
425
  }, contextLoader) + await hashJsonLd(prepareSignatureDocument(jsonLd), contextLoader);
425
426
  const messageBytes = new TextEncoder().encode(message);
426
- const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, messageBytes);
427
+ const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", asCryptoKey(privateKey), messageBytes);
427
428
  return {
428
429
  "@context": "https://w3id.org/security/v1",
429
430
  ...options,
@@ -494,6 +495,9 @@ function detachSignature(jsonLd) {
494
495
  }
495
496
  /**
496
497
  * Verifies Linked Data Signatures of the given JSON-LD document.
498
+ * Unmapped properties discarded during JSON-LD processing are tolerated, but
499
+ * their values are not authenticated by the signature. Other unsafe
500
+ * canonicalization warnings, including relative IRIs, remain rejected.
497
501
  * @param jsonLd The JSON-LD document to verify.
498
502
  * @param options Options for verifying the signature.
499
503
  * @returns The public key that signed the document or `null` if the signature
@@ -524,7 +528,7 @@ async function verifySignature(jsonLd, options = {}) {
524
528
  delete sigOpts.signatureValue;
525
529
  let sigOptsHash;
526
530
  try {
527
- sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader);
531
+ sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader, "verify");
528
532
  } catch (error) {
529
533
  logger.warn("Failed to verify; failed to hash the signature options: {signatureOptions}\n{error}", {
530
534
  signatureOptions: sigOpts,
@@ -536,7 +540,7 @@ async function verifySignature(jsonLd, options = {}) {
536
540
  delete document.signature;
537
541
  let docHash;
538
542
  try {
539
- docHash = await hashJsonLd(document, options.contextLoader);
543
+ docHash = await hashJsonLd(document, options.contextLoader, "verify");
540
544
  } catch (error) {
541
545
  logger.warn("Failed to verify; failed to hash the document: {document}\n{error}", {
542
546
  document,
@@ -575,6 +579,8 @@ async function verifySignature(jsonLd, options = {}) {
575
579
  * Signatures. If the document is signed, this function verifies the signature
576
580
  * and checks if the document is attributed to the owner of the public key.
577
581
  * If the document is not signed, this function returns `false`.
582
+ * Unmapped properties discarded during JSON-LD processing are not
583
+ * authenticated, even when verification succeeds.
578
584
  * @param jsonLd The JSON-LD document to verify.
579
585
  * @param options Options for verifying the document.
580
586
  * @returns `true` if the document is authentic; `false` otherwise.
@@ -627,10 +633,17 @@ async function verifyJsonLdInternal(jsonLd, options, compact) {
627
633
  }
628
634
  });
629
635
  }
630
- async function hashJsonLd(jsonLd, contextLoader) {
636
+ const tolerableVerificationWarnings = new Set(["blank node predicate", "invalid property"]);
637
+ function handleVerificationEvent({ event, next }) {
638
+ if (event.level === "warning" && !tolerableVerificationWarnings.has(event.code)) throw new TypeError(`Unsafe JSON-LD canonicalization warning: ${event.code}`);
639
+ next();
640
+ }
641
+ async function hashJsonLd(jsonLd, contextLoader, mode = "sign") {
631
642
  const canon = await jsonld.canonize(jsonLd, {
632
643
  format: "application/n-quads",
633
- documentLoader: contextLoader ?? getDocumentLoader()
644
+ documentLoader: contextLoader ?? getDocumentLoader(),
645
+ safe: mode === "sign",
646
+ eventHandler: mode === "verify" ? handleVerificationEvent : void 0
634
647
  });
635
648
  const encoder = new TextEncoder();
636
649
  return encodeHex(await crypto.subtle.digest("SHA-256", encoder.encode(canon)));
@@ -1,4 +1,4 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_middleware = require("./middleware-BW7yDR0N.cjs");
3
+ const require_middleware = require("./middleware-ClxSuYs7.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -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 { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnockScoped } from "./http-Cqbz1vSQ.js";
5
+ import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnockScoped } from "./http-6beU7KiN.js";
6
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-DlcTuXU1.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CFnt0ze9.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-iPBfQoMT.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DPBGlPnW.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";
@@ -14,11 +14,11 @@ import { Router } from "uri-template-router";
14
14
  import { parseTemplate } from "url-template";
15
15
  import { encodeHex } from "byte-encodings/hex";
16
16
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
17
+ import { asCryptoKey, openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
17
18
  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
19
  import jsonld from "@fedify/vocab-runtime/jsonld";
19
20
  import { normalizeDateTimeLiteral } from "@fedify/vocab-runtime/temporal";
20
21
  import { lookupWebFinger } from "@fedify/webfinger";
21
- import { openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
22
22
  import { domainToASCII } from "node:url";
23
23
  //#region src/federation/inbox.ts
24
24
  var InboxListenerSet = class InboxListenerSet {
@@ -4053,6 +4053,8 @@ var ContextImpl = class ContextImpl {
4053
4053
  for (const keyPair of keyPairs) {
4054
4054
  const newPair = {
4055
4055
  ...keyPair,
4056
+ privateKey: asCryptoKey(keyPair.privateKey),
4057
+ publicKey: asCryptoKey(keyPair.publicKey),
4056
4058
  cryptographicKey: new CryptographicKey({
4057
4059
  id: keyPair.keyId,
4058
4060
  owner,
@@ -4129,10 +4131,16 @@ var ContextImpl = class ContextImpl {
4129
4131
  } else identifierPromise = Promise.resolve(identity.identifier);
4130
4132
  return identifierPromise.then((identifier) => {
4131
4133
  if (identifier == null) return this.documentLoader;
4132
- return this.getRsaKeyPairFromIdentifier(identifier).then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory(pair));
4134
+ return this.getRsaKeyPairFromIdentifier(identifier).then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory({
4135
+ keyId: pair.keyId,
4136
+ privateKey: asCryptoKey(pair.privateKey)
4137
+ }));
4133
4138
  });
4134
4139
  }
4135
- return this.federation.authenticatedDocumentLoaderFactory(identity);
4140
+ return this.federation.authenticatedDocumentLoaderFactory({
4141
+ keyId: identity.keyId,
4142
+ privateKey: asCryptoKey(identity.privateKey)
4143
+ });
4136
4144
  }
4137
4145
  lookupObject(identifier, options = {}) {
4138
4146
  return lookupObject(identifier, {
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
4
  const require_transformers = require("./transformers-NeAONrAq.cjs");
5
- const require_http = require("./http-CUyMHX68.cjs");
5
+ const require_http = require("./http-CU9dab8F.cjs");
6
6
  const require_types = require("./types-DOvyymM4.cjs");
7
- const require_proof = require("./proof-Czu16ywv.cjs");
8
- const require_kv_cache = require("./kv-cache-C2CZ0wo0.cjs");
7
+ const require_proof = require("./proof-BGPhmUJL.cjs");
8
+ const require_kv_cache = require("./kv-cache-DFybNxHG.cjs");
9
9
  let _logtape_logtape = require("@logtape/logtape");
10
10
  let _fedify_vocab = require("@fedify/vocab");
11
11
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -14,12 +14,12 @@ let uri_template_router = require("uri-template-router");
14
14
  let url_template = require("url-template");
15
15
  let byte_encodings_hex = require("byte-encodings/hex");
16
16
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
17
+ let _fedify_vocab_runtime_internal = require("@fedify/vocab-runtime/internal");
17
18
  let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
18
19
  let _fedify_vocab_runtime_jsonld = require("@fedify/vocab-runtime/jsonld");
19
20
  _fedify_vocab_runtime_jsonld = require_chunk.__toESM(_fedify_vocab_runtime_jsonld);
20
21
  let _fedify_vocab_runtime_temporal = require("@fedify/vocab-runtime/temporal");
21
22
  let _fedify_webfinger = require("@fedify/webfinger");
22
- let _fedify_vocab_runtime_internal = require("@fedify/vocab-runtime/internal");
23
23
  let node_url = require("node:url");
24
24
  //#region src/federation/inbox.ts
25
25
  var InboxListenerSet = class InboxListenerSet {
@@ -351,7 +351,7 @@ var FederationBuilderImpl = class {
351
351
  this.collectionTypeIds = {};
352
352
  }
353
353
  async build(options) {
354
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CNSvd_Yd.cjs"));
354
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-Bdvdue5B.cjs"));
355
355
  const f = new FederationImpl(options);
356
356
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
357
357
  f.router = this.router.clone();
@@ -4047,6 +4047,8 @@ var ContextImpl = class ContextImpl {
4047
4047
  for (const keyPair of keyPairs) {
4048
4048
  const newPair = {
4049
4049
  ...keyPair,
4050
+ privateKey: (0, _fedify_vocab_runtime_internal.asCryptoKey)(keyPair.privateKey),
4051
+ publicKey: (0, _fedify_vocab_runtime_internal.asCryptoKey)(keyPair.publicKey),
4050
4052
  cryptographicKey: new _fedify_vocab.CryptographicKey({
4051
4053
  id: keyPair.keyId,
4052
4054
  owner,
@@ -4123,10 +4125,16 @@ var ContextImpl = class ContextImpl {
4123
4125
  } else identifierPromise = Promise.resolve(identity.identifier);
4124
4126
  return identifierPromise.then((identifier) => {
4125
4127
  if (identifier == null) return this.documentLoader;
4126
- return this.getRsaKeyPairFromIdentifier(identifier).then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory(pair));
4128
+ return this.getRsaKeyPairFromIdentifier(identifier).then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory({
4129
+ keyId: pair.keyId,
4130
+ privateKey: (0, _fedify_vocab_runtime_internal.asCryptoKey)(pair.privateKey)
4131
+ }));
4127
4132
  });
4128
4133
  }
4129
- return this.federation.authenticatedDocumentLoaderFactory(identity);
4134
+ return this.federation.authenticatedDocumentLoaderFactory({
4135
+ keyId: identity.keyId,
4136
+ privateKey: (0, _fedify_vocab_runtime_internal.asCryptoKey)(identity.privateKey)
4137
+ });
4130
4138
  }
4131
4139
  lookupObject(identifier, options = {}) {
4132
4140
  return (0, _fedify_vocab.lookupObject)(identifier, {
@@ -2,28 +2,29 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as RouterError } from "./router-CrMLXoOr.mjs";
5
- import { n as version, t as name } from "./deno-DnlTCwP9.mjs";
6
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-WbbcbEg2.mjs";
7
- import { u as verifyRequest } from "./http-pcUSzQJO.mjs";
8
- import { n as getAuthenticatedDocumentLoader } from "./docloader-ClA1cBXp.mjs";
5
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
6
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-DjCiTRyO.mjs";
7
+ import { u as verifyRequest } from "./http-BEyjd3P7.mjs";
8
+ import { n as getAuthenticatedDocumentLoader } from "./docloader-DXZDJeg3.mjs";
9
9
  import { n as kvCache } from "./kv-cache-BrjuJue8.mjs";
10
- import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-CQIFcE4D.mjs";
11
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-U2uzi8vw.mjs";
12
- import { n as signObject, r as verifyObject } from "./proof-DuGHbMbs.mjs";
10
+ import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-B5pG0yhd.mjs";
11
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-Dmlm2oR_.mjs";
12
+ import { n as signObject, r as verifyObject } from "./proof-v76wU5Lv.mjs";
13
13
  import { d as MAX_BODY_SIZE, f as readBoundedText, t as getNodeInfo, u as BodyTooLargeError } from "./client-DGNacEx_.mjs";
14
14
  import { t as nodeInfoToJson } from "./types-MNlFfxjv.mjs";
15
- import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-Dvd92fR4.mjs";
16
- import { t as FederationBuilderImpl } from "./builder-D6LGNjSj.mjs";
15
+ import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-DO4a9FKE.mjs";
16
+ import { t as FederationBuilderImpl } from "./builder-DifMW7os.mjs";
17
17
  import { t as buildCollectionSynchronizationHeader } from "./collection-DI6YzYpd.mjs";
18
18
  import { t as KvKeyCache } from "./keycache-DBD6fzl1.mjs";
19
19
  import { t as acceptsJsonLd } from "./negotiation-TWEs6Cl8.mjs";
20
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-B7Rg3f1o.mjs";
20
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-Bm5DL5mq.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
22
- import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-JCtYxtYm.mjs";
22
+ import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-C830qz95.mjs";
23
23
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
24
24
  import { lookupWebFinger } from "@fedify/webfinger";
25
25
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
26
26
  import { getDocumentLoader } from "@fedify/vocab-runtime";
27
+ import { asCryptoKey } from "@fedify/vocab-runtime/internal";
27
28
  import { getLogger, withContext } from "@logtape/logtape";
28
29
  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";
29
30
  import { domainToASCII } from "node:url";
@@ -2716,6 +2717,8 @@ var ContextImpl = class ContextImpl {
2716
2717
  for (const keyPair of keyPairs) {
2717
2718
  const newPair = {
2718
2719
  ...keyPair,
2720
+ privateKey: asCryptoKey(keyPair.privateKey),
2721
+ publicKey: asCryptoKey(keyPair.publicKey),
2719
2722
  cryptographicKey: new CryptographicKey({
2720
2723
  id: keyPair.keyId,
2721
2724
  owner,
@@ -2792,10 +2795,16 @@ var ContextImpl = class ContextImpl {
2792
2795
  } else identifierPromise = Promise.resolve(identity.identifier);
2793
2796
  return identifierPromise.then((identifier) => {
2794
2797
  if (identifier == null) return this.documentLoader;
2795
- return this.getRsaKeyPairFromIdentifier(identifier).then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory(pair));
2798
+ return this.getRsaKeyPairFromIdentifier(identifier).then((pair) => pair == null ? this.documentLoader : this.federation.authenticatedDocumentLoaderFactory({
2799
+ keyId: pair.keyId,
2800
+ privateKey: asCryptoKey(pair.privateKey)
2801
+ }));
2796
2802
  });
2797
2803
  }
2798
- return this.federation.authenticatedDocumentLoaderFactory(identity);
2804
+ return this.federation.authenticatedDocumentLoaderFactory({
2805
+ keyId: identity.keyId,
2806
+ privateKey: asCryptoKey(identity.privateKey)
2807
+ });
2799
2808
  }
2800
2809
  lookupObject(identifier, options = {}) {
2801
2810
  return lookupObject(identifier, {
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-pG3fni-8.mjs";
4
+ import { n as FederationImpl } from "./middleware-DnnYzTPv.mjs";
5
5
  export { FederationImpl };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-C00pWP8x.js";
2
+ import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-CgpkmUFq.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 { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-ao-qb3eP.cjs";
2
+ import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-DGC1C_UU.cjs";
3
3
  import { Span, Tracer } from "@opentelemetry/api";
4
4
 
5
5
  //#region src/federation/webfinger.d.ts
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-Cd8UD1ym.js";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-CURWmZlP.js";
3
3
  import { n as KvStore, t as KvKey } from "./kv-CxaI4eGo.js";
4
4
  import { TracerProvider } from "@opentelemetry/api";
5
- import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
5
+ import { CryptoKeyLike, DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
6
6
 
7
7
  //#region src/utils/docloader.d.ts
8
8
  /**
@@ -41,7 +41,7 @@ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOpt
41
41
  */
42
42
  declare function getAuthenticatedDocumentLoader(identity: {
43
43
  keyId: URL;
44
- privateKey: CryptoKey;
44
+ privateKey: CryptoKeyLike;
45
45
  }, options?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
46
46
  //#endregion
47
47
  //#region src/utils/kv-cache.d.ts
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DFqAb11b.cjs";
2
+ import { n as HttpMessageSignaturesSpecDeterminer } from "./http-B57wVmZ3.cjs";
3
3
  import { n as KvStore, t as KvKey } from "./kv-CZKl1IUS.cjs";
4
- import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
4
+ import { CryptoKeyLike, DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
5
5
  import { TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/utils/docloader.d.ts
@@ -41,7 +41,7 @@ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOpt
41
41
  */
42
42
  declare function getAuthenticatedDocumentLoader(identity: {
43
43
  keyId: URL;
44
- privateKey: CryptoKey;
44
+ privateKey: CryptoKeyLike;
45
45
  }, options?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
46
46
  //#endregion
47
47
  //#region src/utils/kv-cache.d.ts
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { l as KeyCache } from "./http-Cd8UD1ym.js";
2
+ import { l as KeyCache } from "./http-B57wVmZ3.cjs";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
+ import { CryptoKeyLike, CryptoKeyLike as CryptoKeyLike$1, CryptoKeyPairLike as CryptoKeyPairLike$1, DocumentLoader } from "@fedify/vocab-runtime";
4
5
  import { TracerProvider } from "@opentelemetry/api";
5
- import { DocumentLoader } from "@fedify/vocab-runtime";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -71,7 +71,7 @@ interface CreateSignatureOptions {
71
71
  * @throws {TypeError} If the private key is invalid or unsupported.
72
72
  * @since 1.0.0
73
73
  */
74
- declare function createSignature(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, {
74
+ declare function createSignature(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, {
75
75
  contextLoader,
76
76
  created
77
77
  }?: CreateSignatureOptions): Promise<Signature>;
@@ -100,7 +100,7 @@ interface SignJsonLdOptions extends CreateSignatureOptions {
100
100
  * @throws {TypeError} If the private key is invalid or unsupported.
101
101
  * @since 1.0.0
102
102
  */
103
- declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, options: SignJsonLdOptions): Promise<{
103
+ declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, options: SignJsonLdOptions): Promise<{
104
104
  signature: Signature;
105
105
  }>;
106
106
  /**
@@ -137,6 +137,9 @@ interface VerifySignatureOptions {
137
137
  }
138
138
  /**
139
139
  * Verifies Linked Data Signatures of the given JSON-LD document.
140
+ * Unmapped properties discarded during JSON-LD processing are tolerated, but
141
+ * their values are not authenticated by the signature. Other unsafe
142
+ * canonicalization warnings, including relative IRIs, remain rejected.
140
143
  * @param jsonLd The JSON-LD document to verify.
141
144
  * @param options Options for verifying the signature.
142
145
  * @returns The public key that signed the document or `null` if the signature
@@ -153,6 +156,8 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
153
156
  * Signatures. If the document is signed, this function verifies the signature
154
157
  * and checks if the document is attributed to the owner of the public key.
155
158
  * If the document is not signed, this function returns `false`.
159
+ * Unmapped properties discarded during JSON-LD processing are not
160
+ * authenticated, even when verification succeeds.
156
161
  * @param jsonLd The JSON-LD document to verify.
157
162
  * @param options Options for verifying the document.
158
163
  * @returns `true` if the document is authentic; `false` otherwise.
@@ -189,7 +194,7 @@ interface CreateProofOptions {
189
194
  * @throws {TypeError} If the private key is invalid or unsupported.
190
195
  * @since 0.10.0
191
196
  */
192
- declare function createProof(object: Object$1, privateKey: CryptoKey, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
197
+ declare function createProof(object: Object$1, privateKey: CryptoKeyLike, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
193
198
  /**
194
199
  * Options for {@link signObject}.
195
200
  * @since 0.10.0
@@ -216,7 +221,7 @@ interface SignObjectOptions extends CreateProofOptions {
216
221
  * @throws {TypeError} If the private key is invalid or unsupported.
217
222
  * @since 0.10.0
218
223
  */
219
- declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKey, keyId: URL, options?: SignObjectOptions): Promise<T>;
224
+ declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKeyLike, keyId: URL, options?: SignObjectOptions): Promise<T>;
220
225
  /**
221
226
  * Options for {@link verifyProof}.
222
227
  * @since 0.10.0
@@ -276,4 +281,4 @@ declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) =>
276
281
  fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
277
282
  }, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
278
283
  //#endregion
279
- export { verifyJsonLd as _, createProof as a, verifyProof as c, VerifyJsonLdOptions as d, VerifySignatureOptions as f, signJsonLd as g, detachSignature as h, VerifyProofOptions as i, CreateSignatureOptions as l, createSignature as m, SignObjectOptions as n, signObject as o, attachSignature as p, VerifyObjectOptions as r, verifyObject as s, CreateProofOptions as t, SignJsonLdOptions as u, verifySignature as v };
284
+ export { detachSignature as _, VerifyObjectOptions as a, verifySignature as b, signObject as c, CreateSignatureOptions as d, SignJsonLdOptions as f, createSignature as g, attachSignature as h, SignObjectOptions as i, verifyObject as l, VerifySignatureOptions as m, CryptoKeyPairLike$1 as n, VerifyProofOptions as o, VerifyJsonLdOptions as p, CreateProofOptions as r, createProof as s, CryptoKeyLike$1 as t, verifyProof as u, signJsonLd as v, verifyJsonLd as y };
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { l as KeyCache } from "./http-DFqAb11b.cjs";
2
+ import { l as KeyCache } from "./http-CURWmZlP.js";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
- import { DocumentLoader } from "@fedify/vocab-runtime";
5
4
  import { TracerProvider } from "@opentelemetry/api";
5
+ import { CryptoKeyLike, CryptoKeyLike as CryptoKeyLike$1, CryptoKeyPairLike as CryptoKeyPairLike$1, DocumentLoader } from "@fedify/vocab-runtime";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -71,7 +71,7 @@ interface CreateSignatureOptions {
71
71
  * @throws {TypeError} If the private key is invalid or unsupported.
72
72
  * @since 1.0.0
73
73
  */
74
- declare function createSignature(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, {
74
+ declare function createSignature(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, {
75
75
  contextLoader,
76
76
  created
77
77
  }?: CreateSignatureOptions): Promise<Signature>;
@@ -100,7 +100,7 @@ interface SignJsonLdOptions extends CreateSignatureOptions {
100
100
  * @throws {TypeError} If the private key is invalid or unsupported.
101
101
  * @since 1.0.0
102
102
  */
103
- declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, options: SignJsonLdOptions): Promise<{
103
+ declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, options: SignJsonLdOptions): Promise<{
104
104
  signature: Signature;
105
105
  }>;
106
106
  /**
@@ -137,6 +137,9 @@ interface VerifySignatureOptions {
137
137
  }
138
138
  /**
139
139
  * Verifies Linked Data Signatures of the given JSON-LD document.
140
+ * Unmapped properties discarded during JSON-LD processing are tolerated, but
141
+ * their values are not authenticated by the signature. Other unsafe
142
+ * canonicalization warnings, including relative IRIs, remain rejected.
140
143
  * @param jsonLd The JSON-LD document to verify.
141
144
  * @param options Options for verifying the signature.
142
145
  * @returns The public key that signed the document or `null` if the signature
@@ -153,6 +156,8 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
153
156
  * Signatures. If the document is signed, this function verifies the signature
154
157
  * and checks if the document is attributed to the owner of the public key.
155
158
  * If the document is not signed, this function returns `false`.
159
+ * Unmapped properties discarded during JSON-LD processing are not
160
+ * authenticated, even when verification succeeds.
156
161
  * @param jsonLd The JSON-LD document to verify.
157
162
  * @param options Options for verifying the document.
158
163
  * @returns `true` if the document is authentic; `false` otherwise.
@@ -189,7 +194,7 @@ interface CreateProofOptions {
189
194
  * @throws {TypeError} If the private key is invalid or unsupported.
190
195
  * @since 0.10.0
191
196
  */
192
- declare function createProof(object: Object$1, privateKey: CryptoKey, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
197
+ declare function createProof(object: Object$1, privateKey: CryptoKeyLike, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
193
198
  /**
194
199
  * Options for {@link signObject}.
195
200
  * @since 0.10.0
@@ -216,7 +221,7 @@ interface SignObjectOptions extends CreateProofOptions {
216
221
  * @throws {TypeError} If the private key is invalid or unsupported.
217
222
  * @since 0.10.0
218
223
  */
219
- declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKey, keyId: URL, options?: SignObjectOptions): Promise<T>;
224
+ declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKeyLike, keyId: URL, options?: SignObjectOptions): Promise<T>;
220
225
  /**
221
226
  * Options for {@link verifyProof}.
222
227
  * @since 0.10.0
@@ -276,4 +281,4 @@ declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) =>
276
281
  fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
277
282
  }, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
278
283
  //#endregion
279
- export { verifyJsonLd as _, createProof as a, verifyProof as c, VerifyJsonLdOptions as d, VerifySignatureOptions as f, signJsonLd as g, detachSignature as h, VerifyProofOptions as i, CreateSignatureOptions as l, createSignature as m, SignObjectOptions as n, signObject as o, attachSignature as p, VerifyObjectOptions as r, verifyObject as s, CreateProofOptions as t, SignJsonLdOptions as u, verifySignature as v };
284
+ export { detachSignature as _, VerifyObjectOptions as a, verifySignature as b, signObject as c, CreateSignatureOptions as d, SignJsonLdOptions as f, createSignature as g, attachSignature as h, SignObjectOptions as i, verifyObject as l, VerifySignatureOptions as m, CryptoKeyPairLike$1 as n, VerifyProofOptions as o, VerifyJsonLdOptions as p, CreateProofOptions as r, createProof as s, CryptoKeyLike$1 as t, verifyProof as u, signJsonLd as v, verifyJsonLd as y };
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-CUyMHX68.cjs");
8
- const require_middleware = require("./middleware-BW7yDR0N.cjs");
7
+ const require_http = require("./http-CU9dab8F.cjs");
8
+ const require_middleware = require("./middleware-ClxSuYs7.cjs");
9
9
  const require_types = require("./types-DOvyymM4.cjs");
10
- const require_proof = require("./proof-Czu16ywv.cjs");
11
- const require_kv_cache = require("./kv-cache-C2CZ0wo0.cjs");
10
+ const require_proof = require("./proof-BGPhmUJL.cjs");
11
+ const require_kv_cache = require("./kv-cache-DFybNxHG.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,18 +1,18 @@
1
1
  /// <reference lib="esnext.temporal" />
2
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 { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-DFqAb11b.cjs";
3
+ import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-B57wVmZ3.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-ao-qb3eP.cjs";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-DGC1C_UU.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-6uJWdCc0.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-BA6vqC2S.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BPDfu4Ey.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-BzKteaAe.cjs";
9
+ import { _ as detachSignature, a as VerifyObjectOptions, b as verifySignature, c as signObject, d as CreateSignatureOptions, f as SignJsonLdOptions, g as createSignature, h as attachSignature, i as SignObjectOptions, l as verifyObject, m as VerifySignatureOptions, n as CryptoKeyPairLike, o as VerifyProofOptions, p as VerifyJsonLdOptions, r as CreateProofOptions, s as createProof, t as CryptoKeyLike, u as verifyProof, v as signJsonLd, y as verifyJsonLd } from "./mod-DmmcsbU8.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DaQ6pIH3.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
14
14
  declare namespace mod_d_exports {
15
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
15
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
16
16
  }
17
17
  //#endregion
18
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
18
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };