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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{builder-Cv8baeaM.mjs → builder-DifMW7os.mjs} +3 -3
  2. package/dist/callback-CJd-aCRE.d.mts +2223 -0
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{context-C00pWP8x.d.ts → context-CgpkmUFq.d.ts} +23 -12
  7. package/dist/{context-ao-qb3eP.d.cts → context-DGC1C_UU.d.cts} +23 -12
  8. package/dist/{deno-Bk4jrob6.mjs → deno-CZYDJcbZ.mjs} +1 -1
  9. package/dist/{docloader-w8xGNWvP.mjs → docloader-DXZDJeg3.mjs} +2 -2
  10. package/dist/federation/builder.test.mjs +1 -1
  11. package/dist/federation/handler.test.mjs +6 -6
  12. package/dist/federation/idempotency.test.mjs +2 -2
  13. package/dist/federation/inbox.test.mjs +1 -1
  14. package/dist/federation/middleware.test.mjs +105 -7
  15. package/dist/federation/mod.cjs +1 -1
  16. package/dist/federation/mod.d.cts +2 -2
  17. package/dist/federation/mod.d.ts +2 -2
  18. package/dist/federation/mod.js +1 -1
  19. package/dist/federation/send.test.mjs +3 -3
  20. package/dist/federation/temporal.test.mjs +1 -1
  21. package/dist/federation/webfinger.test.mjs +1 -1
  22. package/dist/{http-C1v_vvt4.js → http-6beU7KiN.js} +6 -4
  23. package/dist/{http-Cd8UD1ym.d.ts → http-B57wVmZ3.d.cts} +3 -3
  24. package/dist/{http-CDK9iAjb.mjs → http-BEyjd3P7.mjs} +6 -4
  25. package/dist/{http-B9ZWGTaN.cjs → http-CU9dab8F.cjs} +6 -4
  26. package/dist/{http-DFqAb11b.d.cts → http-CURWmZlP.d.ts} +3 -3
  27. package/dist/{inbox-DAm48Q_C.mjs → inbox-DO4a9FKE.mjs} +1 -1
  28. package/dist/{key-C8OKWl8g.mjs → key-DjCiTRyO.mjs} +3 -2
  29. package/dist/{kv-cache-BFFwfQPZ.cjs → kv-cache-DFybNxHG.cjs} +1 -1
  30. package/dist/{kv-cache-B1Y7_B63.js → kv-cache-DPBGlPnW.js} +1 -1
  31. package/dist/{ld-gUJKeHbH.mjs → ld-B5pG0yhd.mjs} +20 -7
  32. package/dist/{middleware-3t8hmtzt.cjs → middleware-Bdvdue5B.cjs} +1 -1
  33. package/dist/{middleware-D-DIq_jJ.js → middleware-BqQbaTiu.js} +15 -7
  34. package/dist/{middleware-_yMwRAE9.cjs → middleware-ClxSuYs7.cjs} +16 -8
  35. package/dist/{middleware-DLxdIffl.mjs → middleware-DnnYzTPv.mjs} +23 -14
  36. package/dist/{middleware-LgcMsPlF.mjs → middleware-Dsw0i5sQ.mjs} +1 -1
  37. package/dist/{mod-DtRh015i.d.ts → mod-BqnolIm8.d.ts} +1 -1
  38. package/dist/{mod-6uJWdCc0.d.cts → mod-BzKteaAe.d.cts} +1 -1
  39. package/dist/{mod-DGP89q0u.d.ts → mod-CIjZ1RmH.d.ts} +3 -3
  40. package/dist/{mod-BPDfu4Ey.d.cts → mod-DaQ6pIH3.d.cts} +3 -3
  41. package/dist/{mod-CL9Ep0uo.d.ts → mod-DmmcsbU8.d.cts} +12 -7
  42. package/dist/{mod-BA6vqC2S.d.cts → mod-fnE_D0lV.d.ts} +12 -7
  43. package/dist/mod.cjs +4 -4
  44. package/dist/mod.d.cts +7 -7
  45. package/dist/mod.d.ts +7 -7
  46. package/dist/mod.js +4 -4
  47. package/dist/nodeinfo/handler.test.mjs +1 -1
  48. package/dist/{owner-BenEndHH.mjs → owner-Dmlm2oR_.mjs} +2 -2
  49. package/dist/{proof-DF1RSNYg.cjs → proof-BGPhmUJL.cjs} +20 -7
  50. package/dist/{proof-BvtZYI3N.js → proof-iPBfQoMT.js} +20 -7
  51. package/dist/{proof-Bo9pmjQJ.mjs → proof-v76wU5Lv.mjs} +4 -3
  52. package/dist/{send-PTFa5PEa.mjs → send-C830qz95.mjs} +2 -2
  53. package/dist/sig/http.test.mjs +2 -2
  54. package/dist/sig/key-types.test.d.mts +218 -0
  55. package/dist/sig/key-types.test.mjs +8 -0
  56. package/dist/sig/key.test.mjs +2 -2
  57. package/dist/sig/ld.test.mjs +156 -4
  58. package/dist/sig/mod.cjs +2 -2
  59. package/dist/sig/mod.d.cts +3 -3
  60. package/dist/sig/mod.d.ts +3 -3
  61. package/dist/sig/mod.js +2 -2
  62. package/dist/sig/owner.test.mjs +1 -1
  63. package/dist/sig/proof.test.mjs +2 -2
  64. package/dist/{temporal-CNbx4A18.mjs → temporal-Bm5DL5mq.mjs} +1 -1
  65. package/dist/testing/mod.d.mts +2 -2123
  66. package/dist/utils/docloader.test.mjs +2 -2
  67. package/dist/utils/mod.cjs +1 -1
  68. package/dist/utils/mod.d.cts +1 -1
  69. package/dist/utils/mod.d.ts +1 -1
  70. package/dist/utils/mod.js +1 -1
  71. package/package.json +5 -5
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { l as KeyCache } from "./http-DFqAb11b.cjs";
2
+ import { l as KeyCache } from "./http-CURWmZlP.js";
3
3
  import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
