@fedify/fedify 2.4.0-dev.2122 → 2.4.0-dev.2127

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 (90) hide show
  1. package/dist/{builder-BCXywsZF.mjs → builder-B2bgGYbP.mjs} +2 -2
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{compound-proof-Fxd45Oy5.mjs → compound-proof-SVlHSzV7.mjs} +2 -2
  6. package/dist/{context-SMNOiiY6.d.cts → context-Bm6ldGvx.d.cts} +30 -4
  7. package/dist/{context-tOiJfBoD.d.ts → context-Ci5vuUr_.d.ts} +30 -4
  8. package/dist/{context-CoNRxGYp.mjs → context-DfSVPcJ8.mjs} +6 -3
  9. package/dist/{deno-BZrnW0Qz.mjs → deno-Be9xoxps.mjs} +1 -1
  10. package/dist/{docloader-3BHaS20Z.mjs → docloader-Dtuyb0ps.mjs} +7 -7
  11. package/dist/federation/builder.test.mjs +1 -1
  12. package/dist/federation/compound-fanout.test.mjs +3 -3
  13. package/dist/federation/handler-compound-proof.test.mjs +4 -4
  14. package/dist/federation/handler.test.mjs +6 -6
  15. package/dist/federation/hashlink-media.test.mjs +2 -2
  16. package/dist/federation/idempotency.test.mjs +2 -2
  17. package/dist/federation/metrics.test.mjs +1 -1
  18. package/dist/federation/middleware.test.mjs +8 -8
  19. package/dist/federation/mod.cjs +1 -1
  20. package/dist/federation/mod.d.cts +2 -2
  21. package/dist/federation/mod.d.ts +2 -2
  22. package/dist/federation/mod.js +1 -1
  23. package/dist/federation/outgoing-proof.test.mjs +5 -5
  24. package/dist/federation/portable-actor.test.mjs +3 -3
  25. package/dist/federation/portable-chain.test.d.mts +2 -0
  26. package/dist/federation/portable-chain.test.mjs +358 -0
  27. package/dist/federation/portable-gateway-keys.test.mjs +4 -4
  28. package/dist/federation/portable-inbox.test.mjs +4 -4
  29. package/dist/federation/portable.test.mjs +3 -3
  30. package/dist/federation/send.test.mjs +3 -3
  31. package/dist/federation/tasks/enqueue.test.mjs +2 -2
  32. package/dist/federation/tasks/tasks.test.mjs +3 -3
  33. package/dist/federation/temporal.test.mjs +1 -1
  34. package/dist/federation/webfinger.test.mjs +2 -2
  35. package/dist/{federation-Ml6NrgRV.cjs → federation-B6IHuS6n.cjs} +37 -13
  36. package/dist/{http-B9BQDNIy.mjs → http-BFeK9sBg.mjs} +4 -4
  37. package/dist/{http-BETASGl0.js → http-Rmbiu-5S.js} +1 -1
  38. package/dist/{http-4bmgw-mA.cjs → http-o8l4QeUY.cjs} +1 -1
  39. package/dist/{key-PyYvun0F.mjs → key-Cc1b6pW9.mjs} +2 -2
  40. package/dist/{kv-cache-D2Bz6t_c.cjs → kv-cache-BUkgZAcX.cjs} +6 -6
  41. package/dist/{kv-cache-C4mv2ZFQ.js → kv-cache-BweDce2I.js} +6 -6
  42. package/dist/{kv-cache-CPqUxRL3.mjs → kv-cache-tLKBfxHc.mjs} +1 -1
  43. package/dist/{ld-u4JOD4iO.mjs → ld-DQNTIrAe.mjs} +3 -3
  44. package/dist/{metrics-DCLoLvLz.mjs → metrics-DDE9S63Q.mjs} +1 -1
  45. package/dist/{middleware-CgOqRkK-.mjs → middleware-BdhvduR9.mjs} +54 -29
  46. package/dist/{middleware-B7bmtONC.mjs → middleware-CsQorLC_.mjs} +1 -1
  47. package/dist/{middleware-DWlAGlyP.js → middleware-K9aLnf57.js} +43 -19
  48. package/dist/{mod-DnElMslb.d.cts → mod-AVir5nVI.d.cts} +1 -1
  49. package/dist/{mod-DMdGFMEl.d.cts → mod-Byt5tvAS.d.cts} +13 -2
  50. package/dist/{mod-CTh7ijx5.d.ts → mod-Co53r-VP.d.ts} +13 -2
  51. package/dist/{mod-COWgSo2v.d.ts → mod-eVOUPbQE.d.ts} +1 -1
  52. package/dist/mod.cjs +8 -8
  53. package/dist/mod.d.cts +3 -3
  54. package/dist/mod.d.ts +3 -3
  55. package/dist/mod.js +5 -5
  56. package/dist/nodeinfo/handler.test.mjs +2 -2
  57. package/dist/{owner-CPFM-sqo.mjs → owner-CCfdL83M.mjs} +3 -3
  58. package/dist/{sig-Cb9VSeiF.cjs → portable-collection-DXogVs__.cjs} +220 -2
  59. package/dist/portable-collection-DdXsKBg4.js +623 -0
  60. package/dist/{sig-C1xOA4ml.js → portable-collection-WXaHkNqC.mjs} +5 -4
  61. package/dist/{portable-key-DyylakVV.mjs → portable-key-C-fPq_Yf.mjs} +1 -1
  62. package/dist/{proof-BCOg7Njv.mjs → proof-CW8k0R1G.mjs} +4 -4
  63. package/dist/{send-C8eOPat3.mjs → send--FORaIc4.mjs} +3 -3
  64. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  65. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  66. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  67. package/dist/sig/compound-proof.test.mjs +2 -2
  68. package/dist/sig/http.test.mjs +2 -2
  69. package/dist/sig/key.test.mjs +1 -1
  70. package/dist/sig/ld.test.mjs +2 -2
  71. package/dist/sig/mod.cjs +5 -6
  72. package/dist/sig/mod.d.cts +1 -1
  73. package/dist/sig/mod.d.ts +1 -1
  74. package/dist/sig/mod.js +2 -3
  75. package/dist/sig/owner.test.mjs +1 -1
  76. package/dist/sig/portable-collection.test.mjs +20 -431
  77. package/dist/sig/portable-key.test.mjs +5 -5
  78. package/dist/sig/proof.test.mjs +3 -3
  79. package/dist/{temporal-vjHOhBpy.mjs → temporal-CffY_XOJ.mjs} +1 -1
  80. package/dist/testing/kv.test.mjs +1 -1
  81. package/dist/testing/mod.d.mts +30 -4
  82. package/dist/testing/mod.mjs +2 -2
  83. package/dist/{testing-BWq1dCzx.mjs → testing-otQhu4aD.mjs} +1 -1
  84. package/dist/utils/docloader.test.mjs +81 -2
  85. package/dist/utils/kv-cache.test.mjs +1 -1
  86. package/dist/utils/mod.cjs +1 -1
  87. package/dist/utils/mod.js +1 -1
  88. package/package.json +7 -7
  89. package/dist/owner-DkA0Lz7v.cjs +0 -225
  90. package/dist/owner-wNinn7RK.js +0 -215
