@fedify/fedify 2.0.33-dev.2413 → 2.0.33-dev.2414

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 (60) hide show
  1. package/dist/{assert_rejects-B-qJtC9Z.mjs → assert_rejects-WyYSTDDX.mjs} +2 -20
  2. package/dist/{assert_throws-4NwKEy2q.mjs → assert_throws-D4DNWrux.mjs} +19 -1
  3. package/dist/{builder-DEj2UtTo.mjs → builder-oPN-KAgG.mjs} +3 -3
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{deno-1poG3nVL.mjs → deno-v7kfTDw9.mjs} +1 -1
  6. package/dist/{docloader-DHhMJMBx.mjs → docloader-C40rdqSR.mjs} +2 -2
  7. package/dist/federation/builder.test.mjs +3 -3
  8. package/dist/federation/collection.test.mjs +1 -1
  9. package/dist/federation/handler.test.mjs +258 -9
  10. package/dist/federation/idempotency.test.mjs +3 -3
  11. package/dist/federation/inbox.test.mjs +25 -2
  12. package/dist/federation/kv.test.mjs +1 -1
  13. package/dist/federation/middleware.test.mjs +128 -10
  14. package/dist/federation/mod.cjs +1 -1
  15. package/dist/federation/mod.js +1 -1
  16. package/dist/federation/mq.test.mjs +2 -2
  17. package/dist/federation/negotiation.test.mjs +2 -2
  18. package/dist/federation/retry.test.mjs +1 -1
  19. package/dist/federation/router.test.mjs +2 -3
  20. package/dist/federation/send.test.mjs +7 -6
  21. package/dist/federation/temporal.test.mjs +3 -3
  22. package/dist/federation/webfinger.test.mjs +2 -2
  23. package/dist/{http-C8SYUIha.mjs → http-BRdkmpRl.mjs} +2 -2
  24. package/dist/{http-0H3c-FW0.cjs → http-CytEl2_x.cjs} +1 -1
  25. package/dist/{http-DaS2vnNk.js → http-i02DDItX.js} +1 -1
  26. package/dist/{inbox-DvbsFXWB.mjs → inbox-Bj-VABWa.mjs} +23 -10
  27. package/dist/{key-CDuFq0mQ.mjs → key-qe6uT5ER.mjs} +1 -1
  28. package/dist/{kv-cache-BNiY7ea-.cjs → kv-cache-CCCwr3Y2.cjs} +1 -1
  29. package/dist/{kv-cache-B7T3rhpo.js → kv-cache-DT2Fk4wy.js} +1 -1
  30. package/dist/{ld-5AEMxXBH.mjs → ld-gf5riP2W.mjs} +2 -2
  31. package/dist/{middleware-CKBMWB3q.cjs → middleware-BDniN395.cjs} +1 -1
  32. package/dist/{middleware-DlYK6kvo.cjs → middleware-C_ybJNaa.cjs} +103 -33
  33. package/dist/{middleware-NUR07Wjx.mjs → middleware-GCF6LA-a.mjs} +1 -1
  34. package/dist/{middleware-Cm5Kx7Nr.mjs → middleware-a9um4sWr.mjs} +89 -32
  35. package/dist/{middleware-B4GK0_I-.js → middleware-rrNFt8Ia.js} +102 -32
  36. package/dist/mod.cjs +4 -4
  37. package/dist/mod.js +4 -4
  38. package/dist/nodeinfo/client.test.mjs +1 -1
  39. package/dist/nodeinfo/handler.test.mjs +2 -2
  40. package/dist/nodeinfo/types.test.mjs +2 -2
  41. package/dist/otel/exporter.test.mjs +1 -1
  42. package/dist/{owner-BUnSHtD3.mjs → owner-DRXYR3jY.mjs} +2 -2
  43. package/dist/{proof-Bg4dnzAo.cjs → proof-BS0ckB77.cjs} +1 -1
  44. package/dist/{proof-nfrx8WZI.mjs → proof-DYP1abqL.mjs} +2 -2
  45. package/dist/{proof-BPWRZzc2.js → proof-PVc8vCvO.js} +1 -1
  46. package/dist/{send-BVjpjEY-.mjs → send-CVlj4zuA.mjs} +2 -2
  47. package/dist/sig/http.test.mjs +5 -5
  48. package/dist/sig/key.test.mjs +5 -5
  49. package/dist/sig/ld.test.mjs +4 -4
  50. package/dist/sig/mod.cjs +2 -2
  51. package/dist/sig/mod.js +2 -2
  52. package/dist/sig/owner.test.mjs +3 -3
  53. package/dist/sig/proof.test.mjs +3 -3
  54. package/dist/{std__assert-BUOJXi-Z.mjs → std__assert-DflMZha5.mjs} +2 -2
  55. package/dist/{temporal-D58JcKAc.mjs → temporal-BwiXwu1s.mjs} +1 -1
  56. package/dist/utils/docloader.test.mjs +4 -4
  57. package/dist/utils/mod.cjs +1 -1
  58. package/dist/utils/mod.js +1 -1
  59. package/package.json +5 -5
  60. /package/dist/{assert_not_equals--wG9hV7u.mjs → assert_not_equals-BkxW5QJI.mjs} +0 -0
