@fedify/fedify 2.4.0-pr.936.41 → 2.5.0-dev.2271
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/README.md +50 -39
- package/dist/{assert-CJ1KXcvv.mjs → assert-D1Eafmd_.mjs} +1 -1
- package/dist/{assert_equals-BV7oLMxm.mjs → assert_equals-Z6IcEbWU.mjs} +2 -28
- package/dist/assert_exists-cffSpJ7X.mjs +28 -0
- package/dist/assert_false-CPdRnc3E.mjs +23 -0
- package/dist/assert_greater_or_equal-BlafOF4-.mjs +31 -0
- package/dist/{assert_instance_of-Q9KTBnrf.mjs → assert_instance_of-mrXWWNY-.mjs} +1 -1
- package/dist/{assert_not_equals-EPJPoxuf.mjs → assert_not_equals-CpPK2t89.mjs} +2 -1
- package/dist/assert_rejects-CTptdYck.mjs +39 -0
- package/dist/{assert_strict_equals-Ec20AUwa.mjs → assert_strict_equals-CYvBmkpC.mjs} +2 -1
- package/dist/{assert_throws-NiFfqbnH.mjs → assert_throws-BYITOvPO.mjs} +2 -1
- package/dist/assertion_error-B-cx0fFA.mjs +31 -0
- package/dist/audience-CHQ-FlLD.mjs +95 -0
- package/dist/{builder-DonuxRl_.mjs → builder-Bda6LK7A.mjs} +169 -14
- package/dist/{circuit-breaker-CBGyz5F7.mjs → circuit-breaker-XJ53md4S.mjs} +224 -17
- package/dist/circuit-breaker-test-utils-DW6YC_Pe.mjs +14 -0
- package/dist/{client-CjF5IYQS.mjs → client-CEnNz8O7.mjs} +144 -8
- package/dist/{codec-BBga-FWI.mjs → codec-C6rTrpIp.mjs} +26 -3
- package/dist/{collection-BIhlldqK.mjs → collection-CnnP1UAv.mjs} +1 -1
- 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 +71 -3
- package/dist/compat/public-audience.test.mjs +14 -5
- package/dist/compat/secured-document.test.d.mts +2 -0
- package/dist/compat/secured-document.test.mjs +58 -0
- package/dist/compat/transformers.test.mjs +5 -5
- package/dist/compound-proof-B-9mXxFW.mjs +989 -0
- package/dist/{context-Zii1f5xS.d.ts → context-7NyiqIcg.d.ts} +1600 -25
- package/dist/{context-BJXxPElm.mjs → context-8Tu9kea0.mjs} +21 -63
- package/dist/{context-lxX6I7as.d.cts → context-tsYPJ2Ew.d.cts} +1600 -25
- package/dist/{deno-BHzKn9Ig.mjs → deno-oR5aJKpU.mjs} +1 -1
- package/dist/dist-DJQM4u7i.mjs +189 -0
- package/dist/docloader-DBoYbvYW.mjs +87 -0
- package/dist/{esm-yYQfPhIY.mjs → esm-BHXXx4Wx.mjs} +13 -6
- package/dist/federation/audience.test.d.mts +2 -0
- package/dist/federation/audience.test.mjs +130 -0
- package/dist/federation/builder.test.mjs +54 -5
- package/dist/federation/circuit-breaker.test.mjs +838 -7
- package/dist/federation/collection.test.mjs +3 -3
- package/dist/federation/compound-fanout.test.d.mts +2 -0
- package/dist/federation/compound-fanout.test.mjs +228 -0
- package/dist/federation/handler-compound-proof.test.d.mts +2 -0
- package/dist/federation/handler-compound-proof.test.mjs +384 -0
- package/dist/federation/handler.test.mjs +385 -15
- package/dist/federation/hashlink-media.test.d.mts +2 -0
- package/dist/federation/hashlink-media.test.mjs +422 -0
- package/dist/federation/idempotency.test.mjs +6 -6
- package/dist/federation/inbox-report.test.d.mts +2 -0
- package/dist/federation/inbox-report.test.mjs +475 -0
- package/dist/federation/inbox.test.mjs +3 -3
- package/dist/federation/keycache.test.mjs +215 -14
- package/dist/federation/kv.test.mjs +3 -3
- package/dist/federation/metrics.test.mjs +5 -5
- package/dist/federation/middleware.test.mjs +967 -35
- package/dist/federation/mod.cjs +18 -261
- package/dist/federation/mod.d.cts +5 -5
- package/dist/federation/mod.d.ts +5 -5
- package/dist/federation/mod.js +279 -1
- package/dist/federation/mq.test.mjs +123 -47
- package/dist/federation/negotiation.test.mjs +4 -4
- package/dist/federation/outgoing-proof.test.d.mts +2 -0
- package/dist/federation/outgoing-proof.test.mjs +931 -0
- package/dist/federation/portable-actor.test.d.mts +2 -0
- package/dist/federation/portable-actor.test.mjs +496 -0
- package/dist/federation/portable-chain.test.d.mts +2 -0
- package/dist/federation/portable-chain.test.mjs +370 -0
- package/dist/federation/portable-collection.test.d.mts +2 -0
- package/dist/federation/portable-collection.test.mjs +832 -0
- package/dist/federation/portable-delivery.test.d.mts +2 -0
- package/dist/federation/portable-delivery.test.mjs +746 -0
- package/dist/federation/portable-gateway-keys.test.d.mts +2 -0
- package/dist/federation/portable-gateway-keys.test.mjs +686 -0
- package/dist/federation/portable-inbox.test.d.mts +2 -0
- package/dist/federation/portable-inbox.test.mjs +1535 -0
- package/dist/federation/portable-parse-uri.test.d.mts +2 -0
- package/dist/federation/portable-parse-uri.test.mjs +348 -0
- package/dist/federation/portable-route-activity.test.d.mts +2 -0
- package/dist/federation/portable-route-activity.test.mjs +259 -0
- package/dist/federation/portable.test.d.mts +2 -0
- package/dist/federation/portable.test.mjs +1072 -0
- package/dist/federation/retry.test.mjs +4 -3
- package/dist/federation/router.test.mjs +9 -159
- package/dist/federation/send.test.mjs +245 -27
- package/dist/federation/tasks/codec.test.mjs +4 -4
- package/dist/federation/tasks/enqueue.test.mjs +42 -4
- package/dist/federation/tasks/tasks.test.mjs +7 -6
- package/dist/federation/temporal.test.mjs +4 -4
- package/dist/federation/webfinger.test.mjs +275 -12
- package/dist/{middleware-FrSMAYEx.cjs → federation-CkZiAcWY.cjs} +8640 -3722
- package/dist/http-B5JT115n.cjs +10630 -0
- package/dist/http-DydWCB7R.js +6527 -0
- package/dist/{http-CPVMUgsW.mjs → http-siciWkmx.mjs} +397 -168
- package/dist/key-BspPiXqn.mjs +951 -0
- package/dist/key-C1nv7_jD.d.ts +1125 -0
- package/dist/key-DYxuyd-s.d.cts +1125 -0
- package/dist/key-owner-evidence-APB6NpSk.mjs +108 -0
- package/dist/keycache-Da8A8mZa.mjs +200 -0
- package/dist/{kv-D6hNiMTK.d.ts → kv-B2mzK5tl.d.cts} +3 -2
- package/dist/{kv-gJ8LYbxX.d.cts → kv-B2mzK5tl.d.ts} +3 -2
- package/dist/kv-DBRWVx3Q.mjs +104 -0
- package/dist/{kv-cache-KyGqJqSp.mjs → kv-cache-BF1hnW65.mjs} +1 -1
- package/dist/{kv-cache-5bnX3-Jq.js → kv-cache-CTQr1tbn.js} +54 -16
- package/dist/{kv-cache-DQ29C4XL.cjs → kv-cache-DCac1nEU.cjs} +55 -19
- package/dist/{ld-Cj9F_5AP.mjs → ld-CzaP-hJl.mjs} +44 -12
- package/dist/map-local-context-conflict-DOYEEJ3u.mjs +204 -0
- package/dist/map-local-create-note-B0SeXJms.mjs +214 -0
- package/dist/{metrics-DMk-nTxI.mjs → metrics-CYg9yxBL.mjs} +3 -2
- package/dist/metrics-DVKYY6K1.d.cts +36 -0
- package/dist/metrics-DoRtI0qU.d.ts +36 -0
- package/dist/{middleware-Y-kpsp6S.js → middleware-CsDDXKuL.js} +5493 -1103
- package/dist/{middleware-CvwTUgnP.mjs → middleware-D7_LO-Vs.mjs} +3157 -272
- package/dist/{middleware-CEctxBN6.mjs → middleware-DWjrfpcz.mjs} +1 -1
- package/dist/{mod-gOlPDuT8.d.cts → mod-BojP2Bw3.d.cts} +1 -1
- package/dist/mod-CavhAgLw.d.cts +320 -0
- package/dist/mod-CtpF2BU5.d.ts +320 -0
- package/dist/{mod-BtEaIEcD.d.cts → mod-DEZXwV6J.d.ts} +10 -4
- package/dist/{mod-UMmveiO0.d.ts → mod-Dw-nPxQh.d.cts} +10 -4
- package/dist/{mod-DLc2Ot6f.d.ts → mod-Xj5P4s4d.d.ts} +1 -1
- package/dist/mod.cjs +40 -39
- package/dist/mod.d.cts +10 -11
- package/dist/mod.d.ts +10 -11
- package/dist/mod.js +9 -9
- package/dist/{mq-llHKivST.mjs → mq-Dm1Wmtm-.mjs} +6 -0
- package/dist/nodeinfo/client.test.mjs +139 -4
- package/dist/nodeinfo/handler.test.mjs +5 -5
- 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/nodeinfo/types.test.mjs +4 -4
- package/dist/otel/exporter.test.mjs +3 -3
- package/dist/otel/mod.cjs +0 -1
- package/dist/otel/mod.d.cts +1 -1
- package/dist/otel/mod.d.ts +1 -1
- package/dist/{outgoing-jsonld-URuqsICz.mjs → outgoing-jsonld-4IJqPYos.mjs} +12 -10
- package/dist/{owner-DEvZuyOE.d.cts → owner-BF0L9cMt.d.cts} +11 -0
- package/dist/{owner-CnngXDNJ.d.ts → owner-BSzr5-I8.d.ts} +11 -0
- package/dist/owner-DYgfTFHy.mjs +267 -0
- package/dist/portable-collection-BpsVsRov.js +670 -0
- package/dist/portable-collection-C74P1vtC.mjs +418 -0
- package/dist/portable-collection-DZd2bm7M.cjs +686 -0
- package/dist/portable-key-BIMLrAP4.mjs +549 -0
- package/dist/portable-key-id-Ca30-hOa.mjs +248 -0
- package/dist/proof-Dxy6ByqI.mjs +1299 -0
- package/dist/{public-audience-Cr5MsnMq.mjs → public-audience--klBIOk1.mjs} +15 -10
- package/dist/router-u5O5KCQr.mjs +156 -0
- package/dist/runtime/mod.cjs +1 -1
- package/dist/runtime/mod.js +1 -1
- package/dist/secured-document-CxzZZ9nL.mjs +35 -0
- package/dist/send-C4dDpAxm.mjs +495 -0
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/compound-proof-discovery.test.d.mts +2 -0
- package/dist/sig/compound-proof-discovery.test.mjs +331 -0
- package/dist/sig/compound-proof-producer.test.d.mts +2 -0
- package/dist/sig/compound-proof-producer.test.mjs +107 -0
- package/dist/sig/compound-proof-verification.test.d.mts +2 -0
- package/dist/sig/compound-proof-verification.test.mjs +833 -0
- package/dist/sig/compound-proof.test.d.mts +2 -0
- package/dist/sig/compound-proof.test.mjs +411 -0
- package/dist/sig/http.test.mjs +702 -31
- package/dist/sig/key-owner-evidence.test.d.mts +2 -0
- package/dist/sig/key-owner-evidence.test.mjs +100 -0
- package/dist/sig/key.test.mjs +220 -8
- package/dist/sig/ld.test.mjs +65 -7
- package/dist/sig/mitra-receive-interop.test.d.mts +2 -0
- package/dist/sig/mitra-receive-interop.test.mjs +260 -0
- package/dist/sig/mitra-send-interop.test.d.mts +2 -0
- package/dist/sig/mitra-send-interop.test.mjs +461 -0
- package/dist/sig/mod.cjs +18 -16
- package/dist/sig/mod.d.cts +4 -4
- package/dist/sig/mod.d.ts +4 -4
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +108 -9
- package/dist/sig/portable-collection.test.d.mts +2 -0
- package/dist/sig/portable-collection.test.mjs +697 -0
- package/dist/sig/portable-interop.test.d.mts +2 -0
- package/dist/sig/portable-interop.test.mjs +156 -0
- package/dist/sig/portable-key-id.test.d.mts +2 -0
- package/dist/sig/portable-key-id.test.mjs +67 -0
- package/dist/sig/portable-key.test.d.mts +2 -0
- package/dist/sig/portable-key.test.mjs +1439 -0
- package/dist/sig/proof.test.mjs +1753 -16
- package/dist/sig/tootik-request-interop.test.d.mts +2 -0
- package/dist/sig/tootik-request-interop.test.mjs +190 -0
- package/dist/sig/tootik-send-interop.test.d.mts +2 -0
- package/dist/sig/tootik-send-interop.test.mjs +331 -0
- package/dist/sig/verification.test.d.mts +2 -0
- package/dist/sig/verification.test.mjs +310 -0
- package/dist/std__assert-DvMDRPes.mjs +8 -0
- package/dist/{testing-CO7ftO8A.mjs → tasks-IG3pHfvZ.mjs} +2 -2
- package/dist/{temporal-fsXO5IvD.mjs → temporal-D0KJI4NF.mjs} +3 -3
- package/dist/testing/context.test.d.mts +2 -0
- package/dist/testing/context.test.mjs +19 -0
- package/dist/testing/kv.test.d.mts +2 -0
- package/dist/testing/kv.test.mjs +101 -0
- package/dist/testing/mod.d.mts +1617 -48
- package/dist/testing/mod.mjs +6 -3
- package/dist/testing-t8xDeJZ5.mjs +8 -0
- package/dist/{transformers-DGwl-hD1.cjs → transformers-BalCrSsr.cjs} +0 -1
- package/dist/{types-DC1pNgJA.js → types-_S2_MeLF.js} +144 -8
- package/dist/{types-CPym83zc.cjs → types-poIao40f.cjs} +160 -7
- package/dist/utils/docloader.test.mjs +530 -8
- package/dist/utils/kv-cache.test.mjs +2 -2
- 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/verification-C3954hQh.mjs +5 -0
- package/dist/verification-Dpfcw8ml.mjs +105 -0
- package/dist/vocab/cjs.test.mjs +1 -1
- package/package.json +8 -8
- package/dist/assert_rejects-EgstcQy5.mjs +0 -82
- package/dist/docloader-e1khNUKy.mjs +0 -49
- package/dist/http-CsmQ-BQ4.js +0 -2483
- package/dist/http-VyDTd4G3.d.cts +0 -553
- package/dist/http-hlIjmewS.cjs +0 -2694
- package/dist/http-lf8Hsd91.d.ts +0 -553
- package/dist/key-DfPsX8hv.mjs +0 -453
- package/dist/keycache-_DHqz5z_.mjs +0 -97
- package/dist/metrics-CoUJLQhZ.d.cts +0 -276
- package/dist/metrics-Dc4jR-IC.d.ts +0 -276
- package/dist/mod-B0hW12_O.d.cts +0 -307
- package/dist/mod-COIAjwRS.d.ts +0 -307
- package/dist/owner-Br9YYzn_.mjs +0 -120
- package/dist/proof-B4ngoaNQ.mjs +0 -316
- package/dist/proof-B6E0XUXJ.js +0 -1415
- package/dist/proof-NN4xCQGL.cjs +0 -1562
- package/dist/send-CxHKUNzv.mjs +0 -239
- package/dist/std__assert-B2NnY9bq.mjs +0 -79
- package/dist/temporal-polyfill-BCdTHexd.cjs +0 -3565
- /package/dist/{accept-8PiolDP7.mjs → accept-CPVqki78.mjs} +0 -0
- /package/dist/{activity-listener-BtTSxZWA.mjs → activity-listener-C-BSbKI7.mjs} +0 -0
- /package/dist/{client-CAM_bQXx.d.cts → client-D-XP_Ccb.d.cts} +0 -0
- /package/dist/{client-CSddvgWN.d.ts → client-D-XP_Ccb.d.ts} +0 -0
- /package/dist/{keys-Dbyd7bhl.mjs → keys-DIJNHW-Y.mjs} +0 -0
- /package/dist/{kv-CXBAok3k.mjs → kv-DCHkaJ9-.mjs} +0 -0
- /package/dist/{negotiation-RuwrPFqi.mjs → negotiation-CCocWT_N.mjs} +0 -0
- /package/dist/{retry-DgFqeS5k.mjs → retry-zX5xw5e0.mjs} +0 -0
- /package/dist/{chunk-D5IdezsZ.js → rolldown-runtime-BC-Eo5Mj.js} +0 -0
- /package/dist/{chunk-Czpeue4M.cjs → rolldown-runtime-Dmm3t92W.cjs} +0 -0
- /package/dist/{transformers-DXze6FUB.js → transformers-DAtXl_Kc.js} +0 -0
- /package/dist/{types-CrtdVuDP.mjs → types-DE_LV1JB.mjs} +0 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { Temporal } from "temporal-polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
+
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
|
+
import "../std__assert-DvMDRPes.mjs";
|
|
7
|
+
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
+
import { c as verifyPortableObjectProof } from "../proof-Dxy6ByqI.mjs";
|
|
9
|
+
import { p as verifyRequestDetailed } from "../http-siciWkmx.mjs";
|
|
10
|
+
import { o as createFederation } from "../middleware-D7_LO-Vs.mjs";
|
|
11
|
+
import { t as doesActorOwnKey } from "../owner-DYgfTFHy.mjs";
|
|
12
|
+
import { Follow, Person } from "@fedify/vocab";
|
|
13
|
+
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
|
+
import { encodeHex } from "byte-encodings/hex";
|
|
15
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/follow/actor.json
|
|
16
|
+
var actor_default = {
|
|
17
|
+
"@context": [
|
|
18
|
+
"https://www.w3.org/ns/activitystreams",
|
|
19
|
+
"https://w3id.org/security/data-integrity/v1",
|
|
20
|
+
"https://w3id.org/security/v1"
|
|
21
|
+
],
|
|
22
|
+
id: "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor",
|
|
23
|
+
type: "Person",
|
|
24
|
+
inbox: "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/inbox",
|
|
25
|
+
outbox: "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/outbox",
|
|
26
|
+
preferredUsername: "alice",
|
|
27
|
+
followers: "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/followers",
|
|
28
|
+
publicKey: {
|
|
29
|
+
"id": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#main-key",
|
|
30
|
+
"owner": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor",
|
|
31
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyLpYZnhnVih6ToB4UThp\nEZIcxbBcGng71XeEfiR42v+cCyUL+jzQm12x/I0a3FNh4dzIicMvtbmLewQ/HscR\nUNIxAFHF8GqshIjg2tDAmGswTQDsvTzBsaEixXtL0qTTX8X0tFzVKJEsMJJ99jzg\nodERW73G55WwpJYyI4v1RT3G5tU3p0tmD52hhCLCRLRCPKy75iz416nCwDt5sA8B\nowVE5n/J+tjqG3umnnI3gJpTtuJxTyB/SVjLjnC604RKowwQQTHGAmcl3E5F3IrK\nfnmfqdXNCrNbfvJFFAWB+XNXFB0I+fJbGUZAOYMfjhMGEpPzzkKI8cI1eR+Z5DeZ\nGQIDAQAB\n-----END PUBLIC KEY-----\n"
|
|
32
|
+
},
|
|
33
|
+
icon: [{
|
|
34
|
+
"type": "Image",
|
|
35
|
+
"mediaType": "image/gif",
|
|
36
|
+
"url": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/icon.gif"
|
|
37
|
+
}],
|
|
38
|
+
manuallyApprovesFollowers: false,
|
|
39
|
+
assertionMethod: [{
|
|
40
|
+
"id": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#ed25519-key",
|
|
41
|
+
"type": "Multikey",
|
|
42
|
+
"controller": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor",
|
|
43
|
+
"publicKeyMultibase": "z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR"
|
|
44
|
+
}, {
|
|
45
|
+
"id": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#ml-dsa-44-key",
|
|
46
|
+
"type": "Multikey",
|
|
47
|
+
"controller": "https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor",
|
|
48
|
+
"publicKeyMultibase": "ukCQjRdBDVD0QfnNnj4wFAJE82TmNXoNQ80Rf6s3ivFXlFCzb5_tZHVhfsR5JysgCbOqYPnXYyXIgXAm_klgaj1a4_MB-KLhmueucnnMKUjl60ORt4RG2fDAjZoCzBy-m7PMX5hByOfuDTXbAhSFhG44xvBumN2x877PLudpMqhe9hhBDwgL4NTxUWOP3xJR4KhO0GMzjA6r4HGw0F2Mw3cYQNJs2t40k9w_Yt1qiVfyr4Qk0pk5vnZEkNFF71OBm-SUUSPtrHQEo02HhElN7uFE8wgYmziC_RqzrvyWAi9XQofgDGps2d-xXQew28NkyhAjv-7yIwd3ukjm_0UxjslLFpcjRAW7hNkrIm6oxV_Wv3ynpUVII7uc6v3Q3hkTtJxL4bcsl-oOpZKAqJide5A09G0XE_PvPrnVU3n9hH1HIhs4aWUeo3xda_gLfA5yoavGhqh1oOKnT3yiZYysjKt4GbdcLE_AMCDvWAqLdHTywnl5CG_9gUa3GlgjEsrJK8-SWCXoVgjQmGtdLWWMXTwzAwNZZwkoiR72v0uVOAzE54U_0oz6_Fowdgr29o0qu8TTb6NY70fF34XMWDDlKOWpgo7s5ejL15jfsrzcLhzP1xQlcBqQRZIsSQ_e0z_6mPJlYMu-UjsJIu4SM1__mn48TAQbw__B7VtClD_wGpedwF8gPpATziNsmOVvK8LKtYt983i2bzLYlV3Um31R4r-0i13JY6tBDC3SXkbOyOW3HkfecC1EJ11ffqoBwYT6KJGYH1pd8YR7cvwQn6C4kItLQnoUcIPBY7hKmw6B78e0ZexMMZlmQkW_JEHpgRi0Fb9atgSfGs8IIHTZGOkU5MGUUH1Evqz995dqFjoUxZaCGNKE2Rh-c0F4UdVToex7ZniQOFL1-D16mTloNwPgA9tvd7SUnSY2fr_E4Vyt-Rvcy_azBWBZWPzKdOy9u0OEW8uLeX680qp1Qbx97zDwCsiNAoTRMPyS_azqB12RThb3L-o28UXw5cPyeW9NSSN3G4yaweaIDmQ16vB1biKknrOU9XNVwkwZ4ilzYoESkGmQoCOomrNjGclx99d42S_7laMBlOkQcy846EyxhaHpkOj7t5LIU4Vs1TKeXXDV08wZQHz_r557uwtly8ltLHCg1pWm6MJNRgkhcGBhlE7Jt3gybA9HkYrg_x3NTR-uQocckeUbZZI1Q0aQuMa_F6_qC8WJOAkGDfERlFs7-gVjqYtTSHFLky3B_CgZukp_YZ-HLDlbxAO2qw_itfcn3fn95LLPUxiOZvB49xyha_z2r4rHt9R0BymvDM9ufp-pg2CiLBe3cPiy1Ck_BE7kvA7TyjShi3YyQIGfUcwAoWXOj4lKwejeqUmsjJ-gpD2iVJ3frWao9Cu846ubamb6wQZf5faAx6yTJsHLYdeDBqqJRCMSVEnOYHf6SaNfzdE8EFqCJ7LP2IYDnSFaiZovhja6BJBM4fphH27mnkrQ10whn35XX843QVAOLJa5fn4GoIwkSFY0PSL1J4MT1MobKfA0lROfF5fE29sKLRt-wbnHveAFE_CRiyzW6IFQO9flnSmn83VxigN2hv_xD51KX6p8dCzX1QLl0S9fWF1K9iHkq4ulz6slvypfacesLLGvbVnAWX491PPq9LIOHjCLoZbr1Ap8vkLw61-XvDFSBHUxGKvrlpPOKO5V3zop0sT_QiEymx9DpGAGrbYiyDEC3LhNmD14DxRdRqQLG3wW6HFTMJtl6"
|
|
49
|
+
}],
|
|
50
|
+
gateways: ["https://tootik.example"],
|
|
51
|
+
proof: {
|
|
52
|
+
"@context": [
|
|
53
|
+
"https://www.w3.org/ns/activitystreams",
|
|
54
|
+
"https://w3id.org/security/data-integrity/v1",
|
|
55
|
+
"https://w3id.org/security/v1"
|
|
56
|
+
],
|
|
57
|
+
"type": "DataIntegrityProof",
|
|
58
|
+
"cryptosuite": "eddsa-jcs-2022",
|
|
59
|
+
"verificationMethod": "did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR#z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR",
|
|
60
|
+
"proofPurpose": "assertionMethod",
|
|
61
|
+
"proofValue": "z2G5haKKAJk3rfL8njG9V2jybnPuHrXjR8ipPBjDSFim9cFuJ9xEMEWBLQLdBmoQKXmHhqXfheadf8EaNW3cEpX8s",
|
|
62
|
+
"created": "2026-09-30T13:25:15Z"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/follow/request.json
|
|
67
|
+
var url = "https://fedify.example:18444/users/alice/inbox";
|
|
68
|
+
var method = "POST";
|
|
69
|
+
var headers = [
|
|
70
|
+
["accept-encoding", "gzip"],
|
|
71
|
+
["content-length", "1033"],
|
|
72
|
+
["content-type", "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""],
|
|
73
|
+
["date", "Wed, 30 Sep 2026 13:30:43 GMT"],
|
|
74
|
+
["digest", "SHA-256=ZlDZCndYkYcCvPMpFmRZJE+QT1SVtwope+KPaV5U/r8="],
|
|
75
|
+
["host", "fedify.example:18444"],
|
|
76
|
+
["signature", "keyId=\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) host date content-type digest\",signature=\"Rqd+mtn7knlPY5SXUE2Zz93ICDgBeamFu5v8SagsII8vYcBTX1gan+S0oded4+f4gLB0cs+xdlaqeAUBj3BtWYBJ/cEcCWDFp+bB0xhq/grE/xt4fkdgCCfXWSU2EnJuFCEmUoB1zRemNvTOHwZV4wDrkLVwQsIxrUIjPbMFTVGyMjnpY71Ydta3rdia7VW0VWK3gEC4FJ6YweFxV52dmcOTmA3Qj1h0riHHVEZXs5UOzPJLL6FJQoz8ezyjE7LanxSoXpeOSHa5K1fAo9i35eJr1/eQdFpHt7ftabpv3+6u6MhCFAt2lJs3XJbJZL8DYNkYwJNAYi9fqmH8JOVuMw==\""],
|
|
77
|
+
["user-agent", "tootik/0.25.4"]
|
|
78
|
+
];
|
|
79
|
+
var capturedAt$1 = "2026-09-30T13:30:43.325Z";
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/follow/metadata.json
|
|
82
|
+
var capturedAt = "2026-09-30T13:30:43.325Z";
|
|
83
|
+
var requestBodySha256 = "6650d90a7758918702bcf329166459244f904f5495b70a297be28f695e54febf";
|
|
84
|
+
var actorBodySha256 = "a58dad10d1051aed670bd79ee7dbfb9d3606cc8e6f231a9a742edd9317b28cd8";
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/follow/raw-bodies.json
|
|
87
|
+
var requestBody = "{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://w3id.org/security/v1\"],\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/follow/01a0f282-9cba-7125-af77-e8c7210b7b65\",\"type\":\"Follow\",\"actor\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor\",\"object\":\"https://fedify.example:18444/users/alice\",\"to\":[\"https://fedify.example:18444/users/alice\"],\"cc\":[],\"proof\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://w3id.org/security/v1\"],\"type\":\"DataIntegrityProof\",\"cryptosuite\":\"eddsa-jcs-2022\",\"verificationMethod\":\"did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR#z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z4yttRN3ak6xdXqdkg6KF9UyiVLv85tbcEvGFEcAKRSg5hpzhMFZzK2A8dp3o3wnJq5CA9t6nc47umjJkjmT5Kpmk\",\"created\":\"2026-09-30T13:30:41Z\"}}";
|
|
88
|
+
var actorBody = "{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://w3id.org/security/v1\"],\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor\",\"type\":\"Person\",\"inbox\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/inbox\",\"outbox\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/outbox\",\"preferredUsername\":\"alice\",\"followers\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/followers\",\"publicKey\":{\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#main-key\",\"owner\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor\",\"publicKeyPem\":\"-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyLpYZnhnVih6ToB4UThp\\nEZIcxbBcGng71XeEfiR42v+cCyUL+jzQm12x/I0a3FNh4dzIicMvtbmLewQ/HscR\\nUNIxAFHF8GqshIjg2tDAmGswTQDsvTzBsaEixXtL0qTTX8X0tFzVKJEsMJJ99jzg\\nodERW73G55WwpJYyI4v1RT3G5tU3p0tmD52hhCLCRLRCPKy75iz416nCwDt5sA8B\\nowVE5n/J+tjqG3umnnI3gJpTtuJxTyB/SVjLjnC604RKowwQQTHGAmcl3E5F3IrK\\nfnmfqdXNCrNbfvJFFAWB+XNXFB0I+fJbGUZAOYMfjhMGEpPzzkKI8cI1eR+Z5DeZ\\nGQIDAQAB\\n-----END PUBLIC KEY-----\\n\"},\"icon\":[{\"type\":\"Image\",\"mediaType\":\"image/gif\",\"url\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor/icon.gif\"}],\"manuallyApprovesFollowers\":false,\"assertionMethod\":[{\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#ed25519-key\",\"type\":\"Multikey\",\"controller\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor\",\"publicKeyMultibase\":\"z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR\"},{\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor#ml-dsa-44-key\",\"type\":\"Multikey\",\"controller\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR/actor\",\"publicKeyMultibase\":\"ukCQjRdBDVD0QfnNnj4wFAJE82TmNXoNQ80Rf6s3ivFXlFCzb5_tZHVhfsR5JysgCbOqYPnXYyXIgXAm_klgaj1a4_MB-KLhmueucnnMKUjl60ORt4RG2fDAjZoCzBy-m7PMX5hByOfuDTXbAhSFhG44xvBumN2x877PLudpMqhe9hhBDwgL4NTxUWOP3xJR4KhO0GMzjA6r4HGw0F2Mw3cYQNJs2t40k9w_Yt1qiVfyr4Qk0pk5vnZEkNFF71OBm-SUUSPtrHQEo02HhElN7uFE8wgYmziC_RqzrvyWAi9XQofgDGps2d-xXQew28NkyhAjv-7yIwd3ukjm_0UxjslLFpcjRAW7hNkrIm6oxV_Wv3ynpUVII7uc6v3Q3hkTtJxL4bcsl-oOpZKAqJide5A09G0XE_PvPrnVU3n9hH1HIhs4aWUeo3xda_gLfA5yoavGhqh1oOKnT3yiZYysjKt4GbdcLE_AMCDvWAqLdHTywnl5CG_9gUa3GlgjEsrJK8-SWCXoVgjQmGtdLWWMXTwzAwNZZwkoiR72v0uVOAzE54U_0oz6_Fowdgr29o0qu8TTb6NY70fF34XMWDDlKOWpgo7s5ejL15jfsrzcLhzP1xQlcBqQRZIsSQ_e0z_6mPJlYMu-UjsJIu4SM1__mn48TAQbw__B7VtClD_wGpedwF8gPpATziNsmOVvK8LKtYt983i2bzLYlV3Um31R4r-0i13JY6tBDC3SXkbOyOW3HkfecC1EJ11ffqoBwYT6KJGYH1pd8YR7cvwQn6C4kItLQnoUcIPBY7hKmw6B78e0ZexMMZlmQkW_JEHpgRi0Fb9atgSfGs8IIHTZGOkU5MGUUH1Evqz995dqFjoUxZaCGNKE2Rh-c0F4UdVToex7ZniQOFL1-D16mTloNwPgA9tvd7SUnSY2fr_E4Vyt-Rvcy_azBWBZWPzKdOy9u0OEW8uLeX680qp1Qbx97zDwCsiNAoTRMPyS_azqB12RThb3L-o28UXw5cPyeW9NSSN3G4yaweaIDmQ16vB1biKknrOU9XNVwkwZ4ilzYoESkGmQoCOomrNjGclx99d42S_7laMBlOkQcy846EyxhaHpkOj7t5LIU4Vs1TKeXXDV08wZQHz_r557uwtly8ltLHCg1pWm6MJNRgkhcGBhlE7Jt3gybA9HkYrg_x3NTR-uQocckeUbZZI1Q0aQuMa_F6_qC8WJOAkGDfERlFs7-gVjqYtTSHFLky3B_CgZukp_YZ-HLDlbxAO2qw_itfcn3fn95LLPUxiOZvB49xyha_z2r4rHt9R0BymvDM9ufp-pg2CiLBe3cPiy1Ck_BE7kvA7TyjShi3YyQIGfUcwAoWXOj4lKwejeqUmsjJ-gpD2iVJ3frWao9Cu846ubamb6wQZf5faAx6yTJsHLYdeDBqqJRCMSVEnOYHf6SaNfzdE8EFqCJ7LP2IYDnSFaiZovhja6BJBM4fphH27mnkrQ10whn35XX843QVAOLJa5fn4GoIwkSFY0PSL1J4MT1MobKfA0lROfF5fE29sKLRt-wbnHveAFE_CRiyzW6IFQO9flnSmn83VxigN2hv_xD51KX6p8dCzX1QLl0S9fWF1K9iHkq4ulz6slvypfacesLLGvbVnAWX491PPq9LIOHjCLoZbr1Ap8vkLw61-XvDFSBHUxGKvrlpPOKO5V3zop0sT_QiEymx9DpGAGrbYiyDEC3LhNmD14DxRdRqQLG3wW6HFTMJtl6\"}],\"gateways\":[\"https://tootik.example\"],\"proof\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://w3id.org/security/v1\"],\"type\":\"DataIntegrityProof\",\"cryptosuite\":\"eddsa-jcs-2022\",\"verificationMethod\":\"did:key:z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR#z6MkpWqhz4YAuBfC4ddjU49mGfs6CAuYcm243K5hW2YEGAyR\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z2G5haKKAJk3rfL8njG9V2jybnPuHrXjR8ipPBjDSFim9cFuJ9xEMEWBLQLdBmoQKXmHhqXfheadf8EaNW3cEpX8s\",\"created\":\"2026-09-30T13:25:15Z\"}}";
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/sig/tootik-request-interop.test.ts
|
|
91
|
+
const body = requestBody;
|
|
92
|
+
const activity = JSON.parse(body);
|
|
93
|
+
async function sha256(value) {
|
|
94
|
+
return encodeHex(new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value))));
|
|
95
|
+
}
|
|
96
|
+
function loader(document = actor_default) {
|
|
97
|
+
return (url) => {
|
|
98
|
+
assertEquals(url.split("#")[0], actor_default.id);
|
|
99
|
+
return Promise.resolve({
|
|
100
|
+
document: structuredClone(document),
|
|
101
|
+
documentUrl: actor_default.id,
|
|
102
|
+
contextUrl: null
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const options = {
|
|
107
|
+
documentLoader: loader(),
|
|
108
|
+
contextLoader: mockDocumentLoader,
|
|
109
|
+
currentTime: Temporal.Instant.from(capturedAt$1)
|
|
110
|
+
};
|
|
111
|
+
function request(requestBody = body, url$1 = url, headers$2 = new Headers(headers)) {
|
|
112
|
+
return new Request(url$1, {
|
|
113
|
+
method,
|
|
114
|
+
headers: headers$2,
|
|
115
|
+
body: requestBody
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
async function deliver(requestBody) {
|
|
119
|
+
const federation = createFederation({
|
|
120
|
+
kv: new MemoryKvStore(),
|
|
121
|
+
documentLoaderFactory: () => loader(),
|
|
122
|
+
contextLoaderFactory: () => mockDocumentLoader,
|
|
123
|
+
signatureTimeWindow: false
|
|
124
|
+
});
|
|
125
|
+
federation.setActorDispatcher("/users/{identifier}", (ctx, identifier) => identifier === "alice" ? new Person({
|
|
126
|
+
id: ctx.getActorUri(identifier),
|
|
127
|
+
inbox: ctx.getInboxUri(identifier)
|
|
128
|
+
}) : null).setKeyPairsDispatcher(() => []);
|
|
129
|
+
const received = [];
|
|
130
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").on(Follow, (_ctx, follow) => {
|
|
131
|
+
received.push(follow);
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
response: await federation.fetch(request(requestBody), { contextData: void 0 }),
|
|
135
|
+
received
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
test("tootik v0.25.4 captured Follow verifies its proof and HTTP signature", async () => {
|
|
139
|
+
const actorBody$1 = actorBody;
|
|
140
|
+
assertEquals(await sha256(body), requestBodySha256);
|
|
141
|
+
assertEquals(await sha256(actorBody$1), actorBodySha256);
|
|
142
|
+
assertEquals(JSON.parse(actorBody$1), actor_default);
|
|
143
|
+
assertEquals(activity.type, "Follow");
|
|
144
|
+
assertEquals(actor_default.type, "Person");
|
|
145
|
+
assertEquals(activity.actor, actor_default.id);
|
|
146
|
+
assert((await verifyPortableObjectProof(activity, options)).verified);
|
|
147
|
+
const verified = await verifyRequestDetailed(request(), options);
|
|
148
|
+
assert(verified.verified);
|
|
149
|
+
assertEquals(verified.key.id?.href, actor_default.publicKey.id);
|
|
150
|
+
assert(await doesActorOwnKey(await Follow.fromJsonLd(activity, options), verified.key, options));
|
|
151
|
+
assertEquals(capturedAt$1, capturedAt);
|
|
152
|
+
});
|
|
153
|
+
test("tootik v0.25.4 captured Follow reaches the Fedify inbox listener", async () => {
|
|
154
|
+
const { response, received } = await deliver(body);
|
|
155
|
+
assertEquals(response.status, 202);
|
|
156
|
+
assertEquals(received.length, 1);
|
|
157
|
+
assertEquals(received[0].id?.href, activity.id);
|
|
158
|
+
assertEquals(received[0].actorId?.href, actor_default.id);
|
|
159
|
+
});
|
|
160
|
+
test("tootik v0.25.4 captured Follow rejects body tampering", async () => {
|
|
161
|
+
const tampered = {
|
|
162
|
+
...activity,
|
|
163
|
+
object: "https://fedify.example:18444/users/mallory"
|
|
164
|
+
};
|
|
165
|
+
assertEquals((await verifyPortableObjectProof(tampered, options)).verified, false);
|
|
166
|
+
const changedBody = JSON.stringify(tampered);
|
|
167
|
+
assertEquals((await verifyRequestDetailed(request(changedBody), options)).verified, false);
|
|
168
|
+
const { response, received } = await deliver(changedBody);
|
|
169
|
+
assertEquals(response.status, 401);
|
|
170
|
+
assertEquals(received.length, 0);
|
|
171
|
+
});
|
|
172
|
+
test("tootik v0.25.4 captured Follow rejects signed header and path tampering", async () => {
|
|
173
|
+
const headers$1 = new Headers(headers);
|
|
174
|
+
headers$1.set("Content-Type", "application/json");
|
|
175
|
+
assertEquals((await verifyRequestDetailed(request(body, url, headers$1), options)).verified, false);
|
|
176
|
+
assertEquals((await verifyRequestDetailed(request(body, `${url}/tampered`), options)).verified, false);
|
|
177
|
+
});
|
|
178
|
+
test("tootik v0.25.4 captured Follow rejects a tampered actor proof", async () => {
|
|
179
|
+
const tampered = {
|
|
180
|
+
...actor_default,
|
|
181
|
+
preferredUsername: "mallory"
|
|
182
|
+
};
|
|
183
|
+
assertEquals((await verifyPortableObjectProof(tampered, options)).verified, false);
|
|
184
|
+
assertEquals((await verifyRequestDetailed(request(), {
|
|
185
|
+
...options,
|
|
186
|
+
documentLoader: loader(tampered)
|
|
187
|
+
})).verified, false);
|
|
188
|
+
});
|
|
189
|
+
//#endregion
|
|
190
|
+
export {};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { Temporal } from "temporal-polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
|
+
import "../std__assert-DvMDRPes.mjs";
|
|
6
|
+
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
7
|
+
import { c as verifyPortableObjectProof } from "../proof-Dxy6ByqI.mjs";
|
|
8
|
+
import { p as verifyRequestDetailed } from "../http-siciWkmx.mjs";
|
|
9
|
+
import { t as doesActorOwnKey } from "../owner-DYgfTFHy.mjs";
|
|
10
|
+
import { Create } from "@fedify/vocab";
|
|
11
|
+
import { decodeMultibase, importDidKey } from "@fedify/vocab-runtime";
|
|
12
|
+
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
13
|
+
import { encodeHex } from "byte-encodings/hex";
|
|
14
|
+
import serialize from "json-canon";
|
|
15
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/actor.json
|
|
16
|
+
var actor_default = {
|
|
17
|
+
"@context": [
|
|
18
|
+
"https://www.w3.org/ns/activitystreams",
|
|
19
|
+
"https://w3id.org/fep/ef61",
|
|
20
|
+
"https://w3id.org/security/v1",
|
|
21
|
+
"https://w3id.org/security/data-integrity/v1",
|
|
22
|
+
"https://www.w3.org/ns/did/v1",
|
|
23
|
+
"https://w3id.org/security/multikey/v1",
|
|
24
|
+
"https://gotosocial.org/ns",
|
|
25
|
+
"https://w3id.org/fep/7aa9",
|
|
26
|
+
{
|
|
27
|
+
"alsoKnownAs": {
|
|
28
|
+
"@id": "as:alsoKnownAs",
|
|
29
|
+
"@type": "@id"
|
|
30
|
+
},
|
|
31
|
+
"featuredCollections": {
|
|
32
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections",
|
|
33
|
+
"@type": "@id"
|
|
34
|
+
},
|
|
35
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
|
36
|
+
"movedTo": {
|
|
37
|
+
"@id": "as:movedTo",
|
|
38
|
+
"@type": "@id"
|
|
39
|
+
},
|
|
40
|
+
"toot": "http://joinmastodon.org/ns#",
|
|
41
|
+
"Emoji": "toot:Emoji",
|
|
42
|
+
"featured": {
|
|
43
|
+
"@id": "toot:featured",
|
|
44
|
+
"@type": "@id"
|
|
45
|
+
},
|
|
46
|
+
"featuredTags": {
|
|
47
|
+
"@id": "toot:featuredTags",
|
|
48
|
+
"@type": "@id"
|
|
49
|
+
},
|
|
50
|
+
"discoverable": "toot:discoverable",
|
|
51
|
+
"suspended": "toot:suspended",
|
|
52
|
+
"memorial": "toot:memorial",
|
|
53
|
+
"indexable": "toot:indexable",
|
|
54
|
+
"schema": "http://schema.org#",
|
|
55
|
+
"PropertyValue": "schema:PropertyValue",
|
|
56
|
+
"value": "schema:value",
|
|
57
|
+
"misskey": "https://misskey-hub.net/ns#",
|
|
58
|
+
"_misskey_followedMessage": "misskey:_misskey_followedMessage",
|
|
59
|
+
"isCat": "misskey:isCat"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
id: "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor",
|
|
63
|
+
type: "Person",
|
|
64
|
+
inbox: "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor/inbox",
|
|
65
|
+
gateways: ["https://fedify.example/"],
|
|
66
|
+
assertionMethod: [{
|
|
67
|
+
"id": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#ed25519-key",
|
|
68
|
+
"type": "Multikey",
|
|
69
|
+
"controller": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor",
|
|
70
|
+
"publicKeyMultibase": "z6MkoHdcDxRg36BmHgY8riW5xW8NbZdbgKBMmXUoyDAN9LEX"
|
|
71
|
+
}, {
|
|
72
|
+
"id": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#main-key",
|
|
73
|
+
"type": "Multikey",
|
|
74
|
+
"controller": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor",
|
|
75
|
+
"publicKeyMultibase": "zgghBUVkqmWS8e1j5pNkit2HZTY7551YeVnqt4nok9y5j6Qj4zHfHAiTCUWeiSfvfgC8cuknF4312kUZa79gAAwCyoXqA3PZppMxsGmdwRprmxYkGrZkfvmmLfzCvw6faQrsph6hiMvYtFEQUZTwd2n6CG9j7ZqiXA5NGN9WRu5MNqucWNpMTQZFSdPnow2GgMnGy7G5fDhg7BQtSPLCYdEWEipFWJuy6nKwmySnffKYnZQZQRzNysFg2xJ91ZceWVrAjFxHwjekyUe2CrkNM1vYq829SnCoXUfPBsA31ujzVuYBwjDZhCDXmJ87fbWFmDg6zmwyXLdGLRmGY3nbkU8Jwt4iyRNqCpjirKjEx54JQj2wahyxL6r2BBjMnuoisDXNi6vjztoE7WbmHDoMVoz9qGUv5s2b6VVvn7vNgHYjjvKjYLbrj2fhe6ccwycxphU5vphepKWTRCNa3DsC8HpCjBjq3YZ9da8P8JorDKWyZLRAUn6piCn1LMJpHDDbeun1YgdXw3sDhDk5bHfBUJ7y5Lgnob8HpVBcjDA7ttbBEtFJ1RYb7XFYJJcaersNhWAoiZtLaQucHdNoRWJF8ByRJPRp5wz9rk2tkzTQoA5PFdomjbgYhqdq77d9VMuUPHJ97117xGVffGjGFipt5ZEuNazcVfes8Z21XzHBR7D39GyYvGAs1aiFx4wmyLiCw21ATd6Uq2kN6EcHex"
|
|
76
|
+
}],
|
|
77
|
+
proof: {
|
|
78
|
+
"type": "DataIntegrityProof",
|
|
79
|
+
"created": "2026-09-30T14:16:34.822909912Z",
|
|
80
|
+
"cryptosuite": "eddsa-jcs-2022",
|
|
81
|
+
"proofPurpose": "assertionMethod",
|
|
82
|
+
"proofValue": "z2qzHQQ9yWvvfJdZvcWRKU8gYBnKNNMzppy7J6pcr7tqWevY3PFr3RUAVrnK9yuCPh9oP27XWPXrmQjaPDEkJm6Yx",
|
|
83
|
+
"verificationMethod": "did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN",
|
|
84
|
+
"@context": [
|
|
85
|
+
"https://www.w3.org/ns/activitystreams",
|
|
86
|
+
"https://w3id.org/fep/ef61",
|
|
87
|
+
"https://w3id.org/security/v1",
|
|
88
|
+
"https://w3id.org/security/data-integrity/v1",
|
|
89
|
+
"https://www.w3.org/ns/did/v1",
|
|
90
|
+
"https://w3id.org/security/multikey/v1",
|
|
91
|
+
"https://gotosocial.org/ns",
|
|
92
|
+
"https://w3id.org/fep/7aa9",
|
|
93
|
+
{
|
|
94
|
+
"alsoKnownAs": {
|
|
95
|
+
"@id": "as:alsoKnownAs",
|
|
96
|
+
"@type": "@id"
|
|
97
|
+
},
|
|
98
|
+
"featuredCollections": {
|
|
99
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections",
|
|
100
|
+
"@type": "@id"
|
|
101
|
+
},
|
|
102
|
+
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
|
103
|
+
"movedTo": {
|
|
104
|
+
"@id": "as:movedTo",
|
|
105
|
+
"@type": "@id"
|
|
106
|
+
},
|
|
107
|
+
"toot": "http://joinmastodon.org/ns#",
|
|
108
|
+
"Emoji": "toot:Emoji",
|
|
109
|
+
"featured": {
|
|
110
|
+
"@id": "toot:featured",
|
|
111
|
+
"@type": "@id"
|
|
112
|
+
},
|
|
113
|
+
"featuredTags": {
|
|
114
|
+
"@id": "toot:featuredTags",
|
|
115
|
+
"@type": "@id"
|
|
116
|
+
},
|
|
117
|
+
"discoverable": "toot:discoverable",
|
|
118
|
+
"suspended": "toot:suspended",
|
|
119
|
+
"memorial": "toot:memorial",
|
|
120
|
+
"indexable": "toot:indexable",
|
|
121
|
+
"schema": "http://schema.org#",
|
|
122
|
+
"PropertyValue": "schema:PropertyValue",
|
|
123
|
+
"value": "schema:value",
|
|
124
|
+
"misskey": "https://misskey-hub.net/ns#",
|
|
125
|
+
"_misskey_followedMessage": "misskey:_misskey_followedMessage",
|
|
126
|
+
"isCat": "misskey:isCat"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
publicKey: {
|
|
131
|
+
"id": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#main-key",
|
|
132
|
+
"type": "CryptographicKey",
|
|
133
|
+
"owner": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor",
|
|
134
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5PRU4GP79WfFGwBvSJ4V\ntAmtreYrzQuLY/whIprIZScL7t5lvvdyu8qX6odu0LsBozosQ1A/oyaCv00jyhjj\nupQdtJXhzW+WG9AuZT4rH4Z0r9u1bpGJT67msalb4ffDxS1d8Ipb1Xe/Hfs6Uu+d\niyINnR3S4qj1bOXLBfNt4lI1wfycFwFtmtqOsxLKqY0VMZ2d9yeYnAUYAOh/C82t\ng69nuXkeyyRJUNSBaY7ej6jnSPbJCpSsnYHzL/bE5h37vo0DUClV5ZPUGzFggDYK\nYC6py31LOEXIn94AV4xVSVpKrQEPeBHrcx4ejJuUVpA9s9L5OoLMcUyZS5OSs8ek\nM8Mj+LjCkakzsZWCusWstyebsszYNz1zq/yiXBiJJ0ypcbraYkltLJ5Ui8KSdH6e\n2r5zC951YifyJZp8p+qK+Z52ZGjbMsWlfwHAynZEn8F5Bqzd4Xlo4s8/mgYtJBIk\nKC4t4HgPXZSCH866wyOOJZz1m7jS5XwopX5s/ST7XzLVw9WpTqd2hqRGpAvCGR42\nM8JOcPqHCAi/KjN4Nyhj9e3TzkoETYYqzQvxCy0LeDi/dHr8EDbT7tF5rCAeglc9\nWWSBqpOnromClOWxX9HgklXvUmid4CkstoQzFb5H+uovtbLrPzMY9kokEXnG69UD\nVkq6SwoNVm0551D8M2smtf0CAwEAAQ==\n-----END PUBLIC KEY-----\n"
|
|
135
|
+
},
|
|
136
|
+
name: "Native Fedify portable sender",
|
|
137
|
+
outbox: "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor/outbox",
|
|
138
|
+
preferredUsername: "fedifyreverse"
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/request.json
|
|
142
|
+
var url = "https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor/inbox";
|
|
143
|
+
var method = "POST";
|
|
144
|
+
var headers = [
|
|
145
|
+
["content-type", "application/activity+json"],
|
|
146
|
+
["date", "Wed, 30 Sep 2026 14:16:35 GMT"],
|
|
147
|
+
["digest", "SHA-256=WB7t6jsP47/AEPHyEcEz/RSb1MTRXkeJ7y/zuMLzJVc="],
|
|
148
|
+
["host", "tootik.example"],
|
|
149
|
+
["signature", "keyId=\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#main-key\",algorithm=\"rsa-sha256\",headers=\"(request-target) content-type date digest host\",signature=\"y2ub43LG9Akaqko3y0bTKSWyQwAlbDdH6x2pLFHqyFfogCXm3zjCJGjISkYsDQn56B6PteHT1JWSgKsmS8/ohH+lYvnSqaZ6KYU3DC0DozJTYHRy18nr9GP9w4Sq0EUAx+jOgpMGlud7G3DRMcZ17aeVCaT8IQCTezBbfzbGjb7fh0U6mYhiI+wKYMAqxmHym9lJDiBP+1s2Gctp9vN2lInvZ0Ve9zW9ue4Yfx/7mnHaSk9Kv9rk3Crjh+pf2U2FZMs5MgnXgqmLgQ3xIuzSyXZ/knj3Eqv0pLVGD4oUehypatPC7VGhRRECCYygVfx9GUdCSxHLNRFP0BXAIcQ5rkJ7hI54moSDXL3VP0+7FPI8FhbZmDS+bW0P6prAWlxYJPdpF/Zy/eiwNBPIQiOz0WQkJ8G0++roZH/Ov9QQqSfb2wziNaE+zRBBKdwKRW8NO7mYfFvmHK+q2sPh/WCBZU7zPPSeGTSlREcUO6EIPNLVC5tYEyyGhONgPn/mjfIllxItb/XzNOyzRYbYw3zoDMS7D1CZE81YX/TmX+UcDkXGOxQyiMcBGFCKPWWcEdYQgaQz4MffhLXSR/UqDG520xGk0aaUZRyCalLK/kUhPKYxd4WB3wa61nQ6s6bn0/s2RKbK5U4crsgvDw6f8ebIm5ZO6PcQjz+d3sLx/D/FYgo=\""]
|
|
150
|
+
];
|
|
151
|
+
var capturedAt = "2026-09-30T14:16:35.040Z";
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/first-response.json
|
|
154
|
+
var status$2 = 401;
|
|
155
|
+
var body = "{\"error\":\"actor is too young\"}\n";
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/metadata.json
|
|
158
|
+
var sha256 = {
|
|
159
|
+
"requestBody": "581eedea3b0fe3bfc010f1f211c133fd149bd4c4d15e4789ef2ff3b8c2f32557",
|
|
160
|
+
"actorBody": "e164c9b9c9009887a97b4260b3acdad5cb68281b11663a2f99e1e3cf66b8d5c1",
|
|
161
|
+
"recipientBody": "8104376557559155f4a82406a66bc7ac571dd02bd23ee8ad9cbbb9eefc4e6aa5",
|
|
162
|
+
"tamperedBody": "5a6f2c7fe5dccac671511d0a6b43d9bb5158acdb585ae6897d78be34c96a919b"
|
|
163
|
+
};
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/processed-note.json
|
|
166
|
+
var rows = [{
|
|
167
|
+
"id": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/notes/native-inbox",
|
|
168
|
+
"author": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor",
|
|
169
|
+
"object": {
|
|
170
|
+
"@context": [
|
|
171
|
+
"https://www.w3.org/ns/activitystreams",
|
|
172
|
+
"https://w3id.org/security/data-integrity/v1",
|
|
173
|
+
"https://gotosocial.org/ns",
|
|
174
|
+
{
|
|
175
|
+
"Emoji": "toot:Emoji",
|
|
176
|
+
"Hashtag": "as:Hashtag",
|
|
177
|
+
"QuoteAuthorization": "https://w3id.org/fep/044f#QuoteAuthorization",
|
|
178
|
+
"_misskey_quote": "misskey:_misskey_quote",
|
|
179
|
+
"emojiReactions": {
|
|
180
|
+
"@id": "fedibird:emojiReactions",
|
|
181
|
+
"@type": "@id"
|
|
182
|
+
},
|
|
183
|
+
"fedibird": "http://fedibird.com/ns#",
|
|
184
|
+
"misskey": "https://misskey-hub.net/ns#",
|
|
185
|
+
"quote": {
|
|
186
|
+
"@id": "https://w3id.org/fep/044f#quote",
|
|
187
|
+
"@type": "@id"
|
|
188
|
+
},
|
|
189
|
+
"quoteAuthorization": {
|
|
190
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization",
|
|
191
|
+
"@type": "@id"
|
|
192
|
+
},
|
|
193
|
+
"quoteUri": "fedibird:quoteUri",
|
|
194
|
+
"quoteUrl": "as:quoteUrl",
|
|
195
|
+
"sensitive": "as:sensitive",
|
|
196
|
+
"toot": "http://joinmastodon.org/ns#"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"id": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/notes/native-inbox",
|
|
200
|
+
"type": "Note",
|
|
201
|
+
"attributedTo": "https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor",
|
|
202
|
+
"content": "<p>Native Fedify to tootik v0.25.4 portable interoperability.</p>",
|
|
203
|
+
"to": ["https://www.w3.org/ns/activitystreams#Public", "https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor"],
|
|
204
|
+
"proof": {
|
|
205
|
+
"@context": [
|
|
206
|
+
"https://www.w3.org/ns/activitystreams",
|
|
207
|
+
"https://w3id.org/security/data-integrity/v1",
|
|
208
|
+
"https://gotosocial.org/ns",
|
|
209
|
+
{
|
|
210
|
+
"Emoji": "toot:Emoji",
|
|
211
|
+
"Hashtag": "as:Hashtag",
|
|
212
|
+
"QuoteAuthorization": "https://w3id.org/fep/044f#QuoteAuthorization",
|
|
213
|
+
"_misskey_quote": "misskey:_misskey_quote",
|
|
214
|
+
"emojiReactions": {
|
|
215
|
+
"@id": "fedibird:emojiReactions",
|
|
216
|
+
"@type": "@id"
|
|
217
|
+
},
|
|
218
|
+
"fedibird": "http://fedibird.com/ns#",
|
|
219
|
+
"misskey": "https://misskey-hub.net/ns#",
|
|
220
|
+
"quote": {
|
|
221
|
+
"@id": "https://w3id.org/fep/044f#quote",
|
|
222
|
+
"@type": "@id"
|
|
223
|
+
},
|
|
224
|
+
"quoteAuthorization": {
|
|
225
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization",
|
|
226
|
+
"@type": "@id"
|
|
227
|
+
},
|
|
228
|
+
"quoteUri": "fedibird:quoteUri",
|
|
229
|
+
"quoteUrl": "as:quoteUrl",
|
|
230
|
+
"sensitive": "as:sensitive",
|
|
231
|
+
"toot": "http://joinmastodon.org/ns#"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"type": "DataIntegrityProof",
|
|
235
|
+
"cryptosuite": "eddsa-jcs-2022",
|
|
236
|
+
"verificationMethod": "did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN",
|
|
237
|
+
"proofPurpose": "assertionMethod",
|
|
238
|
+
"proofValue": "z3Qs33iEXVq9qLD29kiMa26yLGVuYaKvUKCMqPmuj2z3Y4FmjVVtm4Nb3vMGiaeSNvVahpPni6H7ttesNjpZ9SsDe",
|
|
239
|
+
"created": "2026-09-30T14:16:34.84575Z"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}];
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/raw-bodies.json
|
|
245
|
+
var raw_bodies_default = {
|
|
246
|
+
requestBody: "{\"@context\":[\"https://w3id.org/identity/v1\",\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"votersCount\":{\"@id\":\"toot:votersCount\",\"@type\":\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\"},\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"ChatMessage\":\"http://litepub.social/ns#ChatMessage\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"QuoteRequest\":\"https://w3id.org/fep/044f#QuoteRequest\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}],\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/creates/native-inbox\",\"type\":\"Create\",\"proof\":{\"type\":\"DataIntegrityProof\",\"created\":\"2026-09-30T14:16:34.859806885Z\",\"cryptosuite\":\"eddsa-jcs-2022\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z4fZQxG72dz6Qp2z1xj9NS96bPRCitAnM1FBVWYqHq65pYdQBwbk5ZJ3S7suxuZYHFPjCuL7vPKHFT8v2w4LHbyUK\",\"verificationMethod\":\"did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN\",\"@context\":[\"https://w3id.org/identity/v1\",\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"votersCount\":{\"@id\":\"toot:votersCount\",\"@type\":\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\"},\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"ChatMessage\":\"http://litepub.social/ns#ChatMessage\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"QuoteRequest\":\"https://w3id.org/fep/044f#QuoteRequest\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}]},\"actor\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"object\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}],\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/notes/native-inbox\",\"type\":\"Note\",\"attributedTo\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"content\":\"<p>Native Fedify to tootik v0.25.4 portable interoperability.</p>\",\"to\":[\"https://www.w3.org/ns/activitystreams#Public\",\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\"],\"proof\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}],\"type\":\"DataIntegrityProof\",\"created\":\"2026-09-30T14:16:34.84575Z\",\"cryptosuite\":\"eddsa-jcs-2022\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z3Qs33iEXVq9qLD29kiMa26yLGVuYaKvUKCMqPmuj2z3Y4FmjVVtm4Nb3vMGiaeSNvVahpPni6H7ttesNjpZ9SsDe\",\"verificationMethod\":\"did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN\"}},\"to\":[\"https://www.w3.org/ns/activitystreams#Public\",\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\"]}",
|
|
247
|
+
actorBody: "{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/fep/ef61\",\"https://w3id.org/security/v1\",\"https://w3id.org/security/data-integrity/v1\",\"https://www.w3.org/ns/did/v1\",\"https://w3id.org/security/multikey/v1\",\"https://gotosocial.org/ns\",\"https://w3id.org/fep/7aa9\",{\"alsoKnownAs\":{\"@id\":\"as:alsoKnownAs\",\"@type\":\"@id\"},\"featuredCollections\":{\"@id\":\"https://w3id.org/fep/7aa9#featuredCollections\",\"@type\":\"@id\"},\"manuallyApprovesFollowers\":\"as:manuallyApprovesFollowers\",\"movedTo\":{\"@id\":\"as:movedTo\",\"@type\":\"@id\"},\"toot\":\"http://joinmastodon.org/ns#\",\"Emoji\":\"toot:Emoji\",\"featured\":{\"@id\":\"toot:featured\",\"@type\":\"@id\"},\"featuredTags\":{\"@id\":\"toot:featuredTags\",\"@type\":\"@id\"},\"discoverable\":\"toot:discoverable\",\"suspended\":\"toot:suspended\",\"memorial\":\"toot:memorial\",\"indexable\":\"toot:indexable\",\"schema\":\"http://schema.org#\",\"PropertyValue\":\"schema:PropertyValue\",\"value\":\"schema:value\",\"misskey\":\"https://misskey-hub.net/ns#\",\"_misskey_followedMessage\":\"misskey:_misskey_followedMessage\",\"isCat\":\"misskey:isCat\"}],\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"type\":\"Person\",\"inbox\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor/inbox\",\"gateways\":[\"https://fedify.example/\"],\"assertionMethod\":[{\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#ed25519-key\",\"type\":\"Multikey\",\"controller\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"publicKeyMultibase\":\"z6MkoHdcDxRg36BmHgY8riW5xW8NbZdbgKBMmXUoyDAN9LEX\"},{\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#main-key\",\"type\":\"Multikey\",\"controller\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"publicKeyMultibase\":\"zgghBUVkqmWS8e1j5pNkit2HZTY7551YeVnqt4nok9y5j6Qj4zHfHAiTCUWeiSfvfgC8cuknF4312kUZa79gAAwCyoXqA3PZppMxsGmdwRprmxYkGrZkfvmmLfzCvw6faQrsph6hiMvYtFEQUZTwd2n6CG9j7ZqiXA5NGN9WRu5MNqucWNpMTQZFSdPnow2GgMnGy7G5fDhg7BQtSPLCYdEWEipFWJuy6nKwmySnffKYnZQZQRzNysFg2xJ91ZceWVrAjFxHwjekyUe2CrkNM1vYq829SnCoXUfPBsA31ujzVuYBwjDZhCDXmJ87fbWFmDg6zmwyXLdGLRmGY3nbkU8Jwt4iyRNqCpjirKjEx54JQj2wahyxL6r2BBjMnuoisDXNi6vjztoE7WbmHDoMVoz9qGUv5s2b6VVvn7vNgHYjjvKjYLbrj2fhe6ccwycxphU5vphepKWTRCNa3DsC8HpCjBjq3YZ9da8P8JorDKWyZLRAUn6piCn1LMJpHDDbeun1YgdXw3sDhDk5bHfBUJ7y5Lgnob8HpVBcjDA7ttbBEtFJ1RYb7XFYJJcaersNhWAoiZtLaQucHdNoRWJF8ByRJPRp5wz9rk2tkzTQoA5PFdomjbgYhqdq77d9VMuUPHJ97117xGVffGjGFipt5ZEuNazcVfes8Z21XzHBR7D39GyYvGAs1aiFx4wmyLiCw21ATd6Uq2kN6EcHex\"}],\"proof\":{\"type\":\"DataIntegrityProof\",\"created\":\"2026-09-30T14:16:34.822909912Z\",\"cryptosuite\":\"eddsa-jcs-2022\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z2qzHQQ9yWvvfJdZvcWRKU8gYBnKNNMzppy7J6pcr7tqWevY3PFr3RUAVrnK9yuCPh9oP27XWPXrmQjaPDEkJm6Yx\",\"verificationMethod\":\"did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN\",\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/fep/ef61\",\"https://w3id.org/security/v1\",\"https://w3id.org/security/data-integrity/v1\",\"https://www.w3.org/ns/did/v1\",\"https://w3id.org/security/multikey/v1\",\"https://gotosocial.org/ns\",\"https://w3id.org/fep/7aa9\",{\"alsoKnownAs\":{\"@id\":\"as:alsoKnownAs\",\"@type\":\"@id\"},\"featuredCollections\":{\"@id\":\"https://w3id.org/fep/7aa9#featuredCollections\",\"@type\":\"@id\"},\"manuallyApprovesFollowers\":\"as:manuallyApprovesFollowers\",\"movedTo\":{\"@id\":\"as:movedTo\",\"@type\":\"@id\"},\"toot\":\"http://joinmastodon.org/ns#\",\"Emoji\":\"toot:Emoji\",\"featured\":{\"@id\":\"toot:featured\",\"@type\":\"@id\"},\"featuredTags\":{\"@id\":\"toot:featuredTags\",\"@type\":\"@id\"},\"discoverable\":\"toot:discoverable\",\"suspended\":\"toot:suspended\",\"memorial\":\"toot:memorial\",\"indexable\":\"toot:indexable\",\"schema\":\"http://schema.org#\",\"PropertyValue\":\"schema:PropertyValue\",\"value\":\"schema:value\",\"misskey\":\"https://misskey-hub.net/ns#\",\"_misskey_followedMessage\":\"misskey:_misskey_followedMessage\",\"isCat\":\"misskey:isCat\"}]},\"publicKey\":{\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor#main-key\",\"type\":\"CryptographicKey\",\"owner\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"publicKeyPem\":\"-----BEGIN PUBLIC KEY-----\\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA5PRU4GP79WfFGwBvSJ4V\\ntAmtreYrzQuLY/whIprIZScL7t5lvvdyu8qX6odu0LsBozosQ1A/oyaCv00jyhjj\\nupQdtJXhzW+WG9AuZT4rH4Z0r9u1bpGJT67msalb4ffDxS1d8Ipb1Xe/Hfs6Uu+d\\niyINnR3S4qj1bOXLBfNt4lI1wfycFwFtmtqOsxLKqY0VMZ2d9yeYnAUYAOh/C82t\\ng69nuXkeyyRJUNSBaY7ej6jnSPbJCpSsnYHzL/bE5h37vo0DUClV5ZPUGzFggDYK\\nYC6py31LOEXIn94AV4xVSVpKrQEPeBHrcx4ejJuUVpA9s9L5OoLMcUyZS5OSs8ek\\nM8Mj+LjCkakzsZWCusWstyebsszYNz1zq/yiXBiJJ0ypcbraYkltLJ5Ui8KSdH6e\\n2r5zC951YifyJZp8p+qK+Z52ZGjbMsWlfwHAynZEn8F5Bqzd4Xlo4s8/mgYtJBIk\\nKC4t4HgPXZSCH866wyOOJZz1m7jS5XwopX5s/ST7XzLVw9WpTqd2hqRGpAvCGR42\\nM8JOcPqHCAi/KjN4Nyhj9e3TzkoETYYqzQvxCy0LeDi/dHr8EDbT7tF5rCAeglc9\\nWWSBqpOnromClOWxX9HgklXvUmid4CkstoQzFb5H+uovtbLrPzMY9kokEXnG69UD\\nVkq6SwoNVm0551D8M2smtf0CAwEAAQ==\\n-----END PUBLIC KEY-----\\n\"},\"name\":\"Native Fedify portable sender\",\"outbox\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor/outbox\",\"preferredUsername\":\"fedifyreverse\"}",
|
|
248
|
+
recipientBody: "{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://w3id.org/security/v1\"],\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\",\"type\":\"Application\",\"inbox\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor/inbox\",\"outbox\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor/outbox\",\"preferredUsername\":\"actor\",\"followers\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor/followers\",\"publicKey\":{\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor#main-key\",\"owner\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\",\"publicKeyPem\":\"-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvOrxaDyQG0jyLQ6OlLYi\\n5GabA3ieKKQi5Z3fS/yVDxV9WEyu79FzCC+uTZQXXXqzljI4ziTA4GmaITRHwGcU\\nji5bYK2y/fvfAQLhwhJotbZF4u4ZeWtyXN8Ds7IQ+Dr67ci7K/htsMNSysAMF/+u\\n5witcW5hdJrWSAIZEg/17UVQO+0EbuPXL5o6fRHm/t1GLchvFCo1pcyV3G+y3q2E\\nOx8FQTIkVPDwPNBzfX21YbBOIDo6AlbqSjB9tWKZePkUymX/JX4FARK3aVJvstUt\\neOX7hPxp8TvjGjA7nzLDf0E6kntFYzjaMG0qumjXftAQZUFZHL7eGCGOaIAgm68Z\\nAQIDAQAB\\n-----END PUBLIC KEY-----\\n\"},\"icon\":[{\"type\":\"Image\",\"mediaType\":\"image/gif\",\"url\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor/icon.gif\"}],\"manuallyApprovesFollowers\":false,\"assertionMethod\":[{\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor#ed25519-key\",\"type\":\"Multikey\",\"controller\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\",\"publicKeyMultibase\":\"z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg\"},{\"id\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor#ml-dsa-44-key\",\"type\":\"Multikey\",\"controller\":\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\",\"publicKeyMultibase\":\"ukCTy_ExYm-3IjZfDghrCf0O1P76JI3iS6sOVeu0WISMvS0w-0cLogJ9RK_cZivJFOHadKtTHT2IUGufuhLpPnxhymkQnmagnryXEexIvK-Vpl4Q4CV6jldBib_yXSYIZJnIofLK-BfB8itzLns95VMAFI3j_aqpoj4-02sSvcIfW7dQzmk__73LVux8HchjzvumnVhhJtNwnM2IeS60Yo6XQqqDrFfaOJ6-7dEIfabzwGwiJTYjtpn6pwjlg7uvP4b1rEyBosb9jgpuH2tBBxjbTceARNdnndrj6n5LnAPh0V5Zs2cs2Hc097lB_exY_ICOEzZ9Go654IKy9AGcKwDxaLl_BMvIo7YYDSlK8h86q2K6pBVOa1MPx2ixFCrA9HdlNPeqSs5giI_yWmkxR2_Tsm_0WbQ6ZOR7j7Ra4srqJVPGTAIvBpW2hlsOriiL73xjuOMptoQq3-23epnF-hIKVTa5vjSer_7V_UR-qoXHqWfMgAaGXIviMM8CGc4-_12ktGZPA-Okvqf5f3K6_0tIjOCh3zZN1CHblH-rstgXMk5tH7lK22wV2IfUz_i7o98Wd4hm10yUrFu_-cPrL7unhRBpiDVeKtIJ2F4t6xuXypRjV-bN282U1Zve5daiMvT0xb07T6Yfn34l01_HkklxywcgOKVZ8bpXJEaEg9lfozqTTvp2DuvkMlYqIvzoiLa5YbUKQb0g8Bio049_i79R3KDfl6K8aIqLPNtzS3q06BdpP4jflfpm6JXzInV_SX-WnM4xQ2eJJj7N7hsnDV9Tt1oWs5yzQyoi7v0pJSbJpPsnzdlNYyqJPrH8jHXuaq74T0kxX7wGLDNFMAVnOWiW8aIiqRthKOrQ7fxZGBWiREmjOWDtwjmWmay3JFkG6D0nby78zPMnTROPU9I6ZeGIjdZRsi5Mc1eXqpUiqnncuXtaOa1nzUAU5MmMEvj441R8lPk1ax2F0XYbxHWCmUSg3y4K8JQwbn2DBryvBV8KT9EcDibqdSZ9hz158uIXJtJuK70RiQw1JC3iI6tB5A_rnprpt8ooyPXUsLNYyS-dXN_oyrv8eWAWrVh4v3XAwhwajkq9jknzY0V-TNpX37KWWVfPg_z7t9qGwIx_RHND2FjLjrrnm0t-q7dAdWjeVBHXzpaU3eLIzCJRORbPFCsjkbSiiBKnCurBOxXUe4tp-vxzIDkICfKn93vJrs09WpELN93B1CaauiwWEstcjrvcB_2cz_7Z3KmRoOhErJ08G4lxApru4Xuwp4GvPys1uxO7ntBONLzkHsWXd6jwwC0jQwRc8J2lrlljYTeRIhYKiRIjwo47VigHnr3Od4drnMXwr2PJw6QqKhmWvmRvZBWDoncbtEKd7oOEoPE7gA5z-P9Q1ZxkcjVNBd3zniwLUORVCrm9dgChHRy9wpQzRoQX-fPRjVUSm8sS3KLFH7JU74UoUaJfn7eOzUfydz_Ad6peDqpSFWEaWLFUMnr_fsSaNaZRNWaLfvZmskWYq5YGBrPYPdh6rx7P1XctYzBG2chqDKdDblmsWSKKZBJlUxAAas1C-AYC3j_PsZo58MBRhNgxS-UaKDkh73JSYNLGSt7T9WdUSKul5l8mXJSjzxrnIFHmvBozVMcxfHMMe8Ii9h5MogAN5hyTOyN2Ug0QDG47_w9ylz3ljNzzavRGWT49KCk1x3tqlxaf8_Ghx4sKY3B6s1c77YCX_Rne_MO96JA4xDLN11hqai39cVfNfyJoz\"}],\"implements\":[{\"href\":\"https://datatracker.ietf.org/doc/html/rfc9421\",\"name\":\"RFC-9421: HTTP Message Signatures\"},{\"href\":\"https://datatracker.ietf.org/doc/html/rfc9421#name-eddsa-using-curve-edwards25\",\"name\":\"RFC-9421 signatures using the Ed25519 algorithm\"},{\"href\":\"https://c2sp.org/httpsig-pq@v1.0.0#ml-dsa-44\",\"name\":\"RFC-9421 signatures using the ml-dsa-44 algorithm\"}],\"gateways\":[\"https://tootik.example\"],\"proof\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://w3id.org/security/v1\"],\"type\":\"DataIntegrityProof\",\"cryptosuite\":\"eddsa-jcs-2022\",\"verificationMethod\":\"did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg#z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z4dTmsRsKvgqVBBHJnrkxfZUA44bzZxotkkjNwQtx62h77vpGbwA7X3KNNZwaYcT8zTiwCmXCDurPwEdZax9p8oQQ\",\"created\":\"2026-09-30T13:23:34Z\"}}",
|
|
249
|
+
tamperedBody: "{\"@context\":[\"https://w3id.org/identity/v1\",\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"votersCount\":{\"@id\":\"toot:votersCount\",\"@type\":\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\"},\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"ChatMessage\":\"http://litepub.social/ns#ChatMessage\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"QuoteRequest\":\"https://w3id.org/fep/044f#QuoteRequest\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}],\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/creates/native-inbox\",\"type\":\"Create\",\"proof\":{\"type\":\"DataIntegrityProof\",\"created\":\"2026-09-30T14:16:34.859806885Z\",\"cryptosuite\":\"eddsa-jcs-2022\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z4fZQxG72dz6Qp2z1xj9NS96bPRCitAnM1FBVWYqHq65pYdQBwbk5ZJ3S7suxuZYHFPjCuL7vPKHFT8v2w4LHbyUK\",\"verificationMethod\":\"did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN\",\"@context\":[\"https://w3id.org/identity/v1\",\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"votersCount\":{\"@id\":\"toot:votersCount\",\"@type\":\"http://www.w3.org/2001/XMLSchema#nonNegativeInteger\"},\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"ChatMessage\":\"http://litepub.social/ns#ChatMessage\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"QuoteRequest\":\"https://w3id.org/fep/044f#QuoteRequest\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}]},\"actor\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"object\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}],\"id\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/notes/native-inbox\",\"type\":\"Note\",\"attributedTo\":\"https://fedify.example/.well-known/apgateway/did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN/actor\",\"content\":\"<p>Tampered after signing.</p>\",\"to\":[\"https://www.w3.org/ns/activitystreams#Public\",\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\"],\"proof\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/data-integrity/v1\",\"https://gotosocial.org/ns\",{\"toot\":\"http://joinmastodon.org/ns#\",\"misskey\":\"https://misskey-hub.net/ns#\",\"fedibird\":\"http://fedibird.com/ns#\",\"sensitive\":\"as:sensitive\",\"Emoji\":\"toot:Emoji\",\"Hashtag\":\"as:Hashtag\",\"quote\":{\"@id\":\"https://w3id.org/fep/044f#quote\",\"@type\":\"@id\"},\"quoteUrl\":\"as:quoteUrl\",\"_misskey_quote\":\"misskey:_misskey_quote\",\"quoteUri\":\"fedibird:quoteUri\",\"QuoteAuthorization\":\"https://w3id.org/fep/044f#QuoteAuthorization\",\"quoteAuthorization\":{\"@id\":\"https://w3id.org/fep/044f#quoteAuthorization\",\"@type\":\"@id\"},\"emojiReactions\":{\"@id\":\"fedibird:emojiReactions\",\"@type\":\"@id\"}}],\"type\":\"DataIntegrityProof\",\"created\":\"2026-09-30T14:16:34.84575Z\",\"cryptosuite\":\"eddsa-jcs-2022\",\"proofPurpose\":\"assertionMethod\",\"proofValue\":\"z3Qs33iEXVq9qLD29kiMa26yLGVuYaKvUKCMqPmuj2z3Y4FmjVVtm4Nb3vMGiaeSNvVahpPni6H7ttesNjpZ9SsDe\",\"verificationMethod\":\"did:key:z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN#z6MkuVzJw5PGsWVBkEtE7k2vsNqCgWwnBm9iBFAVGmzfCjwN\"}},\"to\":[\"https://www.w3.org/ns/activitystreams#Public\",\"https://tootik.example/.well-known/apgateway/did:key:z6MkqoM6ybQGmFBWcwsDGbD927SQrnLGTHGJxTABHtWk7DVg/actor\"]}"
|
|
250
|
+
};
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/response.json
|
|
253
|
+
var status$1 = 202;
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region test-vectors/fep-ef61/tootik-v0.25.4/send/tampered-response.json
|
|
256
|
+
var status = 401;
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/sig/tootik-send-interop.test.ts
|
|
259
|
+
const activity = JSON.parse(raw_bodies_default.requestBody);
|
|
260
|
+
const tampered = JSON.parse(raw_bodies_default.tamperedBody);
|
|
261
|
+
async function digest(value) {
|
|
262
|
+
return new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value)));
|
|
263
|
+
}
|
|
264
|
+
async function verifyRawJcs(document) {
|
|
265
|
+
const { proof, ...unsecured } = document;
|
|
266
|
+
assert(proof != null && typeof proof === "object" && !Array.isArray(proof));
|
|
267
|
+
const { proofValue, ...configuration } = proof;
|
|
268
|
+
assertEquals(configuration.cryptosuite, "eddsa-jcs-2022");
|
|
269
|
+
configuration["@context"] ??= document["@context"];
|
|
270
|
+
assert(typeof configuration.verificationMethod === "string");
|
|
271
|
+
assert(typeof proofValue === "string");
|
|
272
|
+
const key = await importDidKey(configuration.verificationMethod.split("#")[0]);
|
|
273
|
+
const combined = /* @__PURE__ */ new Uint8Array(64);
|
|
274
|
+
combined.set(await digest(serialize(configuration)), 0);
|
|
275
|
+
combined.set(await digest(serialize(unsecured)), 32);
|
|
276
|
+
return await crypto.subtle.verify("Ed25519", key, new Uint8Array(decodeMultibase(proofValue)), combined);
|
|
277
|
+
}
|
|
278
|
+
const options = {
|
|
279
|
+
contextLoader: mockDocumentLoader,
|
|
280
|
+
documentLoader(url) {
|
|
281
|
+
assertEquals(url.split("#")[0], actor_default.id);
|
|
282
|
+
return Promise.resolve({
|
|
283
|
+
document: structuredClone(actor_default),
|
|
284
|
+
documentUrl: actor_default.id,
|
|
285
|
+
contextUrl: null
|
|
286
|
+
});
|
|
287
|
+
},
|
|
288
|
+
currentTime: Temporal.Instant.from(capturedAt)
|
|
289
|
+
};
|
|
290
|
+
function request() {
|
|
291
|
+
return new Request(url, {
|
|
292
|
+
method,
|
|
293
|
+
headers,
|
|
294
|
+
body: raw_bodies_default.requestBody
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
test("Fedify to tootik v0.25.4 captured actor and compound proofs verify raw JCS", async () => {
|
|
298
|
+
for (const [name, value] of Object.entries(raw_bodies_default)) assertEquals(encodeHex(await digest(value)), sha256[name]);
|
|
299
|
+
assertEquals(JSON.parse(raw_bodies_default.actorBody), actor_default);
|
|
300
|
+
assert(await verifyRawJcs(actor_default));
|
|
301
|
+
assert(await verifyRawJcs(activity));
|
|
302
|
+
assert(await verifyRawJcs(activity.object));
|
|
303
|
+
assert((await verifyPortableObjectProof(actor_default, options)).verified);
|
|
304
|
+
assert((await verifyPortableObjectProof(activity, options)).verified);
|
|
305
|
+
assert((await verifyPortableObjectProof(activity.object, options)).verified);
|
|
306
|
+
});
|
|
307
|
+
test("Fedify to tootik v0.25.4 captured HTTP signature belongs to its portable actor", async () => {
|
|
308
|
+
const verified = await verifyRequestDetailed(request(), options);
|
|
309
|
+
assert(verified.verified);
|
|
310
|
+
assertEquals(verified.key.id?.href, actor_default.publicKey.id);
|
|
311
|
+
assert(await doesActorOwnKey(await Create.fromJsonLd(activity, options), verified.key, options));
|
|
312
|
+
});
|
|
313
|
+
test("Fedify to tootik v0.25.4 captured result records native Note processing", () => {
|
|
314
|
+
assertEquals(status$2, 401);
|
|
315
|
+
assertEquals(JSON.parse(body).error, "actor is too young");
|
|
316
|
+
assertEquals(status$1, 202);
|
|
317
|
+
assertEquals(rows.length, 1);
|
|
318
|
+
assertEquals(rows[0].id, activity.object.id);
|
|
319
|
+
assertEquals(rows[0].author, actor_default.id);
|
|
320
|
+
assertEquals(rows[0].object.content, activity.object.content);
|
|
321
|
+
assertEquals(rows[0].object.proof.proofValue, activity.object.proof.proofValue);
|
|
322
|
+
});
|
|
323
|
+
test("Fedify to tootik v0.25.4 captured nested tampering invalidates both proofs", async () => {
|
|
324
|
+
assertEquals(status, 401);
|
|
325
|
+
assertEquals(tampered.id, activity.id);
|
|
326
|
+
assert(tampered.object.content !== activity.object.content);
|
|
327
|
+
assertEquals(await verifyRawJcs(tampered), false);
|
|
328
|
+
assertEquals(await verifyRawJcs(tampered.object), false);
|
|
329
|
+
});
|
|
330
|
+
//#endregion
|
|
331
|
+
export {};
|