@fedify/fedify 2.0.10 → 2.0.12
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/{builder-opzCVeXZ.mjs → builder-D6J-5hKa.mjs} +3 -3
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-Dyg7P1qW.d.ts → context-DKccFiYD.d.ts} +4 -1
- package/dist/{context-CNIt-Qn7.d.cts → context-Kt2s6UWW.d.cts} +4 -1
- package/dist/{deno-CrjRl2cm.mjs → deno-SCNd7qf9.mjs} +1 -1
- package/dist/{docloader-35wi0JO1.mjs → docloader-hJEqcTL7.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +3 -3
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +89 -29
- 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/send.test.mjs +3 -3
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-BGjkvEDc.js → http-8mR6zS99.js} +1 -1
- package/dist/{http-VQAKycaZ.mjs → http-B98y63Kd.mjs} +2 -2
- package/dist/{http-DLnqzOtY.cjs → http-CJBoXT7y.cjs} +1 -1
- package/dist/{inbox-B6DfJ3h9.mjs → inbox-C23H7V44.mjs} +1 -1
- package/dist/{key-C9oV7wk8.mjs → key-DB6mlGEl.mjs} +1 -1
- package/dist/{kv-cache-QxhhotWv.js → kv-cache-CZPQRg2z.js} +1 -1
- package/dist/{kv-cache-BAEaVRvi.cjs → kv-cache-DyDvcvqh.cjs} +1 -1
- package/dist/{ld-BfEccFSP.mjs → ld-BLu-KvLW.mjs} +2 -2
- package/dist/{middleware-DuFvBMT2.cjs → middleware-C2p8Tgjt.cjs} +1 -1
- package/dist/{middleware-CGkdTPmX.mjs → middleware-CNP01MGn.mjs} +1 -1
- package/dist/{middleware-Dj7uT9F8.cjs → middleware-DTZLVRS1.cjs} +43 -18
- package/dist/{middleware-ReZIkikn.mjs → middleware-Do_Wjr4i.mjs} +49 -24
- package/dist/{middleware-Bc4sY_YW.js → middleware-ROrpLy17.js} +42 -17
- package/dist/{mod-BnAKGh2w.d.ts → mod-Cwmyxyoc.d.ts} +1 -1
- package/dist/{mod-DWoQffTD.d.cts → mod-DiGQkv-4.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-CRLqJlP_.mjs → owner-CnWzoI3C.mjs} +2 -2
- package/dist/{proof-DvQ28mUJ.js → proof-3N_8Goy3.js} +1 -1
- package/dist/{proof-B4SaJCmK.cjs → proof-CpP_LUUi.cjs} +1 -1
- package/dist/{proof-9SGtq4tE.mjs → proof-gNE8tyl0.mjs} +2 -2
- package/dist/{send-DN2ywoe8.mjs → send-Bt03lAUy.mjs} +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/testing/mod.d.mts +4 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
|
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
require("./chunk-DDcVe30Y.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
5
|
-
const require_http = require("./http-
|
|
6
|
-
const require_proof = require("./proof-
|
|
5
|
+
const require_http = require("./http-CJBoXT7y.cjs");
|
|
6
|
+
const require_proof = require("./proof-CpP_LUUi.cjs");
|
|
7
7
|
const require_types = require("./types-KC4QAoxe.cjs");
|
|
8
|
-
const require_kv_cache = require("./kv-cache-
|
|
8
|
+
const require_kv_cache = require("./kv-cache-DyDvcvqh.cjs");
|
|
9
9
|
let _logtape_logtape = require("@logtape/logtape");
|
|
10
10
|
let _fedify_vocab = require("@fedify/vocab");
|
|
11
11
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -330,7 +330,7 @@ var FederationBuilderImpl = class {
|
|
|
330
330
|
this.collectionTypeIds = {};
|
|
331
331
|
}
|
|
332
332
|
async build(options) {
|
|
333
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
333
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-C2p8Tgjt.cjs"));
|
|
334
334
|
const f = new FederationImpl(options);
|
|
335
335
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
336
336
|
f.router = this.router.clone();
|
|
@@ -2798,14 +2798,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2798
2798
|
let rsaKey = null;
|
|
2799
2799
|
for (const { keyId, privateKey } of keys) {
|
|
2800
2800
|
require_http.validateCryptoKey(privateKey, "private");
|
|
2801
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2801
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2802
|
+
keyId,
|
|
2803
|
+
privateKey
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2807
|
+
proofCreated = true;
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
if (!proofCreated) {
|
|
2811
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2809
2812
|
activity = await require_proof.signObject(activity, privateKey, keyId, {
|
|
2810
2813
|
contextLoader,
|
|
2811
2814
|
tracerProvider: this.tracerProvider
|
|
@@ -3395,6 +3398,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3395
3398
|
}
|
|
3396
3399
|
const owner = this.getActorUri(identifier);
|
|
3397
3400
|
const result = [];
|
|
3401
|
+
let i = 1;
|
|
3398
3402
|
for (const keyPair of keyPairs) {
|
|
3399
3403
|
const newPair = {
|
|
3400
3404
|
...keyPair,
|
|
@@ -3404,12 +3408,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3404
3408
|
publicKey: keyPair.publicKey
|
|
3405
3409
|
}),
|
|
3406
3410
|
multikey: new _fedify_vocab.Multikey({
|
|
3407
|
-
id:
|
|
3411
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3408
3412
|
controller: owner,
|
|
3409
3413
|
publicKey: keyPair.publicKey
|
|
3410
3414
|
})
|
|
3411
3415
|
};
|
|
3412
3416
|
result.push(newPair);
|
|
3417
|
+
i++;
|
|
3413
3418
|
}
|
|
3414
3419
|
return result;
|
|
3415
3420
|
}
|
|
@@ -3547,6 +3552,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3547
3552
|
]);
|
|
3548
3553
|
let keys;
|
|
3549
3554
|
let identifier = null;
|
|
3555
|
+
let actorKeyPairs = null;
|
|
3550
3556
|
if ("identifier" in sender || "username" in sender) {
|
|
3551
3557
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3552
3558
|
else {
|
|
@@ -3559,8 +3565,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3559
3565
|
}
|
|
3560
3566
|
}
|
|
3561
3567
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3562
|
-
|
|
3563
|
-
|
|
3568
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3569
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3570
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3571
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3572
|
+
keyId: kp.keyId,
|
|
3573
|
+
privateKey: kp.privateKey
|
|
3574
|
+
}));
|
|
3564
3575
|
} else if (Array.isArray(sender)) {
|
|
3565
3576
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3566
3577
|
keys = sender;
|
|
@@ -3596,6 +3607,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3596
3607
|
});
|
|
3597
3608
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3598
3609
|
}
|
|
3610
|
+
if (actorKeyPairs != null) {
|
|
3611
|
+
const contextLoader = this.contextLoader;
|
|
3612
|
+
for (const kp of actorKeyPairs) {
|
|
3613
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3614
|
+
activity = await require_proof.signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3615
|
+
contextLoader,
|
|
3616
|
+
tracerProvider: this.tracerProvider
|
|
3617
|
+
});
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3599
3620
|
const inboxes = extractInboxes({
|
|
3600
3621
|
recipients: expandedRecipients,
|
|
3601
3622
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3636,7 +3657,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3636
3657
|
traceContext: carrier
|
|
3637
3658
|
};
|
|
3638
3659
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
3639
|
-
this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
3660
|
+
await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
3640
3661
|
}
|
|
3641
3662
|
async *getFollowers(identifier) {
|
|
3642
3663
|
if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
|
|
@@ -3913,8 +3934,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3913
3934
|
identifier = mapped;
|
|
3914
3935
|
}
|
|
3915
3936
|
}
|
|
3916
|
-
|
|
3917
|
-
if (
|
|
3937
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3938
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3939
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3940
|
+
keyId: kp.keyId,
|
|
3941
|
+
privateKey: kp.privateKey
|
|
3942
|
+
}));
|
|
3918
3943
|
} else if (Array.isArray(forwarder)) {
|
|
3919
3944
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3920
3945
|
keys = forwarder;
|
|
@@ -2,23 +2,23 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-
|
|
7
|
-
import { l as verifyRequest } from "./http-
|
|
8
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
5
|
+
import { n as version, t as name } from "./deno-SCNd7qf9.mjs";
|
|
6
|
+
import { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-DB6mlGEl.mjs";
|
|
7
|
+
import { l as verifyRequest } from "./http-B98y63Kd.mjs";
|
|
8
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-hJEqcTL7.mjs";
|
|
9
9
|
import { n as kvCache } from "./kv-cache-OWmRLHir.mjs";
|
|
10
|
-
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-
|
|
11
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
12
|
-
import { n as signObject, r as verifyObject } from "./proof-
|
|
10
|
+
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-BLu-KvLW.mjs";
|
|
11
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CnWzoI3C.mjs";
|
|
12
|
+
import { n as signObject, r as verifyObject } from "./proof-gNE8tyl0.mjs";
|
|
13
13
|
import { t as getNodeInfo } from "./client-A1UrnX6I.mjs";
|
|
14
14
|
import { t as nodeInfoToJson } from "./types-C37hquWI.mjs";
|
|
15
|
-
import { n as routeActivity } from "./inbox-
|
|
16
|
-
import { t as FederationBuilderImpl } from "./builder-
|
|
15
|
+
import { n as routeActivity } from "./inbox-C23H7V44.mjs";
|
|
16
|
+
import { t as FederationBuilderImpl } from "./builder-D6J-5hKa.mjs";
|
|
17
17
|
import { t as buildCollectionSynchronizationHeader } from "./collection-ChgDTHLz.mjs";
|
|
18
18
|
import { t as KvKeyCache } from "./keycache-DaQ3ndaJ.mjs";
|
|
19
19
|
import { t as acceptsJsonLd } from "./negotiation-BehA2uul.mjs";
|
|
20
20
|
import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
|
|
21
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-
|
|
21
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-Bt03lAUy.mjs";
|
|
22
22
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
23
23
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
24
24
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -1740,14 +1740,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
1740
1740
|
let rsaKey = null;
|
|
1741
1741
|
for (const { keyId, privateKey } of keys) {
|
|
1742
1742
|
validateCryptoKey(privateKey, "private");
|
|
1743
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1743
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
1744
|
+
keyId,
|
|
1745
|
+
privateKey
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
1749
|
+
proofCreated = true;
|
|
1750
|
+
break;
|
|
1751
|
+
}
|
|
1752
|
+
if (!proofCreated) {
|
|
1753
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
1751
1754
|
activity = await signObject(activity, privateKey, keyId, {
|
|
1752
1755
|
contextLoader,
|
|
1753
1756
|
tracerProvider: this.tracerProvider
|
|
@@ -2337,6 +2340,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2337
2340
|
}
|
|
2338
2341
|
const owner = this.getActorUri(identifier);
|
|
2339
2342
|
const result = [];
|
|
2343
|
+
let i = 1;
|
|
2340
2344
|
for (const keyPair of keyPairs) {
|
|
2341
2345
|
const newPair = {
|
|
2342
2346
|
...keyPair,
|
|
@@ -2346,12 +2350,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2346
2350
|
publicKey: keyPair.publicKey
|
|
2347
2351
|
}),
|
|
2348
2352
|
multikey: new Multikey({
|
|
2349
|
-
id:
|
|
2353
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
2350
2354
|
controller: owner,
|
|
2351
2355
|
publicKey: keyPair.publicKey
|
|
2352
2356
|
})
|
|
2353
2357
|
};
|
|
2354
2358
|
result.push(newPair);
|
|
2359
|
+
i++;
|
|
2355
2360
|
}
|
|
2356
2361
|
return result;
|
|
2357
2362
|
}
|
|
@@ -2489,6 +2494,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2489
2494
|
]);
|
|
2490
2495
|
let keys;
|
|
2491
2496
|
let identifier = null;
|
|
2497
|
+
let actorKeyPairs = null;
|
|
2492
2498
|
if ("identifier" in sender || "username" in sender) {
|
|
2493
2499
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
2494
2500
|
else {
|
|
@@ -2501,8 +2507,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2501
2507
|
}
|
|
2502
2508
|
}
|
|
2503
2509
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
2504
|
-
|
|
2505
|
-
|
|
2510
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
2511
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
2512
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
2513
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
2514
|
+
keyId: kp.keyId,
|
|
2515
|
+
privateKey: kp.privateKey
|
|
2516
|
+
}));
|
|
2506
2517
|
} else if (Array.isArray(sender)) {
|
|
2507
2518
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
2508
2519
|
keys = sender;
|
|
@@ -2538,6 +2549,16 @@ var ContextImpl = class ContextImpl {
|
|
|
2538
2549
|
});
|
|
2539
2550
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
2540
2551
|
}
|
|
2552
|
+
if (actorKeyPairs != null) {
|
|
2553
|
+
const contextLoader = this.contextLoader;
|
|
2554
|
+
for (const kp of actorKeyPairs) {
|
|
2555
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
2556
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
2557
|
+
contextLoader,
|
|
2558
|
+
tracerProvider: this.tracerProvider
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2541
2562
|
const inboxes = extractInboxes({
|
|
2542
2563
|
recipients: expandedRecipients,
|
|
2543
2564
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -2578,7 +2599,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2578
2599
|
traceContext: carrier
|
|
2579
2600
|
};
|
|
2580
2601
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
2581
|
-
this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
2602
|
+
await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
2582
2603
|
}
|
|
2583
2604
|
async *getFollowers(identifier) {
|
|
2584
2605
|
if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
|
|
@@ -2855,8 +2876,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
2855
2876
|
identifier = mapped;
|
|
2856
2877
|
}
|
|
2857
2878
|
}
|
|
2858
|
-
|
|
2859
|
-
if (
|
|
2879
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
2880
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
2881
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
2882
|
+
keyId: kp.keyId,
|
|
2883
|
+
privateKey: kp.privateKey
|
|
2884
|
+
}));
|
|
2860
2885
|
} else if (Array.isArray(forwarder)) {
|
|
2861
2886
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
2862
2887
|
keys = forwarder;
|
|
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./chunk-nlSIicah.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-ve6e2xcg.js";
|
|
5
|
-
import { c as validateCryptoKey, i as exportJwk, l as name, r as verifyRequest, s as importJwk, t as doubleKnock, u as version } from "./http-
|
|
6
|
-
import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-
|
|
5
|
+
import { c as validateCryptoKey, i as exportJwk, l as name, r as verifyRequest, s as importJwk, t as doubleKnock, u as version } from "./http-8mR6zS99.js";
|
|
6
|
+
import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-3N_8Goy3.js";
|
|
7
7
|
import { n as getNodeInfo, t as nodeInfoToJson } from "./types-hvL8ElAs.js";
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CZPQRg2z.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -2805,14 +2805,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2805
2805
|
let rsaKey = null;
|
|
2806
2806
|
for (const { keyId, privateKey } of keys) {
|
|
2807
2807
|
validateCryptoKey(privateKey, "private");
|
|
2808
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2808
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2809
|
+
keyId,
|
|
2810
|
+
privateKey
|
|
2811
|
+
};
|
|
2812
|
+
}
|
|
2813
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2814
|
+
proofCreated = true;
|
|
2815
|
+
break;
|
|
2816
|
+
}
|
|
2817
|
+
if (!proofCreated) {
|
|
2818
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2816
2819
|
activity = await signObject(activity, privateKey, keyId, {
|
|
2817
2820
|
contextLoader,
|
|
2818
2821
|
tracerProvider: this.tracerProvider
|
|
@@ -3402,6 +3405,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3402
3405
|
}
|
|
3403
3406
|
const owner = this.getActorUri(identifier);
|
|
3404
3407
|
const result = [];
|
|
3408
|
+
let i = 1;
|
|
3405
3409
|
for (const keyPair of keyPairs) {
|
|
3406
3410
|
const newPair = {
|
|
3407
3411
|
...keyPair,
|
|
@@ -3411,12 +3415,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3411
3415
|
publicKey: keyPair.publicKey
|
|
3412
3416
|
}),
|
|
3413
3417
|
multikey: new Multikey({
|
|
3414
|
-
id:
|
|
3418
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3415
3419
|
controller: owner,
|
|
3416
3420
|
publicKey: keyPair.publicKey
|
|
3417
3421
|
})
|
|
3418
3422
|
};
|
|
3419
3423
|
result.push(newPair);
|
|
3424
|
+
i++;
|
|
3420
3425
|
}
|
|
3421
3426
|
return result;
|
|
3422
3427
|
}
|
|
@@ -3554,6 +3559,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3554
3559
|
]);
|
|
3555
3560
|
let keys;
|
|
3556
3561
|
let identifier = null;
|
|
3562
|
+
let actorKeyPairs = null;
|
|
3557
3563
|
if ("identifier" in sender || "username" in sender) {
|
|
3558
3564
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3559
3565
|
else {
|
|
@@ -3566,8 +3572,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3566
3572
|
}
|
|
3567
3573
|
}
|
|
3568
3574
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3569
|
-
|
|
3570
|
-
|
|
3575
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3576
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3577
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3578
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3579
|
+
keyId: kp.keyId,
|
|
3580
|
+
privateKey: kp.privateKey
|
|
3581
|
+
}));
|
|
3571
3582
|
} else if (Array.isArray(sender)) {
|
|
3572
3583
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3573
3584
|
keys = sender;
|
|
@@ -3603,6 +3614,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3603
3614
|
});
|
|
3604
3615
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3605
3616
|
}
|
|
3617
|
+
if (actorKeyPairs != null) {
|
|
3618
|
+
const contextLoader = this.contextLoader;
|
|
3619
|
+
for (const kp of actorKeyPairs) {
|
|
3620
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3621
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3622
|
+
contextLoader,
|
|
3623
|
+
tracerProvider: this.tracerProvider
|
|
3624
|
+
});
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3606
3627
|
const inboxes = extractInboxes({
|
|
3607
3628
|
recipients: expandedRecipients,
|
|
3608
3629
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3643,7 +3664,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3643
3664
|
traceContext: carrier
|
|
3644
3665
|
};
|
|
3645
3666
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
3646
|
-
this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
3667
|
+
await this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
3647
3668
|
}
|
|
3648
3669
|
async *getFollowers(identifier) {
|
|
3649
3670
|
if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
|
|
@@ -3920,8 +3941,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3920
3941
|
identifier = mapped;
|
|
3921
3942
|
}
|
|
3922
3943
|
}
|
|
3923
|
-
|
|
3924
|
-
if (
|
|
3944
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3945
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3946
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3947
|
+
keyId: kp.keyId,
|
|
3948
|
+
privateKey: kp.privateKey
|
|
3949
|
+
}));
|
|
3925
3950
|
} else if (Array.isArray(forwarder)) {
|
|
3926
3951
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3927
3952
|
keys = forwarder;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-
|
|
3
|
+
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-DKccFiYD.js";
|
|
4
4
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-
|
|
1
|
+
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-Kt2s6UWW.cjs";
|
|
2
2
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
3
3
|
|
|
4
4
|
//#region src/federation/webfinger.d.ts
|
package/dist/mod.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
require("./chunk-DDcVe30Y.cjs");
|
|
5
5
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_http = require("./http-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
9
|
-
const require_proof = require("./proof-
|
|
7
|
+
const require_http = require("./http-CJBoXT7y.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-DTZLVRS1.cjs");
|
|
9
|
+
const require_proof = require("./proof-CpP_LUUi.cjs");
|
|
10
10
|
const require_types = require("./types-KC4QAoxe.cjs");
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
11
|
+
const require_kv_cache = require("./kv-cache-DyDvcvqh.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-z-8dc-e1.cjs";
|
|
2
2
|
import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-C_tEAiZj.cjs";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CptqhsOy.cjs";
|
|
4
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-
|
|
4
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-Kt2s6UWW.cjs";
|
|
5
5
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CbLNp3zQ.cjs";
|
|
6
6
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
7
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
7
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-DiGQkv-4.cjs";
|
|
8
8
|
import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-1xhgsHef.cjs";
|
|
9
9
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Bld7oeqf.cjs";
|
|
10
10
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-AtlibPOU.js";
|
|
4
4
|
import { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-B2wiNmSo.js";
|
|
5
5
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-74ARJ5TL.js";
|
|
6
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-
|
|
6
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-DKccFiYD.js";
|
|
7
7
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-GFYnFoOl.js";
|
|
8
8
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
9
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
9
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-Cwmyxyoc.js";
|
|
10
10
|
import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-BGtYJZKu.js";
|
|
11
11
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DTOUyCce.js";
|
|
12
12
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
import "./chunk-nlSIicah.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-ve6e2xcg.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "./http-
|
|
7
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-
|
|
8
|
-
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-
|
|
6
|
+
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "./http-8mR6zS99.js";
|
|
7
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-ROrpLy17.js";
|
|
8
|
+
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-3N_8Goy3.js";
|
|
9
9
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-hvL8ElAs.js";
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CZPQRg2z.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-Duiq_YC9.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-
|
|
8
|
+
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-Do_Wjr4i.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-SCNd7qf9.mjs";
|
|
5
|
+
import "./key-DB6mlGEl.mjs";
|
|
6
6
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { a as fetchKey, c as validateCryptoKey, l as name, u as version } from "./http-
|
|
3
|
+
import { a as fetchKey, c as validateCryptoKey, l as name, u as version } from "./http-8mR6zS99.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-CJBoXT7y.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { a as validateCryptoKey, n as fetchKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-SCNd7qf9.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-DB6mlGEl.mjs";
|
|
6
6
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-SCNd7qf9.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-B98y63Kd.mjs";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
//#region src/federation/send.ts
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { a as assertExists, t as assertStringIncludes } from "../std__assert-Dui
|
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
9
9
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-
|
|
10
|
+
import { t as exportJwk } from "../key-DB6mlGEl.mjs";
|
|
11
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-B98y63Kd.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
13
13
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import { exportSpki } from "@fedify/vocab-runtime";
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import "../std__assert-Duiq_YC9.mjs";
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
8
|
-
import { a as validateCryptoKey, i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-
|
|
8
|
+
import { a as validateCryptoKey, i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-DB6mlGEl.mjs";
|
|
9
9
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
7
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
8
|
-
import { r as generateCryptoKeyPair } from "../key-
|
|
8
|
+
import { r as generateCryptoKeyPair } from "../key-DB6mlGEl.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
10
|
-
import { a as signJsonLd, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-
|
|
10
|
+
import { a as signJsonLd, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-BLu-KvLW.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { CryptographicKey } from "@fedify/vocab";
|
|
13
13
|
import { encodeBase64 } from "byte-encodings/base64";
|
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-CJBoXT7y.cjs");
|
|
5
|
+
const require_proof = require("../proof-CpP_LUUi.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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "../http-
|
|
4
|
-
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "../proof-
|
|
3
|
+
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "../http-8mR6zS99.js";
|
|
4
|
+
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "../proof-3N_8Goy3.js";
|
|
5
5
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|