@fedify/fedify 1.6.12 → 1.6.14

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.
Files changed (138) hide show
  1. package/dist/{actor-tT_B0pDn.d.ts → actor.d.ts} +3 -3
  2. package/dist/{actor-BxaCJsn8.js → actor.js} +6 -6
  3. package/dist/{assert-LOEeCUK5.js → assert.js} +2 -2
  4. package/dist/{assert_equals-B44MxcIj.js → assert_equals.js} +16 -16
  5. package/dist/{assert_instance_of-XtuFevV_.js → assert_instance_of.js} +2 -2
  6. package/dist/{assert_is_error-BTlryvT0.js → assert_is_error.js} +2 -2
  7. package/dist/{assert_not_equals-C685gKx6.js → assert_not_equals.js} +3 -6
  8. package/dist/{assert_rejects-DWQ4jaf9.js → assert_rejects.js} +3 -3
  9. package/dist/{assert_throws-YetpVSc-.js → assert_throws.js} +3 -3
  10. package/dist/{authdocloader-niAJMnCQ.js → authdocloader.js} +8 -8
  11. package/dist/{builder-DboGa9iv.js → builder.js} +7 -7
  12. package/dist/{chunk-Cx8LTkjm.js → chunk.js} +22 -15
  13. package/dist/{client-Cd552pKL.d.ts → client.d.ts} +2 -2
  14. package/dist/{client-De_5-2EG.js → client.js} +3 -3
  15. package/dist/{collection-Dfb0TPno.js → collection.js} +2 -3
  16. package/dist/compat/mod.d.ts +79 -12
  17. package/dist/compat/mod.js +1 -2
  18. package/dist/compat/transformers.test.js +34 -38
  19. package/dist/{context-DRhhOsMk.d.ts → context.d.ts} +10 -10
  20. package/dist/{context-KOy1fHBn.js → context.js} +5 -5
  21. package/dist/{docloader-DlUDOVSe.d.ts → docloader.d.ts} +2 -2
  22. package/dist/{docloader-CPBLJsVK.js → docloader.js} +32 -152
  23. package/dist/{docloader-09nVWLAZ.js → docloader2.js} +1 -1
  24. package/dist/{esm-DO9PrujO.js → esm.js} +36 -22
  25. package/dist/federation/builder.test.js +20 -26
  26. package/dist/federation/collection.test.js +11 -16
  27. package/dist/federation/handler.test.js +41 -48
  28. package/dist/federation/inbox.test.js +11 -11
  29. package/dist/federation/keycache.test.js +12 -11
  30. package/dist/federation/kv.test.js +8 -10
  31. package/dist/federation/middleware.test.js +99 -120
  32. package/dist/federation/mod.d.ts +4 -13
  33. package/dist/federation/mod.js +195 -12
  34. package/dist/federation/mq.test.js +9 -14
  35. package/dist/federation/retry.test.js +5 -4
  36. package/dist/federation/router.test.js +9 -10
  37. package/dist/federation/send.test.js +23 -24
  38. package/dist/{http-BkUCISGt.d.ts → http.d.ts} +3 -3
  39. package/dist/{http-B__WhFrv.js → http.js} +19 -27
  40. package/dist/{inbox-L4MTtAQ4.js → inbox.js} +5 -5
  41. package/dist/key.js +16 -0
  42. package/dist/{key-Dlbuqhbr.js → key2.js} +5 -5
  43. package/dist/{keycache-BEb0DSk7.js → keycache.js} +2 -2
  44. package/dist/{keys-CqpeF-EG.js → keys.js} +2 -2
  45. package/dist/{kv-p8sC8PTT.d.ts → kv.d.ts} +1 -1
  46. package/dist/{kv-DohFOP2C.js → kv.js} +1 -1
  47. package/dist/{langstr-DbWheeIS.js → langstr.js} +1 -1
  48. package/dist/{ld-45SsuOmB.js → ld.js} +9 -12
  49. package/dist/{lookup-vJccIKCS.d.ts → lookup.d.ts} +2 -2
  50. package/dist/{lookup-HY083HcK.js → lookup.js} +4 -4
  51. package/dist/{lookup-CWdbkwKD.js → lookup2.js} +6 -6
  52. package/dist/{middleware-D2HU0DhQ.js → middleware.js} +35 -39
  53. package/dist/middleware2.js +32 -0
  54. package/dist/mod.d.ts +17 -17
  55. package/dist/mod.js +17 -17
  56. package/dist/{mod-DSPyncxx.d.ts → mod2.d.ts} +3 -3
  57. package/dist/{mod-j45KmAfR.d.ts → mod3.d.ts} +4 -4
  58. package/dist/{mq-nceTGCuc.d.ts → mq.d.ts} +1 -1
  59. package/dist/{multibase-CnLHszip.js → multibase.js} +1 -1
  60. package/dist/nodeinfo/client.test.js +19 -28
  61. package/dist/nodeinfo/handler.test.js +37 -44
  62. package/dist/nodeinfo/mod.d.ts +2 -5
  63. package/dist/nodeinfo/mod.js +2 -3
  64. package/dist/nodeinfo/semver.test.js +13 -21
  65. package/dist/nodeinfo/types.test.js +9 -11
  66. package/dist/{owner-CbRc94FP.d.ts → owner.d.ts} +4 -4
  67. package/dist/{owner-BYxqeMiw.js → owner.js} +4 -4
  68. package/dist/{proof-BjHA4H_1.js → proof.js} +11 -13
  69. package/dist/{retry-BiIhZWgD.js → retry.js} +1 -1
  70. package/dist/{router-D_aVZZUc.js → router.js} +1 -1
  71. package/dist/runtime/authdocloader.test.js +22 -26
  72. package/dist/runtime/docloader.test.js +50 -46
  73. package/dist/runtime/key.test.js +31 -53
  74. package/dist/runtime/langstr.test.js +8 -10
  75. package/dist/runtime/mod.d.ts +103 -6
  76. package/dist/runtime/mod.js +6 -7
  77. package/dist/runtime/multibase/multibase.test.js +12 -18
  78. package/dist/runtime/url.test.js +7 -6
  79. package/dist/{semver-BNrOOAs9.js → semver.js} +7 -17
  80. package/dist/{send-BQA1p7vs.js → send.js} +4 -4
  81. package/dist/sig/http.test.js +104 -168
  82. package/dist/sig/key.test.js +17 -20
  83. package/dist/sig/ld.test.js +28 -35
  84. package/dist/sig/mod.d.ts +3 -7
  85. package/dist/sig/mod.js +6 -7
  86. package/dist/sig/owner.test.js +24 -30
  87. package/dist/sig/proof.test.js +24 -29
  88. package/dist/{std__assert-o_r9vqm1.js → std__assert.js} +7 -13
  89. package/dist/testing/docloader.test.js +9 -12
  90. package/dist/testing/mod.js +2 -1
  91. package/dist/{testing-DLyvtiiW.js → testing.js} +2 -2
  92. package/dist/{transformers-ghwJuzGY.js → transformers.js} +1 -1
  93. package/dist/{type-CFuiGLz9.js → type.js} +1 -1
  94. package/dist/{types-CJHS5pXl.js → types.js} +2 -2
  95. package/dist/{url-C2xuoQD1.js → url.js} +1 -1
  96. package/dist/vocab/actor.test.js +76 -128
  97. package/dist/vocab/lookup.test.js +19 -23
  98. package/dist/vocab/mod.d.ts +3 -5
  99. package/dist/vocab/mod.js +4 -4
  100. package/dist/vocab/type.test.js +10 -10
  101. package/dist/vocab/vocab.test.js +90 -109
  102. package/dist/{vocab-DSFLLLe6.d.ts → vocab.d.ts} +2 -2
  103. package/dist/{vocab-DVEzP_bQ.js → vocab.js} +318 -454
  104. package/dist/webfinger/handler.test.js +40 -48
  105. package/dist/webfinger/lookup.test.js +12 -15
  106. package/dist/webfinger/mod.d.ts +1 -4
  107. package/dist/webfinger/mod.js +2 -3
  108. package/dist/x/cfworkers.d.ts +2 -2
  109. package/dist/x/cfworkers.test.js +7 -9
  110. package/dist/x/hono.d.ts +2 -11
  111. package/dist/x/sveltekit.d.ts +2 -11
  112. package/package.json +1 -1
  113. package/dist/actor-7vCpWIGd.js +0 -34925
  114. package/dist/authdocloader-CVhMTbv4.js +0 -53
  115. package/dist/compat-Bb5myD13.js +0 -4
  116. package/dist/docloader-RFcxdgI8.js +0 -4590
  117. package/dist/federation-DyRlaC4X.js +0 -192
  118. package/dist/http-CnSGudcE.js +0 -789
  119. package/dist/key-BG_CTepE.js +0 -10
  120. package/dist/key-BQg3A7eo.js +0 -257
  121. package/dist/key-CeY-eted.js +0 -16
  122. package/dist/lookup-CdHTw-tQ.js +0 -127
  123. package/dist/middleware-BP-XbRGC.js +0 -17
  124. package/dist/middleware-Cg-eSyqX.js +0 -3501
  125. package/dist/middleware-JoLpCiMC.js +0 -33
  126. package/dist/mod-1pDWKvUL.d.ts +0 -2
  127. package/dist/mod-BTHfUeLo.d.ts +0 -104
  128. package/dist/mod-CgmTOt4z.d.ts +0 -82
  129. package/dist/mod-GIh5OYxW.d.ts +0 -2
  130. package/dist/mod-g0xFzAP9.d.ts +0 -2
  131. package/dist/nodeinfo-CyEbLjHs.js +0 -4
  132. package/dist/proof-DVYup76O.js +0 -582
  133. package/dist/runtime-BSkOVUWM.js +0 -4
  134. package/dist/sig-BXJO--F9.js +0 -4
  135. package/dist/types-D7_MRRa4.js +0 -455
  136. package/dist/vocab-aaGb1Tji.js +0 -168
  137. package/dist/webfinger-C3GIyXIg.js +0 -4
  138. /package/dist/{denokv-B_GFWjrl.js → denokv.js} +0 -0
