@fedify/fedify 2.1.3 → 2.1.5

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 (56) hide show
  1. package/dist/{builder-BKo51w-F.mjs → builder-U7X6o2EL.mjs} +3 -3
  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/{context-BOiMZBu5.d.ts → context-C0fssarc.d.ts} +4 -1
  6. package/dist/{context-BhZVy7RB.d.cts → context-LmrZPwti.d.cts} +4 -1
  7. package/dist/{deno-D5r_9RvZ.mjs → deno-CiA1I28P.mjs} +1 -1
  8. package/dist/{docloader-B9CXCw8i.mjs → docloader-CJVLGKkH.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +1 -1
  10. package/dist/federation/handler.test.mjs +3 -3
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/inbox.test.mjs +1 -1
  13. package/dist/federation/middleware.test.mjs +89 -29
  14. package/dist/federation/mod.cjs +1 -1
  15. package/dist/federation/mod.d.cts +2 -2
  16. package/dist/federation/mod.d.ts +2 -2
  17. package/dist/federation/mod.js +1 -1
  18. package/dist/federation/send.test.mjs +3 -3
  19. package/dist/federation/webfinger.test.mjs +1 -1
  20. package/dist/{http-BngkmEhl.cjs → http-BnhNwZCE.cjs} +1 -1
  21. package/dist/{http-PS3wuU8D.js → http-DGSZjpV8.js} +1 -1
  22. package/dist/{http-B53alCGi.mjs → http-DhPGYu8c.mjs} +2 -2
  23. package/dist/{inbox-CHsLu5ai.mjs → inbox-CB5LTrsc.mjs} +1 -1
  24. package/dist/{key-D9Np_ZXl.mjs → key-BB7giDb0.mjs} +1 -1
  25. package/dist/{kv-cache-B2Qi5MGv.js → kv-cache-BXyQIJaz.js} +1 -1
  26. package/dist/{kv-cache-YCtINZK4.cjs → kv-cache-uC4u_xNv.cjs} +1 -1
  27. package/dist/{ld-BaxRFhDd.mjs → ld-H4y7rFBj.mjs} +2 -2
  28. package/dist/{middleware-dFn6ozt5.mjs → middleware-BuolCLMa.mjs} +49 -24
  29. package/dist/{middleware-Dn1kk96N.js → middleware-CZQtnknj.js} +42 -17
  30. package/dist/{middleware-C37OmOz_.mjs → middleware-D0LdG_ob.mjs} +1 -1
  31. package/dist/{middleware-CelV2xrI.cjs → middleware-DE76xnt9.cjs} +1 -1
  32. package/dist/{middleware-Bsv-7iX7.cjs → middleware-pa87O65Q.cjs} +43 -18
  33. package/dist/{mod-Bp_CzKd4.d.cts → mod-Cgpc49fA.d.cts} +1 -1
  34. package/dist/{mod-DKOAow7a.d.ts → mod-CnwZoDzx.d.ts} +1 -1
  35. package/dist/mod.cjs +4 -4
  36. package/dist/mod.d.cts +2 -2
  37. package/dist/mod.d.ts +2 -2
  38. package/dist/mod.js +4 -4
  39. package/dist/nodeinfo/handler.test.mjs +1 -1
  40. package/dist/{owner-dxM51u36.mjs → owner-BWPBsNVe.mjs} +2 -2
  41. package/dist/{proof-Dpgqx9RS.js → proof-B4c3-QEV.js} +1 -1
  42. package/dist/{proof-CH5U0k7G.mjs → proof-CYvplcHt.mjs} +2 -2
  43. package/dist/{proof-D39qiki3.cjs → proof-lKHWkcgD.cjs} +1 -1
  44. package/dist/{send-D1-4ZnQq.mjs → send-CiKoUUxl.mjs} +2 -2
  45. package/dist/sig/http.test.mjs +2 -2
  46. package/dist/sig/key.test.mjs +1 -1
  47. package/dist/sig/ld.test.mjs +2 -2
  48. package/dist/sig/mod.cjs +2 -2
  49. package/dist/sig/mod.js +2 -2
  50. package/dist/sig/owner.test.mjs +1 -1
  51. package/dist/sig/proof.test.mjs +1 -1
  52. package/dist/testing/mod.d.mts +4 -1
  53. package/dist/utils/docloader.test.mjs +2 -2
  54. package/dist/utils/mod.cjs +1 -1
  55. package/dist/utils/mod.js +1 -1
  56. package/package.json +6 -6
@@ -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-D5r_9RvZ.mjs";
5
+ import { n as version, t as name } from "./deno-CiA1I28P.mjs";
6
6
  import { t as formatAcceptSignature } from "./accept-Dd__NiUL.mjs";
7
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-D9Np_ZXl.mjs";
8
- import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-B53alCGi.mjs";
9
- import { t as getAuthenticatedDocumentLoader } from "./docloader-B9CXCw8i.mjs";
7
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-BB7giDb0.mjs";
8
+ import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-DhPGYu8c.mjs";
9
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-CJVLGKkH.mjs";
10
10
  import { n as kvCache } from "./kv-cache-B01V7s3h.mjs";
11
- import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-BaxRFhDd.mjs";
12
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-dxM51u36.mjs";
13
- import { n as signObject, r as verifyObject } from "./proof-CH5U0k7G.mjs";
11
+ import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-H4y7rFBj.mjs";
12
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-BWPBsNVe.mjs";
13
+ import { n as signObject, r as verifyObject } from "./proof-CYvplcHt.mjs";
14
14
  import { t as getNodeInfo } from "./client-DEpOVgY1.mjs";
15
15
  import { t as nodeInfoToJson } from "./types-DCP0WLdt.mjs";
16
- import { n as routeActivity } from "./inbox-CHsLu5ai.mjs";
17
- import { t as FederationBuilderImpl } from "./builder-BKo51w-F.mjs";
16
+ import { n as routeActivity } from "./inbox-CB5LTrsc.mjs";
17
+ import { t as FederationBuilderImpl } from "./builder-U7X6o2EL.mjs";
18
18
  import { t as buildCollectionSynchronizationHeader } from "./collection-BD6-SZ6O.mjs";
19
19
  import { t as KvKeyCache } from "./keycache-CCSwkQcY.mjs";
20
20
  import { t as acceptsJsonLd } from "./negotiation-DnsfFF8I.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-B_E3V_Dx.mjs";
22
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-D1-4ZnQq.mjs";
22
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-CiKoUUxl.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";
@@ -1890,14 +1890,17 @@ var FederationImpl = class extends FederationBuilderImpl {
1890
1890
  let rsaKey = null;
1891
1891
  for (const { keyId, privateKey } of keys) {
1892
1892
  validateCryptoKey(privateKey, "private");
1893
- if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
1894
- rsaKey = {
1895
- keyId,
1896
- privateKey
1897
- };
1898
- continue;
1899
- }
1900
- if (privateKey.algorithm.name === "Ed25519") {
1893
+ if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
1894
+ keyId,
1895
+ privateKey
1896
+ };
1897
+ }
1898
+ for await (const _ of activity.getProofs({ contextLoader })) {
1899
+ proofCreated = true;
1900
+ break;
1901
+ }
1902
+ if (!proofCreated) {
1903
+ for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
1901
1904
  activity = await signObject(activity, privateKey, keyId, {
1902
1905
  contextLoader,
1903
1906
  tracerProvider: this.tracerProvider
@@ -2489,6 +2492,7 @@ var ContextImpl = class ContextImpl {
2489
2492
  }
2490
2493
  const owner = this.getActorUri(identifier);
2491
2494
  const result = [];
2495
+ let i = 1;
2492
2496
  for (const keyPair of keyPairs) {
2493
2497
  const newPair = {
2494
2498
  ...keyPair,
@@ -2498,12 +2502,13 @@ var ContextImpl = class ContextImpl {
2498
2502
  publicKey: keyPair.publicKey
2499
2503
  }),
2500
2504
  multikey: new Multikey({
2501
- id: keyPair.keyId,
2505
+ id: new URL(`#multikey-${i}`, owner),
2502
2506
  controller: owner,
2503
2507
  publicKey: keyPair.publicKey
2504
2508
  })
2505
2509
  };
2506
2510
  result.push(newPair);
2511
+ i++;
2507
2512
  }
2508
2513
  return result;
2509
2514
  }
@@ -2641,6 +2646,7 @@ var ContextImpl = class ContextImpl {
2641
2646
  ]);
2642
2647
  let keys;
2643
2648
  let identifier = null;
2649
+ let actorKeyPairs = null;
2644
2650
  if ("identifier" in sender || "username" in sender) {
2645
2651
  if ("identifier" in sender) identifier = sender.identifier;
2646
2652
  else {
@@ -2653,8 +2659,13 @@ var ContextImpl = class ContextImpl {
2653
2659
  }
2654
2660
  }
2655
2661
  span.setAttribute("fedify.actor.identifier", identifier);
2656
- keys = await this.getKeyPairsFromIdentifier(identifier);
2657
- if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
2662
+ if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
2663
+ actorKeyPairs = await this.getActorKeyPairs(identifier);
2664
+ if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
2665
+ keys = actorKeyPairs.map((kp) => ({
2666
+ keyId: kp.keyId,
2667
+ privateKey: kp.privateKey
2668
+ }));
2658
2669
  } else if (Array.isArray(sender)) {
2659
2670
  if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
2660
2671
  keys = sender;
@@ -2690,6 +2701,16 @@ var ContextImpl = class ContextImpl {
2690
2701
  });
2691
2702
  throw new TypeError("The activity to send must have at least one actor property.");
2692
2703
  }