4
- import { DocumentLoader } from "@fedify/vocab-runtime";
5
4
  import { TracerProvider } from "@opentelemetry/api";
5
+ import { CryptoKeyLike, CryptoKeyLike as CryptoKeyLike$1, CryptoKeyPairLike as CryptoKeyPairLike$1, DocumentLoader } from "@fedify/vocab-runtime";
6
6
 
7
7
  //#region src/sig/ld.d.ts
8
8
  /**
@@ -71,7 +71,7 @@ interface CreateSignatureOptions {
71
71
  * @throws {TypeError} If the private key is invalid or unsupported.
72
72
  * @since 1.0.0
73
73
  */
74
- declare function createSignature(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, {
74
+ declare function createSignature(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, {
75
75
  contextLoader,
76
76
  created
77
77
  }?: CreateSignatureOptions): Promise<Signature>;
@@ -100,7 +100,7 @@ interface SignJsonLdOptions extends CreateSignatureOptions {
100
100
  * @throws {TypeError} If the private key is invalid or unsupported.
101
101
  * @since 1.0.0
102
102
  */
103
- declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, options: SignJsonLdOptions): Promise<{
103
+ declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, options: SignJsonLdOptions): Promise<{
104
104
  signature: Signature;
105
105
  }>;
106
106
  /**
@@ -137,6 +137,9 @@ interface VerifySignatureOptions {
137
137
  }
138
138
  /**
139
139
  * Verifies Linked Data Signatures of the given JSON-LD document.
140
+ * Unmapped properties discarded during JSON-LD processing are tolerated, but
141
+ * their values are not authenticated by the signature. Other unsafe
142
+ * canonicalization warnings, including relative IRIs, remain rejected.
140
143
  * @param jsonLd The JSON-LD document to verify.
141
144
  * @param options Options for verifying the signature.
142
145
  * @returns The public key that signed the document or `null` if the signature
@@ -153,6 +156,8 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
153
156
  * Signatures. If the document is signed, this function verifies the signature
154
157
  * and checks if the document is attributed to the owner of the public key.
155
158
  * If the document is not signed, this function returns `false`.
159
+ * Unmapped properties discarded during JSON-LD processing are not
160
+ * authenticated, even when verification succeeds.
156
161
  * @param jsonLd The JSON-LD document to verify.
157
162
  * @param options Options for verifying the document.
158
163
  * @returns `true` if the document is authentic; `false` otherwise.
@@ -189,7 +194,7 @@ interface CreateProofOptions {
189
194
  * @throws {TypeError} If the private key is invalid or unsupported.
190
195
  * @since 0.10.0
191
196
  */
192
- declare function createProof(object: Object$1, privateKey: CryptoKey, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
197
+ declare function createProof(object: Object$1, privateKey: CryptoKeyLike, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
193
198
  /**
194
199
  * Options for {@link signObject}.
195
200
  * @since 0.10.0
@@ -216,7 +221,7 @@ interface SignObjectOptions extends CreateProofOptions {
216
221
  * @throws {TypeError} If the private key is invalid or unsupported.
217
222
  * @since 0.10.0
218
223
  */
219
- declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKey, keyId: URL, options?: SignObjectOptions): Promise<T>;
224
+ declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKeyLike, keyId: URL, options?: SignObjectOptions): Promise<T>;
220
225
  /**
221
226
  * Options for {@link verifyProof}.
222
227
  * @since 0.10.0
@@ -276,4 +281,4 @@ declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) =>
276
281
  fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
277
282
  }, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
278
283
  //#endregion
279
- export { verifyJsonLd as _, createProof as a, verifyProof as c, VerifyJsonLdOptions as d, VerifySignatureOptions as f, signJsonLd as g, detachSignature as h, VerifyProofOptions as i, CreateSignatureOptions as l, createSignature as m, SignObjectOptions as n, signObject as o, attachSignature as p, VerifyObjectOptions as r, verifyObject as s, CreateProofOptions as t, SignJsonLdOptions as u, verifySignature as v };
284
+ export { detachSignature as _, VerifyObjectOptions as a, verifySignature as b, signObject as c, CreateSignatureOptions as d, SignJsonLdOptions as f, createSignature as g, attachSignature as h, SignObjectOptions as i, verifyObject as l, VerifySignatureOptions as m, CryptoKeyPairLike$1 as n, VerifyProofOptions as o, VerifyJsonLdOptions as p, CreateProofOptions as r, createProof as s, CryptoKeyLike$1 as t, verifyProof as u, signJsonLd as v, verifyJsonLd as y };
package/dist/mod.cjs CHANGED
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  require("./chunk-DDcVe30Y.cjs");
5
5
  const require_transformers = require("./transformers-NeAONrAq.cjs");
6
6
  require("./compat/mod.cjs");
7
- const require_http = require("./http-B9ZWGTaN.cjs");
8
- const require_middleware = require("./middleware-_yMwRAE9.cjs");
7
+ const require_http = require("./http-CU9dab8F.cjs");
8
+ const require_middleware = require("./middleware-ClxSuYs7.cjs");
9
9
  const require_types = require("./types-DOvyymM4.cjs");
10
- const require_proof = require("./proof-DF1RSNYg.cjs");
11
- const require_kv_cache = require("./kv-cache-BFFwfQPZ.cjs");
10
+ const require_proof = require("./proof-BGPhmUJL.cjs");
11
+ const require_kv_cache = require("./kv-cache-DFybNxHG.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -1,18 +1,18 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-BIBzqEIp.cjs";
3
- import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-DFqAb11b.cjs";
3
+ import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-B57wVmZ3.cjs";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-ao-qb3eP.cjs";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-DGC1C_UU.cjs";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CZKl1IUS.cjs";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-6uJWdCc0.cjs";
9
- import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-BA6vqC2S.cjs";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-BPDfu4Ey.cjs";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-BzKteaAe.cjs";
9
+ import { _ as detachSignature, a as VerifyObjectOptions, b as verifySignature, c as signObject, d as CreateSignatureOptions, f as SignJsonLdOptions, g as createSignature, h as attachSignature, i as SignObjectOptions, l as verifyObject, m as VerifySignatureOptions, n as CryptoKeyPairLike, o as VerifyProofOptions, p as VerifyJsonLdOptions, r as CreateProofOptions, s as createProof, t as CryptoKeyLike, u as verifyProof, v as signJsonLd, y as verifyJsonLd } from "./mod-DmmcsbU8.cjs";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DaQ6pIH3.cjs";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
14
14
  declare namespace mod_d_exports {
15
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
15
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
16
16
  }
17
17
  //#endregion
18
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
18
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
package/dist/mod.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-jE7oGvRh.js";
3
- import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-Cd8UD1ym.js";
3
+ import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-CURWmZlP.js";
4
4
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CiBPcC6F.js";
5
- import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-C00pWP8x.js";
5
+ import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-CgpkmUFq.js";
6
6
  import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CxaI4eGo.js";
7
7
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
8
- import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-DtRh015i.js";
9
- import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-CL9Ep0uo.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DGP89q0u.js";
8
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-BqnolIm8.js";
9
+ import { _ as detachSignature, a as VerifyObjectOptions, b as verifySignature, c as signObject, d as CreateSignatureOptions, f as SignJsonLdOptions, g as createSignature, h as attachSignature, i as SignObjectOptions, l as verifyObject, m as VerifySignatureOptions, n as CryptoKeyPairLike, o as VerifyProofOptions, p as VerifyJsonLdOptions, r as CreateProofOptions, s as createProof, t as CryptoKeyLike, u as verifyProof, v as signJsonLd, y as verifyJsonLd } from "./mod-fnE_D0lV.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CIjZ1RmH.js";
11
11
  export * from "@fedify/vocab-runtime";
12
12
 
13
13
  //#region src/mod.d.ts
14
14
  declare namespace mod_d_exports {
15
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
15
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
16
16
  }
17
17
  //#endregion
18
- export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
18
+ export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
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-C1v_vvt4.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-D-DIq_jJ.js";
6
+ import { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-6beU7KiN.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-BqQbaTiu.js";
8
8
  import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-B1_pRFE_.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-BvtZYI3N.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B1Y7_B63.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-iPBfQoMT.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-DPBGlPnW.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-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-DLxdIffl.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-DnnYzTPv.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-Bk4jrob6.mjs";
5
- import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-C8OKWl8g.mjs";
4
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
5
+ import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-DjCiTRyO.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,12 +1,13 @@
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-B9ZWGTaN.cjs");
4
+ const require_http = require("./http-CU9dab8F.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");
8
8
  let byte_encodings_hex = require("byte-encodings/hex");
9
9
  let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
10
+ let _fedify_vocab_runtime_internal = require("@fedify/vocab-runtime/internal");
10
11
  let byte_encodings_base64 = require("byte-encodings/base64");
11
12
  let _fedify_vocab_runtime_jsonld = require("@fedify/vocab-runtime/jsonld");
12
13
  _fedify_vocab_runtime_jsonld = require_chunk.__toESM(_fedify_vocab_runtime_jsonld);
@@ -425,7 +426,7 @@ async function createSignature(jsonLd, privateKey, keyId, { contextLoader, creat
425
426
  ...options
426
427
  }, contextLoader) + await hashJsonLd(prepareSignatureDocument(jsonLd), contextLoader);
427
428
  const messageBytes = new TextEncoder().encode(message);
428
- const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, messageBytes);
429
+ const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", (0, _fedify_vocab_runtime_internal.asCryptoKey)(privateKey), messageBytes);
429
430
  return {
430
431
  "@context": "https://w3id.org/security/v1",
431
432
  ...options,
@@ -496,6 +497,9 @@ function detachSignature(jsonLd) {
496
497
  }
497
498
  /**
498
499
  * Verifies Linked Data Signatures of the given JSON-LD document.
500
+ * Unmapped properties discarded during JSON-LD processing are tolerated, but
501
+ * their values are not authenticated by the signature. Other unsafe
502
+ * canonicalization warnings, including relative IRIs, remain rejected.
499
503
  * @param jsonLd The JSON-LD document to verify.
500
504
  * @param options Options for verifying the signature.
501
505
  * @returns The public key that signed the document or `null` if the signature
@@ -526,7 +530,7 @@ async function verifySignature(jsonLd, options = {}) {
526
530
  delete sigOpts.signatureValue;
527
531
  let sigOptsHash;
528
532
  try {
529
- sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader);
533
+ sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader, "verify");
530
534
  } catch (error) {
531
535
  logger$2.warn("Failed to verify; failed to hash the signature options: {signatureOptions}\n{error}", {
532
536
  signatureOptions: sigOpts,
@@ -538,7 +542,7 @@ async function verifySignature(jsonLd, options = {}) {
538
542
  delete document.signature;
539
543
  let docHash;
540
544
  try {
541
- docHash = await hashJsonLd(document, options.contextLoader);
545
+ docHash = await hashJsonLd(document, options.contextLoader, "verify");
542
546
  } catch (error) {
543
547
  logger$2.warn("Failed to verify; failed to hash the document: {document}\n{error}", {
544
548
  document,
@@ -577,6 +581,8 @@ async function verifySignature(jsonLd, options = {}) {
577
581
  * Signatures. If the document is signed, this function verifies the signature
578
582
  * and checks if the document is attributed to the owner of the public key.
579
583
  * If the document is not signed, this function returns `false`.
584
+ * Unmapped properties discarded during JSON-LD processing are not
585
+ * authenticated, even when verification succeeds.
580
586
  * @param jsonLd The JSON-LD document to verify.
581
587
  * @param options Options for verifying the document.
582
588
  * @returns `true` if the document is authentic; `false` otherwise.
@@ -629,10 +635,17 @@ async function verifyJsonLdInternal(jsonLd, options, compact) {
629
635
  }
630
636
  });
631
637
  }
632
- async function hashJsonLd(jsonLd, contextLoader) {
638
+ const tolerableVerificationWarnings = new Set(["blank node predicate", "invalid property"]);
639
+ function handleVerificationEvent({ event, next }) {
640
+ if (event.level === "warning" && !tolerableVerificationWarnings.has(event.code)) throw new TypeError(`Unsafe JSON-LD canonicalization warning: ${event.code}`);
641
+ next();
642
+ }
643
+ async function hashJsonLd(jsonLd, contextLoader, mode = "sign") {
633
644
  const canon = await _fedify_vocab_runtime_jsonld.default.canonize(jsonLd, {
634
645
  format: "application/n-quads",
635
- documentLoader: contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)()
646
+ documentLoader: contextLoader ?? (0, _fedify_vocab_runtime.getDocumentLoader)(),
647
+ safe: mode === "sign",
648
+ eventHandler: mode === "verify" ? handleVerificationEvent : void 0
636
649
  });
637
650
  const encoder = new TextEncoder();
638
651
  return (0, byte_encodings_hex.encodeHex)(await crypto.subtle.digest("SHA-256", encoder.encode(canon)));
@@ -848,7 +861,7 @@ async function createProofInternal(object, privateKey, keyId, { contextLoader, c
848
861
  const digest = new Uint8Array(proofDigest.byteLength + msgDigest.byteLength);
849
862
  digest.set(new Uint8Array(proofDigest), 0);
850
863
  digest.set(new Uint8Array(msgDigest), proofDigest.byteLength);
851
- const sig = await crypto.subtle.sign("Ed25519", privateKey, digest);
864
+ const sig = await crypto.subtle.sign("Ed25519", (0, _fedify_vocab_runtime_internal.asCryptoKey)(privateKey), digest);
852
865
  return {
853
866
  proof: new _fedify_vocab.DataIntegrityProof({
854
867
  cryptosuite: "eddsa-jcs-2022",
@@ -1,11 +1,12 @@
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-C1v_vvt4.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-6beU7KiN.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";
7
7
  import { encodeHex } from "byte-encodings/hex";
8
8
  import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
9
+ import { asCryptoKey } from "@fedify/vocab-runtime/internal";
9
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
10
11
  import jsonld from "@fedify/vocab-runtime/jsonld";
11
12
  import serialize from "json-canon";
@@ -422,7 +423,7 @@ async function createSignature(jsonLd, privateKey, keyId, { contextLoader, creat
422
423
  ...options
423
424
  }, contextLoader) + await hashJsonLd(prepareSignatureDocument(jsonLd), contextLoader);
424
425
  const messageBytes = new TextEncoder().encode(message);
425
- const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, messageBytes);
426
+ const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", asCryptoKey(privateKey), messageBytes);
426
427
  return {
427
428
  "@context": "https://w3id.org/security/v1",
428
429
  ...options,
@@ -493,6 +494,9 @@ function detachSignature(jsonLd) {
493
494
  }
494
495
  /**
495
496
  * Verifies Linked Data Signatures of the given JSON-LD document.
497
+ * Unmapped properties discarded during JSON-LD processing are tolerated, but
498
+ * their values are not authenticated by the signature. Other unsafe
499
+ * canonicalization warnings, including relative IRIs, remain rejected.
496
500
  * @param jsonLd The JSON-LD document to verify.
497
501
  * @param options Options for verifying the signature.
498
502
  * @returns The public key that signed the document or `null` if the signature
@@ -523,7 +527,7 @@ async function verifySignature(jsonLd, options = {}) {
523
527
  delete sigOpts.signatureValue;
524
528
  let sigOptsHash;
525
529
  try {
526
- sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader);
530
+ sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader, "verify");
527
531
  } catch (error) {
528
532
  logger$2.warn("Failed to verify; failed to hash the signature options: {signatureOptions}\n{error}", {
529
533
  signatureOptions: sigOpts,
@@ -535,7 +539,7 @@ async function verifySignature(jsonLd, options = {}) {
535
539
  delete document.signature;
536
540
  let docHash;
537
541
  try {
538
- docHash = await hashJsonLd(document, options.contextLoader);
542
+ docHash = await hashJsonLd(document, options.contextLoader, "verify");
539
543
  } catch (error) {
540
544
  logger$2.warn("Failed to verify; failed to hash the document: {document}\n{error}", {
541
545
  document,
@@ -574,6 +578,8 @@ async function verifySignature(jsonLd, options = {}) {
574
578
  * Signatures. If the document is signed, this function verifies the signature
575
579
  * and checks if the document is attributed to the owner of the public key.
576
580
  * If the document is not signed, this function returns `false`.
581
+ * Unmapped properties discarded during JSON-LD processing are not
582
+ * authenticated, even when verification succeeds.
577
583
  * @param jsonLd The JSON-LD document to verify.
578
584
  * @param options Options for verifying the document.
579
585
  * @returns `true` if the document is authentic; `false` otherwise.
@@ -626,10 +632,17 @@ async function verifyJsonLdInternal(jsonLd, options, compact) {
626
632
  }
627
633
  });
628
634
  }
629
- async function hashJsonLd(jsonLd, contextLoader) {
635
+ const tolerableVerificationWarnings = new Set(["blank node predicate", "invalid property"]);
636
+ function handleVerificationEvent({ event, next }) {
637
+ if (event.level === "warning" && !tolerableVerificationWarnings.has(event.code)) throw new TypeError(`Unsafe JSON-LD canonicalization warning: ${event.code}`);
638
+ next();
639
+ }
640
+ async function hashJsonLd(jsonLd, contextLoader, mode = "sign") {
630
641
  const canon = await jsonld.canonize(jsonLd, {
631
642
  format: "application/n-quads",
632
- documentLoader: contextLoader ?? getDocumentLoader()
643
+ documentLoader: contextLoader ?? getDocumentLoader(),
644
+ safe: mode === "sign",
645
+ eventHandler: mode === "verify" ? handleVerificationEvent : void 0
633
646
  });
634
647
  const encoder = new TextEncoder();
635
648
  return encodeHex(await crypto.subtle.digest("SHA-256", encoder.encode(canon)));
@@ -845,7 +858,7 @@ async function createProofInternal(object, privateKey, keyId, { contextLoader, c
845
858
  const digest = new Uint8Array(proofDigest.byteLength + msgDigest.byteLength);
846
859
  digest.set(new Uint8Array(proofDigest), 0);
847
860
  digest.set(new Uint8Array(msgDigest), proofDigest.byteLength);
848
- const sig = await crypto.subtle.sign("Ed25519", privateKey, digest);
861
+ const sig = await crypto.subtle.sign("Ed25519", asCryptoKey(privateKey), digest);
849
862
  return {
850
863
  proof: new DataIntegrityProof({
851
864
  cryptosuite: "eddsa-jcs-2022",
@@ -1,10 +1,11 @@
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-Bk4jrob6.mjs";
5
- import { o as validateCryptoKey, r as fetchKey } from "./key-C8OKWl8g.mjs";
4
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
5
+ import { o as validateCryptoKey, r as fetchKey } from "./key-DjCiTRyO.mjs";
6
6
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
+ import { asCryptoKey } from "@fedify/vocab-runtime/internal";
8
9
  import { getLogger } from "@logtape/logtape";
9
10
  import { encodeHex } from "byte-encodings/hex";
10
11
  import serialize from "json-canon";
@@ -53,7 +54,7 @@ async function createProofInternal(object, privateKey, keyId, { contextLoader, c
53
54
  const digest = new Uint8Array(proofDigest.byteLength + msgDigest.byteLength);
54
55
  digest.set(new Uint8Array(proofDigest), 0);
55
56
  digest.set(new Uint8Array(msgDigest), proofDigest.byteLength);
56
- const sig = await crypto.subtle.sign("Ed25519", privateKey, digest);
57
+ const sig = await crypto.subtle.sign("Ed25519", asCryptoKey(privateKey), digest);
57
58
  return {
58
59
  proof: new DataIntegrityProof({
59
60
  cryptosuite: "eddsa-jcs-2022",
@@ -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-Bk4jrob6.mjs";
5
- import { r as doubleKnockScoped } from "./http-CDK9iAjb.mjs";
4
+ import { n as version, t as name } from "./deno-CZYDJcbZ.mjs";
5
+ import { r as doubleKnockScoped } from "./http-BEyjd3P7.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { FetchError, UrlError } from "@fedify/vocab-runtime";
8
8
  import { openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
@@ -7,8 +7,8 @@ import { i as assertExists, t as assertStringIncludes } from "../std__assert-Dfl
7
7
  import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
8
8
  import { t as assert } from "../assert-BhQd8QHP.mjs";
9
9
  import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
10
- import { t as exportJwk } from "../key-C8OKWl8g.mjs";
11
- import { a as formatRfc9421SignatureParameters, c as signRequest, i as formatRfc9421Signature, l as timingSafeEqual, n as doubleKnock, o as parseRfc9421Signature, r as doubleKnockScoped, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as verifyRequest } from "../http-CDK9iAjb.mjs";
10
+ import { t as exportJwk } from "../key-DjCiTRyO.mjs";
11
+ import { a as formatRfc9421SignatureParameters, c as signRequest, i as formatRfc9421Signature, l as timingSafeEqual, n as doubleKnock, o as parseRfc9421Signature, r as doubleKnockScoped, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as verifyRequest } from "../http-BEyjd3P7.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";