@@ -2,24 +2,24 @@ 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-1poG3nVL.mjs";
6
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-CDuFq0mQ.mjs";
7
- import { l as verifyRequest } from "./http-C8SYUIha.mjs";
8
- import { t as getAuthenticatedDocumentLoader } from "./docloader-DHhMJMBx.mjs";
5
+ import { n as version, t as name } from "./deno-v7kfTDw9.mjs";
6
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-qe6uT5ER.mjs";
7
+ import { l as verifyRequest } from "./http-BRdkmpRl.mjs";
8
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-C40rdqSR.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-5AEMxXBH.mjs";
11
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-BUnSHtD3.mjs";
12
- import { n as signObject, r as verifyObject } from "./proof-nfrx8WZI.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-gf5riP2W.mjs";
11
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-DRXYR3jY.mjs";
12
+ import { n as signObject, r as verifyObject } from "./proof-DYP1abqL.mjs";
13
13
  import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-BUqbea1d.mjs";
14
14
  import { t as nodeInfoToJson } from "./types-MNlFfxjv.mjs";
15
- import { n as routeActivity } from "./inbox-DvbsFXWB.mjs";
16
- import { t as FederationBuilderImpl } from "./builder-DEj2UtTo.mjs";
15
+ import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-Bj-VABWa.mjs";
16
+ import { t as FederationBuilderImpl } from "./builder-oPN-KAgG.mjs";
17
17
  import { t as buildCollectionSynchronizationHeader } from "./collection-DI6YzYpd.mjs";
18
18
  import { t as KvKeyCache } from "./keycache-D239uGT9.mjs";
19
19
  import { t as acceptsJsonLd } from "./negotiation-TWEs6Cl8.mjs";
20
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-D58JcKAc.mjs";
20
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BwiXwu1s.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
22
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-BVjpjEY-.mjs";
22
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-CVlj4zuA.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";
@@ -241,8 +241,8 @@ async function handleObject(request, { values, context, objectDispatcher, author
241
241
  * @param parameters The parameters for handling the collection.
242
242
  * @returns A promise that resolves to an HTTP response.
243
243
  */
244
- async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
245
- const spanName = name$1.trim().replace(/\s+/g, "_");
244
+ async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
245
+ const spanName = name$2.trim().replace(/\s+/g, "_");
246
246
  tracerProvider = tracerProvider ?? trace.getTracerProvider();
247
247
  const tracer = tracerProvider.getTracer(name, version);
248
248
  const cursor = new URL(request.url).searchParams.get("cursor");
@@ -284,7 +284,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
284
284
  collection = new OrderedCollection({
285
285
  id: baseUri,
286
286
  totalItems: totalItems == null ? null : Number(totalItems),
287
- items: filterCollectionItems(itemsOrResponse, name$1, filterPredicate)
287
+ items: filterCollectionItems(itemsOrResponse, name$2, filterPredicate)
288
288
  });
289
289
  } else {
290
290
  const lastCursor = await collectionCallbacks.lastCursor?.(context, identifier);
@@ -305,7 +305,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
305
305
  } else {
306
306
  const uri = new URL(baseUri);
307
307
  uri.searchParams.set("cursor", cursor);
308
- const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
308
+ const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
309
309
  kind: SpanKind.SERVER,
310
310
  attributes: {
311
311
  "activitypub.collection.id": uri.href,
@@ -349,7 +349,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
349
349
  id: uri,
350
350
  prev,
351
351
  next,
352
- items: filterCollectionItems(items, name$1, filterPredicate),
352
+ items: filterCollectionItems(items, name$2, filterPredicate),
353
353
  partOf
354
354
  });
355
355
  }