@@ -3,10 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-CPBLJsVK.js";
7
- import { Activity, DataIntegrityProof, Multikey } from "./vocab-DVEzP_bQ.js";
8
- import { getTypeId } from "./type-CFuiGLz9.js";
9
- import { fetchKey, validateCryptoKey } from "./key-Dlbuqhbr.js";
6
+ import { d as version, u as name } from "./docloader.js";
7
+ import { h as Multikey, s as DataIntegrityProof, t as Activity } from "./vocab.js";
8
+ import { t as getTypeId } from "./type.js";
9
+ import { a as validateCryptoKey, n as fetchKey } from "./key2.js";
10
10
  import { getLogger } from "@logtape/logtape";
11
11
  import { SpanStatusCode, trace } from "@opentelemetry/api";
12
12
  import { encodeHex } from "byte-encodings/hex";
@@ -41,15 +41,14 @@ async function createProof(object, privateKey, keyId, { contextLoader, context:
41
41
  const msgBytes = encoder.encode(msgCanon);
42
42
  const msgDigest = await crypto.subtle.digest("SHA-256", msgBytes);
43
43
  created ??= Temporal.Now.instant();
44
- const proofConfig = {
44
+ const proofCanon = serialize({
45
45
  "@context": compactMsg["@context"],
46
46
  type: "DataIntegrityProof",
47
47
  cryptosuite: "eddsa-jcs-2022",
48
48
  verificationMethod: keyId.href,
49
49
  proofPurpose: "assertionMethod",
50
50
  created: created.toString()
51
- };
52
- const proofCanon = serialize(proofConfig);
51
+ });
53
52
  const proofBytes = encoder.encode(proofCanon);
54
53
  const proofDigest = await crypto.subtle.digest("SHA-256", proofBytes);
55
54
  const digest = new Uint8Array(proofDigest.byteLength + msgDigest.byteLength);
@@ -75,7 +74,7 @@ async function createProof(object, privateKey, keyId, { contextLoader, context:
75
74
  * @since 0.10.0
76
75
  */
77
76
  async function signObject(object, privateKey, keyId, options = {}) {
78
- return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(deno_default.name, deno_default.version).startActiveSpan("object_integrity_proofs.sign", { attributes: { "activitypub.object.type": getTypeId(object).href } }, async (span) => {
77
+ return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(name, version).startActiveSpan("object_integrity_proofs.sign", { attributes: { "activitypub.object.type": getTypeId(object).href } }, async (span) => {
79
78
  try {
80
79
  if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
81
80
  const existingProofs = [];
@@ -109,7 +108,7 @@ async function signObject(object, privateKey, keyId, options = {}) {
109
108
  * @since 0.10.0
110
109
  */
111
110
  async function verifyProof(jsonLd, proof, options = {}) {
112
- return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(deno_default.name, deno_default.version).startActiveSpan("object_integrity_proofs.verify", async (span) => {
111
+ return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(name, version).startActiveSpan("object_integrity_proofs.verify", async (span) => {
113
112
  if (span.isRecording()) {
114
113
  if (proof.cryptosuite != null) span.setAttribute("object_integrity_proofs.cryptosuite", proof.cryptosuite);
115
114
  if (proof.verificationMethodId != null) span.setAttribute("object_integrity_proofs.key_id", proof.verificationMethodId.href);
@@ -133,15 +132,14 @@ async function verifyProof(jsonLd, proof, options = {}) {
133
132
  async function verifyProofInternal(jsonLd, proof, options) {
134
133
  if (typeof jsonLd !== "object" || proof.cryptosuite !== "eddsa-jcs-2022" || proof.verificationMethodId == null || proof.proofPurpose !== "assertionMethod" || proof.proofValue == null || proof.created == null) return null;
135
134
  const publicKeyPromise = fetchKey(proof.verificationMethodId, Multikey, options);
136
- const proofConfig = {
135
+ const proofCanon = serialize({
137
136
  "@context": jsonLd["@context"],
138
137
  type: "DataIntegrityProof",
139
138
  cryptosuite: proof.cryptosuite,
140
139
  verificationMethod: proof.verificationMethodId.href,
141
140
  proofPurpose: proof.proofPurpose,
142
141
  created: proof.created.toString()
143
- };
144
- const proofCanon = serialize(proofConfig);
142
+ });
145
143
  const encoder = new TextEncoder();
146
144
  const proofBytes = encoder.encode(proofCanon);
147
145
  const proofDigest = await crypto.subtle.digest("SHA-256", proofBytes);
@@ -254,4 +252,4 @@ async function verifyObject(cls, jsonLd, options = {}) {
254
252
  }
255
253
 
256
254
  //#endregion
257
- export { createProof, signObject, verifyObject, verifyProof };
255
+ export { verifyProof as i, signObject as n, verifyObject as r, createProof as t };
@@ -34,4 +34,4 @@ function createExponentialBackoffPolicy(options = {}) {
34
34
  }
35
35
 
36
36
  //#endregion
37
- export { createExponentialBackoffPolicy };
37
+ export { createExponentialBackoffPolicy as t };
@@ -115,4 +115,4 @@ var RouterError = class extends Error {
115
115
  };
116
116
 
117
117
  //#endregion
118
- export { Router$1 as Router, RouterError };
118
+ export { RouterError as n, Router$1 as t };
@@ -3,29 +3,26 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-B44MxcIj.js";
7
- import "../assert-LOEeCUK5.js";
8
- import "../assert_instance_of-XtuFevV_.js";
9
- import "../docloader-CPBLJsVK.js";
10
- import { UrlError } from "../url-C2xuoQD1.js";
11
- import "../multibase-CnLHszip.js";
12
- import "../vocab-DVEzP_bQ.js";
13
- import "../langstr-DbWheeIS.js";
14
- import "../lookup-HY083HcK.js";
15
- import "../type-CFuiGLz9.js";
16
- import "../actor-BxaCJsn8.js";
17
- import "../key-Dlbuqhbr.js";
18
- import { verifyRequest } from "../http-CnSGudcE.js";
19
- import { getAuthenticatedDocumentLoader } from "../authdocloader-CVhMTbv4.js";
20
- import { test } from "../testing-DLyvtiiW.js";
21
- import "../std__assert-o_r9vqm1.js";
22
- import { assertRejects } from "../assert_rejects-DWQ4jaf9.js";
23
- import "../assert_is_error-BTlryvT0.js";
24
- import "../assert_not_equals-C685gKx6.js";
25
- import "../assert_throws-YetpVSc-.js";
26
- import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
27
- import { rsaPrivateKey2 } from "../keys-CqpeF-EG.js";
28
- import { esm_default } from "../esm-DO9PrujO.js";
6
+ import "../chunk.js";
7
+ import { t as assertEquals } from "../assert_equals.js";
8
+ import "../docloader.js";
9
+ import { t as UrlError } from "../url.js";
10
+ import "../multibase.js";
11
+ import "../vocab.js";
12
+ import "../langstr.js";
13
+ import "../lookup.js";
14
+ import "../actor.js";
15
+ import "../key2.js";
16
+ import { l as verifyRequest } from "../http.js";
17
+ import { t as getAuthenticatedDocumentLoader } from "../authdocloader.js";
18
+ import { t as test } from "../testing.js";
19
+ import "../std__assert.js";
20
+ import { t as assertRejects } from "../assert_rejects.js";
21
+ import "../assert_is_error.js";
22
+ import "../assert_throws.js";
23
+ import { t as mockDocumentLoader } from "../docloader2.js";
24
+ import { i as rsaPrivateKey2 } from "../keys.js";
25
+ import { t as esm_default } from "../esm.js";
29
26
 
30
27
  //#region runtime/authdocloader.test.ts
31
28
  test("getAuthenticatedDocumentLoader()", async (t) => {
@@ -39,11 +36,10 @@ test("getAuthenticatedDocumentLoader()", async (t) => {
39
36
  return new Response(JSON.stringify(v != null), { headers: { "Content-Type": "application/json" } });
40
37
  });
41
38
  await t.step("test", async () => {
42
- const loader = await getAuthenticatedDocumentLoader({
39
+ assertEquals(await (await getAuthenticatedDocumentLoader({
43
40
  keyId: new URL("https://example.com/key2"),
44
41
  privateKey: rsaPrivateKey2
45
- });
46
- assertEquals(await loader("https://example.com/object"), {
42
+ }))("https://example.com/object"), {
47
43
  contextUrl: null,
48
44
  documentUrl: "https://example.com/object",
49
45
  document: true
@@ -3,20 +3,19 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-B44MxcIj.js";
7
- import "../assert-LOEeCUK5.js";
8
- import "../assert_instance_of-XtuFevV_.js";
9
- import { MemoryKvStore } from "../kv-DohFOP2C.js";
10
- import { FetchError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../docloader-CPBLJsVK.js";
11
- import { UrlError } from "../url-C2xuoQD1.js";
12
- import { test } from "../testing-DLyvtiiW.js";
13
- import "../std__assert-o_r9vqm1.js";
14
- import { assertRejects } from "../assert_rejects-DWQ4jaf9.js";
15
- import "../assert_is_error-BTlryvT0.js";
16
- import "../assert_not_equals-C685gKx6.js";
17
- import { assertThrows } from "../assert_throws-YetpVSc-.js";
18
- import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
19
- import { esm_default } from "../esm-DO9PrujO.js";
6
+ import "../chunk.js";
7
+ import { t as assertEquals } from "../assert_equals.js";
8
+ import { t as assert } from "../assert.js";
9
+ import { t as MemoryKvStore } from "../kv.js";
10
+ import { d as version, i as getDocumentLoader, l as contexts_default, o as getUserAgent, s as kvCache, t as FetchError } from "../docloader.js";
11
+ import { t as UrlError } from "../url.js";
12
+ import { t as test } from "../testing.js";
13
+ import "../std__assert.js";
14
+ import { t as assertRejects } from "../assert_rejects.js";
15
+ import "../assert_is_error.js";
16
+ import { t as assertThrows } from "../assert_throws.js";
17
+ import { t as mockDocumentLoader } from "../docloader2.js";
18
+ import { t as esm_default } from "../esm.js";
20
19
  import process from "node:process";
21
20
 
22
21
  //#region runtime/docloader.test.ts
@@ -287,6 +286,17 @@ test("getDocumentLoader()", async (t) => {
287
286
  assertEquals(await fetchDocumentLoader2("https://example.com/localhost-redirect"), expected);
288
287
  assertEquals(await fetchDocumentLoader2("https://example.com/localhost-link"), expected);
289
288
  });
289
+ const maliciousPayload = "<a" + " a=\"b\"".repeat(30) + " ";
290
+ esm_default.get("https://example.com/redos", {
291
+ body: maliciousPayload,
292
+ headers: { "Content-Type": "text/html; charset=utf-8" }
293
+ });
294
+ await t.step("ReDoS resistance (CVE-2025-68475)", async () => {
295
+ const start = performance.now();
296
+ await assertRejects(() => fetchDocumentLoader("https://example.com/redos"), SyntaxError);
297
+ const elapsed = performance.now() - start;
298
+ assert(elapsed < 1e3, `Potential ReDoS vulnerability detected: ${elapsed}ms (expected < 1000ms)`);
299
+ });
290
300
  esm_default.hardReset();
291
301
  });
292
302
  test("kvCache()", async (t) => {
@@ -313,12 +323,11 @@ test("kvCache()", async (t) => {
313
323
  type: "Object"
314
324
  }
315
325
  });
316
- const cache = await kv.get([
326
+ assertEquals(await kv.get([
317
327
  "_test",
318
328
  "cached",
319
329
  "https://example.com/object"
320
- ]);
321
- assertEquals(cache, result);
330
+ ]), result);
322
331
  await kv.set([
323
332
  "_test",
324
333
  "cached",
@@ -328,8 +337,7 @@ test("kvCache()", async (t) => {
328
337
  documentUrl: "https://example.org/",
329
338
  document: { "id": "https://example.org/" }
330
339
  });
331
- const result2 = await loader("https://example.org/");
332
- assertEquals(result2, {
340
+ assertEquals(await loader("https://example.org/"), {
333
341
  contextUrl: null,
334
342
  documentUrl: "https://example.org/",
335
343
  document: { "id": "https://example.org/" }
@@ -343,21 +351,19 @@ test("kvCache()", async (t) => {
343
351
  documentUrl: "https://example.net/",
344
352
  document: { "id": "https://example.net/" }
345
353
  });
346
- const result3 = await loader("https://example.net/");
347
- assertEquals(result3, {
354
+ assertEquals(await loader("https://example.net/"), {
348
355
  contextUrl: null,
349
356
  documentUrl: "https://example.net/",
350
357
  document: { "id": "https://example.net/" }
351
358
  });
352
359
  });
353
360
  await t.step("not cached", async () => {
354
- const result = await kvCache({
361
+ assertEquals(await kvCache({
355
362
  kv,
356
363
  loader: mockDocumentLoader,
357
364
  rules: [],
358
365
  prefix: ["_test", "not cached"]
359
- })("https://example.com/object");
360
- assertEquals(result, {
366
+ })("https://example.com/object"), {
361
367
  contextUrl: null,
362
368
  documentUrl: "https://example.com/object",
363
369
  document: {
@@ -367,12 +373,11 @@ test("kvCache()", async (t) => {
367
373
  type: "Object"
368
374
  }
369
375
  });
370
- const cache = await kv.get([
376
+ assertEquals(await kv.get([
371
377
  "test2",
372
378
  "not cached",
373
379
  "https://example.com/object"
374
- ]);
375
- assertEquals(cache, void 0);
380
+ ]), void 0);
376
381
  });
377
382
  await t.step("maximum cache duration", () => {
378
383
  assertThrows(() => kvCache({
@@ -404,7 +409,7 @@ test("kvCache()", async (t) => {
404
409
  throw new Error("Failed to delete key");
405
410
  }
406
411
  }
407
- const result = await kvCache({
412
+ assertEquals(await kvCache({
408
413
  kv: new KvStoreThrowsException(),
409
414
  loader: mockDocumentLoader,
410
415
  rules: [
@@ -413,8 +418,7 @@ test("kvCache()", async (t) => {
413
418
  [new URLPattern("https://example.com/*"), Temporal.Duration.from({ days: 30 })]
414
419
  ],
415
420
  prefix: ["_test", "not cached"]
416
- })("https://example.com/object");
417
- assertEquals(result, {
421
+ })("https://example.com/object"), {
418
422
  contextUrl: null,
419
423
  documentUrl: "https://example.com/object",
420
424
  document: {
@@ -428,37 +432,37 @@ test("kvCache()", async (t) => {
428
432
  });
429
433
  test("getUserAgent()", () => {
430
434
  if ("Deno" in globalThis) {
431
- assertEquals(getUserAgent(), `Fedify/${deno_default.version} (Deno/${Deno.version.deno})`);
432
- assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Deno/${Deno.version.deno})`);
433
- assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${deno_default.version} (Deno/${Deno.version.deno}; +https://example.com/)`);
435
+ assertEquals(getUserAgent(), `Fedify/${version} (Deno/${Deno.version.deno})`);
436
+ assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${version}; Deno/${Deno.version.deno})`);
437
+ assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${version} (Deno/${Deno.version.deno}; +https://example.com/)`);
434
438
  assertEquals(getUserAgent({
435
439
  software: "MyApp/1.0.0",
436
440
  url: new URL("https://example.com/")
437
- }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Deno/${Deno.version.deno}; +https://example.com/)`);
441
+ }), `MyApp/1.0.0 (Fedify/${version}; Deno/${Deno.version.deno}; +https://example.com/)`);
438
442
  } else if ("Bun" in globalThis) {
439
- assertEquals(getUserAgent(), `Fedify/${deno_default.version} (Bun/${Bun.version})`);
440
- assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Bun/${Bun.version})`);
441
- assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${deno_default.version} (Bun/${Bun.version}; +https://example.com/)`);
443
+ assertEquals(getUserAgent(), `Fedify/${version} (Bun/${Bun.version})`);
444
+ assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${version}; Bun/${Bun.version})`);
445
+ assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${version} (Bun/${Bun.version}; +https://example.com/)`);
442
446
  assertEquals(getUserAgent({
443
447
  software: "MyApp/1.0.0",
444
448
  url: new URL("https://example.com/")
445
- }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Bun/${Bun.version}; +https://example.com/)`);
449
+ }), `MyApp/1.0.0 (Fedify/${version}; Bun/${Bun.version}; +https://example.com/)`);
446
450
  } else if (navigator.userAgent === "Cloudflare-Workers") {
447
- assertEquals(getUserAgent(), `Fedify/${deno_default.version} (Cloudflare-Workers)`);
448
- assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Cloudflare-Workers)`);
449
- assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${deno_default.version} (Cloudflare-Workers; +https://example.com/)`);
451
+ assertEquals(getUserAgent(), `Fedify/${version} (Cloudflare-Workers)`);
452
+ assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${version}; Cloudflare-Workers)`);
453
+ assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${version} (Cloudflare-Workers; +https://example.com/)`);
450
454
  assertEquals(getUserAgent({
451
455
  software: "MyApp/1.0.0",
452
456
  url: new URL("https://example.com/")
453
- }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Cloudflare-Workers; +https://example.com/)`);
457
+ }), `MyApp/1.0.0 (Fedify/${version}; Cloudflare-Workers; +https://example.com/)`);
454
458
  } else {
455
- assertEquals(getUserAgent(), `Fedify/${deno_default.version} (Node.js/${process.versions.node})`);
456
- assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Node.js/${process.versions.node})`);
457
- assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${deno_default.version} (Node.js/${process.versions.node}; +https://example.com/)`);
459
+ assertEquals(getUserAgent(), `Fedify/${version} (Node.js/${process.versions.node})`);
460
+ assertEquals(getUserAgent({ software: "MyApp/1.0.0" }), `MyApp/1.0.0 (Fedify/${version}; Node.js/${process.versions.node})`);
461
+ assertEquals(getUserAgent({ url: "https://example.com/" }), `Fedify/${version} (Node.js/${process.versions.node}; +https://example.com/)`);
458
462
  assertEquals(getUserAgent({
459
463
  software: "MyApp/1.0.0",
460
464
  url: new URL("https://example.com/")
461
- }), `MyApp/1.0.0 (Fedify/${deno_default.version}; Node.js/${process.versions.node}; +https://example.com/)`);
465
+ }), `MyApp/1.0.0 (Fedify/${version}; Node.js/${process.versions.node}; +https://example.com/)`);
462
466
  }
463
467
  });
464
468
 
@@ -3,24 +3,21 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-B44MxcIj.js";
7
- import "../assert-LOEeCUK5.js";
8
- import "../assert_instance_of-XtuFevV_.js";
9
- import "../docloader-CPBLJsVK.js";
10
- import "../url-C2xuoQD1.js";
11
- import "../multibase-CnLHszip.js";
12
- import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../vocab-DVEzP_bQ.js";
13
- import "../langstr-DbWheeIS.js";
14
- import "../lookup-HY083HcK.js";
15
- import "../type-CFuiGLz9.js";
16
- import "../actor-BxaCJsn8.js";
17
- import { exportJwk, importJwk } from "../key-Dlbuqhbr.js";
18
- import { test } from "../testing-DLyvtiiW.js";
19
- import "../std__assert-o_r9vqm1.js";
20
- import "../assert_rejects-DWQ4jaf9.js";
21
- import "../assert_is_error-BTlryvT0.js";
22
- import "../assert_not_equals-C685gKx6.js";
23
- import "../assert_throws-YetpVSc-.js";
6
+ import "../chunk.js";
7
+ import { t as assertEquals } from "../assert_equals.js";
8
+ import "../docloader.js";
9
+ import "../url.js";
10
+ import "../multibase.js";
11
+ import { A as exportSpki, M as importPem, N as importPkcs1, P as importSpki, j as importMultibaseKey, k as exportMultibaseKey } from "../vocab.js";
12
+ import "../langstr.js";
13
+ import "../lookup.js";
14
+ import "../actor.js";
15
+ import { i as importJwk, t as exportJwk } from "../key2.js";
16
+ import { t as test } from "../testing.js";
17
+ import "../std__assert.js";
18
+ import "../assert_rejects.js";
19
+ import "../assert_is_error.js";
20
+ import "../assert_throws.js";
24
21
 
25
22
  //#region runtime/key.test.ts
26
23
  const rsaSpki = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsm\nnt/J1mQfZasfJtN33dcZ3d1lJroxmgmMu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR\n5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7WQnKQgQMI+ezn24GHsZ/v1JIo77lerX5\nk4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1s\nZnh1WbHbevlGd72HSXll5rocPIHn8gq6xpBgpHwRphlRsgn4KHaJ6brXDIJjrnQh\nIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hwbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2\nuwIDAQAB\n-----END PUBLIC KEY-----\n";
@@ -45,64 +42,45 @@ const ed25519Jwk = {
45
42
  };
46
43
  const ed25519Multibase = "z6MksHj1MJnidCtDiyYW9ugNFftoX9fLK4bornTxmMZ6X7vq";
47
44
  test("importSpki()", async () => {
48
- const rsaKey = await importSpki(rsaSpki);
49
- assertEquals(await exportJwk(rsaKey), rsaJwk);
50
- const ed25519Key = await importSpki(ed25519Pem);
51
- assertEquals(await exportJwk(ed25519Key), ed25519Jwk);
45
+ assertEquals(await exportJwk(await importSpki(rsaSpki)), rsaJwk);
46
+ assertEquals(await exportJwk(await importSpki(ed25519Pem)), ed25519Jwk);
52
47
  });
53
48
  test("exportSpki()", async () => {
54
- const rsaKey = await importJwk(rsaJwk, "public");
55
- const rsaSpki$1 = await exportSpki(rsaKey);
49
+ const rsaSpki$1 = await exportSpki(await importJwk(rsaJwk, "public"));
56
50
  assertEquals(rsaSpki$1, rsaSpki$1);
57
- const ed25519Key = await importJwk(ed25519Jwk, "public");
58
- const ed25519Spki = await exportSpki(ed25519Key);
59
- assertEquals(ed25519Spki, ed25519Pem);
51
+ assertEquals(await exportSpki(await importJwk(ed25519Jwk, "public")), ed25519Pem);
60
52
  });
61
53
  test("importPkcs1()", async () => {
62
- const rsaKey = await importPkcs1(rsaPkcs1);
63
- assertEquals(await exportJwk(rsaKey), rsaJwk);
54
+ assertEquals(await exportJwk(await importPkcs1(rsaPkcs1)), rsaJwk);
64
55
  });
65
56
  test("importPem()", async () => {
66
- const rsaPkcs1Key = await importPem(rsaPkcs1);
67
- assertEquals(await exportJwk(rsaPkcs1Key), rsaJwk);
68
- const rsaSpkiKey = await importPem(rsaSpki);
69
- assertEquals(await exportJwk(rsaSpkiKey), rsaJwk);
70
- const ed25519Key = await importPem(ed25519Pem);
71
- assertEquals(await exportJwk(ed25519Key), ed25519Jwk);
57
+ assertEquals(await exportJwk(await importPem(rsaPkcs1)), rsaJwk);
58
+ assertEquals(await exportJwk(await importPem(rsaSpki)), rsaJwk);
59
+ assertEquals(await exportJwk(await importPem(ed25519Pem)), ed25519Jwk);
72
60
  });
73
61
  test("importMultibase()", async () => {
74
- const rsaKey = await importMultibaseKey(rsaMultibase);
75
- assertEquals(await exportJwk(rsaKey), rsaJwk);
76
- const ed25519Key = await importMultibaseKey(ed25519Multibase);
77
- assertEquals(await exportJwk(ed25519Key), ed25519Jwk);
62
+ assertEquals(await exportJwk(await importMultibaseKey(rsaMultibase)), rsaJwk);
63
+ assertEquals(await exportJwk(await importMultibaseKey(ed25519Multibase)), ed25519Jwk);
78
64
  });
79
65
  test("exportMultibaseKey()", async () => {
80
- const rsaKey = await importJwk(rsaJwk, "public");
81
- const rsaMb = await exportMultibaseKey(rsaKey);
82
- assertEquals(rsaMb, rsaMultibase);
83
- const ed25519Key = await importJwk(ed25519Jwk, "public");
84
- const ed25519Mb = await exportMultibaseKey(ed25519Key);
85
- assertEquals(ed25519Mb, ed25519Multibase);
86
- const rsaKey2 = await importJwk({
66
+ assertEquals(await exportMultibaseKey(await importJwk(rsaJwk, "public")), rsaMultibase);
67
+ assertEquals(await exportMultibaseKey(await importJwk(ed25519Jwk, "public")), ed25519Multibase);
68
+ assertEquals(await exportMultibaseKey(await importJwk({
87
69
  alg: "RS256",
88
70
  ext: true,
89
71
  key_ops: ["verify"],
90
72
  e: "AQAB",
91
73
  kty: "RSA",
92
74
  n: "sbX82NTV6IylxCh7MfV4hlyvaniCajuP97GyOqSvTmoEdBOflFvZ06kR_9D6ctt45Fk6hskfnag2GG69NALVH2o4RCR6tQiLRpKcMRtDYE_thEmfBvDzm_VVkOIYfxu-Ipuo9J_S5XDNDjczx2v-3oDh5-CIHkU46hvFeCvpUS-L8TJSbgX0kjVk_m4eIb9wh63rtmD6Uz_KBtCo5mmR4TEtcLZKYdqMp3wCjN-TlgHiz_4oVXWbHUefCEe8rFnX1iQnpDHU49_SaXQoud1jCaexFn25n-Aa8f8bc5Vm-5SeRwidHa6ErvEhTvf1dz6GoNPp2iRvm-wJ1gxwWJEYPQ"
93
- }, "public");
94
- const rsaMb2 = await exportMultibaseKey(rsaKey2);
95
- assertEquals(rsaMb2, "z4MXj1wBzi9jUstyPMS4jQqB6KdJaiatPkAtVtGc6bQEQEEsKTic4G7Rou3iBf9vPmT5dbkm9qsZsuVNjq8HCuW1w24nhBFGkRE4cd2Uf2tfrB3N7h4mnyPp1BF3ZttHTYv3DLUPi1zMdkULiow3M1GfXkoC6DoxDUm1jmN6GBj22SjVsr6dxezRVQc7aj9TxE7JLbMH1wh5X3kA58H3DFW8rnYMakFGbca5CB2Jf6CnGQZmL7o5uJAdTwXfy2iiiyPxXEGerMhHwhjTA1mKYobyk2CpeEcmvynADfNZ5MBvcCS7m3XkFCMNUYBS9NQ3fze6vMSUPsNa6GVYmKx2x6JrdEjCk3qRMMmyjnjCMfR4pXbRMZa3i");
96
- const ed25519Key2 = await importJwk({
75
+ }, "public")), "z4MXj1wBzi9jUstyPMS4jQqB6KdJaiatPkAtVtGc6bQEQEEsKTic4G7Rou3iBf9vPmT5dbkm9qsZsuVNjq8HCuW1w24nhBFGkRE4cd2Uf2tfrB3N7h4mnyPp1BF3ZttHTYv3DLUPi1zMdkULiow3M1GfXkoC6DoxDUm1jmN6GBj22SjVsr6dxezRVQc7aj9TxE7JLbMH1wh5X3kA58H3DFW8rnYMakFGbca5CB2Jf6CnGQZmL7o5uJAdTwXfy2iiiyPxXEGerMhHwhjTA1mKYobyk2CpeEcmvynADfNZ5MBvcCS7m3XkFCMNUYBS9NQ3fze6vMSUPsNa6GVYmKx2x6JrdEjCk3qRMMmyjnjCMfR4pXbRMZa3i");
76
+ assertEquals(await exportMultibaseKey(await importJwk({
97
77
  alg: "Ed25519",
98
78
  crv: "Ed25519",
99
79
  ext: true,
100
80
  key_ops: ["verify"],
101
81
  kty: "OKP",
102
82
  x: "Lm_M42cB3HkUiODQsXRcweM6TByfzEHGO9ND274JcOY"
103
- }, "public");
104
- const ed25519Mb2 = await exportMultibaseKey(ed25519Key2);
105
- assertEquals(ed25519Mb2, "z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK");
83
+ }, "public")), "z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK");
106
84
  });
107
85
 
108
86
  //#endregion
@@ -3,16 +3,14 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals } from "../assert_equals-B44MxcIj.js";
7
- import "../assert-LOEeCUK5.js";
8
- import "../assert_instance_of-XtuFevV_.js";
9
- import { LanguageString } from "../langstr-DbWheeIS.js";
10
- import { test } from "../testing-DLyvtiiW.js";
11
- import "../std__assert-o_r9vqm1.js";
12
- import "../assert_rejects-DWQ4jaf9.js";
13
- import "../assert_is_error-BTlryvT0.js";
14
- import "../assert_not_equals-C685gKx6.js";
15
- import "../assert_throws-YetpVSc-.js";
6
+ import "../chunk.js";
7
+ import { t as assertEquals } from "../assert_equals.js";
8
+ import { t as LanguageString } from "../langstr.js";
9
+ import { t as test } from "../testing.js";
10
+ import "../std__assert.js";
11
+ import "../assert_rejects.js";
12
+ import "../assert_is_error.js";
13
+ import "../assert_throws.js";
16
14
  import { parseLanguageTag } from "@phensley/language-tag";
17
15
  import util from "node:util";
18
16
 
@@ -1,8 +1,105 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import "../kv-p8sC8PTT.js";
4
- import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-DlUDOVSe.js";
5
- import { LanguageString } from "../vocab-DSFLLLe6.js";
6
- import "../http-BkUCISGt.js";
7
- import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "../mod-BTHfUeLo.js";
8
- export { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, LanguageString, RemoteDocument, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
3
+ import { a as FetchError, c as KvCacheParameters, d as getDocumentLoader, f as getUserAgent, i as DocumentLoaderFactoryOptions, l as RemoteDocument, n as DocumentLoader, o as GetDocumentLoaderOptions, p as kvCache, r as DocumentLoaderFactory, s as GetUserAgentOptions, t as AuthenticatedDocumentLoaderFactory, u as fetchDocumentLoader } from "../docloader.js";
4
+ import { pt as LanguageString } from "../vocab.js";
5
+ import { n as HttpMessageSignaturesSpecDeterminer } from "../http.js";
6
+ import { TracerProvider } from "@opentelemetry/api";
7
+
8
+ //#region runtime/authdocloader.d.ts
9
+ /**
10
+ * Options for {@link getAuthenticatedDocumentLoader}.
11
+ * @see {@link getAuthenticatedDocumentLoader}
12
+ * @since 1.3.0
13
+ */
14
+ interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
15
+ /**
16
+ * An optional spec determiner for HTTP Message Signatures.
17
+ * It determines the spec to use for signing requests.
18
+ * It is used for double-knocking
19
+ * (see <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>).
20
+ * @since 1.6.0
21
+ */
22
+ specDeterminer?: HttpMessageSignaturesSpecDeterminer;
23
+ /**
24
+ * The OpenTelemetry tracer provider. If omitted, the global tracer provider
25
+ * is used.
26
+ * @since 1.6.0
27
+ */
28
+ tracerProvider?: TracerProvider;
29
+ }
30
+ /**
31
+ * Gets an authenticated {@link DocumentLoader} for the given identity.
32
+ * Note that an authenticated document loader intentionally does not cache
33
+ * the fetched documents.
34
+ * @param identity The identity to get the document loader for.
35
+ * The actor's key pair.
36
+ * @param options The options for the document loader.
37
+ * @returns The authenticated document loader.
38
+ * @throws {TypeError} If the key is invalid or unsupported.
39
+ * @since 0.4.0
40
+ */
41
+ declare function getAuthenticatedDocumentLoader(identity: {
42
+ keyId: URL;
43
+ privateKey: CryptoKey;
44
+ }, {
45
+ allowPrivateAddress,
46
+ userAgent,
47
+ specDeterminer,
48
+ tracerProvider
49
+ }?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
50
+ //#endregion
51
+ //#region runtime/key.d.ts
52
+ /**
53
+ * Imports a PEM-SPKI formatted public key.
54
+ * @param pem The PEM-SPKI formatted public key.
55
+ * @returns The imported public key.
56
+ * @throws {TypeError} If the key is invalid or unsupported.
57
+ * @since 0.5.0
58
+ */
59
+ declare function importSpki(pem: string): Promise<CryptoKey>;
60
+ /**
61
+ * Exports a public key in PEM-SPKI format.
62
+ * @param key The public key to export.
63
+ * @returns The exported public key in PEM-SPKI format.
64
+ * @throws {TypeError} If the key is invalid or unsupported.
65
+ * @since 0.5.0
66
+ */
67
+ declare function exportSpki(key: CryptoKey): Promise<string>;
68
+ /**
69
+ * Imports a PEM-PKCS#1 formatted public key.
70
+ * @param pem The PEM-PKCS#1 formatted public key.
71
+ * @returns The imported public key.
72
+ * @throws {TypeError} If the key is invalid or unsupported.
73
+ * @since 1.5.0
74
+ */
75
+ declare function importPkcs1(pem: string): Promise<CryptoKey>;
76
+ /**
77
+ * Imports a PEM formatted public key (SPKI or PKCS#1).
78
+ * @param pem The PEM formatted public key to import (SPKI or PKCS#1).
79
+ * @returns The imported public key.
80
+ * @throws {TypeError} If the key is invalid or unsupported.
81
+ * @since 1.5.0
82
+ */
83
+ declare function importPem(pem: string): Promise<CryptoKey>;
84
+ /**
85
+ * Imports a [Multibase]-encoded public key.
86
+ *
87
+ * [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
88
+ * @param key The Multibase-encoded public key.
89
+ * @returns The imported public key.
90
+ * @throws {TypeError} If the key is invalid or unsupported.
91
+ * @since 0.10.0
92
+ */
93
+ declare function importMultibaseKey(key: string): Promise<CryptoKey>;
94
+ /**
95
+ * Exports a public key in [Multibase] format.
96
+ *
97
+ * [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
98
+ * @param key The public key to export.
99
+ * @returns The exported public key in Multibase format.
100
+ * @throws {TypeError} If the key is invalid or unsupported.
101
+ * @since 0.10.0
102
+ */
103
+ declare function exportMultibaseKey(key: CryptoKey): Promise<string>;
104
+ //#endregion
105
+ export { type AuthenticatedDocumentLoaderFactory, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, FetchError, GetAuthenticatedDocumentLoaderOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type KvCacheParameters, LanguageString, type RemoteDocument, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
@@ -2,12 +2,11 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "../docloader-RFcxdgI8.js";
6
- import { LanguageString, exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../actor-7vCpWIGd.js";
7
- import "../lookup-CdHTw-tQ.js";
8
- import "../key-BQg3A7eo.js";
9
- import "../http-B__WhFrv.js";
10
- import { getAuthenticatedDocumentLoader } from "../authdocloader-niAJMnCQ.js";
11
- import "../runtime-BSkOVUWM.js";
5
+ import { i as getDocumentLoader, o as getUserAgent, r as fetchDocumentLoader, s as kvCache, t as FetchError } from "../docloader.js";
6
+ import { Ct as importPkcs1, St as importPem, bt as exportSpki, vt as LanguageString, wt as importSpki, xt as importMultibaseKey, yt as exportMultibaseKey } from "../actor.js";
7
+ import "../lookup.js";
8
+ import "../key2.js";
9
+ import "../http.js";
10
+ import { t as getAuthenticatedDocumentLoader } from "../authdocloader.js";
12
11
 
13
12
  export { FetchError, LanguageString, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };