@fedify/fedify 2.4.6-dev.2628 → 2.4.6
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/attachment-arrays-5yDbmjEb.mjs +16 -0
- package/dist/{builder-kj5boG2l.mjs → builder-CadJYxhX.mjs} +2 -2
- package/dist/callback-DPDs_dxC.d.mts +5280 -0
- package/dist/{client-3InDZbba.d.cts → client-DLHsPY7X.d.cts} +16 -0
- package/dist/{client-3InDZbba.d.ts → client-DLHsPY7X.d.ts} +16 -0
- package/dist/{client-5SIFzW3q.mjs → client-DU3owZBD.mjs} +86 -11
- package/dist/compat/attachment-arrays.test.d.mts +2 -0
- package/dist/compat/attachment-arrays.test.mjs +255 -0
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/mod.js +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-BoNAYSHt.mjs → compound-proof-CbWKyg2H.mjs} +2 -2
- package/dist/{context-D0gFIgev.d.cts → context-DUwicVx-.d.cts} +31 -14
- package/dist/{context-CVOOd9pD.d.ts → context-iGMHITvS.d.ts} +31 -14
- package/dist/{deno-ksnVeCA7.mjs → deno-BKSRi6w3.mjs} +1 -1
- package/dist/{docloader-BhVNi06k.mjs → docloader-BcDiJfFl.mjs} +2 -2
- package/dist/federation/attachment-responses.test.d.mts +2 -0
- package/dist/federation/attachment-responses.test.mjs +182 -0
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +4 -4
- package/dist/federation/delivery-attachments.test.d.mts +2 -0
- package/dist/federation/delivery-attachments.test.mjs +288 -0
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +206 -14
- 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/inbox.test.mjs +1 -1
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +1188 -13
- 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 +4 -4
- 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 +5 -5
- 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 +293 -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 +25 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-BtPz9sr3.cjs → federation-CM4nzbhO.cjs} +501 -145
- package/dist/{http-BSARoDPh.mjs → http-B6sfb5xN.mjs} +8 -6
- package/dist/{http-rH230xCD.js → http-BwgldAIk.js} +2803 -2633
- package/dist/{http-CeVcKQMZ.cjs → http-Tj9eQ_rd.cjs} +2640 -2458
- package/dist/{inbox-BdZenpZQ.mjs → inbox-B7NVkb8j.mjs} +2 -2
- package/dist/{key-VEL1QqHF.d.cts → key-CIdQA7Pc.d.cts} +5 -5
- package/dist/{key-CyCcut3h.d.ts → key-CjtBFzaE.d.ts} +5 -5
- package/dist/{kv-cache-CNfNI_95.js → kv-cache-C-5yfTw-.js} +1 -1
- package/dist/{kv-cache-Cxn7pNMx.mjs → kv-cache-CvWuigft.mjs} +1 -1
- package/dist/{kv-cache-BpGIONmd.cjs → kv-cache-Vbq0yM7W.cjs} +1 -1
- package/dist/{ld-DJZrjNuN.mjs → ld-BGnZDnia.mjs} +176 -24
- package/dist/ld-signature-D1tFSFK8.mjs +23 -0
- package/dist/{metrics-DtxsYIkN.mjs → metrics-DHUP4F1-.mjs} +1 -1
- package/dist/{middleware-DyEjt33n.mjs → middleware-CUb31OGG.mjs} +1 -1
- package/dist/{middleware-DDvck2q9.js → middleware-DX8wADUa.js} +452 -98
- package/dist/{middleware-DblGj642.mjs → middleware-mRXKHq68.mjs} +445 -176
- package/dist/{mod-B1Qt5cQQ.d.ts → mod-B6s6hA4y.d.ts} +3 -3
- package/dist/{mod-ss0wBUH1.d.cts → mod-CJf5GcVD.d.cts} +3 -3
- package/dist/{mod-makPMVMg.d.cts → mod-CSlxqNto.d.cts} +1 -1
- package/dist/{mod-CpyjFA9s.d.ts → mod-D2DiA8u5.d.cts} +29 -7
- package/dist/{mod-BTxJG7ZH.d.cts → mod-DKRf1FLm.d.ts} +29 -7
- package/dist/{mod-B5COx5Wd.d.ts → mod-Dqu6Dl1k.d.ts} +1 -1
- package/dist/mod.cjs +6 -6
- package/dist/mod.d.cts +8 -8
- package/dist/mod.d.ts +8 -8
- package/dist/mod.js +6 -6
- package/dist/nodeinfo/client.test.mjs +432 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/{outgoing-jsonld-4IJqPYos.mjs → outgoing-jsonld-Dsca6G_Y.mjs} +35 -4
- package/dist/{owner-2vfqhUJw.mjs → owner-DEiBiiqR.mjs} +4 -4
- package/dist/{portable-collection-Cs--KD5A.cjs → portable-collection--h11WDIi.cjs} +3 -2
- package/dist/{portable-collection-DKJwGO8S.mjs → portable-collection-D0-tInp2.mjs} +2 -2
- package/dist/{portable-collection-B7AQ_dW7.js → portable-collection-M6d5I5JQ.js} +3 -2
- package/dist/{portable-key-DXGepvtD.mjs → portable-key-CyVJpWWJ.mjs} +1 -1
- package/dist/portable-verifier-CPA86vIP.js +22 -0
- package/dist/portable-verifier-DiLU8c9T.cjs +26 -0
- package/dist/{proof-DW0FK6Cp.mjs → proof-C4pwAF2k.mjs} +31 -11
- package/dist/{send-CqsocpvF.mjs → send-ivzJCtb-.mjs} +100 -22
- 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 +2 -2
- package/dist/sig/compound-proof.test.mjs +3 -3
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key-types.test.d.mts +162 -0
- package/dist/sig/key-types.test.mjs +8 -0
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +572 -7
- 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 +3 -3
- package/dist/sig/mod.d.ts +3 -3
- 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 +5 -5
- package/dist/sig/proof.test.mjs +100 -6
- 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-Dm2E1-vs.mjs → temporal-B6OlxwK_.mjs} +3 -5
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +3 -5045
- package/dist/{transformers-DAtXl_Kc.js → transformers-BlJ53iKs.js} +3 -2
- package/dist/{transformers-BalCrSsr.cjs → transformers-aIK89ibB.cjs} +3 -2
- package/dist/{types-DUjZb4i6.js → types-BbCbtwZp.js} +86 -11
- package/dist/{types-hKCCjii0.cjs → types-C8gac_AD.cjs} +85 -10
- 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/dist/utils/portable-verifier.test.d.mts +2 -0
- package/dist/utils/portable-verifier.test.mjs +126 -0
- package/package.json +6 -6
|
@@ -3,16 +3,17 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { m as parseKeyIdString } 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-
|
|
6
|
+
import { n as version, t as name } from "./deno-BKSRi6w3.mjs";
|
|
7
|
+
import { n as getDurationMs, r as getFederationMetrics, s as measureSignatureKeyFetch } from "./metrics-DHUP4F1-.mjs";
|
|
8
8
|
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-CPVqki78.mjs";
|
|
9
9
|
import { a as promoteKeyOwnerEvidence } from "./key-owner-evidence-APB6NpSk.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import { n as resolvePortableActorKey, r as verifyPortableGatewayKeyDocument } from "./portable-key-
|
|
10
|
+
import { D as validateCryptoKey, b as bypassKeyCacheReads, w as fetchKeyDetailed } from "./ld-BGnZDnia.mjs";
|
|
11
|
+
import { n as resolvePortableActorKey, r as verifyPortableGatewayKeyDocument } from "./portable-key-CyVJpWWJ.mjs";
|
|
12
12
|
import { getLogger } from "@logtape/logtape";
|
|
13
13
|
import { CryptographicKey } from "@fedify/vocab";
|
|
14
14
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
15
15
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
16
|
+
import { asCryptoKey } from "@fedify/vocab-runtime/internal";
|
|
16
17
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
17
18
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
18
19
|
import { encodeHex } from "byte-encodings/hex";
|
|
@@ -31,12 +32,13 @@ const DOUBLE_KNOCK_TRANSPORT_RETRY_DELAY_MS = 100;
|
|
|
31
32
|
*/
|
|
32
33
|
async function signRequest(request, privateKey, keyId, options = {}) {
|
|
33
34
|
validateCryptoKey(privateKey, "private");
|
|
35
|
+
const signingKey = asCryptoKey(privateKey);
|
|
34
36
|
return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(name, version).startActiveSpan("http_signatures.sign", async (span) => {
|
|
35
37
|
try {
|
|
36
38
|
const spec = options.spec ?? "draft-cavage-http-signatures-12";
|
|
37
39
|
let signed;
|
|
38
|
-
if (spec === "rfc9421") signed = await signRequestRfc9421(request,
|
|
39
|
-
else signed = await signRequestDraft(request,
|
|
40
|
+
if (spec === "rfc9421") signed = await signRequestRfc9421(request, signingKey, keyId, span, options.currentTime, options.body, options.rfc9421);
|
|
41
|
+
else signed = await signRequestDraft(request, signingKey, keyId, span, options.currentTime, options.body);
|
|
40
42
|
if (span.isRecording()) {
|
|
41
43
|
span.setAttribute(ATTR_HTTP_REQUEST_METHOD, signed.method);
|
|
42
44
|
span.setAttribute(ATTR_URL_FULL, signed.url);
|