@@ -735,6 +735,36 @@ async function handleInboxInternal(request, parameters, span) {
735
735
  headers: { "Content-Type": "text/plain; charset=utf-8" }
736
736
  });
737
737
  }
738
+ if (activity.actorId == null) {
739
+ logger.error("Missing actor.", {
740
+ activity: json,
741
+ recipient
742
+ });
743
+ span.setStatus({
744
+ code: SpanStatusCode.ERROR,
745
+ message: "Missing actor."
746
+ });
747
+ return new Response("Missing actor.", {
748
+ status: 400,
749
+ headers: { "Content-Type": "text/plain; charset=utf-8" }
750
+ });
751
+ }
752
+ if (!skipSignatureVerification && activity.id != null && !actorsHaveSameOrigin(activity)) {
753
+ logger.error("The activity ({activityId}) and its actors do not have the same origin.", {
754
+ activity: json,
755
+ recipient,
756
+ activityId: activity.id.href,
757
+ actorIds: activity.actorIds.map((actor) => actor.href)
758
+ });
759
+ span.setStatus({
760
+ code: SpanStatusCode.ERROR,
761
+ message: `The activity (${activity.id.href}) and its actors do not have the same origin.`
762
+ });
763
+ return new Response("The activity and its actors do not have the same origin.", {
764
+ status: 401,
765
+ headers: { "Content-Type": "text/plain; charset=utf-8" }
766
+ });
767
+ }
738
768
  const routeResult = await routeActivity({
739
769
  context: ctx,
740
770
  json,
@@ -863,8 +893,8 @@ var CustomCollectionHandler = class {
863
893
  * @param CollectionPage The CollectionPage constructor.
864
894
  * @param filterPredicate Optional filter predicate for items.
865
895
  */
866
- constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
867
- this.name = name$2;
896
+ constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
897
+ this.name = name$1;
868
898
  this.values = values;
869
899
  this.context = context;
870
900
  this.callbacks = callbacks;
@@ -1857,6 +1887,33 @@ var FederationImpl = class extends FederationBuilderImpl {
1857
1887
  activity = await Activity.fromJsonLd(parseInput, parseContext);
1858
1888
  span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
1859
1889
  if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
1890
+ if (activity.actorId == null) {
1891
+ logger.error("Missing actor in queued incoming activity.", {
1892
+ activityId: activity.id?.href,
1893
+ activity: message.activity,
1894
+ recipient: message.identifier
1895
+ });
1896
+ span.setStatus({
1897
+ code: SpanStatusCode.ERROR,
1898
+ message: "Missing actor."
1899
+ });
1900
+ span.end();
1901
+ return;
1902
+ }
1903
+ if (!this.skipSignatureVerification && activity.id != null && !actorsHaveSameOrigin(activity)) {
1904
+ logger.error("The queued activity ({activityId}) and its actors do not have the same origin.", {
1905
+ activityId: activity.id.href,
1906
+ actorIds: activity.actorIds.map((actor) => actor.href),
1907
+ activity: message.activity,
1908
+ recipient: message.identifier
1909
+ });
1910
+ span.setStatus({
1911
+ code: SpanStatusCode.ERROR,
1912
+ message: `The activity (${activity.id.href}) and its actors do not have the same origin.`
1913
+ });
1914
+ span.end();
1915
+ return;
1916
+ }
1860
1917
  cacheKey = activity.id == null ? null : [
1861
1918
  ...this.kvPrefixes.activityIdempotence,
1862
1919
  context.origin,
@@ -2967,20 +3024,6 @@ var ContextImpl = class ContextImpl {
2967
3024
  activity: await fetched.toJsonLd({ contextLoader })
2968
3025
  });
2969
3026
  return false;
2970
- } else if (fetched.actorIds.length < 1) {
2971
- logger.debug("Fetched activity object is missing an actor; unable to verify.", {
2972
- recipient,
2973
- activity: await fetched.toJsonLd({ contextLoader })
2974
- });
2975
- return false;
2976
- }
2977
- const activityId = fetched.id;
2978
- if (!fetched.actorIds.every((actor) => actor.origin === activityId.origin)) {
2979
- logger.debug("Fetched activity object has actors from different origins; unable to verify.", {
2980
- recipient,
2981
- activity: await fetched.toJsonLd({ contextLoader })
2982
- });
2983
- return false;
2984
3027
  }
2985
3028
  logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
2986
3029
  activity = fetched;
@@ -2989,6 +3032,20 @@ var ContextImpl = class ContextImpl {
2989
3032
  recipient,
2990
3033
  activity: json
2991
3034
  });
3035
+ if (activity.actorId == null) {
3036
+ logger.debug("Activity is missing an actor; unable to verify.", {
3037
+ recipient,
3038
+ activity: json
3039
+ });
3040
+ return false;
3041
+ }
3042
+ if (activity.id != null && !actorsHaveSameOrigin(activity)) {
3043
+ logger.debug("Activity has actors from different origins; unable to verify.", {
3044
+ recipient,
3045
+ activity: json
3046
+ });
3047
+ return false;
3048
+ }
2992
3049
  const routeResult = await routeActivity({
2993
3050
  context: this,
2994
3051
  json,
@@ -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 doubleKnock } from "./http-DaS2vnNk.js";
5
+ import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnock } from "./http-i02DDItX.js";
6
6
  import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.js";
7
- import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-BPWRZzc2.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B7T3rhpo.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-PVc8vCvO.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DT2Fk4wy.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";
@@ -52,12 +52,33 @@ var InboxListenerSet = class InboxListenerSet {
52
52
  return this.dispatchWithClass(activity)?.listener ?? null;
53
53
  }
54
54
  };
55
+ /**
56
+ * Checks whether an activity's ID and all of its actor IDs have the same
57
+ * non-opaque origin. Activities without an ID have no origin to authenticate.
58
+ *
59
+ * The caller is responsible for rejecting a missing primary actor ID before
60
+ * relying on this check.
61
+ * @internal
62
+ */
63
+ function actorsHaveSameOrigin(activity) {
64
+ if (activity.id == null) return true;
65
+ const origin = activity.id.origin;
66
+ return origin !== "null" && activity.actorIds.every((actor) => actor.origin === origin);
67
+ }
55
68
  async function routeActivity({ context: ctx, json, originalJson, normalizedActivity, ldSignatureVerified, activity, recipient, inboxListeners, inboxContextFactory, listenerInboxContextFactory, inboxErrorHandler, kv, kvPrefixes, queue, span, tracerProvider, idempotencyStrategy }) {
56
69
  const logger = getLogger([
57
70
  "fedify",
58
71
  "federation",
59
72
  "inbox"
60
73
  ]);
74
+ if (activity.actorId == null) {
75
+ logger.error("Missing actor.", { activity: json });
76
+ span.setStatus({
77
+ code: SpanStatusCode.ERROR,
78
+ message: "Missing actor."
79
+ });
80
+ return "missingActor";
81
+ }
61
82
  let cacheKey = null;
62
83
  if (activity.id != null) {
63
84
  const inboxContext = inboxContextFactory(recipient, json, activity.id?.href, getTypeId(activity).href);
@@ -92,14 +113,6 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
92
113
  return "alreadyProcessed";
93
114
  }
94
115
  }
95
- if (activity.actorId == null) {
96
- logger.error("Missing actor.", { activity: json });
97
- span.setStatus({
98
- code: SpanStatusCode.ERROR,
99
- message: "Missing actor."
100
- });
101
- return "missingActor";
102
- }
103
116
  span.setAttribute("activitypub.actor.id", activity.actorId.href);
104
117
  if (queue != null) {
105
118
  const carrier = {};
@@ -1159,8 +1172,8 @@ async function handleObject(request, { values, context, objectDispatcher, author
1159
1172
  * @param parameters The parameters for handling the collection.
1160
1173
  * @returns A promise that resolves to an HTTP response.
1161
1174
  */
1162
- async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
1163
- const spanName = name$1.trim().replace(/\s+/g, "_");
1175
+ async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
1176
+ const spanName = name$2.trim().replace(/\s+/g, "_");
1164
1177
  tracerProvider = tracerProvider ?? trace.getTracerProvider();
1165
1178
  const tracer = tracerProvider.getTracer(name, version);
1166
1179
  const cursor = new URL(request.url).searchParams.get("cursor");
@@ -1202,7 +1215,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
1202
1215
  collection = new OrderedCollection({
1203
1216
  id: baseUri,
1204
1217
  totalItems: totalItems == null ? null : Number(totalItems),
1205
- items: filterCollectionItems(itemsOrResponse, name$1, filterPredicate)
1218
+ items: filterCollectionItems(itemsOrResponse, name$2, filterPredicate)
1206
1219
  });
1207
1220
  } else {
1208
1221
  const lastCursor = await collectionCallbacks.lastCursor?.(context, identifier);
@@ -1223,7 +1236,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
1223
1236
  } else {
1224
1237
  const uri = new URL(baseUri);
1225
1238
  uri.searchParams.set("cursor", cursor);
1226
- const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
1239
+ const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
1227
1240
  kind: SpanKind.SERVER,
1228
1241
  attributes: {
1229
1242
  "activitypub.collection.id": uri.href,
@@ -1267,7 +1280,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
1267
1280
  id: uri,
1268
1281
  prev,
1269
1282
  next,
1270
- items: filterCollectionItems(items, name$1, filterPredicate),
1283
+ items: filterCollectionItems(items, name$2, filterPredicate),
1271
1284
  partOf
1272
1285
  });
1273
1286
  }
@@ -1653,6 +1666,36 @@ async function handleInboxInternal(request, parameters, span) {
1653
1666
  headers: { "Content-Type": "text/plain; charset=utf-8" }
1654
1667
  });
1655
1668
  }
