@fedify/fedify 2.3.16-dev.2845 → 2.3.16
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-BlfpZlWF.mjs +16 -0
- package/dist/{builder-B9apzaoK.mjs → builder-D4GE1Gmi.mjs} +3 -3
- package/dist/callback-kR_sx2zZ.d.mts +2661 -0
- package/dist/{client-BIBzqEIp.d.cts → client-9DPcy_Yx.d.ts} +16 -0
- package/dist/{client-jE7oGvRh.d.ts → client-B3ruDgWg.d.cts} +16 -0
- package/dist/{client-DpUNYKla.mjs → client-DFgYVbUA.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.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +1 -1
- package/dist/compat/public-audience.test.mjs +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-CE_Tj_Oc.d.cts → context-CEE8vl-b.d.cts} +31 -14
- package/dist/{context-H_5tZXg-.d.ts → context-CTJwXHRu.d.ts} +31 -14
- package/dist/{deno-CgHxPWA-.mjs → deno-FtdqgHJA.mjs} +1 -1
- package/dist/{docloader-CYscMv4m.mjs → docloader-B9iU4DP2.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/circuit-breaker.test.mjs +2 -2
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/delivery-attachments.test.d.mts +2 -0
- package/dist/federation/delivery-attachments.test.mjs +288 -0
- package/dist/federation/handler.test.mjs +208 -16
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +1191 -16
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/negotiation.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/send.test.mjs +293 -3
- package/dist/federation/temporal.test.mjs +25 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-CfxAK-RL.cjs → http-2RyDQ0tE.cjs} +6 -4
- package/dist/{http-DmP0sr2l.d.ts → http-Bs5mXWlH.d.ts} +3 -3
- package/dist/{http-CZPYFK3b.d.cts → http-D8DgRhHU.d.cts} +3 -3
- package/dist/{http-dzXtCtOp.mjs → http-D8tiOrZf.mjs} +7 -5
- package/dist/{http-BzIb8Gk0.js → http-mLeLYFj-.js} +6 -4
- package/dist/{inbox-BMytDl21.mjs → inbox-Dy8awbi8.mjs} +2 -2
- package/dist/{key-fdTPEBhG.mjs → key-o1SmN5s0.mjs} +4 -3
- package/dist/{kv-cache-ShxnSuNt.mjs → kv-cache-BwUrzCVO.mjs} +1 -1
- package/dist/{kv-cache-dQUFD_pa.cjs → kv-cache-CI6Z0WiS.cjs} +1 -1
- package/dist/{kv-cache-CwqJUNNd.js → kv-cache-Dsq8C8D8.js} +1 -1
- package/dist/{ld-B8mU49Dg.mjs → ld-DCKrqj9y.mjs} +155 -22
- package/dist/ld-signature-Dgz_b89j.mjs +23 -0
- package/dist/{metrics-C0ZYkgVy.mjs → metrics-CaoYRhNH.mjs} +1 -1
- package/dist/{middleware-DK_kGeMl.mjs → middleware-4p3opEMT.mjs} +1 -1
- package/dist/{middleware-9mBkHYci.cjs → middleware-CP-8P7kk.cjs} +492 -117
- package/dist/{middleware-D0GPqg_7.js → middleware-Cce0nLDw.js} +491 -117
- package/dist/{middleware-Hr9ci9uD.mjs → middleware-D31fNcY4.mjs} +399 -109
- package/dist/{mod-C_gFmeNq.d.cts → mod-BD0-_vya.d.ts} +31 -13
- package/dist/{mod-HQXFvOHs.d.ts → mod-BMX6nsHP.d.cts} +31 -13
- package/dist/{mod-CDFFESfL.d.ts → mod-BTvP5Hva.d.ts} +1 -1
- package/dist/{mod-DMjhnFbg.d.ts → mod-DgMTlwUO.d.ts} +3 -3
- package/dist/{mod-DDVkmZ_h.d.cts → mod-Q1Fo3FJk.d.cts} +3 -3
- package/dist/{mod-DDjtbkZO.d.cts → mod-n51LED4J.d.cts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +8 -8
- package/dist/mod.d.ts +8 -8
- package/dist/mod.js +5 -5
- 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/nodeinfo/types.test.mjs +1 -1
- package/dist/{outgoing-jsonld-D4iTv7uM.mjs → outgoing-jsonld-BZEAVK_Q.mjs} +38 -8
- package/dist/{owner-BqnaV4zl.mjs → owner-Bdj0nHhf.mjs} +2 -2
- package/dist/{proof-BSRF2hIP.js → proof-B9XJiyz-.js} +1030 -858
- package/dist/{proof-D9VX-J1n.cjs → proof-CmcP8yqP.cjs} +1243 -1059
- package/dist/{proof-BvpOtXRD.mjs → proof-DrbjYma9.mjs} +41 -16
- package/dist/{send-BPel6SCW.mjs → send-VD_WG3dN.mjs} +100 -22
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key-types.test.d.mts +218 -0
- package/dist/sig/key-types.test.mjs +8 -0
- package/dist/sig/key.test.mjs +2 -2
- package/dist/sig/ld.test.mjs +573 -8
- 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/proof.test.mjs +96 -4
- package/dist/{temporal-CaD1O1QX.mjs → temporal-CMvoB-vD.mjs} +3 -5
- package/dist/testing/mod.d.mts +2 -2476
- package/dist/{types-DOvyymM4.cjs → types-BWx7zw3Y.cjs} +85 -10
- package/dist/{types-B1_pRFE_.js → types-Dx_w2JSM.js} +86 -11
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
- /package/dist/{activity-listener-tztVvlNb.mjs → activity-listener-BeTGV3wc.mjs} +0 -0
- /package/dist/{circuit-breaker-D1fxthDI.mjs → circuit-breaker-B1fLHmg2.mjs} +0 -0
- /package/dist/{circuit-breaker-test-utils-CAdwjgMi.mjs → circuit-breaker-test-utils-BGHm_MsT.mjs} +0 -0
- /package/dist/{collection-Cc3DVAhE.mjs → collection-Dp5ky45w.mjs} +0 -0
- /package/dist/{negotiation-DDstyBvc.mjs → negotiation-DC8nG6J_.mjs} +0 -0
- /package/dist/{public-audience-Dp4ZScSr.mjs → public-audience-rnYUGj8a.mjs} +0 -0
- /package/dist/{retry-CXg_MBI-.mjs → retry-C4G_vIgv.mjs} +0 -0
- /package/dist/{types-J53Kw7so.mjs → types-BFowWFTT.mjs} +0 -0
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -5,12 +5,15 @@ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
|
|
|
5
5
|
import { r as assertFalse, t as assertThrows } from "../assert_throws-BbSMEFKo.mjs";
|
|
6
6
|
import { n as assertGreaterOrEqual, t as assertRejects } from "../assert_rejects-D1HYAik3.mjs";
|
|
7
7
|
import { n as assertInstanceOf, t as assert } from "../assert-CEO06XCw.mjs";
|
|
8
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
8
|
+
import { a as generateCryptoKeyPair } from "../key-o1SmN5s0.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BAK-tUlf.mjs";
|
|
10
|
-
import { a as compactJsonLd,
|
|
11
|
-
import {
|
|
10
|
+
import { _ as verifyJsonLd, a as compactJsonLd, c as detachSignature, d as hasSignatureLike, f as hasVerifiableSignature, h as signJsonLd, i as attachSignature, m as isInvalidUrlTypeError, n as UnsafeJsonLdError, o as createSignature, s as describeSignatureShape, u as hasSignature, v as verifySignature } from "../ld-DCKrqj9y.mjs";
|
|
11
|
+
import { t as ldSignatureWithoutCreated } from "../ld-signature-Dgz_b89j.mjs";
|
|
12
|
+
import { configure, reset } from "@logtape/logtape";
|
|
13
|
+
import { Create, CryptographicKey, Note } from "@fedify/vocab";
|
|
12
14
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
13
15
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
16
|
+
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
14
17
|
//#region src/sig/ld.test.ts
|
|
15
18
|
test("isInvalidUrlTypeError()", () => {
|
|
16
19
|
assert(isInvalidUrlTypeError(/* @__PURE__ */ new TypeError("Invalid URL string.")));
|
|
@@ -25,22 +28,84 @@ test("isInvalidUrlTypeError()", () => {
|
|
|
25
28
|
});
|
|
26
29
|
test("attachSignature()", () => {
|
|
27
30
|
const sig = {
|
|
28
|
-
"@context": "https://w3id.org/
|
|
31
|
+
"@context": "https://w3id.org/security/v1",
|
|
29
32
|
type: "RsaSignature2017",
|
|
30
33
|
creator: "https://activitypub.academy/users/brauca_darradiul#main-key",
|
|
31
34
|
created: "2024-09-12T16:50:46Z",
|
|
32
35
|
signatureValue: "asdf"
|
|
33
36
|
};
|
|
37
|
+
const signatureTerm = { "signature": "https://w3id.org/security#signature" };
|
|
34
38
|
const doc = {
|
|
35
39
|
"@context": "https://www.w3.org/ns/activitystreams",
|
|
36
40
|
id: "https://example.com/1"
|
|
37
41
|
};
|
|
38
42
|
assertEquals(attachSignature(doc, sig), {
|
|
39
43
|
...doc,
|
|
44
|
+
"@context": ["https://www.w3.org/ns/activitystreams", signatureTerm],
|
|
45
|
+
signature: sig
|
|
46
|
+
});
|
|
47
|
+
const arrayDoc = {
|
|
48
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/data-integrity/v1"],
|
|
49
|
+
id: "https://example.com/1"
|
|
50
|
+
};
|
|
51
|
+
assertEquals(attachSignature(arrayDoc, sig), {
|
|
52
|
+
...arrayDoc,
|
|
53
|
+
"@context": [...arrayDoc["@context"], signatureTerm],
|
|
54
|
+
signature: sig
|
|
55
|
+
});
|
|
56
|
+
for (const context of [
|
|
57
|
+
["https://w3id.org/identity/v1", "https://www.w3.org/ns/activitystreams"],
|
|
58
|
+
["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
|
|
59
|
+
["https://www.w3.org/ns/activitystreams", signatureTerm],
|
|
60
|
+
{ "signature": "https://w3id.org/security#signature" }
|
|
61
|
+
]) {
|
|
62
|
+
const contextDoc = {
|
|
63
|
+
"@context": context,
|
|
64
|
+
id: "https://example.com/1"
|
|
65
|
+
};
|
|
66
|
+
assertEquals(attachSignature(contextDoc, sig), {
|
|
67
|
+
...contextDoc,
|
|
68
|
+
signature: sig
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
assertEquals(attachSignature({
|
|
72
|
+
"@context": null,
|
|
73
|
+
id: "https://example.com/1"
|
|
74
|
+
}, sig), {
|
|
75
|
+
"@context": [signatureTerm],
|
|
76
|
+
id: "https://example.com/1",
|
|
77
|
+
signature: sig
|
|
78
|
+
});
|
|
79
|
+
const resetDoc = {
|
|
80
|
+
"@context": [
|
|
81
|
+
"https://w3id.org/security/v1",
|
|
82
|
+
null,
|
|
83
|
+
"https://www.w3.org/ns/activitystreams"
|
|
84
|
+
],
|
|
85
|
+
id: "https://example.com/1"
|
|
86
|
+
};
|
|
87
|
+
assertEquals(attachSignature(resetDoc, sig), {
|
|
88
|
+
...resetDoc,
|
|
89
|
+
"@context": [...resetDoc["@context"], signatureTerm],
|
|
90
|
+
signature: sig
|
|
91
|
+
});
|
|
92
|
+
const disabledTermDoc = {
|
|
93
|
+
"@context": [{ "signature": { "@id": null } }, "https://www.w3.org/ns/activitystreams"],
|
|
94
|
+
id: "https://example.com/1"
|
|
95
|
+
};
|
|
96
|
+
assertEquals(attachSignature(disabledTermDoc, sig), {
|
|
97
|
+
...disabledTermDoc,
|
|
98
|
+
"@context": [...disabledTermDoc["@context"], signatureTerm],
|
|
99
|
+
signature: sig
|
|
100
|
+
});
|
|
101
|
+
assertEquals(attachSignature({ id: "https://example.com/1" }, sig), {
|
|
102
|
+
id: "https://example.com/1",
|
|
103
|
+
"@context": [signatureTerm],
|
|
40
104
|
signature: sig
|
|
41
105
|
});
|
|
42
106
|
assertThrows(() => attachSignature(null, sig), TypeError);
|
|
43
107
|
assertThrows(() => attachSignature(1234, sig), TypeError);
|
|
108
|
+
assertThrows(() => attachSignature([], sig), TypeError);
|
|
44
109
|
});
|
|
45
110
|
test("createSignature()", async () => {
|
|
46
111
|
const doc = {
|
|
@@ -48,7 +113,11 @@ test("createSignature()", async () => {
|
|
|
48
113
|
id: "https://example.com/1",
|
|
49
114
|
type: "Create"
|
|
50
115
|
};
|
|
51
|
-
|
|
116
|
+
const sig = await createSignature(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader: mockDocumentLoader });
|
|
117
|
+
assertEquals(typeof sig.created, "string");
|
|
118
|
+
assert(hasSignature(attachSignature(doc, sig)));
|
|
119
|
+
assertEquals(sig["@context"], "https://w3id.org/security/v1");
|
|
120
|
+
assertEquals(await verifySignature(attachSignature(doc, sig), {
|
|
52
121
|
documentLoader: mockDocumentLoader,
|
|
53
122
|
contextLoader: mockDocumentLoader
|
|
54
123
|
}), rsaPublicKey2);
|
|
@@ -56,12 +125,15 @@ test("createSignature()", async () => {
|
|
|
56
125
|
assertRejects(() => createSignature(doc, ed25519PrivateKey, ed25519Multikey.id, { contextLoader: mockDocumentLoader }), TypeError);
|
|
57
126
|
});
|
|
58
127
|
test("signJsonLd()", async () => {
|
|
59
|
-
|
|
128
|
+
const signed = await signJsonLd({
|
|
60
129
|
"@context": "https://www.w3.org/ns/activitystreams",
|
|
61
130
|
id: "https://example.com/1",
|
|
62
131
|
type: "Create",
|
|
63
132
|
actor: "https://example.com/person2"
|
|
64
|
-
}, rsaPrivateKey3, rsaPublicKey3.id, { contextLoader: mockDocumentLoader })
|
|
133
|
+
}, rsaPrivateKey3, rsaPublicKey3.id, { contextLoader: mockDocumentLoader });
|
|
134
|
+
assert(hasSignature(signed));
|
|
135
|
+
assertEquals(typeof signed.signature.created, "string");
|
|
136
|
+
assert(await verifyJsonLd(signed, {
|
|
65
137
|
documentLoader: mockDocumentLoader,
|
|
66
138
|
contextLoader: mockDocumentLoader
|
|
67
139
|
}));
|
|
@@ -108,6 +180,135 @@ test("hasSignatureLike()", () => {
|
|
|
108
180
|
} }));
|
|
109
181
|
assertFalse(hasSignatureLike(null));
|
|
110
182
|
});
|
|
183
|
+
test("signJsonLd() defines the signature term when the context lacks it", async () => {
|
|
184
|
+
const signed = await signJsonLd({
|
|
185
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
186
|
+
id: "https://example.com/notes/1",
|
|
187
|
+
type: "Note",
|
|
188
|
+
content: "Hello"
|
|
189
|
+
}, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader: mockDocumentLoader });
|
|
190
|
+
assert(Array.isArray(signed["@context"]));
|
|
191
|
+
assertEquals(signed["@context"][1], { "signature": "https://w3id.org/security#signature" });
|
|
192
|
+
assert((await jsonld.canonize(signed, {
|
|
193
|
+
format: "application/n-quads",
|
|
194
|
+
documentLoader: mockDocumentLoader
|
|
195
|
+
})).includes("<https://w3id.org/security#signature>"));
|
|
196
|
+
assertEquals(await verifySignature(signed, {
|
|
197
|
+
documentLoader: mockDocumentLoader,
|
|
198
|
+
contextLoader: mockDocumentLoader
|
|
199
|
+
}), rsaPublicKey2);
|
|
200
|
+
});
|
|
201
|
+
test("signJsonLd() signs documents that use the signature term", async () => {
|
|
202
|
+
const signatureTerm = { "signature": "https://w3id.org/security#signature" };
|
|
203
|
+
for (const object of [{
|
|
204
|
+
type: "Note",
|
|
205
|
+
signature: "nested value"
|
|
206
|
+
}, { type: "signature" }]) {
|
|
207
|
+
const doc = {
|
|
208
|
+
"@context": ["https://www.w3.org/ns/activitystreams", { "@vocab": "https://example.com/" }],
|
|
209
|
+
id: "https://example.com/1",
|
|
210
|
+
type: "Create",
|
|
211
|
+
object
|
|
212
|
+
};
|
|
213
|
+
const signed = await signJsonLd(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader: mockDocumentLoader });
|
|
214
|
+
assertEquals(signed["@context"], [...doc["@context"], signatureTerm]);
|
|
215
|
+
assertEquals(signed["object"], object);
|
|
216
|
+
assertEquals(await verifySignature(signed, {
|
|
217
|
+
documentLoader: mockDocumentLoader,
|
|
218
|
+
contextLoader: mockDocumentLoader
|
|
219
|
+
}), rsaPublicKey2);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
test("signJsonLd() does not share the inline signature definition", async () => {
|
|
223
|
+
const doc = {
|
|
224
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
225
|
+
id: "https://example.com/notes/1",
|
|
226
|
+
type: "Note"
|
|
227
|
+
};
|
|
228
|
+
const firstContext = (await signJsonLd(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader: mockDocumentLoader }))["@context"];
|
|
229
|
+
firstContext[1]["signature"] = "https://example.com/signature";
|
|
230
|
+
assertEquals((await signJsonLd(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader: mockDocumentLoader }))["@context"][1], { "signature": "https://w3id.org/security#signature" });
|
|
231
|
+
});
|
|
232
|
+
test("signJsonLd() respects a protected null signature definition", async () => {
|
|
233
|
+
for (const context of [{
|
|
234
|
+
"@protected": true,
|
|
235
|
+
"signature": { "@id": null }
|
|
236
|
+
}, { "signature": {
|
|
237
|
+
"@id": null,
|
|
238
|
+
"@protected": true
|
|
239
|
+
} }]) {
|
|
240
|
+
const doc = {
|
|
241
|
+
"@context": ["https://www.w3.org/ns/activitystreams", context],
|
|
242
|
+
id: "https://example.com/1",
|
|
243
|
+
type: "Note"
|
|
244
|
+
};
|
|
245
|
+
const signed = await signJsonLd(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader: mockDocumentLoader });
|
|
246
|
+
assertEquals(signed["@context"], doc["@context"]);
|
|
247
|
+
assertEquals(await verifySignature(signed, {
|
|
248
|
+
documentLoader: mockDocumentLoader,
|
|
249
|
+
contextLoader: mockDocumentLoader
|
|
250
|
+
}), rsaPublicKey2);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
test("signJsonLd() respects protection from imported contexts", async () => {
|
|
254
|
+
const importUrl = "https://example.com/contexts/imported-protected";
|
|
255
|
+
const contextLoader = async (url) => {
|
|
256
|
+
if (new URL(url).href === importUrl) return {
|
|
257
|
+
contextUrl: null,
|
|
258
|
+
documentUrl: url,
|
|
259
|
+
document: { "@context": {
|
|
260
|
+
"@protected": true,
|
|
261
|
+
"name": "https://example.com/name"
|
|
262
|
+
} }
|
|
263
|
+
};
|
|
264
|
+
return await mockDocumentLoader(url);
|
|
265
|
+
};
|
|
266
|
+
for (const signature of [null, { "@id": null }]) {
|
|
267
|
+
const doc = {
|
|
268
|
+
"@context": ["https://www.w3.org/ns/activitystreams", {
|
|
269
|
+
"@import": importUrl,
|
|
270
|
+
signature
|
|
271
|
+
}],
|
|
272
|
+
id: "https://example.com/1",
|
|
273
|
+
type: "Note",
|
|
274
|
+
name: "Alice"
|
|
275
|
+
};
|
|
276
|
+
const signed = await signJsonLd(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader });
|
|
277
|
+
assertEquals(signed["@context"], doc["@context"]);
|
|
278
|
+
assertEquals(await verifySignature(signed, {
|
|
279
|
+
documentLoader: mockDocumentLoader,
|
|
280
|
+
contextLoader
|
|
281
|
+
}), rsaPublicKey2);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
test("signJsonLd() leaves unrecognized remote contexts unchanged", async () => {
|
|
285
|
+
const contextUrl = "https://example.com/contexts/custom";
|
|
286
|
+
const contextLoader = async (url) => {
|
|
287
|
+
if (new URL(url).href === contextUrl) return {
|
|
288
|
+
contextUrl: null,
|
|
289
|
+
documentUrl: url,
|
|
290
|
+
document: { "@context": {
|
|
291
|
+
"@protected": true,
|
|
292
|
+
"signature": {
|
|
293
|
+
"@id": "https://w3id.org/security#signature",
|
|
294
|
+
"@type": "@id"
|
|
295
|
+
}
|
|
296
|
+
} }
|
|
297
|
+
};
|
|
298
|
+
return await mockDocumentLoader(url);
|
|
299
|
+
};
|
|
300
|
+
const doc = {
|
|
301
|
+
"@context": ["https://www.w3.org/ns/activitystreams", contextUrl],
|
|
302
|
+
id: "https://example.com/1",
|
|
303
|
+
type: "Note"
|
|
304
|
+
};
|
|
305
|
+
const signed = await signJsonLd(doc, rsaPrivateKey2, rsaPublicKey2.id, { contextLoader });
|
|
306
|
+
assertEquals(signed["@context"], doc["@context"]);
|
|
307
|
+
assertEquals(await verifySignature(signed, {
|
|
308
|
+
documentLoader: mockDocumentLoader,
|
|
309
|
+
contextLoader
|
|
310
|
+
}), rsaPublicKey2);
|
|
311
|
+
});
|
|
111
312
|
const document = {
|
|
112
313
|
"@context": ["https://www.w3.org/ns/activitystreams", {
|
|
113
314
|
"ostatus": "http://ostatus.org#",
|
|
@@ -393,6 +594,367 @@ test("verifyJsonLd() records verification duration metric", async (t) => {
|
|
|
393
594
|
assertFalse("ld_signatures.type" in measurements[0].attributes);
|
|
394
595
|
});
|
|
395
596
|
});
|
|
597
|
+
test("verifyJsonLd() tolerates unmapped document and signature properties", async () => {
|
|
598
|
+
const options = {
|
|
599
|
+
documentLoader: mockDocumentLoader,
|
|
600
|
+
contextLoader: mockDocumentLoader
|
|
601
|
+
};
|
|
602
|
+
const canonize = (input) => jsonld.canonize(input, {
|
|
603
|
+
format: "application/n-quads",
|
|
604
|
+
documentLoader: mockDocumentLoader,
|
|
605
|
+
safe: false
|
|
606
|
+
});
|
|
607
|
+
const withQuote = {
|
|
608
|
+
...document,
|
|
609
|
+
object: {
|
|
610
|
+
...document.object,
|
|
611
|
+
quoteUri: "https://example.com/quoted"
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
const sigOptions = {
|
|
615
|
+
"@context": "https://w3id.org/identity/v1",
|
|
616
|
+
creator: signature.creator,
|
|
617
|
+
created: signature.created
|
|
618
|
+
};
|
|
619
|
+
const extraOption = { quoteUri: "https://example.com/quoted" };
|
|
620
|
+
assertEquals(await canonize(withQuote), await canonize(document));
|
|
621
|
+
assertEquals(await canonize({
|
|
622
|
+
...sigOptions,
|
|
623
|
+
...extraOption
|
|
624
|
+
}), await canonize(sigOptions));
|
|
625
|
+
for (const input of [withQuote, {
|
|
626
|
+
...sigOptions,
|
|
627
|
+
...extraOption
|
|
628
|
+
}]) await assertRejects(() => jsonld.canonize(input, {
|
|
629
|
+
format: "application/n-quads",
|
|
630
|
+
documentLoader: mockDocumentLoader,
|
|
631
|
+
safe: true
|
|
632
|
+
}), Error, "Safe mode validation error.");
|
|
633
|
+
const expectedKey = await verifySignature(testVector, options);
|
|
634
|
+
assertInstanceOf(expectedKey, CryptographicKey);
|
|
635
|
+
for (const signed of [
|
|
636
|
+
{
|
|
637
|
+
...withQuote,
|
|
638
|
+
signature
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
...document,
|
|
642
|
+
signature: {
|
|
643
|
+
...signature,
|
|
644
|
+
...extraOption
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
...withQuote,
|
|
649
|
+
signature: {
|
|
650
|
+
...signature,
|
|
651
|
+
...extraOption
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
]) {
|
|
655
|
+
assertEquals(await verifySignature(signed, options), expectedKey);
|
|
656
|
+
assert(await verifyJsonLd(signed, options));
|
|
657
|
+
}
|
|
658
|
+
const tampered = {
|
|
659
|
+
...withQuote,
|
|
660
|
+
object: {
|
|
661
|
+
...withQuote.object,
|
|
662
|
+
content: "<p>Forged</p>"
|
|
663
|
+
},
|
|
664
|
+
signature
|
|
665
|
+
};
|
|
666
|
+
assertEquals(await verifySignature(tampered, options), null);
|
|
667
|
+
assertFalse(await verifyJsonLd(tampered, options));
|
|
668
|
+
});
|
|
669
|
+
test("verifyJsonLd() rejects relative IRIs despite unmapped properties", async () => {
|
|
670
|
+
const options = {
|
|
671
|
+
documentLoader: mockDocumentLoader,
|
|
672
|
+
contextLoader: mockDocumentLoader
|
|
673
|
+
};
|
|
674
|
+
const canonize = (input) => jsonld.canonize(input, {
|
|
675
|
+
format: "application/n-quads",
|
|
676
|
+
documentLoader: mockDocumentLoader,
|
|
677
|
+
safe: false
|
|
678
|
+
});
|
|
679
|
+
const withRelativeUrl = {
|
|
680
|
+
...document,
|
|
681
|
+
object: {
|
|
682
|
+
...document.object,
|
|
683
|
+
url: [document.object.url, "/evil"]
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
const note = await (await Create.fromJsonLd(withRelativeUrl, options)).getObject(options);
|
|
687
|
+
assertInstanceOf(note, Note);
|
|
688
|
+
assertEquals(note.urls.map((url) => url instanceof URL ? url.href : null), [document.object.url, "https://activitypub.academy/evil"]);
|
|
689
|
+
for (const input of [withRelativeUrl, {
|
|
690
|
+
...document,
|
|
691
|
+
"https://example.com/extension": { "@id": "relative" }
|
|
692
|
+
}]) {
|
|
693
|
+
assertEquals(await canonize(input), await canonize(document));
|
|
694
|
+
for (const extra of [{}, { quoteUri: "https://example.com/quoted" }]) {
|
|
695
|
+
const signed = {
|
|
696
|
+
...input,
|
|
697
|
+
...extra,
|
|
698
|
+
signature
|
|
699
|
+
};
|
|
700
|
+
assertEquals(await verifySignature(signed, options), null);
|
|
701
|
+
assertFalse(await verifyJsonLd(signed, options));
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
const relativeOptions = {
|
|
705
|
+
...testVector,
|
|
706
|
+
signature: {
|
|
707
|
+
...signature,
|
|
708
|
+
nonce: { "@id": "relative" },
|
|
709
|
+
quoteUri: "https://example.com/quoted"
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
const sigOptions = {
|
|
713
|
+
"@context": "https://w3id.org/identity/v1",
|
|
714
|
+
creator: signature.creator,
|
|
715
|
+
created: signature.created
|
|
716
|
+
};
|
|
717
|
+
assertEquals(await canonize({
|
|
718
|
+
...sigOptions,
|
|
719
|
+
nonce: relativeOptions.signature.nonce,
|
|
720
|
+
quoteUri: relativeOptions.signature.quoteUri
|
|
721
|
+
}), await canonize(sigOptions));
|
|
722
|
+
assertEquals(await verifySignature(relativeOptions, options), null);
|
|
723
|
+
assertFalse(await verifyJsonLd(relativeOptions, options));
|
|
724
|
+
});
|
|
725
|
+
test("signing still rejects unmapped properties", async () => {
|
|
726
|
+
const input = {
|
|
727
|
+
...document,
|
|
728
|
+
quoteUri: "https://example.com/quoted"
|
|
729
|
+
};
|
|
730
|
+
const options = { contextLoader: mockDocumentLoader };
|
|
731
|
+
await assertRejects(() => createSignature(input, rsaPrivateKey3, rsaPublicKey3.id, options), Error, "Safe mode validation error.");
|
|
732
|
+
await assertRejects(() => signJsonLd(input, rsaPrivateKey3, rsaPublicKey3.id, options), Error, "Safe mode validation error.");
|
|
733
|
+
});
|
|
734
|
+
test("verification still rejects malformed JSON-LD", async () => {
|
|
735
|
+
const malformed = {
|
|
736
|
+
...testVector,
|
|
737
|
+
"@context": 42
|
|
738
|
+
};
|
|
739
|
+
const options = {
|
|
740
|
+
documentLoader: mockDocumentLoader,
|
|
741
|
+
contextLoader: mockDocumentLoader
|
|
742
|
+
};
|
|
743
|
+
assertEquals(await verifySignature(malformed, options), null);
|
|
744
|
+
assertEquals((await assertRejects(() => verifyJsonLd(malformed, options), Error)).name, "jsonld.SyntaxError");
|
|
745
|
+
});
|
|
746
|
+
test("Linked Data verification without created", async (t) => {
|
|
747
|
+
const options = {
|
|
748
|
+
documentLoader: mockDocumentLoader,
|
|
749
|
+
contextLoader: mockDocumentLoader
|
|
750
|
+
};
|
|
751
|
+
await t.step("verifies the independently signed options", async () => {
|
|
752
|
+
assertFalse(hasSignature(ldSignatureWithoutCreated));
|
|
753
|
+
assertEquals(await verifySignature(ldSignatureWithoutCreated, options), rsaPublicKey3);
|
|
754
|
+
assert(await verifyJsonLd(ldSignatureWithoutCreated, options));
|
|
755
|
+
});
|
|
756
|
+
await t.step("uses normalization contexts with a restrictive loader", async () => {
|
|
757
|
+
assert(await verifyJsonLd(ldSignatureWithoutCreated, {
|
|
758
|
+
...options,
|
|
759
|
+
contextLoader: async (url) => {
|
|
760
|
+
if (url !== "https://w3id.org/security/v1" && url !== "https://w3id.org/security/data-integrity/v1") return await mockDocumentLoader(url);
|
|
761
|
+
throw new Error(`Unexpected context: ${url}`);
|
|
762
|
+
}
|
|
763
|
+
}));
|
|
764
|
+
});
|
|
765
|
+
await t.step("rejects tampering with the signed timestamp or content", async () => {
|
|
766
|
+
const inserted = {
|
|
767
|
+
...ldSignatureWithoutCreated,
|
|
768
|
+
signature: {
|
|
769
|
+
...ldSignatureWithoutCreated.signature,
|
|
770
|
+
created: "2024-09-12T16:50:46Z"
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
const removed = structuredClone(testVector);
|
|
774
|
+
Reflect.deleteProperty(removed.signature, "created");
|
|
775
|
+
const changed = structuredClone(testVector);
|
|
776
|
+
changed.signature.created = "2024-09-13T16:50:46Z";
|
|
777
|
+
const changedContent = structuredClone(ldSignatureWithoutCreated);
|
|
778
|
+
changedContent.object.content = "tampered";
|
|
779
|
+
for (const doc of [
|
|
780
|
+
inserted,
|
|
781
|
+
removed,
|
|
782
|
+
changed,
|
|
783
|
+
changedContent
|
|
784
|
+
]) {
|
|
785
|
+
assertEquals(await verifySignature(doc, options), null);
|
|
786
|
+
assertFalse(await verifyJsonLd(doc, options));
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
await t.step("still rejects graph restructuring", async () => {
|
|
790
|
+
const { signature, ...document } = ldSignatureWithoutCreated;
|
|
791
|
+
await assertRejects(() => verifyJsonLd({
|
|
792
|
+
"@context": document["@context"],
|
|
793
|
+
"@graph": [document],
|
|
794
|
+
signature
|
|
795
|
+
}, options), UnsafeJsonLdError, "Unsupported JSON-LD keyword: @graph.");
|
|
796
|
+
});
|
|
797
|
+
});
|
|
798
|
+
test("Linked Data verification rejects malformed creator URLs", async () => {
|
|
799
|
+
let keyLoads = 0;
|
|
800
|
+
const options = {
|
|
801
|
+
documentLoader: (url) => {
|
|
802
|
+
keyLoads++;
|
|
803
|
+
return mockDocumentLoader(url);
|
|
804
|
+
},
|
|
805
|
+
contextLoader: mockDocumentLoader
|
|
806
|
+
};
|
|
807
|
+
for (const creator of [
|
|
808
|
+
"not a URL",
|
|
809
|
+
"",
|
|
810
|
+
"/keys/main",
|
|
811
|
+
"https://["
|
|
812
|
+
]) for (const withCreated of [false, true]) {
|
|
813
|
+
const input = {
|
|
814
|
+
...ldSignatureWithoutCreated,
|
|
815
|
+
signature: {
|
|
816
|
+
...ldSignatureWithoutCreated.signature,
|
|
817
|
+
creator,
|
|
818
|
+
...withCreated ? { created: "2024-09-12T16:50:46Z" } : {}
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
assert(hasVerifiableSignature(input));
|
|
822
|
+
assertEquals(await verifySignature(input, options), null);
|
|
823
|
+
assertFalse(await verifyJsonLd(input, options));
|
|
824
|
+
}
|
|
825
|
+
assertEquals(keyLoads, 0);
|
|
826
|
+
});
|
|
827
|
+
test("Linked Data verification distinguishes malformed and absent signatures", async () => {
|
|
828
|
+
const signature = {
|
|
829
|
+
type: "RsaSignature2017",
|
|
830
|
+
creator: "https://example.com/private-creator-sentinel#key",
|
|
831
|
+
signatureValue: "private-signature-sentinel"
|
|
832
|
+
};
|
|
833
|
+
assert(hasVerifiableSignature({ signature }));
|
|
834
|
+
assertFalse(hasSignature({ signature }));
|
|
835
|
+
for (const created of [
|
|
836
|
+
"2024-09-12T16:50:46Z",
|
|
837
|
+
"not a date",
|
|
838
|
+
""
|
|
839
|
+
]) {
|
|
840
|
+
const doc = { signature: {
|
|
841
|
+
...signature,
|
|
842
|
+
created
|
|
843
|
+
} };
|
|
844
|
+
assert(hasVerifiableSignature(doc));
|
|
845
|
+
assert(hasSignature(doc));
|
|
846
|
+
}
|
|
847
|
+
const malformed = [
|
|
848
|
+
null,
|
|
849
|
+
[],
|
|
850
|
+
"signature",
|
|
851
|
+
{},
|
|
852
|
+
{
|
|
853
|
+
...signature,
|
|
854
|
+
type: "OtherSignature"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
...signature,
|
|
858
|
+
type: ["RsaSignature2017"]
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
...signature,
|
|
862
|
+
creator: {}
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
...signature,
|
|
866
|
+
signatureValue: 1
|
|
867
|
+
},
|
|
868
|
+
...[
|
|
869
|
+
void 0,
|
|
870
|
+
null,
|
|
871
|
+
123,
|
|
872
|
+
{},
|
|
873
|
+
[]
|
|
874
|
+
].map((created) => ({
|
|
875
|
+
...signature,
|
|
876
|
+
created
|
|
877
|
+
}))
|
|
878
|
+
];
|
|
879
|
+
const records = [];
|
|
880
|
+
await configure({
|
|
881
|
+
sinks: { buffer: (record) => records.push(record) },
|
|
882
|
+
loggers: [{
|
|
883
|
+
category: [
|
|
884
|
+
"fedify",
|
|
885
|
+
"sig",
|
|
886
|
+
"ld"
|
|
887
|
+
],
|
|
888
|
+
sinks: ["buffer"],
|
|
889
|
+
lowestLevel: "debug"
|
|
890
|
+
}, {
|
|
891
|
+
category: ["logtape", "meta"],
|
|
892
|
+
sinks: []
|
|
893
|
+
}],
|
|
894
|
+
reset: true
|
|
895
|
+
});
|
|
896
|
+
let keyLoads = 0;
|
|
897
|
+
const options = {
|
|
898
|
+
documentLoader: (url) => {
|
|
899
|
+
keyLoads++;
|
|
900
|
+
return mockDocumentLoader(url);
|
|
901
|
+
},
|
|
902
|
+
contextLoader: mockDocumentLoader
|
|
903
|
+
};
|
|
904
|
+
try {
|
|
905
|
+
for (const value of malformed) {
|
|
906
|
+
const doc = { signature: value };
|
|
907
|
+
assertFalse(hasVerifiableSignature(doc));
|
|
908
|
+
assertEquals(await verifySignature(doc, options), null);
|
|
909
|
+
}
|
|
910
|
+
assertEquals(keyLoads, 0);
|
|
911
|
+
assertEquals(records.length, malformed.length);
|
|
912
|
+
for (const record of records) {
|
|
913
|
+
assertEquals(record.level, "debug");
|
|
914
|
+
assertFalse(JSON.stringify(record).includes(signature.creator));
|
|
915
|
+
assertFalse(JSON.stringify(record).includes(signature.signatureValue));
|
|
916
|
+
}
|
|
917
|
+
assertEquals(records.at(-1)?.properties, {
|
|
918
|
+
signatureKind: "object",
|
|
919
|
+
signatureProperties: [
|
|
920
|
+
"created",
|
|
921
|
+
"creator",
|
|
922
|
+
"signatureValue",
|
|
923
|
+
"type"
|
|
924
|
+
],
|
|
925
|
+
signaturePropertyCount: 4
|
|
926
|
+
});
|
|
927
|
+
for (const absent of [
|
|
928
|
+
null,
|
|
929
|
+
[],
|
|
930
|
+
1,
|
|
931
|
+
{},
|
|
932
|
+
{ type: "Create" }
|
|
933
|
+
]) {
|
|
934
|
+
assertEquals(await verifySignature(absent, options), null);
|
|
935
|
+
assertFalse(hasVerifiableSignature(absent));
|
|
936
|
+
assertEquals(describeSignatureShape(absent), null);
|
|
937
|
+
}
|
|
938
|
+
assertEquals(records.length, malformed.length);
|
|
939
|
+
assertFalse(await verifyJsonLd({
|
|
940
|
+
...ldSignatureWithoutCreated,
|
|
941
|
+
signature: {
|
|
942
|
+
...signature,
|
|
943
|
+
created: 123
|
|
944
|
+
}
|
|
945
|
+
}, options));
|
|
946
|
+
assertEquals(records.length, malformed.length + 1);
|
|
947
|
+
assertEquals(keyLoads, 0);
|
|
948
|
+
} finally {
|
|
949
|
+
await reset();
|
|
950
|
+
}
|
|
951
|
+
const shape = describeSignatureShape({ signature: globalThis.Object.fromEntries(Array.from({ length: 30 }, (_, i) => [`field${i}`.padEnd(200, "x"), "secret"])) });
|
|
952
|
+
assertEquals(shape?.signaturePropertyCount, 30);
|
|
953
|
+
assertEquals(shape?.signatureProperties.length, 20);
|
|
954
|
+
assert(shape?.signatureProperties.every((name) => name.length === 80));
|
|
955
|
+
assertEquals(describeSignatureShape({ signature: null })?.signatureKind, "null");
|
|
956
|
+
assertEquals(describeSignatureShape({ signature: [] })?.signatureKind, "array");
|
|
957
|
+
});
|
|
396
958
|
test("compactJsonLd() with restrictive context loader", async () => {
|
|
397
959
|
const restrictiveContextLoader = async (resource) => {
|
|
398
960
|
const url = new URL(resource).href;
|
|
@@ -897,7 +1459,10 @@ test("verifyJsonLd() rejects unsafe JSON-LD keywords", async () => {
|
|
|
897
1459
|
signature: signed.signature
|
|
898
1460
|
}]
|
|
899
1461
|
];
|
|
900
|
-
for (const [keyword, jsonLd] of cases) await assertRejects(() => verifyJsonLd(
|
|
1462
|
+
for (const [keyword, jsonLd] of cases) for (const extra of [{}, { quoteUri: "https://example.com/quoted" }]) await assertRejects(() => verifyJsonLd({
|
|
1463
|
+
...jsonLd,
|
|
1464
|
+
...extra
|
|
1465
|
+
}, options), UnsafeJsonLdError, `Unsupported JSON-LD keyword: ${keyword}.`);
|
|
901
1466
|
});
|
|
902
1467
|
test("compactJsonLd() rejects unsafe JSON-LD keywords inside signature objects", async () => {
|
|
903
1468
|
const signed = await signJsonLd({
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_http = require("../http-
|
|
5
|
-
const require_proof = require("../proof-
|
|
4
|
+
const require_http = require("../http-2RyDQ0tE.cjs");
|
|
5
|
+
const require_proof = require("../proof-CmcP8yqP.cjs");
|
|
6
6
|
exports.attachSignature = require_proof.attachSignature;
|
|
7
7
|
exports.createProof = require_proof.createProof;
|
|
8
8
|
exports.createSignature = require_proof.createSignature;
|
package/dist/sig/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "../http-
|
|
2
|
+
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "../http-D8DgRhHU.cjs";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "../owner-B3hNQCG8.cjs";
|
|
4
|
-
import { _ as
|
|
5
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, 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, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
4
|
+
import { S as verifySignature, _ as createSignature, a as VerifyObjectOptions, b as signJsonLd, c as hasProofLike, d as verifyProof, f as CreateSignatureOptions, g as attachSignature, h as VerifySignatureOptions, i as SignObjectOptions, l as signObject, m as VerifyJsonLdOptions, n as CryptoKeyPairLike, o as VerifyProofOptions, p as SignJsonLdOptions, r as CreateProofOptions, s as createProof, t as CryptoKeyLike, u as verifyObject, v as detachSignature, x as verifyJsonLd, y as hasSignatureLike } from "../mod-BMX6nsHP.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, 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, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|