2704
+ if (actorKeyPairs != null) {
2705
+ const contextLoader = this.contextLoader;
2706
+ for (const kp of actorKeyPairs) {
2707
+ if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
2708
+ activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
2709
+ contextLoader,
2710
+ tracerProvider: this.tracerProvider
2711
+ });
2712
+ }
2713
+ }
2693
2714
  const inboxes = extractInboxes({
2694
2715
  recipients: expandedRecipients,
2695
2716
  preferSharedInbox: options.preferSharedInbox,
@@ -2730,7 +2751,7 @@ var ContextImpl = class ContextImpl {
2730
2751
  traceContext: carrier
2731
2752
  };
2732
2753
  if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
2733
- this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
2754
+ await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
2734
2755
  }
2735
2756
  async *getFollowers(identifier) {
2736
2757
  if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
@@ -3023,8 +3044,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
3023
3044
  identifier = mapped;
3024
3045
  }
3025
3046
  }
3026
- keys = await this.getKeyPairsFromIdentifier(identifier);
3027
- if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
3047
+ const actorKeyPairs = await this.getActorKeyPairs(identifier);
3048
+ if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
3049
+ keys = actorKeyPairs.map((kp) => ({
3050
+ keyId: kp.keyId,
3051
+ privateKey: kp.privateKey
3052
+ }));
3028
3053
  } else if (Array.isArray(forwarder)) {
3029
3054
  if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
3030
3055
  keys = forwarder;
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-nlSIicah.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-ve6e2xcg.js";
5
- import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-PS3wuU8D.js";
6
- import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-Dpgqx9RS.js";
5
+ import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-DGSZjpV8.js";
6
+ import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-B4c3-QEV.js";
7
7
  import { n as getNodeInfo, t as nodeInfoToJson } from "./types-hvL8ElAs.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B2Qi5MGv.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BXyQIJaz.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";
@@ -3003,14 +3003,17 @@ var FederationImpl = class extends FederationBuilderImpl {
3003
3003
  let rsaKey = null;
3004
3004
  for (const { keyId, privateKey } of keys) {
3005
3005
  validateCryptoKey(privateKey, "private");
3006
- if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
3007
- rsaKey = {
3008
- keyId,
3009
- privateKey
3010
- };
3011
- continue;
3012
- }
3013
- if (privateKey.algorithm.name === "Ed25519") {
3006
+ if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
3007
+ keyId,
3008
+ privateKey
3009
+ };
3010
+ }
3011
+ for await (const _ of activity.getProofs({ contextLoader })) {
3012
+ proofCreated = true;
3013
+ break;
3014
+ }
3015
+ if (!proofCreated) {
3016
+ for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
3014
3017
  activity = await signObject(activity, privateKey, keyId, {
3015
3018
  contextLoader,
3016
3019
  tracerProvider: this.tracerProvider
@@ -3602,6 +3605,7 @@ var ContextImpl = class ContextImpl {
3602
3605
  }
3603
3606
  const owner = this.getActorUri(identifier);
3604
3607
  const result = [];
3608
+ let i = 1;
3605
3609
  for (const keyPair of keyPairs) {
3606
3610
  const newPair = {
3607
3611
  ...keyPair,
@@ -3611,12 +3615,13 @@ var ContextImpl = class ContextImpl {
3611
3615
  publicKey: keyPair.publicKey
3612
3616
  }),
3613
3617
  multikey: new Multikey({
3614
- id: keyPair.keyId,
3618
+ id: new URL(`#multikey-${i}`, owner),
3615
3619
  controller: owner,
3616
3620
  publicKey: keyPair.publicKey
3617
3621
  })
3618
3622
  };
3619
3623
  result.push(newPair);
3624
+ i++;
3620
3625
  }
3621
3626
  return result;
3622
3627
  }
@@ -3754,6 +3759,7 @@ var ContextImpl = class ContextImpl {
3754
3759
  ]);
3755
3760
  let keys;
3756
3761
  let identifier = null;
3762
+ let actorKeyPairs = null;
3757
3763
  if ("identifier" in sender || "username" in sender) {
3758
3764
  if ("identifier" in sender) identifier = sender.identifier;
3759
3765
  else {
@@ -3766,8 +3772,13 @@ var ContextImpl = class ContextImpl {
3766
3772
  }
3767
3773
  }
3768
3774
  span.setAttribute("fedify.actor.identifier", identifier);
3769
- keys = await this.getKeyPairsFromIdentifier(identifier);
3770
- if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
3775
+ if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
3776
+ actorKeyPairs = await this.getActorKeyPairs(identifier);
3777
+ if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
3778
+ keys = actorKeyPairs.map((kp) => ({
3779
+ keyId: kp.keyId,
3780
+ privateKey: kp.privateKey
3781
+ }));
3771
3782
  } else if (Array.isArray(sender)) {
3772
3783
  if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
3773
3784
  keys = sender;
@@ -3803,6 +3814,16 @@ var ContextImpl = class ContextImpl {
3803
3814
  });
3804
3815
  throw new TypeError("The activity to send must have at least one actor property.");
3805
3816
  }