@@ -1,5 +1,5 @@
1
1
  const { URLPattern } = require("urlpattern-polyfill");
2
- const require_http = require("./http-4bmgw-mA.cjs");
2
+ const require_http = require("./http-o8l4QeUY.cjs");
3
3
  let _logtape_logtape = require("@logtape/logtape");
4
4
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
5
5
  let es_toolkit = require("es-toolkit");
@@ -23,21 +23,21 @@ const logger$1 = (0, _logtape_logtape.getLogger)([
23
23
  function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
24
24
  require_http.validateCryptoKey(identity.privateKey);
25
25
  async function load(url, options) {
26
- await validateUrl(url);
26
+ await validateUrl(url, options);
27
27
  return (0, _fedify_vocab_runtime.getRemoteDocument)(url, await require_http.doubleKnock((0, _fedify_vocab_runtime.createActivityPubRequest)(url, { userAgent }), identity, {
28
28
  maxRedirection,
29
29
  specDeterminer,
30
30
  log: (0, es_toolkit.curry)(_fedify_vocab_runtime.logRequest)(logger$1),
31
31
  tracerProvider,
32
32
  signal: options?.signal,
33
- validateRedirect: validateUrl
34
- }), load);
33
+ validateRedirect: (url) => validateUrl(url, options)
34
+ }), load, options);
35
35
  }
