@fedify/fedify 2.0.1 → 2.0.2-dev.415

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 (98) hide show
  1. package/dist/{builder-CqPrSnE5.js → builder-B55ClH_D.js} +3 -3
  2. package/dist/client-BxMZiQaD.d.ts +224 -0
  3. package/dist/client-C97KOq3x.d.cts +222 -0
  4. package/dist/compat/mod.d.cts +6 -6
  5. package/dist/compat/mod.d.ts +6 -6
  6. package/dist/compat/transformers.test.js +11 -11
  7. package/dist/context-D3QkEtZd.d.cts +2494 -0
  8. package/dist/context-DZJhUmzF.d.ts +2496 -0
  9. package/dist/{deno-CIi8RNND.js → deno-D-Duks4b.js} +1 -1
  10. package/dist/{docloader-CmrEfaGw.js → docloader-Bb4MhBYJ.js} +2 -2
  11. package/dist/federation/builder.test.js +3 -3
  12. package/dist/federation/handler.test.js +19 -19
  13. package/dist/federation/idempotency.test.js +11 -11
  14. package/dist/federation/inbox.test.js +2 -2
  15. package/dist/federation/middleware.test.js +11 -11
  16. package/dist/federation/mod.cjs +4 -4
  17. package/dist/federation/mod.d.cts +6 -6
  18. package/dist/federation/mod.d.ts +6 -6
  19. package/dist/federation/mod.js +4 -4
  20. package/dist/federation/send.test.js +5 -5
  21. package/dist/federation/webfinger.test.js +11 -11
  22. package/dist/{http-CCsNu78I.js → http-C3ipH_7H.js} +1 -1
  23. package/dist/http-Cz3MlXAZ.d.cts +244 -0
  24. package/dist/{http-BjroyS-9.cjs → http-DGYGS8C8.cjs} +1 -1
  25. package/dist/http-DkHdFfrc.d.ts +246 -0
  26. package/dist/{http-Dvox_xrq.js → http-DnP0rGKj.js} +2 -2
  27. package/dist/{inbox-CiTdVhJQ.js → inbox-CbNZlhe6.js} +1 -1
  28. package/dist/{key-C7JS89OH.js → key-DChkqRrm.js} +1 -1
  29. package/dist/kv-BL4nlICN.d.cts +110 -0
  30. package/dist/kv-DXEUEP6z.d.ts +113 -0
  31. package/dist/{kv-cache-BqFnozz0.cjs → kv-cache-Bd2z9in6.cjs} +1 -1
  32. package/dist/{kv-cache-6b2ldIo-.js → kv-cache-CFQBoGCe.js} +1 -1
  33. package/dist/{ld-C8i1kViF.js → ld-CR9Xg8mN.js} +2 -2
  34. package/dist/{middleware-DqJ1cmZE.cjs → middleware-B1XHFs0D.cjs} +8 -83
  35. package/dist/{middleware-B3GuN6Gj.js → middleware-B9frafBa.js} +8 -83
  36. package/dist/middleware-Bt5MUXQg.cjs +12 -0
  37. package/dist/{middleware-0fnsG0v7.js → middleware-ByIcAfxE.js} +11 -11
  38. package/dist/{middleware-CfL_Pd6a.js → middleware-DhlkbIaH.js} +4 -4
  39. package/dist/{middleware-B4Bgz0MJ.js → middleware-OPyIzlKI.js} +14 -89
  40. package/dist/mod-CwZXZJ9d.d.ts +91 -0
  41. package/dist/mod-DPkRU3EK.d.cts +266 -0
  42. package/dist/mod-DUWcVv49.d.ts +268 -0
  43. package/dist/mod-DVwHUI_x.d.cts +80 -0
  44. package/dist/mod-DXsQakeS.d.cts +89 -0
  45. package/dist/mod-Di3W5OdP.d.cts +62 -0
  46. package/dist/mod-DnSsduJF.d.ts +64 -0
  47. package/dist/mod-DosD6NsG.d.ts +82 -0
  48. package/dist/mod.cjs +4 -4
  49. package/dist/mod.d.cts +9 -9
  50. package/dist/mod.d.ts +9 -9
  51. package/dist/mod.js +4 -4
  52. package/dist/nodeinfo/handler.test.js +11 -11
  53. package/dist/nodeinfo/mod.d.cts +1 -1
  54. package/dist/nodeinfo/mod.d.ts +1 -1
  55. package/dist/otel/mod.d.cts +145 -145
  56. package/dist/otel/mod.d.ts +145 -145
  57. package/dist/owner-1AbPBOOZ.d.cts +66 -0
  58. package/dist/{owner-BOSWh-ha.js → owner-DfXg2o90.js} +1 -1
  59. package/dist/owner-gd0Q9FuU.d.ts +68 -0
  60. package/dist/{proof-BeT_MFIx.js → proof-BTvHpR2_.js} +2 -2
  61. package/dist/{proof-D61EYfPl.js → proof-CNhYMIct.js} +1 -1
  62. package/dist/{proof-C8qvlfLD.cjs → proof-DnzISmKI.cjs} +1 -1
  63. package/dist/{send-D7lC06r9.js → send-DaEkUvnr.js} +2 -2
  64. package/dist/sig/http.test.js +3 -3
  65. package/dist/sig/key.test.js +2 -2
  66. package/dist/sig/ld.test.js +3 -3
  67. package/dist/sig/mod.cjs +2 -2
  68. package/dist/sig/mod.d.cts +3 -3
  69. package/dist/sig/mod.d.ts +3 -3
  70. package/dist/sig/mod.js +2 -2
  71. package/dist/sig/owner.test.js +3 -3
  72. package/dist/sig/proof.test.js +3 -3
  73. package/dist/testing/mod.d.ts +4 -23
  74. package/dist/utils/docloader.test.js +4 -4
  75. package/dist/utils/mod.cjs +2 -2
  76. package/dist/utils/mod.d.cts +3 -3
  77. package/dist/utils/mod.d.ts +3 -3
  78. package/dist/utils/mod.js +2 -2
  79. package/package.json +5 -5
  80. package/dist/client-CwkOPN13.d.cts +0 -222
  81. package/dist/client-a7NwzhA2.d.ts +0 -224
  82. package/dist/context-BdNW_8a3.d.cts +0 -2554
  83. package/dist/context-C-GVKcJR.d.ts +0 -2556
  84. package/dist/http-CCEu-x1_.d.cts +0 -253
  85. package/dist/http-CODSJcKx.d.ts +0 -255
  86. package/dist/kv-g9jFc34-.d.cts +0 -110
  87. package/dist/kv-jg_8SMc1.d.ts +0 -113
  88. package/dist/middleware-DILzU8Ot.cjs +0 -12
  89. package/dist/mod-5PNty1K9.d.cts +0 -80
  90. package/dist/mod-BcpEGTWV.d.cts +0 -62
  91. package/dist/mod-COO7VMcm.d.cts +0 -266
  92. package/dist/mod-CevNbUol.d.ts +0 -91
  93. package/dist/mod-CtO31FCx.d.ts +0 -64
  94. package/dist/mod-Da9fNDyC.d.ts +0 -82
  95. package/dist/mod-ErTjUJs9.d.cts +0 -89
  96. package/dist/mod-q2IR8UiH.d.ts +0 -268
  97. package/dist/owner-9yZ5Ibsb.d.cts +0 -66
  98. package/dist/owner-DQYAbVmX.d.ts +0 -68
