@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
package/dist/sig/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
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, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, n as FetchKeyErrorResult, o as exportJwk, 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-
|
|
2
|
+
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, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, n as FetchKeyErrorResult, o as exportJwk, 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-CIdQA7Pc.cjs";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "../owner-BF0L9cMt.cjs";
|
|
4
|
-
import { a as
|
|
5
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
4
|
+
import { _ as verifySignature, a as VerifyPortableObjectResult, c as SignJsonLdOptions, d as attachSignature, f as createSignature, g as verifyJsonLd, h as signJsonLd, i as VerifyPortableObjectOptions, l as VerifyJsonLdOptions, m as hasSignatureLike, n as CryptoKeyPairLike, o as verifyPortableObject, p as detachSignature, r as VerifyPortableObjectFailureReason, s as CreateSignatureOptions, t as CryptoKeyLike, u as VerifySignatureOptions } from "../mod-D2DiA8u5.cjs";
|
|
5
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
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, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, n as FetchKeyErrorResult, o as exportJwk, 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-
|
|
2
|
+
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, a as KeyCache, b as HttpMessageSignaturesSpecDeterminer, c as fetchKeyDetailed, i as FetchKeyResult, j as FulfillAcceptSignatureResult, k as AcceptSignatureMember, l as generateCryptoKeyPair, n as FetchKeyErrorResult, o as exportJwk, 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-CjtBFzaE.js";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "../owner-BSzr5-I8.js";
|
|
4
|
-
import { a as
|
|
5
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
4
|
+
import { _ as verifySignature, a as VerifyPortableObjectResult, c as SignJsonLdOptions, d as attachSignature, f as createSignature, g as verifyJsonLd, h as signJsonLd, i as VerifyPortableObjectOptions, l as VerifyJsonLdOptions, m as hasSignatureLike, n as CryptoKeyPairLike, o as verifyPortableObject, p as detachSignature, r as VerifyPortableObjectFailureReason, s as CreateSignatureOptions, t as CryptoKeyLike, u as VerifySignatureOptions } from "../mod-DKRf1FLm.js";
|
|
5
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, CryptoKeyLike, CryptoKeyPairLike, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import {
|
|
4
|
-
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-
|
|
3
|
+
import { A as hasSignatureLike, E as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, a as signRequest, c as verifyRequestDetailed, gt as validateAcceptSignature, h as signObject, ht as parseAcceptSignature, m as hasProofLike, mt as fulfillAcceptSignature, p as createProof, pt as formatAcceptSignature, s as verifyRequest, v as verifyPortableObjectProof, w as attachSignature, x as verifyProof, z as exportJwk } from "../http-BwgldAIk.js";
|
|
4
|
+
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-M6d5I5JQ.js";
|
|
5
5
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-DEiBiiqR.mjs";
|
|
10
10
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
11
11
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/sig/owner.test.ts
|
|
@@ -2,7 +2,7 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
5
|
-
import { t as verifyPortableObject } from "../portable-collection-
|
|
5
|
+
import { t as verifyPortableObject } from "../portable-collection-D0-tInp2.mjs";
|
|
6
6
|
import { Collection, CollectionPage, Note, OrderedCollection, Person, traverseCollection } from "@fedify/vocab";
|
|
7
7
|
import { FetchError, encodeMultibase, exportDidKey, preloadedContexts } from "@fedify/vocab-runtime";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
@@ -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 { c as verifyPortableObjectProof, d as verifyProof } from "../proof-
|
|
8
|
-
import { n as getKeyOwner } from "../owner-
|
|
9
|
-
import { t as verifyPortableObject } from "../portable-collection-
|
|
7
|
+
import { c as verifyPortableObjectProof, d as verifyProof } from "../proof-C4pwAF2k.mjs";
|
|
8
|
+
import { n as getKeyOwner } from "../owner-DEiBiiqR.mjs";
|
|
9
|
+
import { t as verifyPortableObject } from "../portable-collection-D0-tInp2.mjs";
|
|
10
10
|
import { Application, DataIntegrityProof, lookupObject } from "@fedify/vocab";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region test-vectors/fep-ef61/tootik-v0.25.4/actor.json
|
|
@@ -2,12 +2,12 @@ import { Temporal } from "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { d as verifyProof, r as createProof } from "../proof-
|
|
7
|
-
import { n as resolvePortableActorKey } from "../portable-key-
|
|
8
|
-
import { m as verifyRequestDetailed, p as verifyRequest, u as signRequest } from "../http-
|
|
5
|
+
import { C as fetchKey, _ as verifyJsonLd, h as signJsonLd, w as fetchKeyDetailed } from "../ld-BGnZDnia.mjs";
|
|
6
|
+
import { d as verifyProof, r as createProof } from "../proof-C4pwAF2k.mjs";
|
|
7
|
+
import { n as resolvePortableActorKey } from "../portable-key-CyVJpWWJ.mjs";
|
|
8
|
+
import { m as verifyRequestDetailed, p as verifyRequest, u as signRequest } from "../http-B6sfb5xN.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
10
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-DEiBiiqR.mjs";
|
|
11
11
|
import { t as KvKeyCache } from "../keycache-N2opu4-3.mjs";
|
|
12
12
|
import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
|
|
13
13
|
import { FetchError, encodeMultibase, exportDidKey, exportSpki, parseIri, preloadedContexts } from "@fedify/vocab-runtime";
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -10,12 +10,13 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { a as verificationObservation } from "../verification-Dpfcw8ml.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { c as detachSignature, h as signJsonLd, v as verifySignature } from "../ld-BGnZDnia.mjs";
|
|
14
|
+
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-Dsca6G_Y.mjs";
|
|
15
|
+
import { a as signObject, c as verifyPortableObjectProof, d as verifyProof, i as hasProofLike, o as verifyMapLocalProof, r as createProof, s as verifyObject } from "../proof-C4pwAF2k.mjs";
|
|
16
|
+
import { p as verifyRequest } from "../http-B6sfb5xN.mjs";
|
|
16
17
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
17
|
-
import { n as getAuthenticatedDocumentLoader } from "../docloader-
|
|
18
|
-
import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place, Translation } from "@fedify/vocab";
|
|
18
|
+
import { n as getAuthenticatedDocumentLoader } from "../docloader-BcDiJfFl.mjs";
|
|
19
|
+
import { Create, DataIntegrityProof, Document, Multikey, Note, OrderedCollectionPage, PUBLIC_COLLECTION, Place, Translation } from "@fedify/vocab";
|
|
19
20
|
import { decodeMultibase, encodeMultibase, exportDidKey, exportMultibaseKey, formatIri, importMultibaseKey, parseIri } from "@fedify/vocab-runtime";
|
|
20
21
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
21
22
|
import { decodeHex } from "byte-encodings/hex";
|
|
@@ -104,7 +105,7 @@ test("createProof()", async () => {
|
|
|
104
105
|
assertEquals(proof.cryptosuite, "eddsa-jcs-2022");
|
|
105
106
|
assertEquals(proof.verificationMethodId, ed25519PublicKey.id);
|
|
106
107
|
assertEquals(proof.proofPurpose, "assertionMethod");
|
|
107
|
-
assertEquals(proof.proofValue, decodeHex("
|
|
108
|
+
assertEquals(proof.proofValue, decodeHex("471e7aefd4ce4be462d1d7e1194ccfe3c177e10986740e47b60330e1655a0242202e47d3fa6599a83bf9f989c05a1507907e3bbea44c6391243a8e5c29d8ba00"));
|
|
108
109
|
assertEquals(proof.created, created);
|
|
109
110
|
assertEquals(await verifyProof(await create.toJsonLd({
|
|
110
111
|
format: "compact",
|
|
@@ -292,6 +293,71 @@ test("hasProofLike()", () => {
|
|
|
292
293
|
proofPurpose: "assertionMethod"
|
|
293
294
|
} }));
|
|
294
295
|
});
|
|
296
|
+
test("collection serialization preserves cached object integrity proofs", async () => {
|
|
297
|
+
const options = {
|
|
298
|
+
documentLoader: mockDocumentLoader,
|
|
299
|
+
contextLoader: mockDocumentLoader
|
|
300
|
+
};
|
|
301
|
+
const source = await (await signObject(fep8b32TestVectorActivity, fep8b32TestVectorPrivateKey, fep8b32TestVectorKeyId, {
|
|
302
|
+
...options,
|
|
303
|
+
created: Temporal.Instant.from("2023-02-24T23:36:38Z")
|
|
304
|
+
})).toJsonLd(options);
|
|
305
|
+
assertInstanceOf(await verifyObject(Create, source, options), Create);
|
|
306
|
+
const cached = await Create.fromJsonLd(source, options);
|
|
307
|
+
const json = await new OrderedCollectionPage({
|
|
308
|
+
id: new URL("https://server.example/outbox?page=1"),
|
|
309
|
+
items: [cached]
|
|
310
|
+
}).toJsonLd(options);
|
|
311
|
+
assertEquals(json.orderedItems[0], source);
|
|
312
|
+
assertEquals(await cached.toJsonLd(), source);
|
|
313
|
+
assertInstanceOf(await verifyObject(Create, json.orderedItems[0], options), Create);
|
|
314
|
+
const restored = await OrderedCollectionPage.fromJsonLd(json, options);
|
|
315
|
+
const items = await Array.fromAsync(restored.getItems(options));
|
|
316
|
+
assertEquals(items.length, 1);
|
|
317
|
+
assertEquals(await items[0].toJsonLd(), source);
|
|
318
|
+
});
|
|
319
|
+
test("signObject() migrates proofs from an older context", async () => {
|
|
320
|
+
const oldContext = [
|
|
321
|
+
"https://w3id.org/identity/v1",
|
|
322
|
+
"https://www.w3.org/ns/activitystreams",
|
|
323
|
+
"https://w3id.org/security/data-integrity/v1"
|
|
324
|
+
];
|
|
325
|
+
const oldJson = await (await signObject(new Create({
|
|
326
|
+
id: new URL("https://example.com/activities/1"),
|
|
327
|
+
actor: new URL("https://example.com/users/alice")
|
|
328
|
+
}), ed25519PrivateKey, ed25519Multikey.id, {
|
|
329
|
+
contextLoader: mockDocumentLoader,
|
|
330
|
+
context: oldContext
|
|
331
|
+
})).toJsonLd({
|
|
332
|
+
format: "compact",
|
|
333
|
+
contextLoader: mockDocumentLoader,
|
|
334
|
+
context: oldContext
|
|
335
|
+
});
|
|
336
|
+
const json = await (await signObject(await Create.fromJsonLd(oldJson, {
|
|
337
|
+
contextLoader: mockDocumentLoader,
|
|
338
|
+
documentLoader: mockDocumentLoader
|
|
339
|
+
}), ed25519PrivateKey, ed25519Multikey.id, { contextLoader: mockDocumentLoader })).toJsonLd({
|
|
340
|
+
format: "compact",
|
|
341
|
+
contextLoader: mockDocumentLoader
|
|
342
|
+
});
|
|
343
|
+
const proofs = Array.isArray(json.proof) ? json.proof : [json.proof];
|
|
344
|
+
assertEquals(proofs.length, 1);
|
|
345
|
+
assertEquals(proofs[0].verificationMethod, ed25519Multikey.id.href);
|
|
346
|
+
});
|
|
347
|
+
test("signObject() skips context comparison for proofless objects", async () => {
|
|
348
|
+
const activity = new Create({
|
|
349
|
+
id: new URL("https://example.com/activities/1"),
|
|
350
|
+
actor: new URL("https://example.com/users/alice")
|
|
351
|
+
});
|
|
352
|
+
let unformattedSerializations = 0;
|
|
353
|
+
const originalToJsonLd = activity.toJsonLd.bind(activity);
|
|
354
|
+
Object.defineProperty(activity, "toJsonLd", { value: async (options) => {
|
|
355
|
+
if (options?.format == null) unformattedSerializations++;
|
|
356
|
+
return await originalToJsonLd(options);
|
|
357
|
+
} });
|
|
358
|
+
await signObject(activity, ed25519PrivateKey, ed25519Multikey.id, { contextLoader: mockDocumentLoader });
|
|
359
|
+
assertEquals(unformattedSerializations, 0);
|
|
360
|
+
});
|
|
295
361
|
test("verifyProof()", async () => {
|
|
296
362
|
const cache = {};
|
|
297
363
|
const options = {
|
|
@@ -1805,6 +1871,34 @@ test("verifyPortableObjectProof()", async (t) => {
|
|
|
1805
1871
|
assertEquals(rejectedRecorder.getMeasurements("activitypub.signature.verification.duration").length, 0);
|
|
1806
1872
|
});
|
|
1807
1873
|
});
|
|
1874
|
+
test("signJsonLd() does not invalidate an existing proof", async () => {
|
|
1875
|
+
const options = {
|
|
1876
|
+
documentLoader: mockDocumentLoader,
|
|
1877
|
+
contextLoader: mockDocumentLoader
|
|
1878
|
+
};
|
|
1879
|
+
const note = new Note({
|
|
1880
|
+
id: new URL("https://example.com/notes/1"),
|
|
1881
|
+
attribution: new URL("https://example.com/users/alice"),
|
|
1882
|
+
content: "Hello"
|
|
1883
|
+
});
|
|
1884
|
+
const proof = await createProof(note, ed25519PrivateKey, ed25519PublicKey.id, options);
|
|
1885
|
+
const jsonLd = await note.toJsonLd({
|
|
1886
|
+
format: "compact",
|
|
1887
|
+
contextLoader: mockDocumentLoader
|
|
1888
|
+
});
|
|
1889
|
+
const withProof = {
|
|
1890
|
+
...jsonLd,
|
|
1891
|
+
proof: await proof.toJsonLd({
|
|
1892
|
+
format: "compact",
|
|
1893
|
+
contextLoader: mockDocumentLoader,
|
|
1894
|
+
context: jsonLd["@context"]
|
|
1895
|
+
})
|
|
1896
|
+
};
|
|
1897
|
+
const signed = await signJsonLd(withProof, rsaPrivateKey2, rsaPublicKey2.id, options);
|
|
1898
|
+
assertEquals(signed["@context"], withProof["@context"]);
|
|
1899
|
+
assertEquals(await verifyProof(detachSignature(signed), proof, options), ed25519Multikey);
|
|
1900
|
+
assertEquals(await verifySignature(signed, options), rsaPublicKey2);
|
|
1901
|
+
});
|
|
1808
1902
|
test("verifyObject()", async () => {
|
|
1809
1903
|
const options = {
|
|
1810
1904
|
documentLoader: mockDocumentLoader,
|
|
@@ -5,10 +5,10 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
-
import { c as verifyPortableObjectProof } from "../proof-
|
|
9
|
-
import { m as verifyRequestDetailed } from "../http-
|
|
10
|
-
import { o as createFederation } from "../middleware-
|
|
11
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
8
|
+
import { c as verifyPortableObjectProof } from "../proof-C4pwAF2k.mjs";
|
|
9
|
+
import { m as verifyRequestDetailed } from "../http-B6sfb5xN.mjs";
|
|
10
|
+
import { o as createFederation } from "../middleware-mRXKHq68.mjs";
|
|
11
|
+
import { t as doesActorOwnKey } from "../owner-DEiBiiqR.mjs";
|
|
12
12
|
import { Follow, Person } from "@fedify/vocab";
|
|
13
13
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import { encodeHex } from "byte-encodings/hex";
|
|
@@ -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 { c as verifyPortableObjectProof } from "../proof-
|
|
8
|
-
import { m as verifyRequestDetailed } from "../http-
|
|
9
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
7
|
+
import { c as verifyPortableObjectProof } from "../proof-C4pwAF2k.mjs";
|
|
8
|
+
import { m as verifyRequestDetailed } from "../http-B6sfb5xN.mjs";
|
|
9
|
+
import { t as doesActorOwnKey } from "../owner-DEiBiiqR.mjs";
|
|
10
10
|
import { Create } from "@fedify/vocab";
|
|
11
11
|
import { decodeMultibase, importDidKey } from "@fedify/vocab-runtime";
|
|
12
12
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -2,9 +2,9 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { a as verificationObservation } from "../verification-Dpfcw8ml.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import { a as signObject, s as verifyObject } from "../proof-
|
|
7
|
-
import { m as verifyRequestDetailed, u as signRequest } from "../http-
|
|
5
|
+
import { _ as verifyJsonLd, h as signJsonLd } from "../ld-BGnZDnia.mjs";
|
|
6
|
+
import { a as signObject, s as verifyObject } from "../proof-C4pwAF2k.mjs";
|
|
7
|
+
import { m as verifyRequestDetailed, u as signRequest } from "../http-B6sfb5xN.mjs";
|
|
8
8
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
9
9
|
import { Activity, Create, CryptographicKey, Multikey } from "@fedify/vocab";
|
|
10
10
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import {
|
|
4
|
+
import { l as getNormalizationContextLoader } from "./ld-BGnZDnia.mjs";
|
|
5
5
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
6
|
+
import { normalizeDateTimeLiteral } from "@fedify/vocab-runtime/temporal";
|
|
6
7
|
//#region src/federation/temporal.ts
|
|
7
8
|
function isPlainObject(value) {
|
|
8
9
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
9
10
|
}
|
|
10
|
-
function normalizeDateTimeLiteral(value) {
|
|
11
|
-
return value.substring(19).match(/[Z+-]/) ? value : value + "Z";
|
|
12
|
-
}
|
|
13
11
|
function isMalformedDateTimeLiteral(value) {
|
|
14
12
|
if (typeof value !== "string") return false;
|
|
15
13
|
try {
|
|
@@ -51,7 +49,7 @@ function hasMalformedExpandedQuestionClosedLiteral(value) {
|
|
|
51
49
|
if (typeof literal === "boolean") return false;
|
|
52
50
|
if (typeof literal !== "string") return false;
|
|
53
51
|
if (value["@type"] !== XSD_DATE_TIME_IRI) return false;
|
|
54
|
-
if (new Date(literal).toString() === "Invalid Date") return false;
|
|
52
|
+
if (new Date(literal).toString() === "Invalid Date" && new Date(normalizeDateTimeLiteral(literal)).toString() === "Invalid Date") return false;
|
|
55
53
|
return isMalformedDateTimeLiteral(literal);
|
|
56
54
|
}
|
|
57
55
|
function hasMalformedExpandedDurationLiteral(value) {
|
package/dist/testing/kv.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
|
|
7
7
|
import { n as baseOptions, o as stringSchema, t as MockQueue } from "../tasks-IG3pHfvZ.mjs";
|
|
8
8
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
+
import { o as createFederation } from "../middleware-mRXKHq68.mjs";
|
|
10
10
|
//#region src/testing/kv.test.ts
|
|
11
11
|
test("ManualClockKvStore keeps an entry at its exact expiration instant", async () => {
|
|
12
12
|
const kv = new ManualClockKvStore();
|