@fedify/fedify 2.1.0-dev.503 → 2.1.0-dev.523
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-BHUnSQtB.js → builder-CJkMYxxc.js} +9 -3
- package/dist/compat/mod.d.cts +3 -3
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +12 -12
- package/dist/{context-DZJhUmzF.d.ts → context--RwChtri.d.ts} +54 -2
- package/dist/{context-D3QkEtZd.d.cts → context-DL0cPpPV.d.cts} +54 -2
- package/dist/{deno-BYerLnry.js → deno-CQdJQjC5.js} +1 -1
- package/dist/{docloader-MSkogD2T.js → docloader-Cyl0-S8m.js} +2 -2
- package/dist/federation/builder.test.js +14 -3
- package/dist/federation/handler.test.js +97 -13
- package/dist/federation/idempotency.test.js +12 -12
- package/dist/federation/inbox.test.js +2 -2
- package/dist/federation/keycache.test.js +46 -2
- package/dist/federation/middleware.test.js +206 -12
- package/dist/federation/mod.cjs +4 -4
- package/dist/federation/mod.d.cts +4 -4
- package/dist/federation/mod.d.ts +4 -4
- package/dist/federation/mod.js +4 -4
- package/dist/federation/send.test.js +5 -5
- package/dist/federation/webfinger.test.js +12 -12
- package/dist/{http-DkHdFfrc.d.ts → http-BbfOqHGG.d.ts} +80 -8
- package/dist/{http-DJT6NciB.cjs → http-D6a6mMc0.cjs} +305 -99
- package/dist/{http-CSX1-Mgi.js → http-DJmytoC2.js} +295 -101
- package/dist/{http-S2U3qDwN.js → http-DK0CTomU.js} +153 -57
- package/dist/{http-Cz3MlXAZ.d.cts → http-DsqqmkXi.d.cts} +80 -8
- package/dist/{inbox-BaA0g5I_.js → inbox-CWa6sqsk.js} +1 -1
- package/dist/{key-DCdTVZiK.js → key-DRgvVevp.js} +145 -47
- package/dist/keycache-C7k8s1Bk.js +102 -0
- package/dist/{kv-cache-Vtxhbo1W.cjs → kv-cache-DPtsJ1sL.cjs} +1 -1
- package/dist/{kv-cache-CQPL_aGY.js → kv-cache-MPcS_mGG.js} +1 -1
- package/dist/{ld-CrX7pQda.js → ld-s9_8WfBc.js} +2 -2
- package/dist/{middleware-CfI9C9Xy.js → middleware-2XtoTBq0.js} +12 -12
- package/dist/{middleware-MlO5iUeZ.js → middleware-Ajnk9qHB.js} +158 -22
- package/dist/middleware-BgCIhb_C.cjs +12 -0
- package/dist/{middleware-D4S6i4A_.cjs → middleware-BoCzk7-G.cjs} +158 -22
- package/dist/{middleware-C8PKuPrm.js → middleware-DGUNDGCl.js} +4 -4
- package/dist/{middleware-BelSJK7m.js → middleware-Dn9UDJZP.js} +100 -24
- package/dist/{mod-CwZXZJ9d.d.ts → mod-BugwI0JN.d.ts} +1 -1
- package/dist/{mod-DPkRU3EK.d.cts → mod-CFBU2OT3.d.cts} +1 -1
- package/dist/{mod-DUWcVv49.d.ts → mod-CvxylbuV.d.ts} +1 -1
- package/dist/{mod-DVwHUI_x.d.cts → mod-DE8MYisy.d.cts} +1 -1
- package/dist/{mod-DXsQakeS.d.cts → mod-DKG0ovjR.d.cts} +1 -1
- package/dist/{mod-DnSsduJF.d.ts → mod-DcfFNgYf.d.ts} +1 -1
- package/dist/{mod-Di3W5OdP.d.cts → mod-Dp0kK0hO.d.cts} +1 -1
- package/dist/{mod-DosD6NsG.d.ts → mod-Z7lIaCfo.d.ts} +1 -1
- package/dist/mod.cjs +8 -4
- package/dist/mod.d.cts +8 -8
- package/dist/mod.d.ts +8 -8
- package/dist/mod.js +7 -5
- package/dist/nodeinfo/handler.test.js +12 -12
- package/dist/otel/exporter.test.js +43 -2
- package/dist/otel/mod.cjs +7 -1
- package/dist/otel/mod.d.cts +12 -0
- package/dist/otel/mod.d.ts +12 -0
- package/dist/otel/mod.js +7 -1
- package/dist/{owner-BAlnLKMO.js → owner-Cx8gV-j4.js} +1 -1
- package/dist/{proof-DMgHaXNJ.js → proof-CDr3NP3R.js} +2 -2
- package/dist/{proof-BgUVmaJz.js → proof-Le4DAkqb.js} +1 -1
- package/dist/{proof-CR5RUAmy.cjs → proof-qHcNgE5i.cjs} +1 -1
- package/dist/{send-B2aZYf9A.js → send-DreBSY1U.js} +2 -2
- package/dist/sig/http.test.js +85 -5
- package/dist/sig/key.test.js +70 -3
- package/dist/sig/ld.test.js +3 -3
- package/dist/sig/mod.cjs +4 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.js +3 -3
- package/dist/sig/proof.test.js +3 -3
- package/dist/testing/mod.d.ts +92 -0
- package/dist/utils/docloader.test.js +4 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.d.cts +2 -2
- package/dist/utils/mod.d.ts +2 -2
- package/dist/utils/mod.js +2 -2
- package/package.json +5 -5
- package/dist/keycache-DRxpZ5r9.js +0 -48
- package/dist/middleware-D4XcpSBG.cjs +0 -12
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-CQdJQjC5.js";
|
|
7
7
|
import { getNodeInfo } from "./client-Dg7OfUDA.js";
|
|
8
8
|
import { RouterError } from "./router-D9eI0s4b.js";
|
|
9
9
|
import { nodeInfoToJson } from "./types-CPz01LGH.js";
|
|
10
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
|
11
|
-
import { verifyRequest } from "./http-
|
|
12
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
|
13
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
|
14
|
-
import { signObject, verifyObject } from "./proof-
|
|
15
|
-
import { getAuthenticatedDocumentLoader } from "./docloader-
|
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-DRgvVevp.js";
|
|
11
|
+
import { verifyRequest, verifyRequestDetailed } from "./http-DK0CTomU.js";
|
|
12
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-s9_8WfBc.js";
|
|
13
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-Cx8gV-j4.js";
|
|
14
|
+
import { signObject, verifyObject } from "./proof-CDr3NP3R.js";
|
|
15
|
+
import { getAuthenticatedDocumentLoader } from "./docloader-Cyl0-S8m.js";
|
|
16
16
|
import { kvCache } from "./kv-cache-B__dHl7g.js";
|
|
17
|
-
import { routeActivity } from "./inbox-
|
|
18
|
-
import { FederationBuilderImpl } from "./builder-
|
|
17
|
+
import { routeActivity } from "./inbox-CWa6sqsk.js";
|
|
18
|
+
import { FederationBuilderImpl } from "./builder-CJkMYxxc.js";
|
|
19
19
|
import { buildCollectionSynchronizationHeader } from "./collection-CcnIw1qY.js";
|
|
20
|
-
import { KvKeyCache } from "./keycache-
|
|
20
|
+
import { KvKeyCache } from "./keycache-C7k8s1Bk.js";
|
|
21
21
|
import { acceptsJsonLd } from "./negotiation-5NPJL6zp.js";
|
|
22
22
|
import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
|
|
23
|
-
import { SendActivityError, extractInboxes, sendActivity } from "./send-
|
|
23
|
+
import { SendActivityError, extractInboxes, sendActivity } from "./send-DreBSY1U.js";
|
|
24
24
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
25
25
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
26
26
|
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -410,7 +410,7 @@ async function handleInbox(request, options) {
|
|
|
410
410
|
* @returns A promise that resolves to an HTTP response.
|
|
411
411
|
*/
|
|
412
412
|
async function handleInboxInternal(request, parameters, span) {
|
|
413
|
-
const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider } = parameters;
|
|
413
|
+
const { recipient, context: ctx, inboxContextFactory, kv, kvPrefixes, queue, actorDispatcher, inboxListeners, inboxErrorHandler, unverifiedActivityHandler, onNotFound, signatureTimeWindow, skipSignatureVerification, tracerProvider } = parameters;
|
|
414
414
|
const logger$2 = getLogger([
|
|
415
415
|
"fedify",
|
|
416
416
|
"federation",
|
|
@@ -505,12 +505,14 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
505
505
|
}
|
|
506
506
|
const jsonWithoutSig = detachSignature(json);
|
|
507
507
|
let activity = null;
|
|
508
|
+
let activityVerified = false;
|
|
508
509
|
if (ldSigVerified) {
|
|
509
510
|
logger$2.debug("Linked Data Signatures are verified.", {
|
|
510
511
|
recipient,
|
|
511
512
|
json
|
|
512
513
|
});
|
|
513
514
|
activity = await Activity.fromJsonLd(jsonWithoutSig, ctx);
|
|
515
|
+
activityVerified = true;
|
|
514
516
|
} else {
|
|
515
517
|
logger$2.debug("Linked Data Signatures are not verified.", {
|
|
516
518
|
recipient,
|
|
@@ -551,34 +553,107 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
551
553
|
recipient,
|
|
552
554
|
activity: json
|
|
553
555
|
});
|
|
554
|
-
else
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
556
|
+
else {
|
|
557
|
+
logger$2.debug("Object Integrity Proofs are verified.", {
|
|
558
|
+
recipient,
|
|
559
|
+
activity: json
|
|
560
|
+
});
|
|
561
|
+
activityVerified = true;
|
|
562
|
+
}
|
|
558
563
|
}
|
|
559
564
|
let httpSigKey = null;
|
|
560
565
|
if (activity == null) {
|
|
561
566
|
if (!skipSignatureVerification) {
|
|
562
|
-
const
|
|
567
|
+
const verification = await verifyRequestDetailed(request, {
|
|
563
568
|
contextLoader: ctx.contextLoader,
|
|
564
569
|
documentLoader: ctx.documentLoader,
|
|
565
570
|
timeWindow: signatureTimeWindow,
|
|
566
571
|
keyCache,
|
|
567
572
|
tracerProvider
|
|
568
573
|
});
|
|
569
|
-
if (
|
|
570
|
-
|
|
574
|
+
if (verification.verified === false) {
|
|
575
|
+
const reason = verification.reason;
|
|
576
|
+
logger$2.error("Failed to verify the request's HTTP Signatures.", {
|
|
577
|
+
recipient,
|
|
578
|
+
reason: reason.type,
|
|
579
|
+
keyId: "keyId" in reason ? reason.keyId?.href : void 0
|
|
580
|
+
});
|
|
571
581
|
span.setStatus({
|
|
572
582
|
code: SpanStatusCode.ERROR,
|
|
573
583
|
message: `Failed to verify the request's HTTP Signatures.`
|
|
574
584
|
});
|
|
575
|
-
|
|
585
|
+
if (unverifiedActivityHandler == null) return new Response("Failed to verify the request signature.", {
|
|
586
|
+
status: 401,
|
|
587
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
588
|
+
});
|
|
589
|
+
try {
|
|
590
|
+
activity = await Activity.fromJsonLd(jsonWithoutSig, ctx);
|
|
591
|
+
} catch (error) {
|
|
592
|
+
logger$2.error("Failed to parse activity:\n{error}", {
|
|
593
|
+
recipient,
|
|
594
|
+
activity: json,
|
|
595
|
+
error
|
|
596
|
+
});
|
|
597
|
+
try {
|
|
598
|
+
await inboxErrorHandler?.(ctx, error);
|
|
599
|
+
} catch (error$1) {
|
|
600
|
+
logger$2.error("An unexpected error occurred in inbox error handler:\n{error}", {
|
|
601
|
+
error: error$1,
|
|
602
|
+
activity: json,
|
|
603
|
+
recipient
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
return new Response("Invalid activity.", {
|
|
607
|
+
status: 400,
|
|
608
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
|
|
612
|
+
span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
|
|
613
|
+
const eventAttributes = {
|
|
614
|
+
"activitypub.activity.json": JSON.stringify(json),
|
|
615
|
+
"activitypub.activity.verified": false,
|
|
616
|
+
"ld_signatures.verified": ldSigVerified,
|
|
617
|
+
"http_signatures.verified": false,
|
|
618
|
+
"http_signatures.key_id": "keyId" in reason ? reason.keyId?.href ?? "" : "",
|
|
619
|
+
"http_signatures.failure_reason": reason.type
|
|
620
|
+
};
|
|
621
|
+
if (reason.type === "keyFetchError") if ("status" in reason.result) eventAttributes["http_signatures.key_fetch_status"] = reason.result.status;
|
|
622
|
+
else eventAttributes["http_signatures.key_fetch_error"] = reason.result.error.name || reason.result.error.constructor.name || "Error";
|
|
623
|
+
span.addEvent("activitypub.activity.received", eventAttributes);
|
|
624
|
+
let response;
|
|
625
|
+
try {
|
|
626
|
+
response = await unverifiedActivityHandler(ctx, activity, reason);
|
|
627
|
+
} catch (error) {
|
|
628
|
+
logger$2.error("An unexpected error occurred in unverified activity handler:\n{error}", {
|
|
629
|
+
error,
|
|
630
|
+
activity: json,
|
|
631
|
+
recipient
|
|
632
|
+
});
|
|
633
|
+
try {
|
|
634
|
+
await inboxErrorHandler?.(ctx, error);
|
|
635
|
+
} catch (error$1) {
|
|
636
|
+
logger$2.error("An unexpected error occurred in inbox error handler:\n{error}", {
|
|
637
|
+
error: error$1,
|
|
638
|
+
activity: json,
|
|
639
|
+
recipient
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
return new Response("Failed to verify the request signature.", {
|
|
643
|
+
status: 401,
|
|
644
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
if (response instanceof Response) return response;
|
|
648
|
+
return new Response("Failed to verify the request signature.", {
|
|
576
649
|
status: 401,
|
|
577
650
|
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
578
651
|
});
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
652
|
+
} else {
|
|
653
|
+
logger$2.debug("HTTP Signatures are verified.", { recipient });
|
|
654
|
+
activityVerified = true;
|
|
655
|
+
}
|
|
656
|
+
httpSigKey = verification.key;
|
|
582
657
|
}
|
|
583
658
|
activity = await Activity.fromJsonLd(jsonWithoutSig, ctx);
|
|
584
659
|
}
|
|
@@ -586,7 +661,7 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
586
661
|
span.setAttribute("activitypub.activity.type", getTypeId(activity).href);
|
|
587
662
|
span.addEvent("activitypub.activity.received", {
|
|
588
663
|
"activitypub.activity.json": JSON.stringify(json),
|
|
589
|
-
"activitypub.activity.verified":
|
|
664
|
+
"activitypub.activity.verified": activityVerified,
|
|
590
665
|
"ld_signatures.verified": ldSigVerified,
|
|
591
666
|
"http_signatures.verified": httpSigKey != null,
|
|
592
667
|
"http_signatures.key_id": httpSigKey?.id?.href ?? ""
|
|
@@ -2055,6 +2130,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2055
2130
|
actorDispatcher: this.actorCallbacks?.dispatcher,
|
|
2056
2131
|
inboxListeners: this.inboxListeners,
|
|
2057
2132
|
inboxErrorHandler: this.inboxErrorHandler,
|
|
2133
|
+
unverifiedActivityHandler: this.unverifiedActivityHandler,
|
|
2058
2134
|
onNotFound,
|
|
2059
2135
|
signatureTimeWindow: this.signatureTimeWindow,
|
|
2060
2136
|
skipSignatureVerification: this.skipSignatureVerification,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
3
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-BbfOqHGG.js";
|
|
4
4
|
import { KvKey, KvStore } from "./kv-DXEUEP6z.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KeyCache } from "./http-
|
|
1
|
+
import { KeyCache } from "./http-DsqqmkXi.cjs";
|
|
2
2
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
3
3
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { KeyCache } from "./http-
|
|
3
|
+
import { KeyCache } from "./http-BbfOqHGG.js";
|
|
4
4
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
1
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-DsqqmkXi.cjs";
|
|
2
2
|
import { KvKey, KvStore } from "./kv-BL4nlICN.cjs";
|
|
3
3
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context
|
|
3
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context--RwChtri.js";
|
|
4
4
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-
|
|
1
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-DL0cPpPV.cjs";
|
|
2
2
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
3
3
|
|
|
4
4
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { ActivityTransformer, Context } from "./context
|
|
3
|
+
import { ActivityTransformer, Context } from "./context--RwChtri.js";
|
|
4
4
|
import { Activity } from "@fedify/vocab";
|
|
5
5
|
|
|
6
6
|
//#region src/compat/transformers.d.ts
|
package/dist/mod.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-3g8GZwkZ.cjs');
|
|
7
7
|
require('./compat-DmDDELst.cjs');
|
|
8
|
-
const require_http = require('./http-
|
|
9
|
-
const require_middleware = require('./middleware-
|
|
10
|
-
const require_proof = require('./proof-
|
|
8
|
+
const require_http = require('./http-D6a6mMc0.cjs');
|
|
9
|
+
const require_middleware = require('./middleware-BoCzk7-G.cjs');
|
|
10
|
+
const require_proof = require('./proof-qHcNgE5i.cjs');
|
|
11
11
|
const require_federation = require('./federation-Bp3HI26G.cjs');
|
|
12
12
|
const require_types = require('./types-Cd_hszr_.cjs');
|
|
13
|
-
const require_kv_cache = require('./kv-cache-
|
|
13
|
+
const require_kv_cache = require('./kv-cache-DPtsJ1sL.cjs');
|
|
14
14
|
require('./nodeinfo-DuMYTpbZ.cjs');
|
|
15
15
|
const require_runtime = require('./runtime-c2Njxsry.cjs');
|
|
16
16
|
require('./sig-vX39WyWI.cjs');
|
|
@@ -39,6 +39,7 @@ require_chunk.__export(src_exports, {
|
|
|
39
39
|
doesActorOwnKey: () => require_proof.doesActorOwnKey,
|
|
40
40
|
exportJwk: () => require_http.exportJwk,
|
|
41
41
|
fetchKey: () => require_http.fetchKey,
|
|
42
|
+
fetchKeyDetailed: () => require_http.fetchKeyDetailed,
|
|
42
43
|
generateCryptoKeyPair: () => require_http.generateCryptoKeyPair,
|
|
43
44
|
getAuthenticatedDocumentLoader: () => require_kv_cache.getAuthenticatedDocumentLoader,
|
|
44
45
|
getDefaultActivityTransformers: () => require_transformers.getDefaultActivityTransformers,
|
|
@@ -58,6 +59,7 @@ require_chunk.__export(src_exports, {
|
|
|
58
59
|
verifyObject: () => require_proof.verifyObject,
|
|
59
60
|
verifyProof: () => require_proof.verifyProof,
|
|
60
61
|
verifyRequest: () => require_http.verifyRequest,
|
|
62
|
+
verifyRequestDetailed: () => require_http.verifyRequestDetailed,
|
|
61
63
|
verifySignature: () => require_proof.verifySignature
|
|
62
64
|
});
|
|
63
65
|
require_chunk.__reExport(src_exports, require_runtime.runtime_exports);
|
|
@@ -83,6 +85,7 @@ exports.digest = require_middleware.digest;
|
|
|
83
85
|
exports.doesActorOwnKey = require_proof.doesActorOwnKey;
|
|
84
86
|
exports.exportJwk = require_http.exportJwk;
|
|
85
87
|
exports.fetchKey = require_http.fetchKey;
|
|
88
|
+
exports.fetchKeyDetailed = require_http.fetchKeyDetailed;
|
|
86
89
|
exports.generateCryptoKeyPair = require_http.generateCryptoKeyPair;
|
|
87
90
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
|
88
91
|
exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
|
|
@@ -102,4 +105,5 @@ exports.verifyJsonLd = require_proof.verifyJsonLd;
|
|
|
102
105
|
exports.verifyObject = require_proof.verifyObject;
|
|
103
106
|
exports.verifyProof = require_proof.verifyProof;
|
|
104
107
|
exports.verifyRequest = require_http.verifyRequest;
|
|
108
|
+
exports.verifyRequestDetailed = require_http.verifyRequestDetailed;
|
|
105
109
|
exports.verifySignature = require_proof.verifySignature;
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { __export, __reExport, mod_d_exports } from "./mod-Bh8mqlYw.cjs";
|
|
2
2
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-C97KOq3x.cjs";
|
|
3
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
3
|
+
import { FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, signRequest, verifyRequest, verifyRequestDetailed } from "./http-DsqqmkXi.cjs";
|
|
4
4
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-1AbPBOOZ.cjs";
|
|
5
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
5
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-DL0cPpPV.cjs";
|
|
6
6
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-BL4nlICN.cjs";
|
|
7
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
8
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
7
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-DE8MYisy.cjs";
|
|
8
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-Dp0kK0hO.cjs";
|
|
9
9
|
import "./mod-gq_Xfdz8.cjs";
|
|
10
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
|
11
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-
|
|
10
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-CFBU2OT3.cjs";
|
|
11
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-DKG0ovjR.cjs";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports$1 {
|
|
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, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, 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, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
16
16
|
}
|
|
17
17
|
__reExport(mod_d_exports$1, mod_d_exports);
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
|
-
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 };
|
|
20
|
+
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, FetchKeyDetailedResult, FetchKeyErrorResult, 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, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/mod.d.ts
CHANGED
|
@@ -2,22 +2,22 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
4
4
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-BxMZiQaD.js";
|
|
5
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
5
|
+
import { FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, signRequest, verifyRequest, verifyRequestDetailed } from "./http-BbfOqHGG.js";
|
|
6
6
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-gd0Q9FuU.js";
|
|
7
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context
|
|
7
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context--RwChtri.js";
|
|
8
8
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-DXEUEP6z.js";
|
|
9
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
10
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
9
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-Z7lIaCfo.js";
|
|
10
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-DcfFNgYf.js";
|
|
11
11
|
import "./mod-AGjRfPjT.js";
|
|
12
12
|
import { mod_d_exports } from "./mod-D6HodEq7.js";
|
|
13
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
|
14
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-
|
|
13
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-CvxylbuV.js";
|
|
14
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-BugwI0JN.js";
|
|
15
15
|
|
|
16
16
|
//#region src/mod.d.ts
|
|
17
17
|
declare namespace mod_d_exports$1 {
|
|
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, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, 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, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
19
19
|
}
|
|
20
20
|
__reExport(mod_d_exports$1, mod_d_exports);
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
|
-
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 };
|
|
23
|
+
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, FetchKeyDetailedResult, FetchKeyErrorResult, 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, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/mod.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
6
6
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-C3FLHUd6.js";
|
|
7
7
|
import "./compat-Bb4NuTUO.js";
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
9
|
-
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
8
|
+
import { exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, signRequest, verifyRequest, verifyRequestDetailed } from "./http-DJmytoC2.js";
|
|
9
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-Ajnk9qHB.js";
|
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-Le4DAkqb.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-DaMfqRm4.js";
|
|
12
12
|
import { getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./types-C93Ob9cU.js";
|
|
13
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
13
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-MPcS_mGG.js";
|
|
14
14
|
import "./nodeinfo-DoESQxq5.js";
|
|
15
15
|
import { runtime_exports } from "./runtime-poamPCMb.js";
|
|
16
16
|
import "./sig-BNhspNOf.js";
|
|
@@ -39,6 +39,7 @@ __export(src_exports, {
|
|
|
39
39
|
doesActorOwnKey: () => doesActorOwnKey,
|
|
40
40
|
exportJwk: () => exportJwk,
|
|
41
41
|
fetchKey: () => fetchKey,
|
|
42
|
+
fetchKeyDetailed: () => fetchKeyDetailed,
|
|
42
43
|
generateCryptoKeyPair: () => generateCryptoKeyPair,
|
|
43
44
|
getAuthenticatedDocumentLoader: () => getAuthenticatedDocumentLoader,
|
|
44
45
|
getDefaultActivityTransformers: () => getDefaultActivityTransformers,
|
|
@@ -58,9 +59,10 @@ __export(src_exports, {
|
|
|
58
59
|
verifyObject: () => verifyObject,
|
|
59
60
|
verifyProof: () => verifyProof,
|
|
60
61
|
verifyRequest: () => verifyRequest,
|
|
62
|
+
verifyRequestDetailed: () => verifyRequestDetailed,
|
|
61
63
|
verifySignature: () => verifySignature
|
|
62
64
|
});
|
|
63
65
|
__reExport(src_exports, runtime_exports);
|
|
64
66
|
|
|
65
67
|
//#endregion
|
|
66
|
-
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, 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 };
|
|
68
|
+
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, importJwk, kvCache, nodeInfoToJson, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
11
|
+
import "../deno-CQdJQjC5.js";
|
|
12
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-Dn9UDJZP.js";
|
|
13
13
|
import "../client-Dg7OfUDA.js";
|
|
14
14
|
import "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-DRgvVevp.js";
|
|
17
|
+
import "../http-DK0CTomU.js";
|
|
18
|
+
import "../ld-s9_8WfBc.js";
|
|
19
|
+
import "../owner-Cx8gV-j4.js";
|
|
20
|
+
import "../proof-CDr3NP3R.js";
|
|
21
|
+
import "../docloader-Cyl0-S8m.js";
|
|
22
22
|
import "../kv-cache-B__dHl7g.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-CWa6sqsk.js";
|
|
24
|
+
import "../builder-CJkMYxxc.js";
|
|
25
25
|
import "../collection-CcnIw1qY.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-C7k8s1Bk.js";
|
|
27
27
|
import "../negotiation-5NPJL6zp.js";
|
|
28
28
|
import "../retry-D4GJ670a.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-DreBSY1U.js";
|
|
30
30
|
import "../std__assert-DWivtrGR.js";
|
|
31
31
|
import "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import "../assert_throws-BNXdRGWP.js";
|
|
@@ -137,11 +137,17 @@ var FedifySpanExporter = class {
|
|
|
137
137
|
const verified = attrs["activitypub.activity.verified"];
|
|
138
138
|
const httpSigVerified = attrs["http_signatures.verified"];
|
|
139
139
|
const httpSigKeyId = attrs["http_signatures.key_id"];
|
|
140
|
+
const httpSigFailureReason = attrs["http_signatures.failure_reason"];
|
|
141
|
+
const httpSigKeyFetchStatus = attrs["http_signatures.key_fetch_status"];
|
|
142
|
+
const httpSigKeyFetchError = attrs["http_signatures.key_fetch_error"];
|
|
140
143
|
const ldSigVerified = attrs["ld_signatures.verified"];
|
|
141
144
|
let signatureDetails;
|
|
142
|
-
if (typeof httpSigVerified === "boolean" || typeof ldSigVerified === "boolean") signatureDetails = {
|
|
145
|
+
if (typeof httpSigVerified === "boolean" || typeof ldSigVerified === "boolean" || typeof httpSigFailureReason === "string") signatureDetails = {
|
|
143
146
|
httpSignaturesVerified: httpSigVerified === true,
|
|
144
147
|
httpSignaturesKeyId: typeof httpSigKeyId === "string" && httpSigKeyId !== "" ? httpSigKeyId : void 0,
|
|
148
|
+
httpSignaturesFailureReason: typeof httpSigFailureReason === "string" && httpSigFailureReason !== "" ? httpSigFailureReason : void 0,
|
|
149
|
+
httpSignaturesKeyFetchStatus: typeof httpSigKeyFetchStatus === "number" ? httpSigKeyFetchStatus : void 0,
|
|
150
|
+
httpSignaturesKeyFetchError: typeof httpSigKeyFetchError === "string" && httpSigKeyFetchError !== "" ? httpSigKeyFetchError : void 0,
|
|
145
151
|
ldSignaturesVerified: ldSigVerified === true
|
|
146
152
|
};
|
|
147
153
|
return {
|
|
@@ -314,7 +320,10 @@ function createActivityReceivedEvent(options) {
|
|
|
314
320
|
"activitypub.activity.verified": options.verified ?? true,
|
|
315
321
|
"ld_signatures.verified": options.ldSigVerified ?? false,
|
|
316
322
|
"http_signatures.verified": options.httpSigVerified ?? true,
|
|
317
|
-
"http_signatures.key_id": options.httpSigKeyId ?? ""
|
|
323
|
+
"http_signatures.key_id": options.httpSigKeyId ?? "",
|
|
324
|
+
"http_signatures.failure_reason": options.httpSigFailureReason ?? "",
|
|
325
|
+
"http_signatures.key_fetch_status": options.httpSigKeyFetchStatus,
|
|
326
|
+
"http_signatures.key_fetch_error": options.httpSigKeyFetchError ?? ""
|
|
318
327
|
}
|
|
319
328
|
};
|
|
320
329
|
}
|
|
@@ -866,6 +875,38 @@ test("FedifySpanExporter", async (t) => {
|
|
|
866
875
|
assertEquals(activities[0].signatureDetails?.httpSignaturesVerified, false);
|
|
867
876
|
assertEquals(activities[0].signatureDetails?.ldSignaturesVerified, true);
|
|
868
877
|
});
|
|
878
|
+
await t.step("extracts HTTP signature failure details for inbound activity", async () => {
|
|
879
|
+
const kv = new MemoryKvStore();
|
|
880
|
+
const exporter = new FedifySpanExporter(kv);
|
|
881
|
+
const activityJson = JSON.stringify({
|
|
882
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
883
|
+
type: "Delete",
|
|
884
|
+
id: "https://example.com/activities/unverified",
|
|
885
|
+
actor: "https://example.com/users/alice"
|
|
886
|
+
});
|
|
887
|
+
const span = createMockSpan({
|
|
888
|
+
traceId: "sig-failure-trace",
|
|
889
|
+
spanId: "span1",
|
|
890
|
+
name: "activitypub.inbox",
|
|
891
|
+
events: [createActivityReceivedEvent({
|
|
892
|
+
activityJson,
|
|
893
|
+
verified: false,
|
|
894
|
+
httpSigVerified: false,
|
|
895
|
+
httpSigKeyId: "https://example.com/users/alice#main-key",
|
|
896
|
+
httpSigFailureReason: "keyFetchError",
|
|
897
|
+
httpSigKeyFetchStatus: 410,
|
|
898
|
+
ldSigVerified: false
|
|
899
|
+
})]
|
|
900
|
+
});
|
|
901
|
+
await new Promise((resolve) => {
|
|
902
|
+
exporter.export([span], () => resolve());
|
|
903
|
+
});
|
|
904
|
+
const activities = await exporter.getActivitiesByTraceId("sig-failure-trace");
|
|
905
|
+
assertEquals(activities.length, 1);
|
|
906
|
+
assertEquals(activities[0].signatureDetails?.httpSignaturesFailureReason, "keyFetchError");
|
|
907
|
+
assertEquals(activities[0].signatureDetails?.httpSignaturesKeyFetchStatus, 410);
|
|
908
|
+
assertEquals(activities[0].signatureDetails?.httpSignaturesKeyFetchError, void 0);
|
|
909
|
+
});
|
|
869
910
|
await t.step("handles activity without actor field", async () => {
|
|
870
911
|
const kv = new MemoryKvStore();
|
|
871
912
|
const exporter = new FedifySpanExporter(kv);
|
package/dist/otel/mod.cjs
CHANGED
|
@@ -127,11 +127,17 @@ var FedifySpanExporter = class {
|
|
|
127
127
|
const verified = attrs["activitypub.activity.verified"];
|
|
128
128
|
const httpSigVerified = attrs["http_signatures.verified"];
|
|
129
129
|
const httpSigKeyId = attrs["http_signatures.key_id"];
|
|
130
|
+
const httpSigFailureReason = attrs["http_signatures.failure_reason"];
|
|
131
|
+
const httpSigKeyFetchStatus = attrs["http_signatures.key_fetch_status"];
|
|
132
|
+
const httpSigKeyFetchError = attrs["http_signatures.key_fetch_error"];
|
|
130
133
|
const ldSigVerified = attrs["ld_signatures.verified"];
|
|
131
134
|
let signatureDetails;
|
|
132
|
-
if (typeof httpSigVerified === "boolean" || typeof ldSigVerified === "boolean") signatureDetails = {
|
|
135
|
+
if (typeof httpSigVerified === "boolean" || typeof ldSigVerified === "boolean" || typeof httpSigFailureReason === "string") signatureDetails = {
|
|
133
136
|
httpSignaturesVerified: httpSigVerified === true,
|
|
134
137
|
httpSignaturesKeyId: typeof httpSigKeyId === "string" && httpSigKeyId !== "" ? httpSigKeyId : void 0,
|
|
138
|
+
httpSignaturesFailureReason: typeof httpSigFailureReason === "string" && httpSigFailureReason !== "" ? httpSigFailureReason : void 0,
|
|
139
|
+
httpSignaturesKeyFetchStatus: typeof httpSigKeyFetchStatus === "number" ? httpSigKeyFetchStatus : void 0,
|
|
140
|
+
httpSignaturesKeyFetchError: typeof httpSigKeyFetchError === "string" && httpSigKeyFetchError !== "" ? httpSigKeyFetchError : void 0,
|
|
135
141
|
ldSignaturesVerified: ldSigVerified === true
|
|
136
142
|
};
|
|
137
143
|
return {
|
package/dist/otel/mod.d.cts
CHANGED
|
@@ -24,6 +24,18 @@ interface SignatureVerificationDetails {
|
|
|
24
24
|
*/
|
|
25
25
|
readonly httpSignaturesKeyId?: string;
|
|
26
26
|
/**
|
|
27
|
+
* The reason why HTTP signature verification failed, if available.
|
|
28
|
+
*/
|
|
29
|
+
readonly httpSignaturesFailureReason?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The HTTP status code from a failed key fetch, if available.
|
|
32
|
+
*/
|
|
33
|
+
readonly httpSignaturesKeyFetchStatus?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The error type from a non-HTTP key fetch failure, if available.
|
|
36
|
+
*/
|
|
37
|
+
readonly httpSignaturesKeyFetchError?: string;
|
|
38
|
+
/**
|
|
27
39
|
* Whether Linked Data Signatures were verified.
|
|
28
40
|
*/
|
|
29
41
|
readonly ldSignaturesVerified: boolean;
|