3817
+ if (actorKeyPairs != null) {
3818
+ const contextLoader = this.contextLoader;
3819
+ for (const kp of actorKeyPairs) {
3820
+ if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
3821
+ activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
3822
+ contextLoader,
3823
+ tracerProvider: this.tracerProvider
3824
+ });
3825
+ }
3826
+ }
3806
3827
  const inboxes = extractInboxes({
3807
3828
  recipients: expandedRecipients,
3808
3829
  preferSharedInbox: options.preferSharedInbox,
@@ -3843,7 +3864,7 @@ var ContextImpl = class ContextImpl {
3843
3864
  traceContext: carrier
3844
3865
  };
3845
3866
  if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
3846
- this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
3867
+ await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
3847
3868
  }
3848
3869
  async *getFollowers(identifier) {
3849
3870
  if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
@@ -4136,8 +4157,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
4136
4157
  identifier = mapped;
4137
4158
  }
4138
4159
  }
4139
- keys = await this.getKeyPairsFromIdentifier(identifier);
4140
- if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
4160
+ const actorKeyPairs = await this.getActorKeyPairs(identifier);
4161
+ if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
4162
+ keys = actorKeyPairs.map((kp) => ({
4163
+ keyId: kp.keyId,
4164
+ privateKey: kp.privateKey
4165
+ }));
4141
4166
  } else if (Array.isArray(forwarder)) {
4142
4167
  if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
4143
4168
  keys = forwarder;
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-dFn6ozt5.mjs";
4
+ import { n as FederationImpl } from "./middleware-BuolCLMa.mjs";
5
5
  export { FederationImpl };
@@ -1,4 +1,4 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
- const require_middleware = require("./middleware-Bsv-7iX7.cjs");
3
+ const require_middleware = require("./middleware-pa87O65Q.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  require("./chunk-DDcVe30Y.cjs");
4
4
  const require_transformers = require("./transformers-NeAONrAq.cjs");
5
- const require_http = require("./http-BngkmEhl.cjs");
6
- const require_proof = require("./proof-D39qiki3.cjs");
5
+ const require_http = require("./http-BnhNwZCE.cjs");
6
+ const require_proof = require("./proof-lKHWkcgD.cjs");
7
7
  const require_types = require("./types-KC4QAoxe.cjs");
8
- const require_kv_cache = require("./kv-cache-YCtINZK4.cjs");
8
+ const require_kv_cache = require("./kv-cache-uC4u_xNv.cjs");
9
9
  let _logtape_logtape = require("@logtape/logtape");
10
10
  let _fedify_vocab = require("@fedify/vocab");
11
11
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -331,7 +331,7 @@ var FederationBuilderImpl = class {
331
331
  this.collectionTypeIds = {};
332
332
  }
333
333
  async build(options) {
334
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CelV2xrI.cjs"));
334
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-DE76xnt9.cjs"));
335
335
  const f = new FederationImpl(options);
336
336
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
337
337
  f.router = this.router.clone();
@@ -2996,14 +2996,17 @@ var FederationImpl = class extends FederationBuilderImpl {
2996
2996
  let rsaKey = null;
2997
2997
  for (const { keyId, privateKey } of keys) {
2998
2998
  require_http.validateCryptoKey(privateKey, "private");
2999
- if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
3000
- rsaKey = {
3001
- keyId,
3002
- privateKey
3003
- };
3004
- continue;
3005
- }
3006
- if (privateKey.algorithm.name === "Ed25519") {
2999
+ if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
3000
+ keyId,
3001
+ privateKey
3002
+ };
3003
+ }
3004
+ for await (const _ of activity.getProofs({ contextLoader })) {
3005
+ proofCreated = true;
3006
+ break;
3007
+ }
3008
+ if (!proofCreated) {
3009
+ for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
3007
3010
  activity = await require_proof.signObject(activity, privateKey, keyId, {
3008
3011
  contextLoader,
3009
3012
  tracerProvider: this.tracerProvider
@@ -3595,6 +3598,7 @@ var ContextImpl = class ContextImpl {
3595
3598
  }
3596
3599
  const owner = this.getActorUri(identifier);
3597
3600
  const result = [];
3601
+ let i = 1;
3598
3602
  for (const keyPair of keyPairs) {
3599
3603
  const newPair = {
3600
3604
  ...keyPair,
@@ -3604,12 +3608,13 @@ var ContextImpl = class ContextImpl {
3604
3608
  publicKey: keyPair.publicKey
3605
3609
  }),
3606
3610
  multikey: new _fedify_vocab.Multikey({
3607
- id: keyPair.keyId,
3611
+ id: new URL(`#multikey-${i}`, owner),
3608
3612
  controller: owner,
3609
3613
  publicKey: keyPair.publicKey
3610
3614
  })
3611
3615
  };
3612
3616
  result.push(newPair);
3617
+ i++;
3613
3618
  }
3614
3619
  return result;
3615
3620
  }
@@ -3747,6 +3752,7 @@ var ContextImpl = class ContextImpl {
3747
3752
  ]);
3748
3753
  let keys;
3749
3754
  let identifier = null;
3755
+ let actorKeyPairs = null;
3750
3756
  if ("identifier" in sender || "username" in sender) {
3751
3757
  if ("identifier" in sender) identifier = sender.identifier;
3752
3758
  else {
@@ -3759,8 +3765,13 @@ var ContextImpl = class ContextImpl {
3759
3765
  }
3760
3766
  }
3761
3767
  span.setAttribute("fedify.actor.identifier", identifier);
3762
- keys = await this.getKeyPairsFromIdentifier(identifier);
3763
- if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
3768
+ if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
3769
+ actorKeyPairs = await this.getActorKeyPairs(identifier);
3770
+ if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
3771
+ keys = actorKeyPairs.map((kp) => ({
3772
+ keyId: kp.keyId,
3773
+ privateKey: kp.privateKey
3774
+ }));
3764
3775
  } else if (Array.isArray(sender)) {
3765
3776
  if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
3766
3777
  keys = sender;
@@ -3796,6 +3807,16 @@ var ContextImpl = class ContextImpl {
3796
3807
  });
3797
3808
  throw new TypeError("The activity to send must have at least one actor property.");
3798
3809
  }
3810
+ if (actorKeyPairs != null) {
3811
+ const contextLoader = this.contextLoader;
3812
+ for (const kp of actorKeyPairs) {
3813
+ if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
3814
+ activity = await require_proof.signObject(activity, kp.privateKey, kp.multikey.id, {
3815
+ contextLoader,
3816
+ tracerProvider: this.tracerProvider
3817
+ });
3818
+ }
3819
+ }
3799
3820
  const inboxes = extractInboxes({
3800
3821
  recipients: expandedRecipients,
3801
3822
  preferSharedInbox: options.preferSharedInbox,
@@ -3836,7 +3857,7 @@ var ContextImpl = class ContextImpl {
3836
3857
  traceContext: carrier
3837
3858
  };
3838
3859
  if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
3839
- this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
3860
+ await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
3840
3861
  }
3841
3862
  async *getFollowers(identifier) {
3842
3863
  if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
@@ -4129,8 +4150,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
4129
4150
  identifier = mapped;
4130
4151
  }
4131
4152
  }
4132
- keys = await this.getKeyPairsFromIdentifier(identifier);
4133
- if (keys.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
4153
+ const actorKeyPairs = await this.getActorKeyPairs(identifier);
4154
+ if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
4155
+ keys = actorKeyPairs.map((kp) => ({
4156
+ keyId: kp.keyId,
4157
+ privateKey: kp.privateKey
4158
+ }));
4134
4159
  } else if (Array.isArray(forwarder)) {
4135
4160
  if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
4136
4161
  keys = forwarder;
@@ -1,4 +1,4 @@
1
- import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-BhZVy7RB.cjs";
1
+ import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-LmrZPwti.cjs";
2
2
  import { Span, Tracer } from "@opentelemetry/api";
3
3
 
4
4
  //#region src/federation/webfinger.d.ts
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-BOiMZBu5.js";
3
+ import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-C0fssarc.js";
4
4
  import { Span, Tracer } from "@opentelemetry/api";
5
5
 
6
6
  //#region src/federation/webfinger.d.ts
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-BngkmEhl.cjs");
8
- const require_middleware = require("./middleware-Bsv-7iX7.cjs");
9
- const require_proof = require("./proof-D39qiki3.cjs");
7
+ const require_http = require("./http-BnhNwZCE.cjs");
8
+ const require_middleware = require("./middleware-pa87O65Q.cjs");
9
+ const require_proof = require("./proof-lKHWkcgD.cjs");
10
10
  const require_types = require("./types-KC4QAoxe.cjs");
11
- const require_kv_cache = require("./kv-cache-YCtINZK4.cjs");
11
+ const require_kv_cache = require("./kv-cache-uC4u_xNv.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  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-z-8dc-e1.cjs";
2
2
  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-CrGuipxe.cjs";
3
3
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CptqhsOy.cjs";
4
- import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-BhZVy7RB.cjs";
4
+ import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-LmrZPwti.cjs";
5
5
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CbLNp3zQ.cjs";
6
6
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
7
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-Bp_CzKd4.cjs";
7
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-Cgpc49fA.cjs";
8
8
  import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-DoJBjjnO.cjs";
9
9
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-B505FZBC.cjs";
10
10
  export * from "@fedify/vocab-runtime";
package/dist/mod.d.ts CHANGED
@@ -3,10 +3,10 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  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-AtlibPOU.js";
4
4
  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-aQzN9Ayi.js";
5
5
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-74ARJ5TL.js";
6
- import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-BOiMZBu5.js";
6
+ import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-C0fssarc.js";
7
7
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-GFYnFoOl.js";
8
8
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
9
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-DKOAow7a.js";
9
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CnwZoDzx.js";
10
10
  import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-DvxszxXC.js";
11
11
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-D7PAuO6k.js";
12
12
  export * from "@fedify/vocab-runtime";
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import "urlpattern-polyfill";
3
3
  import "./chunk-nlSIicah.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-ve6e2xcg.js";
5
5
  import "./compat/mod.js";
6
- import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-PS3wuU8D.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-Dn1kk96N.js";
8
- import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-Dpgqx9RS.js";
6
+ import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-DGSZjpV8.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-CZQtnknj.js";
8
+ import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-B4c3-QEV.js";
9
9
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-hvL8ElAs.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B2Qi5MGv.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BXyQIJaz.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-Duiq_YC9.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-tL2TOE9X.mjs";
8
- import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-dFn6ozt5.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-BuolCLMa.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -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-D5r_9RvZ.mjs";
5
- import "./key-D9Np_ZXl.mjs";
4
+ import { n as version, t as name } from "./deno-CiA1I28P.mjs";
5
+ import "./key-BB7giDb0.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,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
- import { _ as version, d as validateCryptoKey, g as name, s as fetchKey } from "./http-PS3wuU8D.js";
3
+ import { _ as version, d as validateCryptoKey, g as name, s as fetchKey } from "./http-DGSZjpV8.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 { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-D5r_9RvZ.mjs";
5
- import { n as fetchKey, o as validateCryptoKey } from "./key-D9Np_ZXl.mjs";
4
+ import { n as version, t as name } from "./deno-CiA1I28P.mjs";
5
+ import { n as fetchKey, o as validateCryptoKey } from "./key-BB7giDb0.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,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-BngkmEhl.cjs");
4
+ const require_http = require("./http-BnhNwZCE.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 "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-D5r_9RvZ.mjs";
5
- import { n as doubleKnock } from "./http-B53alCGi.mjs";
4
+ import { n as version, t as name } from "./deno-CiA1I28P.mjs";
5
+ import { n as doubleKnock } from "./http-DhPGYu8c.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  //#region src/federation/send.ts
@@ -7,8 +7,8 @@ import { a as assertExists, t as assertStringIncludes } from "../std__assert-Dui
7
7
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
8
8
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
9
9
  import { t as assert } from "../assert-ddO5KLpe.mjs";
10
- import { t as exportJwk } from "../key-D9Np_ZXl.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, u as verifyRequestDetailed } from "../http-B53alCGi.mjs";
10
+ import { t as exportJwk } from "../key-BB7giDb0.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, u as verifyRequestDetailed } from "../http-DhPGYu8c.mjs";
12
12
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-BAK-tUlf.mjs";
13
13
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-Duiq_YC9.mjs";
6
6
  import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
7
7
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
8
- import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-D9Np_ZXl.mjs";
8
+ import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-BB7giDb0.mjs";
9
9
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BAK-tUlf.mjs";
10
10
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { CryptographicKey, Multikey } from "@fedify/vocab";
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
7
7
  import { t as assert } from "../assert-ddO5KLpe.mjs";
8
- import { i as generateCryptoKeyPair } from "../key-D9Np_ZXl.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-BB7giDb0.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BAK-tUlf.mjs";
10
- import { a as signJsonLd, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-BaxRFhDd.mjs";
10
+ import { a as signJsonLd, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-H4y7rFBj.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { CryptographicKey } from "@fedify/vocab";
13
13
  import { encodeBase64 } from "byte-encodings/base64";