@@ -5,7 +5,7 @@
5
5
 
6
6
  //#region deno.json
7
7
  var name = "@fedify/fedify";
8
- var version = "2.0.1";
8
+ var version = "2.0.2-dev.415+8eb61d52";
9
9
  var license = "MIT";
10
10
  var exports = {
11
11
  ".": "./src/mod.ts",
@@ -3,8 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { validateCryptoKey } from "./key-C7JS89OH.js";
7
- import { doubleKnock } from "./http-Dvox_xrq.js";
6
+ import { validateCryptoKey } from "./key-DChkqRrm.js";
7
+ import { doubleKnock } from "./http-DnP0rGKj.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { curry } from "es-toolkit";
10
10
  import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
@@ -8,10 +8,10 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-QzKcOQgP.js";
11
- import "../deno-CIi8RNND.js";
11
+ import "../deno-D-Duks4b.js";
12
12
  import "../router-D9eI0s4b.js";
13
- import "../inbox-CiTdVhJQ.js";
14
- import { createFederationBuilder } from "../builder-CqPrSnE5.js";
13
+ import "../inbox-CbNZlhe6.js";
14
+ import { createFederationBuilder } from "../builder-B55ClH_D.js";
15
15
  import { assertExists } from "../std__assert-DWivtrGR.js";
16
16
  import "../assert_rejects-Ce45JcFg.js";
17
17
  import { assertThrows } from "../assert_throws-BNXdRGWP.js";
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-QzKcOQgP.js";
11
- import "../deno-CIi8RNND.js";
12
- import { createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-B4Bgz0MJ.js";
11
+ import "../deno-D-Duks4b.js";
12
+ import { createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-OPyIzlKI.js";
13
13
  import "../client-Dg7OfUDA.js";
14
14
  import "../router-D9eI0s4b.js";
15
15
  import "../types-CPz01LGH.js";
16
- import "../key-C7JS89OH.js";
17
- import { signRequest } from "../http-Dvox_xrq.js";
18
- import "../ld-C8i1kViF.js";
19
- import "../owner-BOSWh-ha.js";
20
- import "../proof-BeT_MFIx.js";
21
- import "../docloader-CmrEfaGw.js";
16
+ import "../key-DChkqRrm.js";
17
+ import { signRequest } from "../http-DnP0rGKj.js";
18
+ import "../ld-CR9Xg8mN.js";
19
+ import "../owner-DfXg2o90.js";
20
+ import "../proof-BTvHpR2_.js";
21
+ import "../docloader-Bb4MhBYJ.js";
22
22
  import "../kv-cache-B__dHl7g.js";
23
- import { InboxListenerSet } from "../inbox-CiTdVhJQ.js";
24
- import "../builder-CqPrSnE5.js";
23
+ import { InboxListenerSet } from "../inbox-CbNZlhe6.js";
24
+ import "../builder-B55ClH_D.js";
25
25
  import "../collection-CcnIw1qY.js";
26
26
  import "../keycache-DRxpZ5r9.js";
27
27
  import "../negotiation-5NPJL6zp.js";
28
28
  import "../retry-D4GJ670a.js";
29
- import "../send-D7lC06r9.js";
29
+ import "../send-DaEkUvnr.js";
30
30
  import "../std__assert-DWivtrGR.js";
31
31
  import "../assert_rejects-Ce45JcFg.js";
32
32
  import "../assert_throws-BNXdRGWP.js";
@@ -157,7 +157,7 @@ test("handleActor()", async () => {
157
157
  context,
158
158
  identifier: "someone",
159
159
  actorDispatcher,
160
- authorizePredicate: (_ctx, _handle, signedKey, signedKeyOwner) => signedKey != null && signedKeyOwner != null,
160
+ authorizePredicate: async (ctx, _handle) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null,
161
161
  onNotFound,
162
162
  onUnauthorized
163
163
  });
@@ -174,7 +174,7 @@ test("handleActor()", async () => {
174
174
  context,
175
175
  identifier: "someone",
176
176
  actorDispatcher,
177
- authorizePredicate: (_ctx, _handle, signedKey, signedKeyOwner) => signedKey != null && signedKeyOwner != null,
177
+ authorizePredicate: async (ctx, _handle) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null,
178
178
  onNotFound,
179
179
  onUnauthorized
180
180
  });
@@ -384,7 +384,7 @@ test("handleObject()", async () => {
384
384
  id: "123"
385
385
  },
386
386
  objectDispatcher,
387
- authorizePredicate: (_ctx, _values, signedKey, signedKeyOwner) => signedKey != null && signedKeyOwner != null,
387
+ authorizePredicate: async (ctx, _values) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null,
388
388
  onNotFound,
389
389
  onUnauthorized
390
390
  });
@@ -404,7 +404,7 @@ test("handleObject()", async () => {
404
404
  id: "123"
405
405
  },
406
406
  objectDispatcher,
407
- authorizePredicate: (_ctx, _values, signedKey, signedKeyOwner) => signedKey != null && signedKeyOwner != null,
407
+ authorizePredicate: async (ctx, _values) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null,
408
408
  onNotFound,
409
409
  onUnauthorized
410
410
  });
@@ -630,7 +630,7 @@ test("handleCollection()", async () => {
630
630
  },
631
631
  collectionCallbacks: {
632
632
  dispatcher,
633
- authorizePredicate: (_ctx, _handle, key, keyOwner) => key != null && keyOwner != null
633
+ authorizePredicate: async (ctx, _handle) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null
634
634
  },
635
635
  onNotFound,
636
636
  onUnauthorized
@@ -653,7 +653,7 @@ test("handleCollection()", async () => {
653
653
  },
654
654
  collectionCallbacks: {
655
655
  dispatcher,
656
- authorizePredicate: (_ctx, _handle, key, keyOwner) => key != null && keyOwner != null
656
+ authorizePredicate: async (ctx, _handle) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null
657
657
  },
658
658
  onNotFound,
659
659
  onUnauthorized
@@ -1356,7 +1356,7 @@ test("handleCustomCollection()", async () => {
1356
1356
  values: { identifier: "someone" },
1357
1357
  collectionCallbacks: {
1358
1358
  dispatcher,
1359
- authorizePredicate: (_ctx, _values, key, keyOwner) => key != null && keyOwner != null
1359
+ authorizePredicate: async (ctx, _values) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null
1360
1360
  },
1361
1361
  ...errorHandlers
1362
1362
  });
@@ -1375,7 +1375,7 @@ test("handleCustomCollection()", async () => {
1375
1375
  values: { identifier: "someone" },
1376
1376
  collectionCallbacks: {
1377
1377
  dispatcher,
1378
- authorizePredicate: (_ctx, _values, key, keyOwner) => key != null && keyOwner != null
1378
+ authorizePredicate: async (ctx, _values) => await ctx.getSignedKey() != null && await ctx.getSignedKeyOwner() != null
1379
1379
  },
1380
1380
  ...errorHandlers
1381
1381
  });
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-QzKcOQgP.js";
11
- import "../deno-CIi8RNND.js";
12
- import { createFederation } from "../middleware-B4Bgz0MJ.js";
11
+ import "../deno-D-Duks4b.js";
12
+ import { createFederation } from "../middleware-OPyIzlKI.js";
13
13
  import "../client-Dg7OfUDA.js";
14
14
  import "../router-D9eI0s4b.js";
15
15
  import "../types-CPz01LGH.js";
16
- import "../key-C7JS89OH.js";
17
- import "../http-Dvox_xrq.js";
18
- import "../ld-C8i1kViF.js";
19
- import "../owner-BOSWh-ha.js";
20
- import { signObject } from "../proof-BeT_MFIx.js";
21
- import "../docloader-CmrEfaGw.js";
16
+ import "../key-DChkqRrm.js";
17
+ import "../http-DnP0rGKj.js";
18
+ import "../ld-CR9Xg8mN.js";
19
+ import "../owner-DfXg2o90.js";
20
+ import { signObject } from "../proof-BTvHpR2_.js";
21
+ import "../docloader-Bb4MhBYJ.js";
22
22
  import "../kv-cache-B__dHl7g.js";
23
- import "../inbox-CiTdVhJQ.js";
24
- import "../builder-CqPrSnE5.js";
23
+ import "../inbox-CbNZlhe6.js";
24
+ import "../builder-B55ClH_D.js";
25
25
  import "../collection-CcnIw1qY.js";
26
26
  import "../keycache-DRxpZ5r9.js";
27
27
  import "../negotiation-5NPJL6zp.js";
28
28
  import "../retry-D4GJ670a.js";
29
- import "../send-D7lC06r9.js";
29
+ import "../send-DaEkUvnr.js";
30
30
  import "../std__assert-DWivtrGR.js";
31
31
  import "../assert_rejects-Ce45JcFg.js";
32
32
  import "../assert_throws-BNXdRGWP.js";
@@ -5,8 +5,8 @@
5
5
 
6
6
  import { test } from "../dist-B5f6a8Tt.js";
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
- import "../deno-CIi8RNND.js";
9
- import { InboxListenerSet } from "../inbox-CiTdVhJQ.js";
8
+ import "../deno-D-Duks4b.js";
9
+ import { InboxListenerSet } from "../inbox-CbNZlhe6.js";
10
10
  import { assertThrows } from "../assert_throws-BNXdRGWP.js";
11
11
  import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
12
12
 
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-QzKcOQgP.js";
11
- import "../deno-CIi8RNND.js";
12
- import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-B4Bgz0MJ.js";
11
+ import "../deno-D-Duks4b.js";
12
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-OPyIzlKI.js";
13
13
  import "../client-Dg7OfUDA.js";
14
14
  import { RouterError } from "../router-D9eI0s4b.js";
15
15
  import "../types-CPz01LGH.js";
16
- import "../key-C7JS89OH.js";
17
- import { signRequest, verifyRequest } from "../http-Dvox_xrq.js";
18
- import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-C8i1kViF.js";
19
- import { doesActorOwnKey } from "../owner-BOSWh-ha.js";
20
- import { signObject, verifyObject } from "../proof-BeT_MFIx.js";
21
- import { getAuthenticatedDocumentLoader } from "../docloader-CmrEfaGw.js";
16
+ import "../key-DChkqRrm.js";
17
+ import { signRequest, verifyRequest } from "../http-DnP0rGKj.js";
18
+ import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-CR9Xg8mN.js";
19
+ import { doesActorOwnKey } from "../owner-DfXg2o90.js";
20
+ import { signObject, verifyObject } from "../proof-BTvHpR2_.js";
21
+ import { getAuthenticatedDocumentLoader } from "../docloader-Bb4MhBYJ.js";
22
22
  import "../kv-cache-B__dHl7g.js";
23
- import "../inbox-CiTdVhJQ.js";
24
- import "../builder-CqPrSnE5.js";
23
+ import "../inbox-CbNZlhe6.js";
24
+ import "../builder-B55ClH_D.js";
25
25
  import "../collection-CcnIw1qY.js";
26
26
  import "../keycache-DRxpZ5r9.js";
27
27
  import "../negotiation-5NPJL6zp.js";
28
28
  import "../retry-D4GJ670a.js";
29
- import "../send-D7lC06r9.js";
29
+ import "../send-DaEkUvnr.js";
30
30
  import { assertStrictEquals } from "../std__assert-DWivtrGR.js";
31
31
  import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
32
32
  import { assertThrows } from "../assert_throws-BNXdRGWP.js";
@@ -3,12 +3,12 @@
3
3
  const { URLPattern } = require("urlpattern-polyfill");
4
4
 
5
5
  require('../transformers-3g8GZwkZ.cjs');
6
- require('../http-BjroyS-9.cjs');
7
- const require_middleware = require('../middleware-DqJ1cmZE.cjs');
8
- require('../proof-C8qvlfLD.cjs');
6
+ require('../http-DGYGS8C8.cjs');
7
+ const require_middleware = require('../middleware-B1XHFs0D.cjs');
8
+ require('../proof-DnzISmKI.cjs');
9
9
  const require_federation = require('../federation-Bp3HI26G.cjs');
10
10
  require('../types-Cd_hszr_.cjs');
11
- require('../kv-cache-BqFnozz0.cjs');
11
+ require('../kv-cache-Bd2z9in6.cjs');
12
12
 
13
13
  exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
14
14
  exports.MemoryKvStore = require_federation.MemoryKvStore;
@@ -1,7 +1,7 @@
1
- import "../client-CwkOPN13.cjs";
2
- import "../http-CCEu-x1_.cjs";
3
- import "../owner-9yZ5Ibsb.cjs";
4
- import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-BdNW_8a3.cjs";
5
- import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-g9jFc34-.cjs";
6
- import { WebFingerHandlerParameters, handleWebFinger } from "../mod-BcpEGTWV.cjs";
1
+ import "../client-C97KOq3x.cjs";
2
+ import "../http-Cz3MlXAZ.cjs";
3
+ import "../owner-1AbPBOOZ.cjs";
4
+ import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-D3QkEtZd.cjs";
5
+ import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-BL4nlICN.cjs";
6
+ import { WebFingerHandlerParameters, handleWebFinger } from "../mod-Di3W5OdP.cjs";
7
7
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,9 +1,9 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../client-a7NwzhA2.js";
4
- import "../http-CODSJcKx.js";
5
- import "../owner-DQYAbVmX.js";
6
- import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-C-GVKcJR.js";
7
- import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-jg_8SMc1.js";
8
- import { WebFingerHandlerParameters, handleWebFinger } from "../mod-CtO31FCx.js";
3
+ import "../client-BxMZiQaD.js";
4
+ import "../http-DkHdFfrc.js";
5
+ import "../owner-gd0Q9FuU.js";
6
+ import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-DZJhUmzF.js";
7
+ import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "../kv-DXEUEP6z.js";
8
+ import { WebFingerHandlerParameters, handleWebFinger } from "../mod-DnSsduJF.js";
9
9
  export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -3,11 +3,11 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
5
  import "../transformers-C3FLHUd6.js";
6
- import "../http-CCsNu78I.js";
7
- import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-B3GuN6Gj.js";
8
- import "../proof-D61EYfPl.js";
6
+ import "../http-C3ipH_7H.js";
7
+ import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-B9frafBa.js";
8
+ import "../proof-CNhYMIct.js";
9
9
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-DaMfqRm4.js";
10
10
  import "../types-C93Ob9cU.js";
11
- import "../kv-cache-6b2ldIo-.js";
11
+ import "../kv-cache-CFQBoGCe.js";
12
12
 
13
13
  export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -7,11 +7,11 @@ import { createTestTracerProvider, mockDocumentLoader, test } from "../dist-B5f6
7
7
  import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import { assert } from "../assert-MZs1qjMx.js";
9
9
  import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
- import "../deno-CIi8RNND.js";
11
- import "../key-C7JS89OH.js";
12
- import { verifyRequest } from "../http-Dvox_xrq.js";
13
- import { doesActorOwnKey } from "../owner-BOSWh-ha.js";
14
- import { SendActivityError, extractInboxes, sendActivity } from "../send-D7lC06r9.js";
10
+ import "../deno-D-Duks4b.js";
11
+ import "../key-DChkqRrm.js";
12
+ import { verifyRequest } from "../http-DnP0rGKj.js";
13
+ import { doesActorOwnKey } from "../owner-DfXg2o90.js";
14
+ import { SendActivityError, extractInboxes, sendActivity } from "../send-DaEkUvnr.js";
15
15
  import "../std__assert-DWivtrGR.js";
16
16
  import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
17
17
  import "../assert_throws-BNXdRGWP.js";
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
8
  import "../assert-MZs1qjMx.js";
9
9
  import "../assert_instance_of-DHz7EHNU.js";
10
10
  import { MemoryKvStore } from "../kv-QzKcOQgP.js";
11
- import "../deno-CIi8RNND.js";
12
- import { createFederation, handleWebFinger } from "../middleware-B4Bgz0MJ.js";
11
+ import "../deno-D-Duks4b.js";
12
+ import { createFederation, handleWebFinger } from "../middleware-OPyIzlKI.js";
13
13
  import "../client-Dg7OfUDA.js";
14
14
  import "../router-D9eI0s4b.js";
15
15
  import "../types-CPz01LGH.js";
16
- import "../key-C7JS89OH.js";
17
- import "../http-Dvox_xrq.js";
18
- import "../ld-C8i1kViF.js";
19
- import "../owner-BOSWh-ha.js";
20
- import "../proof-BeT_MFIx.js";
21
- import "../docloader-CmrEfaGw.js";
16
+ import "../key-DChkqRrm.js";
17
+ import "../http-DnP0rGKj.js";
18
+ import "../ld-CR9Xg8mN.js";
19
+ import "../owner-DfXg2o90.js";
20
+ import "../proof-BTvHpR2_.js";
21
+ import "../docloader-Bb4MhBYJ.js";
22
22
  import "../kv-cache-B__dHl7g.js";
23
- import "../inbox-CiTdVhJQ.js";
24
- import "../builder-CqPrSnE5.js";
23
+ import "../inbox-CbNZlhe6.js";
24
+ import "../builder-B55ClH_D.js";
25
25
  import "../collection-CcnIw1qY.js";
26
26
  import "../keycache-DRxpZ5r9.js";
27
27
  import "../negotiation-5NPJL6zp.js";
28
28
  import "../retry-D4GJ670a.js";
29
- import "../send-D7lC06r9.js";
29
+ import "../send-DaEkUvnr.js";
30
30
  import "../std__assert-DWivtrGR.js";
31
31
  import "../assert_rejects-Ce45JcFg.js";
32
32
  import "../assert_throws-BNXdRGWP.js";
@@ -13,7 +13,7 @@ import { getDocumentLoader } from "@fedify/vocab-runtime";
13
13
 
14
14
  //#region deno.json
15
15
  var name = "@fedify/fedify";
16
- var version = "2.0.1";
16
+ var version = "2.0.2-dev.415+8eb61d52";
17
17
  var license = "MIT";
18
18
  var exports = {
19
19
  ".": "./src/mod.ts",
@@ -0,0 +1,244 @@
1
+ import { CryptographicKey, Multikey } from "@fedify/vocab";
2
+ import { DocumentLoader } from "@fedify/vocab-runtime";
3
+ import { TracerProvider } from "@opentelemetry/api";
4
+
5
+ //#region src/sig/key.d.ts
6
+
7
+ /**
8
+ * Generates a key pair which is appropriate for Fedify.
9
+ * @param algorithm The algorithm to use. Currently only RSASSA-PKCS1-v1_5 and
10
+ * Ed25519 are supported.
11
+ * @returns The generated key pair.
12
+ * @throws {TypeError} If the algorithm is unsupported.
13
+ */
14
+ declare function generateCryptoKeyPair(algorithm?: "RSASSA-PKCS1-v1_5" | "Ed25519"): Promise<CryptoKeyPair>;
15
+ /**
16
+ * Exports a key in JWK format.
17
+ * @param key The key to export. Either public or private key.
18
+ * @returns The exported key in JWK format. The key is suitable for
19
+ * serialization and storage.
20
+ * @throws {TypeError} If the key is invalid or unsupported.
21
+ */
22
+ declare function exportJwk(key: CryptoKey): Promise<JsonWebKey>;
23
+ /**
24
+ * Imports a key from JWK format.
25
+ * @param jwk The key in JWK format.
26
+ * @param type Which type of key to import, either `"public"` or `"private"`.
27
+ * @returns The imported key.
28
+ * @throws {TypeError} If the key is invalid or unsupported.
29
+ */
30
+ declare function importJwk(jwk: JsonWebKey, type: "public" | "private"): Promise<CryptoKey>;
31
+ /**
32
+ * Options for {@link fetchKey}.
33
+ * @since 1.3.0
34
+ */
35
+ interface FetchKeyOptions {
36
+ /**
37
+ * The document loader for loading remote JSON-LD documents.
38
+ */
39
+ documentLoader?: DocumentLoader;
40
+ /**
41
+ * The context loader for loading remote JSON-LD contexts.
42
+ */
43
+ contextLoader?: DocumentLoader;
44
+ /**
45
+ * The key cache to use for caching public keys.
46
+ * @since 0.12.0
47
+ */
48
+ keyCache?: KeyCache;
49
+ /**
50
+ * The OpenTelemetry tracer provider to use for tracing. If omitted,
51
+ * the global tracer provider is used.
52
+ * @since 1.3.0
53
+ */
54
+ tracerProvider?: TracerProvider;
55
+ }
56
+ /**
57
+ * The result of {@link fetchKey}.
58
+ * @since 1.3.0
59
+ */
60
+ interface FetchKeyResult<T extends CryptographicKey | Multikey> {
61
+ /**
62
+ * The fetched (or cached) key.
63
+ */
64
+ readonly key: T & {
65
+ publicKey: CryptoKey;
66
+ } | null;
67
+ /**
68
+ * Whether the key is fetched from the cache.
69
+ */
70
+ readonly cached: boolean;
71
+ }
72
+ /**
73
+ * Fetches a {@link CryptographicKey} or {@link Multikey} from the given URL.
74
+ * If the given URL contains an {@link Actor} object, it tries to find
75
+ * the corresponding key in the `publicKey` or `assertionMethod` property.
76
+ * @template T The type of the key to fetch. Either {@link CryptographicKey}
77
+ * or {@link Multikey}.
78
+ * @param keyId The URL of the key.
79
+ * @param cls The class of the key to fetch. Either {@link CryptographicKey}
80
+ * or {@link Multikey}.
81
+ * @param options Options for fetching the key. See {@link FetchKeyOptions}.
82
+ * @returns The fetched key or `null` if the key is not found.
83
+ * @since 1.3.0
84
+ */
85
+ declare function fetchKey<T extends CryptographicKey | Multikey>(keyId: URL | string, cls: (new (...args: any[]) => T) & {
86
+ fromJsonLd(jsonLd: unknown, options: {
87
+ documentLoader?: DocumentLoader;
88
+ contextLoader?: DocumentLoader;
89
+ tracerProvider?: TracerProvider;
90
+ }): Promise<T>;
91
+ }, options?: FetchKeyOptions): Promise<FetchKeyResult<T>>;
92
+ /**
93
+ * A cache for storing cryptographic keys.
94
+ * @since 0.12.0
95
+ */
96
+ interface KeyCache {
97
+ /**
98
+ * Gets a key from the cache.
99
+ * @param keyId The key ID.
100
+ * @returns The key if found, `null` if the key is not available (e.g.,
101
+ * fetching the key was tried but failed), or `undefined`
102
+ * if the cache is not available.
103
+ */
104
+ get(keyId: URL): Promise<CryptographicKey | Multikey | null | undefined>;
105
+ /**
106
+ * Sets a key to the cache.
107
+ *
108
+ * Note that this caches unavailable keys (i.e., `null`) as well,
109
+ * and it is recommended to make unavailable keys expire after a short period.
110
+ * @param keyId The key ID.
111
+ * @param key The key to cache. `null` means the key is not available
112
+ * (e.g., fetching the key was tried but failed).
113
+ */
114
+ set(keyId: URL, key: CryptographicKey | Multikey | null): Promise<void>;
115
+ }
116
+ //#endregion
117
+ //#region src/sig/http.d.ts
118
+ /**
119
+ * The standard to use for signing and verifying HTTP signatures.
120
+ * @since 1.6.0
121
+ */
122
+ type HttpMessageSignaturesSpec = "draft-cavage-http-signatures-12" | "rfc9421";
123
+ /**
124
+ * Options for {@link signRequest}.
125
+ * @since 1.3.0
126
+ */
127
+ interface SignRequestOptions {
128
+ /**
129
+ * The HTTP message signatures specification to use for signing.
130
+ * @default `"draft-cavage-http-signatures-12"`
131
+ * @since 1.6.0
132
+ */
133
+ spec?: HttpMessageSignaturesSpec;
134
+ /**
135
+ * The current time. If not specified, the current time is used. This is
136
+ * useful for testing.
137
+ * @since 1.6.0
138
+ */
139
+ currentTime?: Temporal.Instant;
140
+ /**
141
+ * The request body as ArrayBuffer. If provided, avoids cloning the request body.
142
+ * @since 1.7.7
143
+ */
144
+ body?: ArrayBuffer | null;
145
+ /**
146
+ * The OpenTelemetry tracer provider. If omitted, the global tracer provider
147
+ * is used.
148
+ */
149
+ tracerProvider?: TracerProvider;
150
+ }
151
+ /**
152
+ * Signs a request using the given private key.
153
+ * @param request The request to sign.
154
+ * @param privateKey The private key to use for signing.
155
+ * @param keyId The key ID to use for the signature. It will be used by the
156
+ * verifier.
157
+ * @returns The signed request.
158
+ * @throws {TypeError} If the private key is invalid or unsupported.
159
+ */
160
+ declare function signRequest(request: Request, privateKey: CryptoKey, keyId: URL, options?: SignRequestOptions): Promise<Request>;
161
+ /**
162
+ * Options for {@link verifyRequest}.
163
+ */
164
+ interface VerifyRequestOptions {
165
+ /**
166
+ * The document loader to use for fetching the public key.
167
+ */
168
+ documentLoader?: DocumentLoader;
169
+ /**
170
+ * The context loader to use for JSON-LD context retrieval.
171
+ */
172
+ contextLoader?: DocumentLoader;
173
+ /**
174
+ * The time window to allow for the request date. The actual time window is
175
+ * twice the value of this option, with the current time as the center.
176
+ * Or if it is `false`, no time check is performed.
177
+ *
178
+ * An hour by default.
179
+ */
180
+ timeWindow?: Temporal.Duration | Temporal.DurationLike | false;
181
+ /**
182
+ * The current time. If not specified, the current time is used. This is
183
+ * useful for testing.
184
+ */
185
+ currentTime?: Temporal.Instant;
186
+ /**
187
+ * The key cache to use for caching public keys.
188
+ * @since 0.12.0
189
+ */
190
+ keyCache?: KeyCache;
191
+ /**
192
+ * The HTTP message signatures specification to use for verifying.
193
+ * @default `"draft-cavage-http-signatures-12"`
194
+ * @since 1.6.0
195
+ */
196
+ spec?: HttpMessageSignaturesSpec;
197
+ /**
198
+ * The OpenTelemetry tracer provider. If omitted, the global tracer provider
199
+ * is used.
200
+ * @since 1.3.0
201
+ */
202
+ tracerProvider?: TracerProvider;
203
+ }
204
+ /**
205
+ * Verifies the signature of a request.
206
+ *
207
+ * Note that this function consumes the request body, so it should not be used
208
+ * if the request body is already consumed. Consuming the request body after
209
+ * calling this function is okay, since this function clones the request
210
+ * under the hood.
211
+ *
212
+ * @param request The request to verify.
213
+ * @param options Options for verifying the request.
214
+ * @returns The public key of the verified signature, or `null` if the signature
215
+ * could not be verified.
216
+ */
217
+ declare function verifyRequest(request: Request, options?: VerifyRequestOptions): Promise<CryptographicKey | null>;
218
+ /**
219
+ * A spec determiner for HTTP Message Signatures.
220
+ * It determines the spec to use for signing requests.
221
+ * It is used for double-knocking
222
+ * (see <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>).
223
+ * @since 1.6.0
224
+ */
225
+ interface HttpMessageSignaturesSpecDeterminer {
226
+ /**
227
+ * Determines the spec to use for signing requests.
228
+ * @param origin The origin of the URL to make the request to.
229
+ * @returns The spec to use for signing requests.
230
+ */
231
+ determineSpec(origin: string): HttpMessageSignaturesSpec | Promise<HttpMessageSignaturesSpec>;
232
+ /**
233
+ * Remembers the successfully used spec for the given origin.
234
+ * @param origin The origin of the URL that was requested.
235
+ * @param spec The spec to remember.
236
+ */
237
+ rememberSpec(origin: string, spec: HttpMessageSignaturesSpec): void | Promise<void>;
238
+ }
239
+ /**
240
+ * The options for double-knock requests.
241
+ * @since 1.6.0
242
+ */
243
+ //#endregion
244
+ export { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest };
@@ -14,7 +14,7 @@ const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runt
14
14
 
15
15
  //#region deno.json
16
16
  var name = "@fedify/fedify";
17
- var version = "2.0.1";
17
+ var version = "2.0.2-dev.415+8eb61d52";
18
18
  var license = "MIT";
19
19
  var exports$1 = {
20
20
  ".": "./src/mod.ts",