@fedify/fedify 2.5.0-dev.2358 → 2.5.0-dev.2370
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.
- package/dist/{builder-BMEhdUoW.mjs → builder-DzGfERAV.mjs} +2 -2
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-oZzdjUys.mjs → compound-proof-hnZ7MNwN.mjs} +47 -19
- package/dist/{context-tsYPJ2Ew.d.cts → context-BjD_CTxh.d.cts} +1 -1
- package/dist/{context-7NyiqIcg.d.ts → context-C2-UDo2c.d.ts} +1 -1
- package/dist/{deno-BFtFen0c.mjs → deno-CkkDV5gw.mjs} +1 -1
- package/dist/{docloader-HB4vtU8p.mjs → docloader-D6eQ0vA8.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox-report.test.mjs +5 -5
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable-actor.test.mjs +3 -3
- package/dist/federation/portable-chain.test.mjs +3 -3
- package/dist/federation/portable-collection.test.mjs +4 -4
- package/dist/federation/portable-delivery.test.mjs +2 -2
- package/dist/federation/portable-gateway-keys.test.mjs +4 -4
- package/dist/federation/portable-inbox.test.mjs +4 -4
- package/dist/federation/portable-parse-uri.test.mjs +1 -1
- package/dist/federation/portable-route-activity.test.mjs +2 -2
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-BlSlahiZ.cjs → federation-BkIRrGXG.cjs} +48 -20
- package/dist/{http-CCnvW5x-.js → http-C2gfnrKF.js} +42 -8
- package/dist/{http-ClQ-uy-g.cjs → http-CjpGhvxc.cjs} +53 -7
- package/dist/{http-DeJUDufC.mjs → http-DxljNiCC.mjs} +4 -4
- package/dist/{key-Cf3Vy-8d.mjs → key-8sZWp4lR.mjs} +2 -2
- package/dist/{key-DYxuyd-s.d.cts → key-DhsBxxZN.d.ts} +6 -2
- package/dist/{key-C1nv7_jD.d.ts → key-nYGY4QB9.d.cts} +6 -2
- package/dist/{kv-cache-FrA7ESXq.cjs → kv-cache-BVtotkZw.cjs} +1 -1
- package/dist/{kv-cache-CPwTxfty.mjs → kv-cache-DDwF4zee.mjs} +1 -1
- package/dist/{kv-cache-DD1Rm6av.js → kv-cache-nsVJF31j.js} +1 -1
- package/dist/{ld-BGnEUgfY.mjs → ld-DXaIENwZ.mjs} +3 -3
- package/dist/{metrics-jnlUnpdI.mjs → metrics-DiQRjv6y.mjs} +1 -1
- package/dist/{middleware-BPa7IFZl.mjs → middleware-BBnHLNpJ.mjs} +1 -1
- package/dist/{middleware-BpWwcG33.js → middleware-C_EdDn9c.js} +48 -20
- package/dist/{middleware-B2a3uSU7.mjs → middleware-ClqRVObS.mjs} +14 -14
- package/dist/{mod-Dw-nPxQh.d.cts → mod-B5-wdzmJ.d.cts} +1 -1
- package/dist/{mod-BojP2Bw3.d.cts → mod-BBPd4M_0.d.cts} +1 -1
- package/dist/{mod-CtpF2BU5.d.ts → mod-BRpER-B0.d.ts} +1 -1
- package/dist/{mod-Xj5P4s4d.d.ts → mod-CUYBGKof.d.ts} +1 -1
- package/dist/{mod-DEZXwV6J.d.ts → mod-DkhfZC1u.d.ts} +1 -1
- package/dist/{mod-CavhAgLw.d.cts → mod-xAfaLS4T.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +5 -5
- package/dist/mod.d.ts +5 -5
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-DwHkNHKv.mjs → owner-IiJfae6n.mjs} +3 -3
- package/dist/{portable-collection-D4vHh15d.cjs → portable-collection-BeS_vx1G.cjs} +1 -1
- package/dist/{portable-collection-BsRW7mno.js → portable-collection-BtyE_2Rv.js} +1 -1
- package/dist/{portable-collection-BBJFDDvt.mjs → portable-collection-CUDbGQ5_.mjs} +2 -2
- package/dist/{portable-key-ebokIyiv.mjs → portable-key-ENr3Sc97.mjs} +1 -1
- package/dist/{proof-BaRrofPH.mjs → proof-CGtiU4Lz.mjs} +45 -11
- package/dist/{send-BBnaZoZi.mjs → send-CRYlnzg6.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +168 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mitra-receive-interop.test.mjs +4 -4
- package/dist/sig/mitra-send-interop.test.mjs +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +2 -2
- package/dist/sig/mod.d.ts +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +1 -1
- package/dist/sig/portable-interop.test.mjs +3 -3
- package/dist/sig/portable-key.test.mjs +6 -6
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/sig/tootik-request-interop.test.mjs +4 -4
- package/dist/sig/tootik-send-interop.test.mjs +3 -3
- package/dist/sig/verification.test.mjs +3 -3
- package/dist/{temporal-JVrtO1CV.mjs → temporal-CDbdX_g_.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +5 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -7
|
@@ -4,28 +4,28 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { d as isPortableUri, f as isSameObjectId, i as getPortableDid, l as isPortableId, n as getCanonicalPortableId, o as hasPortableActor, r as getGatewayKeyBase, s as isCompatibleKeyId, t as getAuthenticationOrigin, u as isPortableKeyId } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
5
|
import { n as isPubliclyAddressedNode, t as isInAudience } from "./audience-CHQ-FlLD.mjs";
|
|
6
6
|
import { a as verificationObservation, r as snapshotKey, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
|
|
7
|
-
import { n as version, t as name } from "./deno-
|
|
8
|
-
import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-
|
|
7
|
+
import { n as version, t as name } from "./deno-CkkDV5gw.mjs";
|
|
8
|
+
import { a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, n as getDurationMs, o as isAbortError, r as getFederationMetrics, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "./metrics-DiQRjv6y.mjs";
|
|
9
9
|
import { t as formatAcceptSignature } from "./accept-CPVqki78.mjs";
|
|
10
|
-
import { c as validateCryptoKey, n as exportJwk, s as importJwk } from "./key-
|
|
10
|
+
import { c as validateCryptoKey, n as exportJwk, s as importJwk } from "./key-8sZWp4lR.mjs";
|
|
11
11
|
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
|
|
12
|
-
import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-
|
|
13
|
-
import {
|
|
14
|
-
import { a as listRequestSignatures, c as selectRequestSignature, d as validateMaxSignatures, f as verifyRequest, p as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-
|
|
15
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
16
|
-
import { n as kvCache } from "./kv-cache-
|
|
12
|
+
import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-DXaIENwZ.mjs";
|
|
13
|
+
import { c as verifyObject, d as verifyPortableObjectProofWithRoot, i as hasProofLike, l as verifyPortableObjectProof, o as signObject, t as InvalidPortableObjectIdError } from "./proof-CGtiU4Lz.mjs";
|
|
14
|
+
import { a as listRequestSignatures, c as selectRequestSignature, d as validateMaxSignatures, f as verifyRequest, p as verifyRequestDetailed, s as parseRfc9421SignatureInput } from "./http-DxljNiCC.mjs";
|
|
15
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-D6eQ0vA8.mjs";
|
|
16
|
+
import { n as kvCache } from "./kv-cache-DDwF4zee.mjs";
|
|
17
17
|
import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-CEnNz8O7.mjs";
|
|
18
18
|
import { t as nodeInfoToJson } from "./types-DE_LV1JB.mjs";
|
|
19
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
20
|
-
import { t as verifyPortableObject } from "./portable-collection-
|
|
21
|
-
import { a as getOrderingDestination, i as sendActivityThroughGateways, n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-
|
|
22
|
-
import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-
|
|
19
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-IiJfae6n.mjs";
|
|
20
|
+
import { t as verifyPortableObject } from "./portable-collection-CUDbGQ5_.mjs";
|
|
21
|
+
import { a as getOrderingDestination, i as sendActivityThroughGateways, n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-CRYlnzg6.mjs";
|
|
22
|
+
import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-DzGfERAV.mjs";
|
|
23
23
|
import { t as CircuitBreaker } from "./circuit-breaker-XJ53md4S.mjs";
|
|
24
24
|
import { t as buildCollectionSynchronizationHeader } from "./collection-CnnP1UAv.mjs";
|
|
25
|
-
import { a as inspectCompoundPortableObjectApplicability, c as verifyServedPortableObjects, i as findUnsupportedCompoundProofShape, o as verifyCompoundPortableObjectProofs, r as findEmbeddedProofWithoutContext, t as containsCompoundPortableObject } from "./compound-proof-
|
|
25
|
+
import { a as inspectCompoundPortableObjectApplicability, c as verifyServedPortableObjects, i as findUnsupportedCompoundProofShape, o as verifyCompoundPortableObjectProofs, r as findEmbeddedProofWithoutContext, t as containsCompoundPortableObject } from "./compound-proof-hnZ7MNwN.mjs";
|
|
26
26
|
import { t as KvKeyCache } from "./keycache-D-MNltOk.mjs";
|
|
27
27
|
import { t as acceptsJsonLd } from "./negotiation-CCocWT_N.mjs";
|
|
28
|
-
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-
|
|
28
|
+
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CDbdX_g_.mjs";
|
|
29
29
|
import { t as createExponentialBackoffPolicy } from "./retry-zX5xw5e0.mjs";
|
|
30
30
|
import { t as TaskCodec } from "./codec-C6rTrpIp.mjs";
|
|
31
31
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { b as HttpMessageSignaturesSpecDeterminer } from "./key-
|
|
2
|
+
import { b as HttpMessageSignaturesSpecDeterminer } from "./key-nYGY4QB9.cjs";
|
|
3
3
|
import { n as KvStore, t as KvKey } from "./kv-B2mzK5tl.cjs";
|
|
4
4
|
import { t as DocumentFetchKind } from "./metrics-DVKYY6K1.cjs";
|
|
5
5
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Jt as WebFingerLinksDispatcher, St as ActorHandleMapper, bt as ActorAliasMapper, p as RequestContext, xt as ActorDispatcher } from "./context-
|
|
2
|
+
import { Jt as WebFingerLinksDispatcher, St as ActorHandleMapper, bt as ActorAliasMapper, p as RequestContext, xt as ActorDispatcher } from "./context-BjD_CTxh.cjs";
|
|
3
3
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { B as VerifyPortableObjectProofOptions, a as KeyCache, v as VerificationObservationOptions, z as VerifyPortableObjectProofFailureReason } from "./key-
|
|
2
|
+
import { B as VerifyPortableObjectProofOptions, a as KeyCache, v as VerificationObservationOptions, z as VerifyPortableObjectProofFailureReason } from "./key-DhsBxxZN.js";
|
|
3
3
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { DocumentLoader, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Jt as WebFingerLinksDispatcher, St as ActorHandleMapper, bt as ActorAliasMapper, p as RequestContext, xt as ActorDispatcher } from "./context-
|
|
2
|
+
import { Jt as WebFingerLinksDispatcher, St as ActorHandleMapper, bt as ActorAliasMapper, p as RequestContext, xt as ActorDispatcher } from "./context-C2-UDo2c.js";
|
|
3
3
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
4
4
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { b as HttpMessageSignaturesSpecDeterminer } from "./key-
|
|
2
|
+
import { b as HttpMessageSignaturesSpecDeterminer } from "./key-DhsBxxZN.js";
|
|
3
3
|
import { n as KvStore, t as KvKey } from "./kv-B2mzK5tl.js";
|
|
4
4
|
import { t as DocumentFetchKind } from "./metrics-DoRtI0qU.js";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { B as VerifyPortableObjectProofOptions, a as KeyCache, v as VerificationObservationOptions, z as VerifyPortableObjectProofFailureReason } from "./key-
|
|
2
|
+
import { B as VerifyPortableObjectProofOptions, a as KeyCache, v as VerificationObservationOptions, z as VerifyPortableObjectProofFailureReason } from "./key-nYGY4QB9.cjs";
|
|
3
3
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
4
4
|
import { DocumentLoader, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
package/dist/mod.cjs
CHANGED
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-BalCrSsr.cjs");
|
|
5
5
|
require("./compat/mod.cjs");
|
|
6
|
-
const require_http = require("./http-
|
|
7
|
-
const require_federation = require("./federation-
|
|
6
|
+
const require_http = require("./http-CjpGhvxc.cjs");
|
|
7
|
+
const require_federation = require("./federation-BkIRrGXG.cjs");
|
|
8
8
|
const require_types = require("./types-poIao40f.cjs");
|
|
9
|
-
const require_portable_collection = require("./portable-collection-
|
|
10
|
-
const require_kv_cache = require("./kv-cache-
|
|
9
|
+
const require_portable_collection = require("./portable-collection-BeS_vx1G.cjs");
|
|
10
|
+
const require_kv_cache = require("./kv-cache-BVtotkZw.cjs");
|
|
11
11
|
require("./nodeinfo/mod.cjs");
|
|
12
12
|
require("./runtime/mod.cjs");
|
|
13
13
|
require("./sig/mod.cjs");
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-D-XP_Ccb.cjs";
|
|
3
|
-
import { A as AcceptSignatureParameters, B as VerifyPortableObjectProofOptions, C as VerifyRequestDetailedResult, D as verifyRequest, E as signRequest, F as validateAcceptSignature, G as signObject, H as VerifyProofOptions, I as CreateProofOptions, J as verifyProof, K as verifyObject, L as SignObjectOptions, M as formatAcceptSignature, N as fulfillAcceptSignature, O as verifyRequestDetailed, P as parseAcceptSignature, R as VerifyObjectOptions, S as SignRequestOptions, T as VerifyRequestOptions, U as createProof, V as VerifyPortableObjectProofResult, W as hasProofLike, _ as InboxVerificationKey, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, m as InboxSignatureIdentity, n as FetchKeyErrorResult, o as exportJwk, p as InboxSignatureFailureReason, q as verifyPortableObjectProof, r as FetchKeyOptions, s as fetchKey, t as FetchKeyDetailedResult, u as importJwk, w as VerifyRequestFailureReason, x as Rfc9421SignRequestOptions, y as HttpMessageSignaturesSpec, z as VerifyPortableObjectProofFailureReason } from "./key-
|
|
3
|
+
import { A as AcceptSignatureParameters, B as VerifyPortableObjectProofOptions, C as VerifyRequestDetailedResult, D as verifyRequest, E as signRequest, F as validateAcceptSignature, G as signObject, H as VerifyProofOptions, I as CreateProofOptions, J as verifyProof, K as verifyObject, L as SignObjectOptions, M as formatAcceptSignature, N as fulfillAcceptSignature, O as verifyRequestDetailed, P as parseAcceptSignature, R as VerifyObjectOptions, S as SignRequestOptions, T as VerifyRequestOptions, U as createProof, V as VerifyPortableObjectProofResult, W as hasProofLike, _ as InboxVerificationKey, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, m as InboxSignatureIdentity, n as FetchKeyErrorResult, o as exportJwk, p as InboxSignatureFailureReason, q as verifyPortableObjectProof, r as FetchKeyOptions, s as fetchKey, t as FetchKeyDetailedResult, u as importJwk, w as VerifyRequestFailureReason, x as Rfc9421SignRequestOptions, y as HttpMessageSignaturesSpec, z as VerifyPortableObjectProofFailureReason } from "./key-nYGY4QB9.cjs";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BF0L9cMt.cjs";
|
|
5
|
-
import { $ as respondWithObject, $t as digest, A as InboxChallengePolicy, At as CustomCollectionDispatcher, B as createFederation, Bt as OutboxListener, C as FederationBenchmarkOptions, Ct as ActorKeyPairsDispatcher, D as FederationStartQueueOptions, Dt as CollectionDispatcher, E as FederationOptions, Et as CollectionCursor, F as PortableInboxForwardingOptions, Ft as MediaUploaderCallback, G as TaskEnqueueOptions, Gt as SharedInboxKeyDispatcher, H as createFederationBuilder, Ht as OutboxPermanentFailureHandler, I as Rfc6570Expression, It as NodeInfoDispatcher, J as CreateExponentialBackoffPolicyOptions, Jt as WebFingerLinksDispatcher, K as TaskHandler, Kt as UnverifiedActivityHandler, L as FederationKvPrefixes, Lt as ObjectAuthorizePredicate, M as MediaUploaderSetters, Mt as HashlinkMediaRequest, N as ObjectCallbackSetters, Nt as InboxErrorHandler, O as IdempotencyKeyCallback, Ot as CustomCollectionCounter, P as OutboxListenerSetters, Pt as InboxListener, Q as RespondWithObjectOptions, Qt as buildCollectionSynchronizationHeader, R as FederationOrigin, Rt as ObjectDispatcher, S as Federation, St as ActorHandleMapper, T as FederationFetchOptions, Tt as CollectionCounter, U as TaskDefinition, Ut as PortableActorIdMapper, V as Message, Vt as OutboxListenerErrorHandler, W as TaskDefinitionOptions, Wt as PortableCollectionOwnerMapper, X as RetryPolicy, Xt as SenderKeyPair, Y as RetryContext, Yt as SendActivityError, Z as createExponentialBackoffPolicy, Zt as PageItems, _ as ActorCallbackSetters, _t as NormalizedCircuitBreakerOptions, a as GetObjectOptions, an as InboxRequestReport, at as MessageQueueEnqueueOptions, b as CustomCollectionCallbackSetters, bt as ActorAliasMapper, c as IsSignedByAudienceOptions, ct as CircuitBreaker, d as ParseUriResult, dt as CircuitBreakerCreateOptions, en as ActivityTransformer, et as respondWithObjectIfAcceptable, f as PortableRequest, ft as CircuitBreakerFailurePolicy, g as SendActivityOptionsForCollection, gt as CircuitBreakerStateChange, h as SendActivityOptions, ht as CircuitBreakerState, i as GetActorOptions, in as InboxRequestOutcome, it as MessageQueueDepth, j as InboxListenerSetters, jt as HashlinkMediaDispatcher, k as IdempotencyStrategy, kt as CustomCollectionCursor, l as OutboxContext, lt as CircuitBreakerActivityDrop, m as RouteActivityOptions, mt as CircuitBreakerOptions, n as Context, nn as InboxJsonValue, nt as InProcessMessageQueueOptions, o as GetSignedKeyOptions, ot as MessageQueueListenOptions, p as RequestContext, pt as CircuitBreakerKvState, q as TaskRegistry, qt as UnverifiedActivityReason, r as ForwardActivityOptions, rn as InboxRequestFinishedHandler, rt as MessageQueue, s as InboxContext, st as ParallelMessageQueue, t as ActorKeyPair, tn as InboxAuthentication, tt as InProcessMessageQueue, u as ParseUriOptions, ut as CircuitBreakerBeforeSendDecision, v as CollectionCallbackSetters, vt as normalizeCircuitBreakerOptions, w as FederationBuilder, wt as AuthorizePredicate, x as Federatable, xt as ActorDispatcher, y as ConstructorWithTypeId, yt as parseCircuitBreakerKvState, z as FederationQueueOptions, zt as OutboxErrorHandler } from "./context-
|
|
5
|
+
import { $ as respondWithObject, $t as digest, A as InboxChallengePolicy, At as CustomCollectionDispatcher, B as createFederation, Bt as OutboxListener, C as FederationBenchmarkOptions, Ct as ActorKeyPairsDispatcher, D as FederationStartQueueOptions, Dt as CollectionDispatcher, E as FederationOptions, Et as CollectionCursor, F as PortableInboxForwardingOptions, Ft as MediaUploaderCallback, G as TaskEnqueueOptions, Gt as SharedInboxKeyDispatcher, H as createFederationBuilder, Ht as OutboxPermanentFailureHandler, I as Rfc6570Expression, It as NodeInfoDispatcher, J as CreateExponentialBackoffPolicyOptions, Jt as WebFingerLinksDispatcher, K as TaskHandler, Kt as UnverifiedActivityHandler, L as FederationKvPrefixes, Lt as ObjectAuthorizePredicate, M as MediaUploaderSetters, Mt as HashlinkMediaRequest, N as ObjectCallbackSetters, Nt as InboxErrorHandler, O as IdempotencyKeyCallback, Ot as CustomCollectionCounter, P as OutboxListenerSetters, Pt as InboxListener, Q as RespondWithObjectOptions, Qt as buildCollectionSynchronizationHeader, R as FederationOrigin, Rt as ObjectDispatcher, S as Federation, St as ActorHandleMapper, T as FederationFetchOptions, Tt as CollectionCounter, U as TaskDefinition, Ut as PortableActorIdMapper, V as Message, Vt as OutboxListenerErrorHandler, W as TaskDefinitionOptions, Wt as PortableCollectionOwnerMapper, X as RetryPolicy, Xt as SenderKeyPair, Y as RetryContext, Yt as SendActivityError, Z as createExponentialBackoffPolicy, Zt as PageItems, _ as ActorCallbackSetters, _t as NormalizedCircuitBreakerOptions, a as GetObjectOptions, an as InboxRequestReport, at as MessageQueueEnqueueOptions, b as CustomCollectionCallbackSetters, bt as ActorAliasMapper, c as IsSignedByAudienceOptions, ct as CircuitBreaker, d as ParseUriResult, dt as CircuitBreakerCreateOptions, en as ActivityTransformer, et as respondWithObjectIfAcceptable, f as PortableRequest, ft as CircuitBreakerFailurePolicy, g as SendActivityOptionsForCollection, gt as CircuitBreakerStateChange, h as SendActivityOptions, ht as CircuitBreakerState, i as GetActorOptions, in as InboxRequestOutcome, it as MessageQueueDepth, j as InboxListenerSetters, jt as HashlinkMediaDispatcher, k as IdempotencyStrategy, kt as CustomCollectionCursor, l as OutboxContext, lt as CircuitBreakerActivityDrop, m as RouteActivityOptions, mt as CircuitBreakerOptions, n as Context, nn as InboxJsonValue, nt as InProcessMessageQueueOptions, o as GetSignedKeyOptions, ot as MessageQueueListenOptions, p as RequestContext, pt as CircuitBreakerKvState, q as TaskRegistry, qt as UnverifiedActivityReason, r as ForwardActivityOptions, rn as InboxRequestFinishedHandler, rt as MessageQueue, s as InboxContext, st as ParallelMessageQueue, t as ActorKeyPair, tn as InboxAuthentication, tt as InProcessMessageQueue, u as ParseUriOptions, ut as CircuitBreakerBeforeSendDecision, v as CollectionCallbackSetters, vt as normalizeCircuitBreakerOptions, w as FederationBuilder, wt as AuthorizePredicate, x as Federatable, xt as ActorDispatcher, y as ConstructorWithTypeId, yt as parseCircuitBreakerKvState, z as FederationQueueOptions, zt as OutboxErrorHandler } from "./context-BjD_CTxh.cjs";
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-B2mzK5tl.cjs";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
8
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-
|
|
9
|
-
import { a as CreateSignatureOptions, c as VerifySignatureOptions, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyPortableObject, l as attachSignature, m as verifyJsonLd, n as VerifyPortableObjectOptions, o as SignJsonLdOptions, p as signJsonLd, r as VerifyPortableObjectResult, s as VerifyJsonLdOptions, t as VerifyPortableObjectFailureReason, u as createSignature } from "./mod-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-
|
|
8
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-BBPd4M_0.cjs";
|
|
9
|
+
import { a as CreateSignatureOptions, c as VerifySignatureOptions, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyPortableObject, l as attachSignature, m as verifyJsonLd, n as VerifyPortableObjectOptions, o as SignJsonLdOptions, p as signJsonLd, r as VerifyPortableObjectResult, s as VerifyJsonLdOptions, t as VerifyPortableObjectFailureReason, u as createSignature } from "./mod-xAfaLS4T.cjs";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-B5-wdzmJ.cjs";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-D-XP_Ccb.js";
|
|
3
|
-
import { A as AcceptSignatureParameters, B as VerifyPortableObjectProofOptions, C as VerifyRequestDetailedResult, D as verifyRequest, E as signRequest, F as validateAcceptSignature, G as signObject, H as VerifyProofOptions, I as CreateProofOptions, J as verifyProof, K as verifyObject, L as SignObjectOptions, M as formatAcceptSignature, N as fulfillAcceptSignature, O as verifyRequestDetailed, P as parseAcceptSignature, R as VerifyObjectOptions, S as SignRequestOptions, T as VerifyRequestOptions, U as createProof, V as VerifyPortableObjectProofResult, W as hasProofLike, _ as InboxVerificationKey, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, m as InboxSignatureIdentity, n as FetchKeyErrorResult, o as exportJwk, p as InboxSignatureFailureReason, q as verifyPortableObjectProof, r as FetchKeyOptions, s as fetchKey, t as FetchKeyDetailedResult, u as importJwk, w as VerifyRequestFailureReason, x as Rfc9421SignRequestOptions, y as HttpMessageSignaturesSpec, z as VerifyPortableObjectProofFailureReason } from "./key-
|
|
3
|
+
import { A as AcceptSignatureParameters, B as VerifyPortableObjectProofOptions, C as VerifyRequestDetailedResult, D as verifyRequest, E as signRequest, F as validateAcceptSignature, G as signObject, H as VerifyProofOptions, I as CreateProofOptions, J as verifyProof, K as verifyObject, L as SignObjectOptions, M as formatAcceptSignature, N as fulfillAcceptSignature, O as verifyRequestDetailed, P as parseAcceptSignature, R as VerifyObjectOptions, S as SignRequestOptions, T as VerifyRequestOptions, U as createProof, V as VerifyPortableObjectProofResult, W as hasProofLike, _ as InboxVerificationKey, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, d as InboxProofPolicyFailureReason, f as InboxSignatureCheck, g as InboxVerificationFailureReason, h as InboxVerificationAttempt, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, m as InboxSignatureIdentity, n as FetchKeyErrorResult, o as exportJwk, p as InboxSignatureFailureReason, q as verifyPortableObjectProof, r as FetchKeyOptions, s as fetchKey, t as FetchKeyDetailedResult, u as importJwk, w as VerifyRequestFailureReason, x as Rfc9421SignRequestOptions, y as HttpMessageSignaturesSpec, z as VerifyPortableObjectProofFailureReason } from "./key-DhsBxxZN.js";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-BSzr5-I8.js";
|
|
5
|
-
import { $ as respondWithObject, $t as digest, A as InboxChallengePolicy, At as CustomCollectionDispatcher, B as createFederation, Bt as OutboxListener, C as FederationBenchmarkOptions, Ct as ActorKeyPairsDispatcher, D as FederationStartQueueOptions, Dt as CollectionDispatcher, E as FederationOptions, Et as CollectionCursor, F as PortableInboxForwardingOptions, Ft as MediaUploaderCallback, G as TaskEnqueueOptions, Gt as SharedInboxKeyDispatcher, H as createFederationBuilder, Ht as OutboxPermanentFailureHandler, I as Rfc6570Expression, It as NodeInfoDispatcher, J as CreateExponentialBackoffPolicyOptions, Jt as WebFingerLinksDispatcher, K as TaskHandler, Kt as UnverifiedActivityHandler, L as FederationKvPrefixes, Lt as ObjectAuthorizePredicate, M as MediaUploaderSetters, Mt as HashlinkMediaRequest, N as ObjectCallbackSetters, Nt as InboxErrorHandler, O as IdempotencyKeyCallback, Ot as CustomCollectionCounter, P as OutboxListenerSetters, Pt as InboxListener, Q as RespondWithObjectOptions, Qt as buildCollectionSynchronizationHeader, R as FederationOrigin, Rt as ObjectDispatcher, S as Federation, St as ActorHandleMapper, T as FederationFetchOptions, Tt as CollectionCounter, U as TaskDefinition, Ut as PortableActorIdMapper, V as Message, Vt as OutboxListenerErrorHandler, W as TaskDefinitionOptions, Wt as PortableCollectionOwnerMapper, X as RetryPolicy, Xt as SenderKeyPair, Y as RetryContext, Yt as SendActivityError, Z as createExponentialBackoffPolicy, Zt as PageItems, _ as ActorCallbackSetters, _t as NormalizedCircuitBreakerOptions, a as GetObjectOptions, an as InboxRequestReport, at as MessageQueueEnqueueOptions, b as CustomCollectionCallbackSetters, bt as ActorAliasMapper, c as IsSignedByAudienceOptions, ct as CircuitBreaker, d as ParseUriResult, dt as CircuitBreakerCreateOptions, en as ActivityTransformer, et as respondWithObjectIfAcceptable, f as PortableRequest, ft as CircuitBreakerFailurePolicy, g as SendActivityOptionsForCollection, gt as CircuitBreakerStateChange, h as SendActivityOptions, ht as CircuitBreakerState, i as GetActorOptions, in as InboxRequestOutcome, it as MessageQueueDepth, j as InboxListenerSetters, jt as HashlinkMediaDispatcher, k as IdempotencyStrategy, kt as CustomCollectionCursor, l as OutboxContext, lt as CircuitBreakerActivityDrop, m as RouteActivityOptions, mt as CircuitBreakerOptions, n as Context, nn as InboxJsonValue, nt as InProcessMessageQueueOptions, o as GetSignedKeyOptions, ot as MessageQueueListenOptions, p as RequestContext, pt as CircuitBreakerKvState, q as TaskRegistry, qt as UnverifiedActivityReason, r as ForwardActivityOptions, rn as InboxRequestFinishedHandler, rt as MessageQueue, s as InboxContext, st as ParallelMessageQueue, t as ActorKeyPair, tn as InboxAuthentication, tt as InProcessMessageQueue, u as ParseUriOptions, ut as CircuitBreakerBeforeSendDecision, v as CollectionCallbackSetters, vt as normalizeCircuitBreakerOptions, w as FederationBuilder, wt as AuthorizePredicate, x as Federatable, xt as ActorDispatcher, y as ConstructorWithTypeId, yt as parseCircuitBreakerKvState, z as FederationQueueOptions, zt as OutboxErrorHandler } from "./context-
|
|
5
|
+
import { $ as respondWithObject, $t as digest, A as InboxChallengePolicy, At as CustomCollectionDispatcher, B as createFederation, Bt as OutboxListener, C as FederationBenchmarkOptions, Ct as ActorKeyPairsDispatcher, D as FederationStartQueueOptions, Dt as CollectionDispatcher, E as FederationOptions, Et as CollectionCursor, F as PortableInboxForwardingOptions, Ft as MediaUploaderCallback, G as TaskEnqueueOptions, Gt as SharedInboxKeyDispatcher, H as createFederationBuilder, Ht as OutboxPermanentFailureHandler, I as Rfc6570Expression, It as NodeInfoDispatcher, J as CreateExponentialBackoffPolicyOptions, Jt as WebFingerLinksDispatcher, K as TaskHandler, Kt as UnverifiedActivityHandler, L as FederationKvPrefixes, Lt as ObjectAuthorizePredicate, M as MediaUploaderSetters, Mt as HashlinkMediaRequest, N as ObjectCallbackSetters, Nt as InboxErrorHandler, O as IdempotencyKeyCallback, Ot as CustomCollectionCounter, P as OutboxListenerSetters, Pt as InboxListener, Q as RespondWithObjectOptions, Qt as buildCollectionSynchronizationHeader, R as FederationOrigin, Rt as ObjectDispatcher, S as Federation, St as ActorHandleMapper, T as FederationFetchOptions, Tt as CollectionCounter, U as TaskDefinition, Ut as PortableActorIdMapper, V as Message, Vt as OutboxListenerErrorHandler, W as TaskDefinitionOptions, Wt as PortableCollectionOwnerMapper, X as RetryPolicy, Xt as SenderKeyPair, Y as RetryContext, Yt as SendActivityError, Z as createExponentialBackoffPolicy, Zt as PageItems, _ as ActorCallbackSetters, _t as NormalizedCircuitBreakerOptions, a as GetObjectOptions, an as InboxRequestReport, at as MessageQueueEnqueueOptions, b as CustomCollectionCallbackSetters, bt as ActorAliasMapper, c as IsSignedByAudienceOptions, ct as CircuitBreaker, d as ParseUriResult, dt as CircuitBreakerCreateOptions, en as ActivityTransformer, et as respondWithObjectIfAcceptable, f as PortableRequest, ft as CircuitBreakerFailurePolicy, g as SendActivityOptionsForCollection, gt as CircuitBreakerStateChange, h as SendActivityOptions, ht as CircuitBreakerState, i as GetActorOptions, in as InboxRequestOutcome, it as MessageQueueDepth, j as InboxListenerSetters, jt as HashlinkMediaDispatcher, k as IdempotencyStrategy, kt as CustomCollectionCursor, l as OutboxContext, lt as CircuitBreakerActivityDrop, m as RouteActivityOptions, mt as CircuitBreakerOptions, n as Context, nn as InboxJsonValue, nt as InProcessMessageQueueOptions, o as GetSignedKeyOptions, ot as MessageQueueListenOptions, p as RequestContext, pt as CircuitBreakerKvState, q as TaskRegistry, qt as UnverifiedActivityReason, r as ForwardActivityOptions, rn as InboxRequestFinishedHandler, rt as MessageQueue, s as InboxContext, st as ParallelMessageQueue, t as ActorKeyPair, tn as InboxAuthentication, tt as InProcessMessageQueue, u as ParseUriOptions, ut as CircuitBreakerBeforeSendDecision, v as CollectionCallbackSetters, vt as normalizeCircuitBreakerOptions, w as FederationBuilder, wt as AuthorizePredicate, x as Federatable, xt as ActorDispatcher, y as ConstructorWithTypeId, yt as parseCircuitBreakerKvState, z as FederationQueueOptions, zt as OutboxErrorHandler } from "./context-C2-UDo2c.js";
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-B2mzK5tl.js";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
8
|
-
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-
|
|
9
|
-
import { a as CreateSignatureOptions, c as VerifySignatureOptions, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyPortableObject, l as attachSignature, m as verifyJsonLd, n as VerifyPortableObjectOptions, o as SignJsonLdOptions, p as signJsonLd, r as VerifyPortableObjectResult, s as VerifyJsonLdOptions, t as VerifyPortableObjectFailureReason, u as createSignature } from "./mod-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-
|
|
8
|
+
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-CUYBGKof.js";
|
|
9
|
+
import { a as CreateSignatureOptions, c as VerifySignatureOptions, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyPortableObject, l as attachSignature, m as verifyJsonLd, n as VerifyPortableObjectOptions, o as SignJsonLdOptions, p as signJsonLd, r as VerifyPortableObjectResult, s as VerifyJsonLdOptions, t as VerifyPortableObjectFailureReason, u as createSignature } from "./mod-BRpER-B0.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DkhfZC1u.js";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./rolldown-runtime-BC-Eo5Mj.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-
|
|
6
|
+
import { A as detachSignature, C as verifyProof, D as attachSignature, G as generateCryptoKeyPair, I as signJsonLd, K as importJwk, N as hasSignatureLike, R as verifyJsonLd, U as fetchKey, V as exportJwk, W as fetchKeyDetailed, _t as fulfillAcceptSignature, a as signRequest, c as verifyRequestDetailed, g as signObject, gt as formatAcceptSignature, k as createSignature, m as hasProofLike, p as createProof, s as verifyRequest, v as verifyObject, vt as parseAcceptSignature, y as verifyPortableObjectProof, yt as validateAcceptSignature, z as verifySignature } from "./http-C2gfnrKF.js";
|
|
7
|
+
import { a as respondWithObjectIfAcceptable, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as respondWithObject, l as CircuitBreaker, n as handleWebFinger, o as SendActivityError, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-C_EdDn9c.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-_S2_MeLF.js";
|
|
9
|
-
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "./portable-collection-BtyE_2Rv.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-nsVJF31j.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-8Tu9kea0.mjs";
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { D as handleNodeInfoJrd, E as handleNodeInfo, o as createFederation } from "../middleware-
|
|
8
|
+
import { D as handleNodeInfoJrd, E as handleNodeInfo, o as createFederation } from "../middleware-ClqRVObS.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -2,10 +2,10 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { d as isPortableUri, l as isPortableId, n as getCanonicalPortableId, p as isSamePublicKey$1, s as isCompatibleKeyId } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
+
import { n as version, t as name } from "./deno-CkkDV5gw.mjs";
|
|
6
6
|
import { i as parseKeyOwnerEvidence, r as getVerifiedKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
|
|
7
|
-
import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-
|
|
8
|
-
import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-
|
|
7
|
+
import { l as verifyKeyOwnership, n as exportJwk, r as fetchActorDocument } from "./key-8sZWp4lR.mjs";
|
|
8
|
+
import { n as resolvePortableActorKey, t as fetchPortableGatewayKey } from "./portable-key-ENr3Sc97.mjs";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
const require_http = require("./http-
|
|
2
|
+
const require_http = require("./http-CjpGhvxc.cjs");
|
|
3
3
|
let _logtape_logtape = require("@logtape/logtape");
|
|
4
4
|
let _fedify_vocab = require("@fedify/vocab");
|
|
5
5
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { At as
|
|
3
|
+
import { At as isPortableId, Ft as name, H as fetchActorDocument, It as version, J as verifyKeyOwnership, Mt as isPortableUri, Pt as isSamePublicKey$1, V as exportJwk, X as getVerifiedKeyOwnerEvidence, Z as parseKeyOwnerEvidence, kt as isCompatibleKeyId, l as fetchPortableGatewayKey, u as resolvePortableActorKey, wt as getCanonicalPortableId, x as verifyPortableObjectProofWithRoot, y as verifyPortableObjectProof } from "./http-C2gfnrKF.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { CollectionPage, CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import {
|
|
4
|
+
import { n as version, t as name } from "./deno-CkkDV5gw.mjs";
|
|
5
|
+
import { d as verifyPortableObjectProofWithRoot, l as verifyPortableObjectProof } from "./proof-CGtiU4Lz.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { CollectionPage, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { trace } from "@opentelemetry/api";
|
|
@@ -2,7 +2,7 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { a as getRawCanonicalPortableId, c as isPortableActorDocument, d as isPortableUri, n as getCanonicalPortableId, p as isSamePublicKey } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { d as verifyPortableObjectProofWithRoot } from "./proof-CGtiU4Lz.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { CryptographicKey, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
8
8
|
import { FetchError, formatIri, getDocumentLoader, isGatewayUrl, parseIri, toCompatibleEf61Id } from "@fedify/vocab-runtime";
|
|
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { i as getPortableDid, l as isPortableId } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
5
|
import { a as verificationObservation, i as triedKey, n as observeCheck, t as observeAttempt } from "./verification-Dpfcw8ml.mjs";
|
|
6
|
-
import { n as version, t as name } from "./deno-
|
|
7
|
-
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-
|
|
8
|
-
import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-
|
|
6
|
+
import { n as version, t as name } from "./deno-CkkDV5gw.mjs";
|
|
7
|
+
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DiQRjv6y.mjs";
|
|
8
|
+
import { c as validateCryptoKey, i as fetchKey, t as bypassKeyCacheReads } from "./key-8sZWp4lR.mjs";
|
|
9
9
|
import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
|
|
10
10
|
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-4IJqPYos.mjs";
|
|
11
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
11
|
+
import { c as getNormalizationContextLoader } from "./ld-DXaIENwZ.mjs";
|
|
12
12
|
import { getLogger } from "@logtape/logtape";
|
|
13
13
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
14
14
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1032,34 +1032,68 @@ async function preparePortableObjectProof(jsonLd, options) {
|
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
1034
1034
|
/**
|
|
1035
|
-
*
|
|
1035
|
+
* Checks portable-object policy without resolving keys or verifying signatures.
|
|
1036
1036
|
*
|
|
1037
1037
|
* @internal
|
|
1038
1038
|
*/
|
|
1039
|
-
async function
|
|
1039
|
+
async function preparePortableObjectProofPolicy(jsonLd, options = {}) {
|
|
1040
1040
|
const policyOptions = {
|
|
1041
1041
|
...options,
|
|
1042
1042
|
contextLoader: preloadedOnlyDocumentLoader
|
|
1043
1043
|
};
|
|
1044
1044
|
const prepared = await preparePortableObjectProof(jsonLd, policyOptions);
|
|
1045
|
-
if (!prepared.prepared) return
|
|
1045
|
+
if (!prepared.prepared) return {
|
|
1046
|
+
prepared: false,
|
|
1047
|
+
result: prepared.result
|
|
1048
|
+
};
|
|
1046
1049
|
const policyProof = prepared.proofs[0];
|
|
1047
1050
|
const literalProof = isJsonLdNode(jsonLd) && isJsonLdNode(jsonLd.proof) ? (await parseRawProofCandidates(jsonLd, [jsonLd.proof], policyOptions, prepared.proofContextLoader))[0]?.proof : null;
|
|
1048
1051
|
const verificationMethod = policyProof?.verificationMethodId;
|
|
1049
|
-
if (prepared.proofs.length !== 1 ||
|
|
1052
|
+
if (prepared.proofs.length !== 1 || policyProof == null || literalProof == null || !sameProof(policyProof, literalProof) || verificationMethod == null) return {
|
|
1053
|
+
prepared: false,
|
|
1054
|
+
result: {
|
|
1055
|
+
verified: false,
|
|
1056
|
+
reason: {
|
|
1057
|
+
type: "invalidProof",
|
|
1058
|
+
proofIndex: prepared.proofs.length > 1 ? 1 : 0
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
return {
|
|
1063
|
+
prepared: true,
|
|
1064
|
+
verificationMethod,
|
|
1065
|
+
objectId: formatIri(prepared.objectId)
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Binds prepared portable-object policy to the map-local verified key.
|
|
1070
|
+
*
|
|
1071
|
+
* @internal
|
|
1072
|
+
*/
|
|
1073
|
+
function verifyPreparedPortableObjectProofPolicy(prepared, key) {
|
|
1074
|
+
if (key == null || key.id?.href !== prepared.verificationMethod.href) return {
|
|
1050
1075
|
verified: false,
|
|
1051
1076
|
reason: {
|
|
1052
1077
|
type: "invalidProof",
|
|
1053
|
-
proofIndex:
|
|
1078
|
+
proofIndex: 0
|
|
1054
1079
|
}
|
|
1055
1080
|
};
|
|
1056
1081
|
return {
|
|
1057
1082
|
verified: true,
|
|
1058
1083
|
keys: [key],
|
|
1059
|
-
objectId:
|
|
1084
|
+
objectId: prepared.objectId
|
|
1060
1085
|
};
|
|
1061
1086
|
}
|
|
1062
1087
|
/**
|
|
1088
|
+
* Applies portable-object proof policy to one map-local cryptographic result.
|
|
1089
|
+
*
|
|
1090
|
+
* @internal
|
|
1091
|
+
*/
|
|
1092
|
+
async function verifyPortableObjectProofPolicy(jsonLd, key, options = {}) {
|
|
1093
|
+
const prepared = await preparePortableObjectProofPolicy(jsonLd, options);
|
|
1094
|
+
return prepared.prepared ? verifyPreparedPortableObjectProofPolicy(prepared, key) : prepared.result;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1063
1097
|
* Verifies the FEP-ef61 Object Integrity Proof policy for a portable object.
|
|
1064
1098
|
*
|
|
1065
1099
|
* This applies the FEP-2277 core-type classification to the top-level JSON-LD
|
|
@@ -1296,4 +1330,4 @@ function hasCryptographicOrigin(iri) {
|
|
|
1296
1330
|
return /^did:/i.test(iri) || /^ap(?:\+ef61)?:\/\//i.test(iri);
|
|
1297
1331
|
}
|
|
1298
1332
|
//#endregion
|
|
1299
|
-
export {
|
|
1333
|
+
export { preparePortableObjectProofPolicy as a, verifyObject as c, verifyPortableObjectProofWithRoot as d, verifyPreparedPortableObjectProofPolicy as f, hasProofLike as i, verifyPortableObjectProof as l, classifyFep2277CoreType as n, signObject as o, verifyProof as p, createProof as r, verifyMapLocalProof as s, InvalidPortableObjectIdError as t, verifyPortableObjectProofPolicy as u };
|
|
@@ -2,9 +2,9 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { d as isPortableUri } from "./portable-key-id-Ca30-hOa.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-
|
|
7
|
-
import { n as doubleKnock } from "./http-
|
|
5
|
+
import { n as version, t as name } from "./deno-CkkDV5gw.mjs";
|
|
6
|
+
import { n as getDurationMs, r as getFederationMetrics } from "./metrics-DiQRjv6y.mjs";
|
|
7
|
+
import { n as doubleKnock } from "./http-DxljNiCC.mjs";
|
|
8
8
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { FetchError, UrlError, canonicalizePortableUri, getFe34Origin, isGatewayUrl, toCompatibleEf61Id, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
-
import { a as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-
|
|
6
|
+
import { a as inspectCompoundPortableObjectApplicability, n as discoverCompoundProofDocuments } from "../compound-proof-hnZ7MNwN.mjs";
|
|
7
7
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/sig/compound-proof-discovery.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
-
import { a as inspectCompoundPortableObjectApplicability, i as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-
|
|
6
|
+
import { a as inspectCompoundPortableObjectApplicability, i as findUnsupportedCompoundProofShape, t as containsCompoundPortableObject } from "../compound-proof-hnZ7MNwN.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/sig/compound-proof-producer.test.ts
|
|
9
9
|
const portableId = "ap+ef61://did:key:z6MkAlice/objects/1";
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { s as verifyMapLocalProof, u as verifyPortableObjectProofPolicy } from "../proof-CGtiU4Lz.mjs";
|
|
8
8
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { a as inspectCompoundPortableObjectApplicability, o as verifyCompoundPortableObjectProofs, s as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-
|
|
9
|
+
import { a as inspectCompoundPortableObjectApplicability, o as verifyCompoundPortableObjectProofs, s as verifyCompoundProofDocuments, t as containsCompoundPortableObject } from "../compound-proof-hnZ7MNwN.mjs";
|
|
10
10
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
11
11
|
import { t as map_local_context_conflict_default } from "../map-local-context-conflict-DOYEEJ3u.mjs";
|
|
12
12
|
import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
|
|
@@ -829,5 +829,171 @@ test("compound proof observation does not throw for malformed subject IDs", asyn
|
|
|
829
829
|
assertEquals(evidence.attempts[0].subject.id, null);
|
|
830
830
|
assertEquals(evidence.attempts[0].subject.pointer, "");
|
|
831
831
|
});
|
|
832
|
+
test("compound portable policy rejects actor gateways before key work", async () => {
|
|
833
|
+
const { verificationObservation } = await import("../verification-C3954hQh.mjs");
|
|
834
|
+
for (const gateways of [
|
|
835
|
+
void 0,
|
|
836
|
+
[],
|
|
837
|
+
["https://gw.example/path"],
|
|
838
|
+
["https://gw.example"]
|
|
839
|
+
]) {
|
|
840
|
+
const inner = await secureRawDocument({
|
|
841
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
|
|
842
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
843
|
+
type: "Person",
|
|
844
|
+
inbox: "https://inner.example/inbox",
|
|
845
|
+
outbox: "https://inner.example/outbox",
|
|
846
|
+
...gateways === void 0 ? {} : { gateways }
|
|
847
|
+
}, map_local_create_note_default.keys.inner.testPrivateKeyJwk, map_local_create_note_default.keys.inner.verificationMethod);
|
|
848
|
+
const outer = await secureRawDocument({
|
|
849
|
+
...map_local_create_note_default.documents.outerUnsecuredDocument,
|
|
850
|
+
object: inner
|
|
851
|
+
}, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod);
|
|
852
|
+
const reads = [];
|
|
853
|
+
const evidence = { attempts: [] };
|
|
854
|
+
const result = await verifyCompoundPortableObjectProofs(outer, limits, {
|
|
855
|
+
...options,
|
|
856
|
+
keyCache: {
|
|
857
|
+
get(id) {
|
|
858
|
+
reads.push(id.href);
|
|
859
|
+
return Promise.resolve(void 0);
|
|
860
|
+
},
|
|
861
|
+
async set() {}
|
|
862
|
+
},
|
|
863
|
+
[verificationObservation]: evidence
|
|
864
|
+
});
|
|
865
|
+
assert(result.status === "ok");
|
|
866
|
+
const valid = gateways?.[0] === "https://gw.example";
|
|
867
|
+
assertEquals(result.verified, valid);
|
|
868
|
+
assertEquals(reads.sort(), (valid ? [map_local_create_note_default.keys.inner.verificationMethod, map_local_create_note_default.keys.outer.verificationMethod] : [map_local_create_note_default.keys.outer.verificationMethod]).sort());
|
|
869
|
+
assertEquals(result.proofs.map((p) => [p.path, p.verified]), [["/object", valid], ["", true]]);
|
|
870
|
+
assertEquals(result.snapshot, outer);
|
|
871
|
+
assert(Object.isFrozen(result.snapshot));
|
|
872
|
+
assert(Object.isFrozen(result.proofs));
|
|
873
|
+
assert(Object.isFrozen(result.portableObjects));
|
|
874
|
+
const child = result.portableObjects[0];
|
|
875
|
+
if (!valid) {
|
|
876
|
+
assert(!child.verified);
|
|
877
|
+
assertEquals(child.reason.type, "invalidGateways");
|
|
878
|
+
assertEquals(result.proofs[0], {
|
|
879
|
+
path: "/object",
|
|
880
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
881
|
+
depth: 1,
|
|
882
|
+
verified: false,
|
|
883
|
+
reason: { type: "invalidProof" }
|
|
884
|
+
});
|
|
885
|
+
const attempt = evidence.attempts.find((a) => a.subject.pointer === "/object");
|
|
886
|
+
assert(attempt?.status === "rejected");
|
|
887
|
+
assertEquals(attempt.reason, {
|
|
888
|
+
type: "proofPolicy",
|
|
889
|
+
reason: { type: "invalidGateways" }
|
|
890
|
+
});
|
|
891
|
+
assertEquals(attempt.checks, []);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
test("compound portable policy skips doomed proofs without pruning parents", async () => {
|
|
896
|
+
const context = createInlineProofContext();
|
|
897
|
+
const scoped = createInlineProofContext();
|
|
898
|
+
scoped.proof = {
|
|
899
|
+
"@id": "https://w3id.org/security#proof",
|
|
900
|
+
"@context": { assertionMethod: "https://w3id.org/security#authentication" }
|
|
901
|
+
};
|
|
902
|
+
const cases = [
|
|
903
|
+
{
|
|
904
|
+
id: map_local_create_note_default.documents.outerUnsecuredDocument.id,
|
|
905
|
+
type: "Note",
|
|
906
|
+
method: map_local_create_note_default.keys.inner.verificationMethod,
|
|
907
|
+
context,
|
|
908
|
+
reason: "verificationMethodMismatch"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
912
|
+
type: "Note",
|
|
913
|
+
method: "https://attacker.example/key",
|
|
914
|
+
context,
|
|
915
|
+
reason: "unsupportedVerificationMethod"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
id: "ap://did%ZZkey/objects/1",
|
|
919
|
+
type: "Note",
|
|
920
|
+
method: map_local_create_note_default.keys.inner.verificationMethod,
|
|
921
|
+
context,
|
|
922
|
+
reason: "invalidPortableObject"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
926
|
+
type: "Link",
|
|
927
|
+
method: map_local_create_note_default.keys.inner.verificationMethod,
|
|
928
|
+
context: {
|
|
929
|
+
...context,
|
|
930
|
+
Link: "https://www.w3.org/ns/activitystreams#Link",
|
|
931
|
+
href: {
|
|
932
|
+
"@id": "https://www.w3.org/ns/activitystreams#href",
|
|
933
|
+
"@type": "@id"
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
extra: { href: "https://example.com/resource" },
|
|
937
|
+
reason: "unsupportedObjectType"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
941
|
+
type: "Note",
|
|
942
|
+
method: map_local_create_note_default.keys.inner.verificationMethod,
|
|
943
|
+
context: scoped,
|
|
944
|
+
reason: "invalidProof"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
id: map_local_create_note_default.documents.innerUnsecuredDocument.id,
|
|
948
|
+
type: "Note",
|
|
949
|
+
method: map_local_create_note_default.keys.inner.verificationMethod,
|
|
950
|
+
context,
|
|
951
|
+
extra: { "@id": "https://example.com/ordinary" },
|
|
952
|
+
reason: "notPortableObject"
|
|
953
|
+
}
|
|
954
|
+
];
|
|
955
|
+
for (const candidate of cases) {
|
|
956
|
+
const child = await secureRawDocument({
|
|
957
|
+
"@context": candidate.context,
|
|
958
|
+
id: candidate.id,
|
|
959
|
+
type: candidate.type,
|
|
960
|
+
...candidate.extra,
|
|
961
|
+
content: "Rejected attachment"
|
|
962
|
+
}, map_local_create_note_default.keys.inner.testPrivateKeyJwk, candidate.method);
|
|
963
|
+
if (candidate.context === scoped) delete asRecord(child.proof)["@context"];
|
|
964
|
+
const parent = {
|
|
965
|
+
...map_local_create_note_default.documents.outerUnsecuredDocument,
|
|
966
|
+
id: "https://social.example/activities/1",
|
|
967
|
+
attachment: [child]
|
|
968
|
+
};
|
|
969
|
+
delete parent.object;
|
|
970
|
+
const outer = await secureRawDocument(parent, map_local_create_note_default.keys.outer.testPrivateKeyJwk, map_local_create_note_default.keys.outer.verificationMethod);
|
|
971
|
+
const reads = [];
|
|
972
|
+
let loads = 0;
|
|
973
|
+
const result = await verifyCompoundPortableObjectProofs(outer, limits, {
|
|
974
|
+
...options,
|
|
975
|
+
documentLoader() {
|
|
976
|
+
loads++;
|
|
977
|
+
throw new TypeError("unexpected key fetch");
|
|
978
|
+
},
|
|
979
|
+
keyCache: {
|
|
980
|
+
get(id) {
|
|
981
|
+
reads.push(id.href);
|
|
982
|
+
return Promise.resolve(void 0);
|
|
983
|
+
},
|
|
984
|
+
async set() {}
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
assert(result.status === "ok");
|
|
988
|
+
assertEquals(result.verified, false);
|
|
989
|
+
assertEquals(reads, [map_local_create_note_default.keys.outer.verificationMethod]);
|
|
990
|
+
assertEquals(loads, 0);
|
|
991
|
+
assertEquals(result.proofs.map((p) => [p.path, p.verified]), [["/attachment/0", false], ["", true]]);
|
|
992
|
+
const [rejected] = result.portableObjects;
|
|
993
|
+
assert(!rejected.verified);
|
|
994
|
+
assertEquals(rejected.reason.type, candidate.reason);
|
|
995
|
+
assertEquals(rejected.path, "/attachment/0");
|
|
996
|
+
}
|
|
997
|
+
});
|
|
832
998
|
//#endregion
|
|
833
999
|
export {};
|