36
- async function validateUrl(url) {
36
+ async function validateUrl(url, options) {
37
37
  if (!allowPrivateAddress) try {
38
38
  await (0, _fedify_vocab_runtime.validatePublicUrl)(url);
39
39
  } catch (error) {
40
- if (error instanceof _fedify_vocab_runtime.UrlError) logger$1.error("Disallowed private URL: {url}", {
40
+ if (error instanceof _fedify_vocab_runtime.UrlError) logger$1[options?.suppressError ? "warn" : "error"]("Disallowed private URL: {url}", {
41
41
  url,
42
42
  error
43
43
  });
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { H as validateCryptoKey, et as recordDocumentCache, t as doubleKnock } from "./http-BETASGl0.js";
3
+ import { H as validateCryptoKey, et as recordDocumentCache, t as doubleKnock } from "./http-Rmbiu-5S.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
6
6
  import { curry } from "es-toolkit";
@@ -24,21 +24,21 @@ const logger$1 = getLogger([
24
24
  function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
25
25
  validateCryptoKey(identity.privateKey);
26
26
  async function load(url, options) {
27
- await validateUrl(url);
27
+ await validateUrl(url, options);
28
28
  return getRemoteDocument(url, await doubleKnock(createActivityPubRequest(url, { userAgent }), identity, {
29
29
  maxRedirection,
30
30
  specDeterminer,
31
31
  log: curry(logRequest)(logger$1),
32
32
  tracerProvider,
33
33
  signal: options?.signal,
34
- validateRedirect: validateUrl
35
- }), load);
34
+ validateRedirect: (url) => validateUrl(url, options)
35
+ }), load, options);
36
36
  }
37
- async function validateUrl(url) {
37
+ async function validateUrl(url, options) {
38
38
  if (!allowPrivateAddress) try {
39
39
  await validatePublicUrl(url);
40
40
  } catch (error) {
41
- if (error instanceof UrlError) logger$1.error("Disallowed private URL: {url}", {
41
+ if (error instanceof UrlError) logger$1[options?.suppressError ? "warn" : "error"]("Disallowed private URL: {url}", {
42
42
  url,
43
43
  error
44
44
  });
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { p as recordDocumentCache } from "./metrics-DCLoLvLz.mjs";
4
+ import { p as recordDocumentCache } from "./metrics-DDE9S63Q.mjs";
5
5
  import { getLogger } from "@logtape/logtape";
6
6
  import { preloadedContexts } from "@fedify/vocab-runtime";
7
7
  //#region src/utils/kv-cache.ts
@@ -1,9 +1,9 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-BZrnW0Qz.mjs";
5
- import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DCLoLvLz.mjs";
6
- import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-PyYvun0F.mjs";
4
+ import { n as version, t as name } from "./deno-Be9xoxps.mjs";
5
+ import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DDE9S63Q.mjs";
6
+ import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-Cc1b6pW9.mjs";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,7 +1,7 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-BZrnW0Qz.mjs";
4
+ import { n as version, t as name } from "./deno-Be9xoxps.mjs";
5
5
  import { metrics } from "@opentelemetry/api";
6
6
  import { FetchError } from "@fedify/vocab-runtime";
7
7
  //#region src/federation/metrics.ts
@@ -1,28 +1,29 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-BZrnW0Qz.mjs";
5
- import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-DCLoLvLz.mjs";
4
+ import { n as version, t as name } from "./deno-Be9xoxps.mjs";
5
+ import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-DDE9S63Q.mjs";
6
6
  import { t as formatAcceptSignature } from "./accept-CPVqki78.mjs";
7
7
  import { a as isCompatibleKeyId, c as isPortableUri, i as hasPortableActor, n as getGatewayKeyBase, r as getPortableDid, s as isPortableId, t as getCanonicalPortableId } from "./portable-key-id-T7lecIbt.mjs";
8
- import { c as validateCryptoKey, n as exportJwk, s as importJwk } from "./key-PyYvun0F.mjs";
8
+ import { c as validateCryptoKey, n as exportJwk, s as importJwk } from "./key-Cc1b6pW9.mjs";
9
9
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
10
- import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-u4JOD4iO.mjs";
11
- import { i as signObject, l as verifyPortableObjectProofWithRoot, o as verifyObject, r as hasProofLike, s as verifyPortableObjectProof, t as InvalidPortableObjectIdError } from "./proof-BCOg7Njv.mjs";
12
- import { a as listRequestSignatures, c as selectRequestSignature, d as verifyRequest, f as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-B9BQDNIy.mjs";
13
- import { t as getAuthenticatedDocumentLoader } from "./docloader-3BHaS20Z.mjs";
14
- import { n as kvCache } from "./kv-cache-CPqUxRL3.mjs";
10
+ import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-DQNTIrAe.mjs";
11
+ import { i as signObject, l as verifyPortableObjectProofWithRoot, o as verifyObject, r as hasProofLike, s as verifyPortableObjectProof, t as InvalidPortableObjectIdError } from "./proof-CW8k0R1G.mjs";
12
+ import { a as listRequestSignatures, c as selectRequestSignature, d as verifyRequest, f as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-BFeK9sBg.mjs";
13
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-Dtuyb0ps.mjs";
14
+ import { n as kvCache } from "./kv-cache-tLKBfxHc.mjs";
15
15
  import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-DpnpgjyX.mjs";
16
16
  import { t as nodeInfoToJson } from "./types-DE_LV1JB.mjs";
17
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CPFM-sqo.mjs";
18
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-C8eOPat3.mjs";
19
- import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-BCXywsZF.mjs";
17
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CCfdL83M.mjs";
18
+ import { t as verifyPortableObject } from "./portable-collection-WXaHkNqC.mjs";
19
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send--FORaIc4.mjs";
20
+ import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-B2bgGYbP.mjs";
20
21
  import { t as CircuitBreaker } from "./circuit-breaker-C5NqoLBJ.mjs";
21
22
  import { t as buildCollectionSynchronizationHeader } from "./collection-CnnP1UAv.mjs";
22
- import { a as verifyCompoundPortableObjectProofs, i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "./compound-proof-Fxd45Oy5.mjs";
23
+ import { a as verifyCompoundPortableObjectProofs, i as inspectCompoundPortableObjectApplicability, r as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "./compound-proof-SVlHSzV7.mjs";
23
24
  import { t as KvKeyCache } from "./keycache-BInaECGj.mjs";
24
25
  import { t as acceptsJsonLd } from "./negotiation-CCocWT_N.mjs";
25
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-vjHOhBpy.mjs";
26
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CffY_XOJ.mjs";
26
27
  import { t as createExponentialBackoffPolicy } from "./retry-zX5xw5e0.mjs";
27
28
  import { t as TaskCodec } from "./codec-C6rTrpIp.mjs";
28
29
  import { getLogger, withContext } from "@logtape/logtape";
@@ -1311,13 +1312,13 @@ function recordCollectionMetrics(meterProvider, base, result, options = {}) {
1311
1312
  * @param parameters The parameters for handling the collection.
1312
1313
  * @returns A promise that resolves to an HTTP response.
1313
1314
  */
1314
- async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
1315
- const spanName = name$1.trim().replace(/\s+/g, "_");
1315
+ async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
1316
+ const spanName = name$2.trim().replace(/\s+/g, "_");
1316
1317
  tracerProvider = tracerProvider ?? trace.getTracerProvider();
1317
1318
  const tracer = tracerProvider.getTracer(name, version);
1318
1319
  const cursor = new URL(request.url).searchParams.get("cursor");
1319
1320
  const metricBase = {
1320
- kind: getCollectionMetricKind(name$1),
1321
+ kind: getCollectionMetricKind(name$2),
1321
1322
  page: cursor != null,
1322
1323
  dispatcher: "built_in"
1323
1324
  };
@@ -1358,7 +1359,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
1358
1359
  span.setStatus({ code: SpanStatusCode.ERROR });
1359
1360
  return await onNotFound(request);
1360
1361
  }
1361
- const items = filterCollectionItems(page.items, name$1, filterPredicate);
1362
+ const items = filterCollectionItems(page.items, name$2, filterPredicate);
1362
1363
  itemCount = items.length;
1363
1364
  span.setAttribute("fedify.collection.items", itemCount);
1364
1365
  return items;
@@ -1398,7 +1399,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
1398
1399
  } else {
1399
1400
  const uri = new URL(baseUri);
1400
1401
  uri.searchParams.set("cursor", cursor);
1401
- const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
1402
+ const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
1402
1403
  kind: SpanKind.SERVER,
1403
1404
  attributes: {
1404
1405
  "activitypub.collection.id": uri.href,
@@ -1414,7 +1415,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
1414
1415
  span.setStatus({ code: SpanStatusCode.ERROR });
1415
1416
  return await onNotFound(request);
1416
1417
  }
1417
- const items = filterCollectionItems(page.items, name$1, filterPredicate);
1418
+ const items = filterCollectionItems(page.items, name$2, filterPredicate);
1418
1419
  itemCount = items.length;
1419
1420
  span.setAttribute("fedify.collection.items", itemCount);
1420
1421
  return {
@@ -2149,7 +2150,8 @@ async function handleInboxInternal(request, parameters, span) {
2149
2150
  documentLoader: ctx.documentLoader,
2150
2151
  keyCache,
2151
2152
  meterProvider,
2152
- tracerProvider
2153
+ tracerProvider,
2154
+ verifyPortableObject: ctx.verifyPortableObject
2153
2155
  });
2154
2156
  } catch (error) {
2155
2157
  if (error instanceof RangeError && await hasMalformedKnownTemporalLiteral(jsonWithoutSig, ctx.contextLoader)) return await respondInvalidActivity(error);
@@ -2602,8 +2604,8 @@ var CustomCollectionHandler = class {
2602
2604
  * @param CollectionPage The CollectionPage constructor.
2603
2605
  * @param filterPredicate Optional filter predicate for items.
2604
2606
  */
2605
- constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
2606
- this.name = name$2;
2607
+ constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
2608
+ this.name = name$1;
2607
2609
  this.values = values;
2608
2610
  this.context = context;
2609
2611
  this.callbacks = callbacks;
@@ -4348,11 +4350,16 @@ var FederationImpl = class extends FederationBuilderImpl {
4348
4350
  });
4349
4351
  return parsedActorIds;
4350
4352
  };
4351
- const parseActivity = () => Activity.fromJsonLd(message.activity, {
4352
- contextLoader: this.contextLoaderFactory(loaderOptions),
4353
- documentLoader: rsaKeyPair == null ? this.documentLoaderFactory(loaderOptions) : this.authenticatedDocumentLoaderFactory(rsaKeyPair, loaderOptions),
4354
- tracerProvider: this.tracerProvider
4355
- });
4353
+ const parseActivity = () => {
4354
+ const contextLoader = this.contextLoaderFactory(loaderOptions);
4355
+ const documentLoader = rsaKeyPair == null ? this.documentLoaderFactory(loaderOptions) : this.authenticatedDocumentLoaderFactory(rsaKeyPair, loaderOptions);
4356
+ return Activity.fromJsonLd(message.activity, {
4357
+ contextLoader,
4358
+ documentLoader,
4359
+ tracerProvider: this.tracerProvider,
4360
+ verifyPortableObject: createPortableObjectVerifier(documentLoader, contextLoader, this)
4361
+ });
4362
+ };
4356
4363
  const enqueueHeldOutboxMessage = async (delay, heldSince) => {
4357
4364
  const { outboxQueue } = this;
4358
4365
  if (outboxQueue == null) return;
@@ -5828,12 +5835,28 @@ function getCollectionMetricRoute(routeName) {
5828
5835
  }
5829
5836
  }
5830
5837
  const FANOUT_THRESHOLD = 5;
5838
+ /**
5839
+ * Creates the FEP-ef61 portable object verifier that a context applies to
5840
+ * portable objects it dereferences: `verifyPortableObject()` with the given
5841
+ * loaders and the federation's tracer provider as defaults. Other options,
5842
+ * such as the document URL, gateways, and referrer, are passed through as
5843
+ * they are.
5844
+ */
5845
+ function createPortableObjectVerifier(documentLoader, contextLoader, federation) {
5846
+ return (document, options = {}) => verifyPortableObject(document, {
5847
+ ...options,
5848
+ documentLoader: options.documentLoader ?? documentLoader,
5849
+ contextLoader: options.contextLoader ?? contextLoader,
5850
+ tracerProvider: options.tracerProvider ?? federation.tracerProvider
5851
+ });
5852
+ }
5831
5853
  var ContextImpl = class ContextImpl {
5832
5854
  url;
5833
5855
  federation;
5834
5856
  data;
5835
5857
  documentLoader;
5836
5858
  contextLoader;
5859
+ verifyPortableObject;
5837
5860
  invokedFromActorKeyPairsDispatcher;
5838
5861
  #codec;
5839
5862
  constructor({ url, federation, data, documentLoader, contextLoader, invokedFromActorKeyPairsDispatcher }) {
@@ -5842,6 +5865,7 @@ var ContextImpl = class ContextImpl {
5842
5865
  this.data = data;
5843
5866
  this.documentLoader = documentLoader;
5844
5867
  this.contextLoader = contextLoader;
5868
+ this.verifyPortableObject = createPortableObjectVerifier(documentLoader, contextLoader, federation);
5845
5869
  this.invokedFromActorKeyPairsDispatcher = invokedFromActorKeyPairsDispatcher;
5846
5870
  }
5847
5871
  /**
@@ -6193,7 +6217,7 @@ var ContextImpl = class ContextImpl {
6193
6217
  userAgent: options.userAgent ?? this.federation.userAgent,
6194
6218
  tracerProvider: options.tracerProvider ?? this.tracerProvider,
6195
6219
  meterProvider: options.meterProvider ?? this.meterProvider,
6196
- verifyPortableObject: options.verifyPortableObject ?? verifyPortableObjectProof,
6220
+ verifyPortableObject: options.verifyPortableObject ?? this.verifyPortableObject,
6197
6221
  allowPrivateAddress: this.federation.allowPrivateAddress
6198
6222
  });
6199
6223
  }
@@ -6201,7 +6225,8 @@ var ContextImpl = class ContextImpl {
6201
6225
  return traverseCollection(collection, {
6202
6226
  ...options,
6203
6227
  documentLoader: options.documentLoader ?? this.documentLoader,
6204
- contextLoader: options.contextLoader ?? this.contextLoader
6228
+ contextLoader: options.contextLoader ?? this.contextLoader,
6229
+ verifyPortableObject: options.verifyPortableObject ?? this.verifyPortableObject
6205
6230
  });
6206
6231
  }
6207
6232
  lookupNodeInfo(url, options = {}) {
@@ -1,5 +1,5 @@
1
1
  import "temporal-polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-CgOqRkK-.mjs";
4
+ import { n as FederationImpl } from "./middleware-BdhvduR9.mjs";
5
5
  export { FederationImpl };
@@ -2,10 +2,10 @@ import { Temporal } from "temporal-polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./rolldown-runtime-BC-Eo5Mj.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-DAtXl_Kc.js";
5
- import { $ as recordCollectionTotalItems, A as isInvalidUrlTypeError, C as compactJsonLd, D as hasSignature, E as getNormalizationContextLoader, F as wrapContextLoaderForJsonLd, G as getFederationMetrics, H as validateCryptoKey, I as exportJwk, J as isAbortError, K as getRemoteHost, M as verifyCompactJsonLd, O as hasSignatureLike, Q as recordCollectionRequest, T as detachSignature, V as importJwk, W as getDurationMs, X as recordCollectionDispatchDuration, Y as recordCircuitBreakerStateChange, Z as recordCollectionPageItems, _ as verifyPortableObjectProofWithRoot, _t as isPortableId, at as recordWebFingerHandle, b as InvalidContextReferenceError, bt as name, ct as formatAcceptSignature, d as hasProofLike, f as signObject, ft as getCanonicalPortableId, g as verifyPortableObjectProofPolicy, gt as isCompatibleKeyId, h as verifyPortableObjectProof, ht as hasPortableActor, i as selectRequestSignature, it as recordOutboxEnqueue, j as signJsonLd, k as isClearlyMalformedContextReference, l as InvalidPortableObjectIdError, m as verifyObject, mt as getPortableDid, n as listRequestSignatures, nt as recordInboxActivity, o as verifyRequest, ot as registerQueueDepthGauge, p as verifyMapLocalProof, pt as getGatewayKeyBase, q as instrumentDocumentLoader, r as parseRfc9421SignatureInput, rt as recordOutboxActivity, s as verifyRequestDetailed, st as preloadedOnlyDocumentLoader, t as doubleKnock, tt as recordFanoutRecipients, vt as isPortableUri, x as assertSafeJsonLd, xt as version, y as normalizeOutgoingActivityJsonLd } from "./http-BETASGl0.js";
5
+ import { $ as recordCollectionTotalItems, A as isInvalidUrlTypeError, C as compactJsonLd, D as hasSignature, E as getNormalizationContextLoader, F as wrapContextLoaderForJsonLd, G as getFederationMetrics, H as validateCryptoKey, I as exportJwk, J as isAbortError, K as getRemoteHost, M as verifyCompactJsonLd, O as hasSignatureLike, Q as recordCollectionRequest, T as detachSignature, V as importJwk, W as getDurationMs, X as recordCollectionDispatchDuration, Y as recordCircuitBreakerStateChange, Z as recordCollectionPageItems, _ as verifyPortableObjectProofWithRoot, _t as isPortableId, at as recordWebFingerHandle, b as InvalidContextReferenceError, bt as name, ct as formatAcceptSignature, d as hasProofLike, f as signObject, ft as getCanonicalPortableId, g as verifyPortableObjectProofPolicy, gt as isCompatibleKeyId, h as verifyPortableObjectProof, ht as hasPortableActor, i as selectRequestSignature, it as recordOutboxEnqueue, j as signJsonLd, k as isClearlyMalformedContextReference, l as InvalidPortableObjectIdError, m as verifyObject, mt as getPortableDid, n as listRequestSignatures, nt as recordInboxActivity, o as verifyRequest, ot as registerQueueDepthGauge, p as verifyMapLocalProof, pt as getGatewayKeyBase, q as instrumentDocumentLoader, r as parseRfc9421SignatureInput, rt as recordOutboxActivity, s as verifyRequestDetailed, st as preloadedOnlyDocumentLoader, t as doubleKnock, tt as recordFanoutRecipients, vt as isPortableUri, x as assertSafeJsonLd, xt as version, y as normalizeOutgoingActivityJsonLd } from "./http-Rmbiu-5S.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-C_cNlNVK.js";
7
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-wNinn7RK.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-C4mv2ZFQ.js";
7
+ import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-DdXsKBg4.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BweDce2I.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
11
11
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
@@ -3668,13 +3668,13 @@ function recordCollectionMetrics(meterProvider, base, result, options = {}) {
3668
3668
  * @param parameters The parameters for handling the collection.
3669
3669
  * @returns A promise that resolves to an HTTP response.
3670
3670
  */
3671
- async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
3672
- const spanName = name$1.trim().replace(/\s+/g, "_");
3671
+ async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
3672
+ const spanName = name$2.trim().replace(/\s+/g, "_");
3673
3673
  tracerProvider = tracerProvider ?? trace.getTracerProvider();
3674
3674
  const tracer = tracerProvider.getTracer(name, version);
3675
3675
  const cursor = new URL(request.url).searchParams.get("cursor");
3676
3676
  const metricBase = {
3677
- kind: getCollectionMetricKind(name$1),
3677
+ kind: getCollectionMetricKind(name$2),
3678
3678
  page: cursor != null,
3679
3679
  dispatcher: "built_in"
3680
3680
  };
@@ -3715,7 +3715,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
3715
3715
  span.setStatus({ code: SpanStatusCode.ERROR });
3716
3716
  return await onNotFound(request);
3717
3717
  }
3718
- const items = filterCollectionItems(page.items, name$1, filterPredicate);
3718
+ const items = filterCollectionItems(page.items, name$2, filterPredicate);
3719
3719
  itemCount = items.length;
3720
3720
  span.setAttribute("fedify.collection.items", itemCount);
3721
3721
  return items;
@@ -3755,7 +3755,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
3755
3755
  } else {
3756
3756
  const uri = new URL(baseUri);
3757
3757
  uri.searchParams.set("cursor", cursor);
3758
- const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
3758
+ const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
3759
3759
  kind: SpanKind.SERVER,
3760
3760
  attributes: {
3761
3761
  "activitypub.collection.id": uri.href,
@@ -3771,7 +3771,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
3771
3771
  span.setStatus({ code: SpanStatusCode.ERROR });
3772
3772
  return await onNotFound(request);
3773
3773
  }
3774
- const items = filterCollectionItems(page.items, name$1, filterPredicate);
3774
+ const items = filterCollectionItems(page.items, name$2, filterPredicate);
3775
3775
  itemCount = items.length;
3776
3776
  span.setAttribute("fedify.collection.items", itemCount);
3777
3777
  return {
@@ -4506,7 +4506,8 @@ async function handleInboxInternal(request, parameters, span) {
4506
4506
  documentLoader: ctx.documentLoader,
4507
4507
  keyCache,
4508
4508
  meterProvider,
4509
- tracerProvider
4509
+ tracerProvider,
4510
+ verifyPortableObject: ctx.verifyPortableObject
4510
4511
  });
4511
4512
  } catch (error) {
4512
4513
  if (error instanceof RangeError && await hasMalformedKnownTemporalLiteral(jsonWithoutSig, ctx.contextLoader)) return await respondInvalidActivity(error);
@@ -4959,8 +4960,8 @@ var CustomCollectionHandler = class {
4959
4960
  * @param CollectionPage The CollectionPage constructor.
4960
4961
  * @param filterPredicate Optional filter predicate for items.
4961
4962
  */
4962
- constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
4963
- this.name = name$2;
4963
+ constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
4964
+ this.name = name$1;
4964
4965
  this.values = values;
4965
4966
  this.context = context;
4966
4967
  this.callbacks = callbacks;
@@ -7114,11 +7115,16 @@ var FederationImpl = class extends FederationBuilderImpl {
7114
7115
  });
7115
7116
  return parsedActorIds;
7116
7117
  };
7117
- const parseActivity = () => Activity.fromJsonLd(message.activity, {
7118
- contextLoader: this.contextLoaderFactory(loaderOptions),
7119
- documentLoader: rsaKeyPair == null ? this.documentLoaderFactory(loaderOptions) : this.authenticatedDocumentLoaderFactory(rsaKeyPair, loaderOptions),
7120
- tracerProvider: this.tracerProvider
7121
- });
7118
+ const parseActivity = () => {
7119
+ const contextLoader = this.contextLoaderFactory(loaderOptions);
7120
+ const documentLoader = rsaKeyPair == null ? this.documentLoaderFactory(loaderOptions) : this.authenticatedDocumentLoaderFactory(rsaKeyPair, loaderOptions);
7121
+ return Activity.fromJsonLd(message.activity, {
7122
+ contextLoader,
7123
+ documentLoader,
7124
+ tracerProvider: this.tracerProvider,
7125
+ verifyPortableObject: createPortableObjectVerifier(documentLoader, contextLoader, this)
7126
+ });
7127
+ };
7122
7128
  const enqueueHeldOutboxMessage = async (delay, heldSince) => {
7123
7129
  const { outboxQueue } = this;
7124
7130
  if (outboxQueue == null) return;
@@ -8594,12 +8600,28 @@ function getCollectionMetricRoute(routeName) {
8594
8600
  }
8595
8601
  }
8596
8602
  const FANOUT_THRESHOLD = 5;
8603
+ /**
8604
+ * Creates the FEP-ef61 portable object verifier that a context applies to
8605
+ * portable objects it dereferences: `verifyPortableObject()` with the given
8606
+ * loaders and the federation's tracer provider as defaults. Other options,
8607
+ * such as the document URL, gateways, and referrer, are passed through as
8608
+ * they are.
8609
+ */
8610
+ function createPortableObjectVerifier(documentLoader, contextLoader, federation) {
8611
+ return (document, options = {}) => verifyPortableObject(document, {
8612
+ ...options,
8613
+ documentLoader: options.documentLoader ?? documentLoader,
8614
+ contextLoader: options.contextLoader ?? contextLoader,
8615
+ tracerProvider: options.tracerProvider ?? federation.tracerProvider
8616
+ });
8617
+ }
8597
8618
  var ContextImpl = class ContextImpl {
8598
8619
  url;
8599
8620
  federation;
8600
8621
  data;
8601
8622
  documentLoader;
8602
8623
  contextLoader;
8624
+ verifyPortableObject;
8603
8625
  invokedFromActorKeyPairsDispatcher;
8604
8626
  #codec;
8605
8627
  constructor({ url, federation, data, documentLoader, contextLoader, invokedFromActorKeyPairsDispatcher }) {
@@ -8608,6 +8630,7 @@ var ContextImpl = class ContextImpl {
8608
8630
  this.data = data;
8609
8631
  this.documentLoader = documentLoader;
8610
8632
  this.contextLoader = contextLoader;
8633
+ this.verifyPortableObject = createPortableObjectVerifier(documentLoader, contextLoader, federation);
8611
8634
  this.invokedFromActorKeyPairsDispatcher = invokedFromActorKeyPairsDispatcher;
8612
8635
  }
8613
8636
  /**
@@ -8959,7 +8982,7 @@ var ContextImpl = class ContextImpl {
8959
8982
  userAgent: options.userAgent ?? this.federation.userAgent,
8960
8983
  tracerProvider: options.tracerProvider ?? this.tracerProvider,
8961
8984
  meterProvider: options.meterProvider ?? this.meterProvider,
8962
- verifyPortableObject: options.verifyPortableObject ?? verifyPortableObjectProof,
8985
+ verifyPortableObject: options.verifyPortableObject ?? this.verifyPortableObject,
8963
8986
  allowPrivateAddress: this.federation.allowPrivateAddress
8964
8987
  });
8965
8988
  }
@@ -8967,7 +8990,8 @@ var ContextImpl = class ContextImpl {
8967
8990
  return traverseCollection(collection, {
8968
8991
  ...options,
8969
8992
  documentLoader: options.documentLoader ?? this.documentLoader,
8970
- contextLoader: options.contextLoader ?? this.contextLoader
8993
+ contextLoader: options.contextLoader ?? this.contextLoader,
8994
+ verifyPortableObject: options.verifyPortableObject ?? this.verifyPortableObject
8971
8995
  });
8972
8996
  }
8973
8997
  lookupNodeInfo(url, options = {}) {
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Gt as WebFingerLinksDispatcher, bt as ActorHandleMapper, d as RequestContext, vt as ActorAliasMapper, yt as ActorDispatcher } from "./context-SMNOiiY6.cjs";
2
+ import { Gt as WebFingerLinksDispatcher, bt as ActorHandleMapper, d as RequestContext, vt as ActorAliasMapper, yt as ActorDispatcher } from "./context-Bm6ldGvx.cjs";
3
3
  import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
4
4
  import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
5
5
 
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { S as KeyCache } from "./http-D76Py0M4.cjs";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
- import { DocumentLoader, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
4
+ import { DocumentLoader, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
5
5
  import { MeterProvider, TracerProvider } from "@opentelemetry/api";
6
6
 
7
7
  //#region src/sig/ld.d.ts
@@ -376,7 +376,18 @@ declare function verifyPortableObjectProof(jsonLd: unknown, options?: VerifyPort
376
376
  * Options for {@link verifyObject}.
377
377
  * @since 0.10.0
378
378
  */
379
- interface VerifyObjectOptions extends VerifyProofOptions {}
379
+ interface VerifyObjectOptions extends VerifyProofOptions {
380
+ /**
381
+ * The default [FEP-ef61] portable object verifier for the property
382
+ * accessors of the returned object and the objects obtained from it, e.g.,
383
+ * `Context.verifyPortableObject`. It is not used to verify the given
384
+ * object itself.
385
+ *
386
+ * [FEP-ef61]: https://w3id.org/fep/ef61
387
+ * @since 2.4.0
388
+ */
389
+ verifyPortableObject?: PortableObjectVerifier;
390
+ }
380
391
  /**
381
392
  * Verifies the given object. It will verify all the proofs in the object,
382
393
  * and succeed only if all the proofs are valid and all attributions and
@@ -2,7 +2,7 @@
2
2
  import { S as KeyCache } from "./http-BrQgkJay.js";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
4
  import { MeterProvider, TracerProvider } from "@opentelemetry/api";
5
- import { DocumentLoader, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
5
+ import { DocumentLoader, PortableObjectVerifier, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -376,7 +376,18 @@ declare function verifyPortableObjectProof(jsonLd: unknown, options?: VerifyPort
376
376
  * Options for {@link verifyObject}.
377
377
  * @since 0.10.0
378
378
  */
379
- interface VerifyObjectOptions extends VerifyProofOptions {}
379
+ interface VerifyObjectOptions extends VerifyProofOptions {
380
+ /**
381
+ * The default [FEP-ef61] portable object verifier for the property
382
+ * accessors of the returned object and the objects obtained from it, e.g.,
383
+ * `Context.verifyPortableObject`. It is not used to verify the given
384
+ * object itself.
385
+ *
386
+ * [FEP-ef61]: https://w3id.org/fep/ef61
387
+ * @since 2.4.0
388
+ */
389
+ verifyPortableObject?: PortableObjectVerifier;
390
+ }
380
391
  /**
381
392
  * Verifies the given object. It will verify all the proofs in the object,
382
393
  * and succeed only if all the proofs are valid and all attributions and
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { Gt as WebFingerLinksDispatcher, bt as ActorHandleMapper, d as RequestContext, vt as ActorAliasMapper, yt as ActorDispatcher } from "./context-tOiJfBoD.js";
2
+ import { Gt as WebFingerLinksDispatcher, bt as ActorHandleMapper, d as RequestContext, vt as ActorAliasMapper, yt as ActorDispatcher } from "./context-Ci5vuUr_.js";
3
3
  import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
4
4
  import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
5
5
 
package/dist/mod.cjs CHANGED
@@ -3,14 +3,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("./rolldown-runtime-Dmm3t92W.cjs");
4
4
  const require_transformers = require("./transformers-BalCrSsr.cjs");
5
5
  require("./compat/mod.cjs");
6
- const require_http = require("./http-4bmgw-mA.cjs");
7
- const require_federation = require("./federation-Ml6NrgRV.cjs");
6
+ const require_http = require("./http-o8l4QeUY.cjs");
7
+ const require_federation = require("./federation-B6IHuS6n.cjs");
8
8
  const require_types = require("./types-Be2zbyeG.cjs");
9
- const require_owner = require("./owner-DkA0Lz7v.cjs");
10
- const require_kv_cache = require("./kv-cache-D2Bz6t_c.cjs");
9
+ const require_portable_collection = require("./portable-collection-DXogVs__.cjs");
10
+ const require_kv_cache = require("./kv-cache-BUkgZAcX.cjs");
11
11
  require("./nodeinfo/mod.cjs");
12
12
  require("./runtime/mod.cjs");
13
- const require_sig = require("./sig-Cb9VSeiF.cjs");
13
+ require("./sig/mod.cjs");
14
14
  require("./utils/mod.cjs");
15
15
  //#endregion
16
16
  exports.CircuitBreaker = require_federation.CircuitBreaker;
@@ -31,7 +31,7 @@ exports.createProof = require_http.createProof;
31
31
  exports.createSignature = require_http.createSignature;
32
32
  exports.detachSignature = require_http.detachSignature;
33
33
  exports.digest = require_federation.digest;
34
- exports.doesActorOwnKey = require_owner.doesActorOwnKey;
34
+ exports.doesActorOwnKey = require_portable_collection.doesActorOwnKey;
35
35
  exports.exportJwk = require_http.exportJwk;
36
36
  exports.fetchKey = require_http.fetchKey;
37
37
  exports.fetchKeyDetailed = require_http.fetchKeyDetailed;
@@ -40,7 +40,7 @@ exports.fulfillAcceptSignature = require_http.fulfillAcceptSignature;
40
40
  exports.generateCryptoKeyPair = require_http.generateCryptoKeyPair;
41
41
  exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
42
42
  exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
43
- exports.getKeyOwner = require_owner.getKeyOwner;
43
+ exports.getKeyOwner = require_portable_collection.getKeyOwner;
44
44
  exports.getNodeInfo = require_types.getNodeInfo;
45
45
  exports.handleWebFinger = require_federation.handleWebFinger;
46
46
  exports.hasProofLike = require_http.hasProofLike;
@@ -60,7 +60,7 @@ exports.signRequest = require_http.signRequest;
60
60
  exports.validateAcceptSignature = require_http.validateAcceptSignature;
61
61
  exports.verifyJsonLd = require_http.verifyJsonLd;
62
62
  exports.verifyObject = require_http.verifyObject;
63
- exports.verifyPortableObject = require_sig.verifyPortableObject;
63
+ exports.verifyPortableObject = require_portable_collection.verifyPortableObject;
64
64
  exports.verifyPortableObjectProof = require_http.verifyPortableObjectProof;
65
65
  exports.verifyProof = require_http.verifyProof;
66
66
  exports.verifyRequest = require_http.verifyRequest;
package/dist/mod.d.cts CHANGED
@@ -2,11 +2,11 @@
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-D-XP_Ccb.cjs";
3
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-D76Py0M4.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.cjs";
5
- import { $ as InProcessMessageQueue, A as MediaUploaderSetters, At as HashlinkMediaRequest, B as createFederationBuilder, Bt as OutboxPermanentFailureHandler, C as FederationFetchOptions, Ct as CollectionCounter, D as IdempotencyStrategy, Dt as CustomCollectionCursor, E as IdempotencyKeyCallback, Et as CustomCollectionCounter, F as FederationKvPrefixes, Ft as ObjectAuthorizePredicate, G as TaskRegistry, Gt as WebFingerLinksDispatcher, H as TaskDefinitionOptions, Ht as SharedInboxKeyDispatcher, I as FederationOrigin, It as ObjectDispatcher, J as RetryPolicy, Jt as PageItems, K as CreateExponentialBackoffPolicyOptions, Kt as SendActivityError, L as FederationQueueOptions, Lt as OutboxErrorHandler, M as OutboxListenerSetters, Mt as InboxListener, N as PortableInboxForwardingOptions, Nt as MediaUploaderCallback, O as InboxChallengePolicy, Ot as CustomCollectionDispatcher, P as Rfc6570Expression, Pt as NodeInfoDispatcher, Q as respondWithObjectIfAcceptable, R as createFederation, Rt as OutboxListener, S as FederationBuilder, St as AuthorizePredicate, T as FederationStartQueueOptions, Tt as CollectionDispatcher, U as TaskEnqueueOptions, Ut as UnverifiedActivityHandler, V as TaskDefinition, Vt as PortableActorIdMapper, W as TaskHandler, Wt as UnverifiedActivityReason, X as RespondWithObjectOptions, Xt as digest, Y as createExponentialBackoffPolicy, Yt as buildCollectionSynchronizationHeader, Z as respondWithObject, Zt as ActivityTransformer, _ as ConstructorWithTypeId, _t as parseCircuitBreakerKvState, a as GetObjectOptions, at as ParallelMessageQueue, b as Federation, bt as ActorHandleMapper, c as OutboxContext, ct as CircuitBreakerBeforeSendDecision, d as RequestContext, dt as CircuitBreakerKvState, et as InProcessMessageQueueOptions, f as RouteActivityOptions, ft as CircuitBreakerOptions, g as CollectionCallbackSetters, gt as normalizeCircuitBreakerOptions, h as ActorCallbackSetters, ht as NormalizedCircuitBreakerOptions, i as GetActorOptions, it as MessageQueueListenOptions, j as ObjectCallbackSetters, jt as InboxErrorHandler, k as InboxListenerSetters, kt as HashlinkMediaDispatcher, l as ParseUriResult, lt as CircuitBreakerCreateOptions, m as SendActivityOptionsForCollection, mt as CircuitBreakerStateChange, n as Context, nt as MessageQueueDepth, o as GetSignedKeyOptions, ot as CircuitBreaker, p as SendActivityOptions, pt as CircuitBreakerState, q as RetryContext, qt as SenderKeyPair, r as ForwardActivityOptions, rt as MessageQueueEnqueueOptions, s as InboxContext, st as CircuitBreakerActivityDrop, t as ActorKeyPair, tt as MessageQueue, u as PortableRequest, ut as CircuitBreakerFailurePolicy, v as CustomCollectionCallbackSetters, vt as ActorAliasMapper, w as FederationOptions, wt as CollectionCursor, x as FederationBenchmarkOptions, xt as ActorKeyPairsDispatcher, y as Federatable, yt as ActorDispatcher, z as Message, zt as OutboxListenerErrorHandler } from "./context-SMNOiiY6.cjs";
5
+ import { $ as InProcessMessageQueue, A as MediaUploaderSetters, At as HashlinkMediaRequest, B as createFederationBuilder, Bt as OutboxPermanentFailureHandler, C as FederationFetchOptions, Ct as CollectionCounter, D as IdempotencyStrategy, Dt as CustomCollectionCursor, E as IdempotencyKeyCallback, Et as CustomCollectionCounter, F as FederationKvPrefixes, Ft as ObjectAuthorizePredicate, G as TaskRegistry, Gt as WebFingerLinksDispatcher, H as TaskDefinitionOptions, Ht as SharedInboxKeyDispatcher, I as FederationOrigin, It as ObjectDispatcher, J as RetryPolicy, Jt as PageItems, K as CreateExponentialBackoffPolicyOptions, Kt as SendActivityError, L as FederationQueueOptions, Lt as OutboxErrorHandler, M as OutboxListenerSetters, Mt as InboxListener, N as PortableInboxForwardingOptions, Nt as MediaUploaderCallback, O as InboxChallengePolicy, Ot as CustomCollectionDispatcher, P as Rfc6570Expression, Pt as NodeInfoDispatcher, Q as respondWithObjectIfAcceptable, R as createFederation, Rt as OutboxListener, S as FederationBuilder, St as AuthorizePredicate, T as FederationStartQueueOptions, Tt as CollectionDispatcher, U as TaskEnqueueOptions, Ut as UnverifiedActivityHandler, V as TaskDefinition, Vt as PortableActorIdMapper, W as TaskHandler, Wt as UnverifiedActivityReason, X as RespondWithObjectOptions, Xt as digest, Y as createExponentialBackoffPolicy, Yt as buildCollectionSynchronizationHeader, Z as respondWithObject, Zt as ActivityTransformer, _ as ConstructorWithTypeId, _t as parseCircuitBreakerKvState, a as GetObjectOptions, at as ParallelMessageQueue, b as Federation, bt as ActorHandleMapper, c as OutboxContext, ct as CircuitBreakerBeforeSendDecision, d as RequestContext, dt as CircuitBreakerKvState, et as InProcessMessageQueueOptions, f as RouteActivityOptions, ft as CircuitBreakerOptions, g as CollectionCallbackSetters, gt as normalizeCircuitBreakerOptions, h as ActorCallbackSetters, ht as NormalizedCircuitBreakerOptions, i as GetActorOptions, it as MessageQueueListenOptions, j as ObjectCallbackSetters, jt as InboxErrorHandler, k as InboxListenerSetters, kt as HashlinkMediaDispatcher, l as ParseUriResult, lt as CircuitBreakerCreateOptions, m as SendActivityOptionsForCollection, mt as CircuitBreakerStateChange, n as Context, nt as MessageQueueDepth, o as GetSignedKeyOptions, ot as CircuitBreaker, p as SendActivityOptions, pt as CircuitBreakerState, q as RetryContext, qt as SenderKeyPair, r as ForwardActivityOptions, rt as MessageQueueEnqueueOptions, s as InboxContext, st as CircuitBreakerActivityDrop, t as ActorKeyPair, tt as MessageQueue, u as PortableRequest, ut as CircuitBreakerFailurePolicy, v as CustomCollectionCallbackSetters, vt as ActorAliasMapper, w as FederationOptions, wt as CollectionCursor, x as FederationBenchmarkOptions, xt as ActorKeyPairsDispatcher, y as Federatable, yt as ActorDispatcher, z as Message, zt as OutboxListenerErrorHandler } from "./context-Bm6ldGvx.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-DnElMslb.cjs";
9
- import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-DMdGFMEl.cjs";
8
+ import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-AVir5nVI.cjs";
9
+ import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Byt5tvAS.cjs";
10
10
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Cr79cQlc.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12