1669
+ if (activity.actorId == null) {
1670
+ logger.error("Missing actor.", {
1671
+ activity: json,
1672
+ recipient
1673
+ });
1674
+ span.setStatus({
1675
+ code: SpanStatusCode.ERROR,
1676
+ message: "Missing actor."
1677
+ });
1678
+ return new Response("Missing actor.", {
1679
+ status: 400,
1680
+ headers: { "Content-Type": "text/plain; charset=utf-8" }
1681
+ });
1682
+ }
1683
+ if (!skipSignatureVerification && activity.id != null && !actorsHaveSameOrigin(activity)) {
1684
+ logger.error("The activity ({activityId}) and its actors do not have the same origin.", {
1685
+ activity: json,
1686
+ recipient,
1687
+ activityId: activity.id.href,
1688
+ actorIds: activity.actorIds.map((actor) => actor.href)
1689
+ });
1690
+ span.setStatus({
1691
+ code: SpanStatusCode.ERROR,
1692
+ message: `The activity (${activity.id.href}) and its actors do not have the same origin.`
1693
+ });
1694
+ return new Response("The activity and its actors do not have the same origin.", {
1695
+ status: 401,
1696
+ headers: { "Content-Type": "text/plain; charset=utf-8" }
1697
+ });
1698
+ }
1656
1699
  const routeResult = await routeActivity({
1657
1700
  context: ctx,
1658
1701
  json,
@@ -1781,8 +1824,8 @@ var CustomCollectionHandler = class {
1781
1824
  * @param CollectionPage The CollectionPage constructor.
1782
1825
  * @param filterPredicate Optional filter predicate for items.
1783
1826
  */
1784
- constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
1785
- this.name = name$2;
1827
+ constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
1828
+ this.name = name$1;
1786
1829
  this.values = values;
1787
1830
  this.context = context;
1788
1831
  this.callbacks = callbacks;
@@ -3098,6 +3141,33 @@ var FederationImpl = class extends FederationBuilderImpl {
3098
3141
  activity = await Activity.fromJsonLd(parseInput, parseContext);
3099
3142
  span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
3100
3143
  if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
3144
+ if (activity.actorId == null) {
3145
+ logger.error("Missing actor in queued incoming activity.", {
3146
+ activityId: activity.id?.href,
3147
+ activity: message.activity,
3148
+ recipient: message.identifier
3149
+ });
3150
+ span.setStatus({
3151
+ code: SpanStatusCode.ERROR,
3152
+ message: "Missing actor."
3153
+ });
3154
+ span.end();
3155
+ return;
3156
+ }
3157
+ if (!this.skipSignatureVerification && activity.id != null && !actorsHaveSameOrigin(activity)) {
3158
+ logger.error("The queued activity ({activityId}) and its actors do not have the same origin.", {
3159
+ activityId: activity.id.href,
3160
+ actorIds: activity.actorIds.map((actor) => actor.href),
3161
+ activity: message.activity,
3162
+ recipient: message.identifier
3163
+ });
3164
+ span.setStatus({
3165
+ code: SpanStatusCode.ERROR,
3166
+ message: `The activity (${activity.id.href}) and its actors do not have the same origin.`
3167
+ });
3168
+ span.end();
3169
+ return;
3170
+ }
3101
3171
  cacheKey = activity.id == null ? null : [
3102
3172
  ...this.kvPrefixes.activityIdempotence,
3103
3173
  context.origin,
@@ -4208,20 +4278,6 @@ var ContextImpl = class ContextImpl {
4208
4278
  activity: await fetched.toJsonLd({ contextLoader })
4209
4279
  });
4210
4280
  return false;
4211
- } else if (fetched.actorIds.length < 1) {
4212
- logger.debug("Fetched activity object is missing an actor; unable to verify.", {
4213
- recipient,
4214
- activity: await fetched.toJsonLd({ contextLoader })
4215
- });
4216
- return false;
4217
- }
4218
- const activityId = fetched.id;
4219
- if (!fetched.actorIds.every((actor) => actor.origin === activityId.origin)) {
4220
- logger.debug("Fetched activity object has actors from different origins; unable to verify.", {
4221
- recipient,
4222
- activity: await fetched.toJsonLd({ contextLoader })
4223
- });
4224
- return false;
4225
4281
  }
4226
4282
  logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
4227
4283
  activity = fetched;
@@ -4230,6 +4286,20 @@ var ContextImpl = class ContextImpl {
4230
4286
  recipient,
4231
4287
  activity: json
4232
4288
  });
4289
+ if (activity.actorId == null) {
4290
+ logger.debug("Activity is missing an actor; unable to verify.", {
4291
+ recipient,
4292
+ activity: json
4293
+ });
4294
+ return false;
4295
+ }
4296
+ if (activity.id != null && !actorsHaveSameOrigin(activity)) {
4297
+ logger.debug("Activity has actors from different origins; unable to verify.", {
4298
+ recipient,
4299
+ activity: json
4300
+ });
4301
+ return false;
4302
+ }
4233
4303
  const routeResult = await routeActivity({
4234
4304
  context: this,
4235
4305
  json,
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-0H3c-FW0.cjs");
8
- const require_middleware = require("./middleware-DlYK6kvo.cjs");
7
+ const require_http = require("./http-CytEl2_x.cjs");
8
+ const require_middleware = require("./middleware-C_ybJNaa.cjs");
9
9
  const require_types = require("./types-DRPjmHVV.cjs");
10
- const require_proof = require("./proof-Bg4dnzAo.cjs");
11
- const require_kv_cache = require("./kv-cache-BNiY7ea-.cjs");
10
+ const require_proof = require("./proof-BS0ckB77.cjs");
11
+ const require_kv_cache = require("./kv-cache-CCCwr3Y2.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.js CHANGED
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import "./chunk-CRNNMoPX.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
5
5
  import "./compat/mod.js";
6
- import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-DaS2vnNk.js";
7
- import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-B4GK0_I-.js";
6
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-i02DDItX.js";
7
+ import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-rrNFt8Ia.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-miAYfiGO.js";
9
- import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-BPWRZzc2.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B7T3rhpo.js";
9
+ import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-PVc8vCvO.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DT2Fk4wy.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import "../std__assert-BUOJXi-Z.mjs";
6
+ import "../std__assert-DflMZha5.mjs";
7
7
  import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
8
8
  import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-BUqbea1d.mjs";
9
9
  import { test } from "@fedify/fixture";
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import "../std__assert-BUOJXi-Z.mjs";
6
+ import "../std__assert-DflMZha5.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
8
- import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-Cm5Kx7Nr.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-a9um4sWr.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-BUOJXi-Z.mjs";
6
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
5
+ import "../std__assert-DflMZha5.mjs";
6
+ import { t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as nodeInfoToJson } from "../types-MNlFfxjv.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/nodeinfo/types.test.ts
@@ -2,7 +2,7 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import "../std__assert-BUOJXi-Z.mjs";
5
+ import "../std__assert-DflMZha5.mjs";
6
6
  import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
@@ -1,8 +1,8 @@
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-1poG3nVL.mjs";
5
- import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-CDuFq0mQ.mjs";
4
+ import { n as version, t as name } from "./deno-v7kfTDw9.mjs";
5
+ import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-qe6uT5ER.mjs";
6
6
  import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  const require_chunk = require("./chunk-DDcVe30Y.cjs");
4
- const require_http = require("./http-0H3c-FW0.cjs");
4
+ const require_http = require("./http-CytEl2_x.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
6
6
  let _fedify_vocab = require("@fedify/vocab");
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,8 +1,8 @@
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-1poG3nVL.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-CDuFq0mQ.mjs";
4
+ import { n as version, t as name } from "./deno-v7kfTDw9.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-qe6uT5ER.mjs";
6
6
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getLogger } from "@logtape/logtape";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { a as fetchActorDocument, d as name, f as version, i as exportJwk, l as validateCryptoKey, o as fetchKey, u as verifyKeyOwnership } from "./http-DaS2vnNk.js";
3
+ import { a as fetchActorDocument, d as name, f as version, i as exportJwk, l as validateCryptoKey, o as fetchKey, u as verifyKeyOwnership } from "./http-i02DDItX.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -1,8 +1,8 @@
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-1poG3nVL.mjs";
5
- import { n as doubleKnock } from "./http-C8SYUIha.mjs";
4
+ import { n as version, t as name } from "./deno-v7kfTDw9.mjs";
5
+ import { n as doubleKnock } from "./http-BRdkmpRl.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
8
8
  import { getLogger } from "@logtape/logtape";
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
- import { i as assertExists, t as assertStringIncludes } from "../std__assert-BUOJXi-Z.mjs";
7
- import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
6
+ import { i as assertExists, t as assertStringIncludes } from "../std__assert-DflMZha5.mjs";
7
+ import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { t as assert } from "../assert-BhQd8QHP.mjs";
9
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
10
- import { t as exportJwk } from "../key-CDuFq0mQ.mjs";
11
- import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-C8SYUIha.mjs";
9
+ import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
10
+ import { t as exportJwk } from "../key-qe6uT5ER.mjs";
11
+ import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-BRdkmpRl.mjs";
12
12
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CCxRJhWa.mjs";
13
13
  import { mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -2,13 +2,13 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { n as assertStrictEquals } from "../std__assert-BUOJXi-Z.mjs";
6
- import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
5
+ import { n as assertStrictEquals } from "../std__assert-DflMZha5.mjs";
6
+ import { t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
7
7
  import { t as assert } from "../assert-BhQd8QHP.mjs";
8
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
9
- import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-CDuFq0mQ.mjs";
8
+ import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
9
+ import { a as importJwk, i as generateCryptoKeyPair, o as validateCryptoKey, r as fetchKey, t as exportJwk } from "../key-qe6uT5ER.mjs";
10
10
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
11
- import { g as wrapContextLoaderForJsonLd } from "../ld-5AEMxXBH.mjs";
11
+ import { g as wrapContextLoaderForJsonLd } from "../ld-gf5riP2W.mjs";
12
12
  import { mockDocumentLoader, test } from "@fedify/fixture";
13
13
  import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
14
14
  import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -2,12 +2,12 @@ import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
- import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
5
+ import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
6
6
  import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
7
- import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
8
- import { i as generateCryptoKeyPair } from "../key-CDuFq0mQ.mjs";
7
+ import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-qe6uT5ER.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CCxRJhWa.mjs";
10
- import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-5AEMxXBH.mjs";
10
+ import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-gf5riP2W.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { CryptographicKey } from "@fedify/vocab";
13
13
  import { encodeBase64 } from "byte-encodings/base64";
package/dist/sig/mod.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const require_http = require("../http-0H3c-FW0.cjs");
5
- const require_proof = require("../proof-Bg4dnzAo.cjs");
4
+ const require_http = require("../http-CytEl2_x.cjs");
5
+ const require_proof = require("../proof-BS0ckB77.cjs");
6
6
  exports.attachSignature = require_proof.attachSignature;
7
7
  exports.createProof = require_proof.createProof;
8
8
  exports.createSignature = require_proof.createSignature;
package/dist/sig/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "../http-DaS2vnNk.js";
4
- import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-BPWRZzc2.js";
3
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "../http-i02DDItX.js";
4
+ import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-PVc8vCvO.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };