@fedify/fedify 2.4.0-dev.2056 → 2.4.0-dev.2065
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-D_XU_Fw2.mjs → builder-CMkrnYbY.mjs} +2 -2
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-CwTySDnn.mjs → compound-proof-Dj3DCsoj.mjs} +1 -1
- package/dist/{deno-BtpLWN2L.mjs → deno-BuRFI7wk.mjs} +1 -1
- package/dist/{docloader-CJADEtqb.mjs → docloader-_aSNLA90.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable.test.mjs +3 -3
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-DDwszIrk.cjs → federation-Coi_bg12.cjs} +3 -3
- package/dist/{http-DW5mt8FG.cjs → http-BGShIsd6.cjs} +1 -1
- package/dist/{http-CotELN-4.mjs → http-f1qaBtOh.mjs} +3 -3
- package/dist/{http-iLCx9vk-.js → http-z5n7chWw.js} +1 -1
- package/dist/{key-DrCNkH3Y.mjs → key-BxHsA1s9.mjs} +2 -2
- package/dist/{kv-cache-a1ghEA4h.mjs → kv-cache-C9IY-FMN.mjs} +1 -1
- package/dist/{kv-cache-LOyq_Ty6.cjs → kv-cache-CY6pDNoS.cjs} +1 -1
- package/dist/{kv-cache-bXLDSaRu.js → kv-cache-Cgj-kpQS.js} +1 -1
- package/dist/{ld-BPG92sC0.mjs → ld-CqJq5erX.mjs} +3 -3
- package/dist/{metrics-DxVi0UJD.mjs → metrics-DOqknlZd.mjs} +1 -1
- package/dist/{middleware-1nes8_U-.js → middleware-1h_LgwXC.js} +3 -3
- package/dist/{middleware-BIPftTly.mjs → middleware-VOCZN3SO.mjs} +1 -1
- package/dist/{middleware-DohUu-Tz.mjs → middleware-s-AZzx4r.mjs} +13 -13
- package/dist/{mod-CNRAxXEb.d.ts → mod-Dhm7SqyE.d.ts} +150 -2
- package/dist/{mod-CVQFWefn.d.cts → mod-pLbeNwcC.d.cts} +150 -2
- package/dist/mod.cjs +6 -5
- package/dist/mod.d.cts +3 -3
- package/dist/mod.d.ts +3 -3
- package/dist/mod.js +6 -6
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-SBgt2USF.js → owner-BLBWXCNt.js} +29 -3
- package/dist/{owner-C2ER4VD7.cjs → owner-D8ZpRusc.cjs} +34 -2
- package/dist/{owner-BN7Mqjso.mjs → owner-D_F22lfM.mjs} +2 -2
- package/dist/{proof-BigVZwkl.mjs → proof-B03JXhrk.mjs} +32 -6
- package/dist/{send-CvatEhyY.mjs → send-NNkfKtVN.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +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 +4 -2
- package/dist/sig/mod.d.cts +2 -2
- package/dist/sig/mod.d.ts +2 -2
- package/dist/sig/mod.js +4 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.d.mts +2 -0
- package/dist/sig/portable-collection.test.mjs +1044 -0
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/sig-B1E2uyhQ.cjs +405 -0
- package/dist/sig-Bb20Pyrd.js +401 -0
- package/dist/{temporal-DV5jeBbR.mjs → temporal-VVVSuruq.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- 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.js +1 -1
- package/package.json +6 -6
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { S as KeyCache } from "./http-65PYi9jY.js";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
|
-
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
5
|
+
import { DocumentLoader, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/sig/ld.d.ts
|
|
8
8
|
/**
|
|
@@ -382,4 +382,152 @@ declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) =>
|
|
|
382
382
|
fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
|
|
383
383
|
}, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
|
|
384
384
|
//#endregion
|
|
385
|
-
|
|
385
|
+
//#region src/sig/portable-collection.d.ts
|
|
386
|
+
/**
|
|
387
|
+
* Options for {@link verifyPortableObject}.
|
|
388
|
+
*
|
|
389
|
+
* Besides the options for {@link verifyPortableObjectProof}, it takes where
|
|
390
|
+
* the document came from, which property accessors pass automatically when
|
|
391
|
+
* `verifyPortableObject()` is used as their `verifyPortableObject` option.
|
|
392
|
+
* @since 2.4.0
|
|
393
|
+
*/
|
|
394
|
+
interface VerifyPortableObjectOptions extends VerifyPortableObjectProofOptions, Omit<PortableObjectVerifierOptions, "documentLoader" | "contextLoader" | "tracerProvider"> {}
|
|
395
|
+
/**
|
|
396
|
+
* The reason why {@link verifyPortableObject} did not accept a document.
|
|
397
|
+
*
|
|
398
|
+
* Besides the reasons of {@link verifyPortableObjectProof}, it describes why
|
|
399
|
+
* an unsecured portable collection was not trusted. The
|
|
400
|
+
* `unsecuredCollection` reason itself never appears, since such collections
|
|
401
|
+
* are judged by the gateway trust policy instead.
|
|
402
|
+
* @since 2.4.0
|
|
403
|
+
*/
|
|
404
|
+
type VerifyPortableObjectFailureReason = Exclude<VerifyPortableObjectProofFailureReason, {
|
|
405
|
+
readonly type: "unsecuredCollection";
|
|
406
|
+
}> | {
|
|
407
|
+
/**
|
|
408
|
+
* The unsecured collection was not retrieved from a gateway, i.e., the
|
|
409
|
+
* document's final URL is missing or is not a compatible identifier for
|
|
410
|
+
* the same portable collection.
|
|
411
|
+
*/
|
|
412
|
+
readonly type: "unknownCollectionSource"; /** The final URL of the document, if known. */
|
|
413
|
+
readonly documentUrl: URL | null;
|
|
414
|
+
} | {
|
|
415
|
+
/**
|
|
416
|
+
* The actor that owns the unsecured collection cannot be determined
|
|
417
|
+
* unambiguously.
|
|
418
|
+
*/
|
|
419
|
+
readonly type: "unknownCollectionOwner";
|
|
420
|
+
} | {
|
|
421
|
+
/** The collection, its pages, or its referrer disagree on its owner. */readonly type: "conflictingCollectionOwners"; /** The owner candidates that disagree. */
|
|
422
|
+
readonly candidates: readonly URL[];
|
|
423
|
+
} | {
|
|
424
|
+
/**
|
|
425
|
+
* A collection page does not belong to the collection it was reached
|
|
426
|
+
* from: its `partOf` names another collection, or its cryptographic
|
|
427
|
+
* origin differs.
|
|
428
|
+
*/
|
|
429
|
+
readonly type: "collectionPageMismatch"; /** The page. */
|
|
430
|
+
readonly pageId: URL; /** The collection that the page was reached from. */
|
|
431
|
+
readonly collectionId: URL; /** The mismatching `partOf`, or `null` if the origin differs. */
|
|
432
|
+
readonly partOf: URL | null;
|
|
433
|
+
} | {
|
|
434
|
+
/**
|
|
435
|
+
* The owner's actor document could not be retrieved or verified, or it
|
|
436
|
+
* lists no gateways.
|
|
437
|
+
*/
|
|
438
|
+
readonly type: "collectionOwnerUnavailable"; /** The owner candidate. */
|
|
439
|
+
readonly owner: URL;
|
|
440
|
+
} | {
|
|
441
|
+
/**
|
|
442
|
+
* The owner's actor document does not list the collection as its
|
|
443
|
+
* `inbox`, `outbox`, `followers`, `following`, or `liked`.
|
|
444
|
+
*/
|
|
445
|
+
readonly type: "collectionNotListedByOwner"; /** The owner. */
|
|
446
|
+
readonly owner: URL; /** The collection. */
|
|
447
|
+
readonly collectionId: URL;
|
|
448
|
+
} | {
|
|
449
|
+
/**
|
|
450
|
+
* The unsecured collection was retrieved from a gateway that its owner
|
|
451
|
+
* does not list in its `gateways`.
|
|
452
|
+
*/
|
|
453
|
+
readonly type: "untrustedGateway"; /** The owner. */
|
|
454
|
+
readonly owner: URL; /** The gateway that served the collection. */
|
|
455
|
+
readonly gateway: URL; /** The owner's gateways. */
|
|
456
|
+
readonly gateways: readonly URL[];
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* The result of {@link verifyPortableObject}.
|
|
460
|
+
* @since 2.4.0
|
|
461
|
+
*/
|
|
462
|
+
type VerifyPortableObjectResult = {
|
|
463
|
+
/** Whether the document is accepted. */readonly verified: true; /** The document carries valid Object Integrity Proofs. */
|
|
464
|
+
readonly method: "proof"; /** The public keys used by the verified proofs, in proof order. */
|
|
465
|
+
readonly keys: readonly Multikey[];
|
|
466
|
+
/**
|
|
467
|
+
* Opaque state for verifying the pages of a portable collection. Do not
|
|
468
|
+
* inspect it; property accessors pass it back automatically.
|
|
469
|
+
*/
|
|
470
|
+
readonly collectionContext?: unknown;
|
|
471
|
+
} | {
|
|
472
|
+
/** Whether the document is accepted. */readonly verified: true;
|
|
473
|
+
/**
|
|
474
|
+
* The document is an unsecured portable collection served by a gateway
|
|
475
|
+
* that its owner lists.
|
|
476
|
+
*/
|
|
477
|
+
readonly method: "gateway"; /** The document has no integrity proof. */
|
|
478
|
+
readonly unsecured: true; /** The actor that owns the collection. */
|
|
479
|
+
readonly owner: URL; /** The gateway that served the collection. */
|
|
480
|
+
readonly gateway: URL;
|
|
481
|
+
/**
|
|
482
|
+
* Opaque state for verifying the pages of a portable collection. Do not
|
|
483
|
+
* inspect it; property accessors pass it back automatically.
|
|
484
|
+
*/
|
|
485
|
+
readonly collectionContext: unknown;
|
|
486
|
+
} | {
|
|
487
|
+
/** Whether the document is accepted. */readonly verified: false; /** Why the document was not accepted. */
|
|
488
|
+
readonly reason: VerifyPortableObjectFailureReason;
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* Applies the [FEP-ef61] trust policy to a portable object fetched through
|
|
492
|
+
* a gateway.
|
|
493
|
+
*
|
|
494
|
+
* Portable actors, activities, objects, and collections with proofs are
|
|
495
|
+
* verified by {@link verifyPortableObjectProof}. A portable collection or
|
|
496
|
+
* collection page without a proof is accepted only if all of the following
|
|
497
|
+
* hold:
|
|
498
|
+
*
|
|
499
|
+
* - It was retrieved from a gateway: its final URL (`documentUrl`) is
|
|
500
|
+
* a compatible identifier for the same portable collection.
|
|
501
|
+
* - Its owner is determined unambiguously: the actor whose `inbox`,
|
|
502
|
+
* `outbox`, `followers`, `following`, or `liked` property referred to
|
|
503
|
+
* the collection, or the single actor in its `attributedTo`. A page
|
|
504
|
+
* inherits the owner of the collection it was reached from through
|
|
505
|
+
* `first`, `last`, `current`, `next`, or `prev`, and must not name
|
|
506
|
+
* another collection in `partOf`.
|
|
507
|
+
* - The owner's actor document is verified by its proof and lists the
|
|
508
|
+
* collection as its `inbox`, `outbox`, `followers`, `following`, or
|
|
509
|
+
* `liked`.
|
|
510
|
+
* - The gateway that served the collection is in the owner's `gateways`.
|
|
511
|
+
*
|
|
512
|
+
* Where the document came from and which object referred to it are passed
|
|
513
|
+
* by property accessors when this function is used as their
|
|
514
|
+
* `verifyPortableObject` option. Objects embedded in an unsecured
|
|
515
|
+
* collection accepted this way are not trusted: accessors dereference and
|
|
516
|
+
* verify them one by one.
|
|
517
|
+
*
|
|
518
|
+
* Note that acceptance through the gateway policy does not verify anything
|
|
519
|
+
* cryptographically; it only means that the owner trusts the gateway.
|
|
520
|
+
*
|
|
521
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
522
|
+
*
|
|
523
|
+
* @param jsonLd The JSON-LD document to verify.
|
|
524
|
+
* @param options Additional options. See also
|
|
525
|
+
* {@link VerifyPortableObjectOptions}.
|
|
526
|
+
* @returns The detailed result.
|
|
527
|
+
* @throws {TypeError} If the input is not a single JSON-LD object or has a
|
|
528
|
+
* malformed portable ID.
|
|
529
|
+
* @since 2.4.0
|
|
530
|
+
*/
|
|
531
|
+
declare function verifyPortableObject(jsonLd: unknown, options?: VerifyPortableObjectOptions): Promise<VerifyPortableObjectResult>;
|
|
532
|
+
//#endregion
|
|
533
|
+
export { createSignature as C, verifyJsonLd as D, signJsonLd as E, verifySignature as O, attachSignature as S, hasSignatureLike as T, verifyProof as _, CreateProofOptions as a, VerifyJsonLdOptions as b, VerifyPortableObjectProofFailureReason as c, VerifyProofOptions as d, createProof as f, verifyPortableObjectProof as g, verifyObject as h, verifyPortableObject as i, VerifyPortableObjectProofOptions as l, signObject as m, VerifyPortableObjectOptions as n, SignObjectOptions as o, hasProofLike as p, VerifyPortableObjectResult as r, VerifyObjectOptions as s, VerifyPortableObjectFailureReason as t, VerifyPortableObjectProofResult as u, CreateSignatureOptions as v, detachSignature as w, VerifySignatureOptions as x, SignJsonLdOptions as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { S as KeyCache } from "./http-CP-7OdSq.cjs";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
|
-
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
4
|
+
import { DocumentLoader, PortableObjectVerifierOptions } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region src/sig/ld.d.ts
|
|
@@ -382,4 +382,152 @@ declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) =>
|
|
|
382
382
|
fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
|
|
383
383
|
}, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
|
|
384
384
|
//#endregion
|
|
385
|
-
|
|
385
|
+
//#region src/sig/portable-collection.d.ts
|
|
386
|
+
/**
|
|
387
|
+
* Options for {@link verifyPortableObject}.
|
|
388
|
+
*
|
|
389
|
+
* Besides the options for {@link verifyPortableObjectProof}, it takes where
|
|
390
|
+
* the document came from, which property accessors pass automatically when
|
|
391
|
+
* `verifyPortableObject()` is used as their `verifyPortableObject` option.
|
|
392
|
+
* @since 2.4.0
|
|
393
|
+
*/
|
|
394
|
+
interface VerifyPortableObjectOptions extends VerifyPortableObjectProofOptions, Omit<PortableObjectVerifierOptions, "documentLoader" | "contextLoader" | "tracerProvider"> {}
|
|
395
|
+
/**
|
|
396
|
+
* The reason why {@link verifyPortableObject} did not accept a document.
|
|
397
|
+
*
|
|
398
|
+
* Besides the reasons of {@link verifyPortableObjectProof}, it describes why
|
|
399
|
+
* an unsecured portable collection was not trusted. The
|
|
400
|
+
* `unsecuredCollection` reason itself never appears, since such collections
|
|
401
|
+
* are judged by the gateway trust policy instead.
|
|
402
|
+
* @since 2.4.0
|
|
403
|
+
*/
|
|
404
|
+
type VerifyPortableObjectFailureReason = Exclude<VerifyPortableObjectProofFailureReason, {
|
|
405
|
+
readonly type: "unsecuredCollection";
|
|
406
|
+
}> | {
|
|
407
|
+
/**
|
|
408
|
+
* The unsecured collection was not retrieved from a gateway, i.e., the
|
|
409
|
+
* document's final URL is missing or is not a compatible identifier for
|
|
410
|
+
* the same portable collection.
|
|
411
|
+
*/
|
|
412
|
+
readonly type: "unknownCollectionSource"; /** The final URL of the document, if known. */
|
|
413
|
+
readonly documentUrl: URL | null;
|
|
414
|
+
} | {
|
|
415
|
+
/**
|
|
416
|
+
* The actor that owns the unsecured collection cannot be determined
|
|
417
|
+
* unambiguously.
|
|
418
|
+
*/
|
|
419
|
+
readonly type: "unknownCollectionOwner";
|
|
420
|
+
} | {
|
|
421
|
+
/** The collection, its pages, or its referrer disagree on its owner. */readonly type: "conflictingCollectionOwners"; /** The owner candidates that disagree. */
|
|
422
|
+
readonly candidates: readonly URL[];
|
|
423
|
+
} | {
|
|
424
|
+
/**
|
|
425
|
+
* A collection page does not belong to the collection it was reached
|
|
426
|
+
* from: its `partOf` names another collection, or its cryptographic
|
|
427
|
+
* origin differs.
|
|
428
|
+
*/
|
|
429
|
+
readonly type: "collectionPageMismatch"; /** The page. */
|
|
430
|
+
readonly pageId: URL; /** The collection that the page was reached from. */
|
|
431
|
+
readonly collectionId: URL; /** The mismatching `partOf`, or `null` if the origin differs. */
|
|
432
|
+
readonly partOf: URL | null;
|
|
433
|
+
} | {
|
|
434
|
+
/**
|
|
435
|
+
* The owner's actor document could not be retrieved or verified, or it
|
|
436
|
+
* lists no gateways.
|
|
437
|
+
*/
|
|
438
|
+
readonly type: "collectionOwnerUnavailable"; /** The owner candidate. */
|
|
439
|
+
readonly owner: URL;
|
|
440
|
+
} | {
|
|
441
|
+
/**
|
|
442
|
+
* The owner's actor document does not list the collection as its
|
|
443
|
+
* `inbox`, `outbox`, `followers`, `following`, or `liked`.
|
|
444
|
+
*/
|
|
445
|
+
readonly type: "collectionNotListedByOwner"; /** The owner. */
|
|
446
|
+
readonly owner: URL; /** The collection. */
|
|
447
|
+
readonly collectionId: URL;
|
|
448
|
+
} | {
|
|
449
|
+
/**
|
|
450
|
+
* The unsecured collection was retrieved from a gateway that its owner
|
|
451
|
+
* does not list in its `gateways`.
|
|
452
|
+
*/
|
|
453
|
+
readonly type: "untrustedGateway"; /** The owner. */
|
|
454
|
+
readonly owner: URL; /** The gateway that served the collection. */
|
|
455
|
+
readonly gateway: URL; /** The owner's gateways. */
|
|
456
|
+
readonly gateways: readonly URL[];
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* The result of {@link verifyPortableObject}.
|
|
460
|
+
* @since 2.4.0
|
|
461
|
+
*/
|
|
462
|
+
type VerifyPortableObjectResult = {
|
|
463
|
+
/** Whether the document is accepted. */readonly verified: true; /** The document carries valid Object Integrity Proofs. */
|
|
464
|
+
readonly method: "proof"; /** The public keys used by the verified proofs, in proof order. */
|
|
465
|
+
readonly keys: readonly Multikey[];
|
|
466
|
+
/**
|
|
467
|
+
* Opaque state for verifying the pages of a portable collection. Do not
|
|
468
|
+
* inspect it; property accessors pass it back automatically.
|
|
469
|
+
*/
|
|
470
|
+
readonly collectionContext?: unknown;
|
|
471
|
+
} | {
|
|
472
|
+
/** Whether the document is accepted. */readonly verified: true;
|
|
473
|
+
/**
|
|
474
|
+
* The document is an unsecured portable collection served by a gateway
|
|
475
|
+
* that its owner lists.
|
|
476
|
+
*/
|
|
477
|
+
readonly method: "gateway"; /** The document has no integrity proof. */
|
|
478
|
+
readonly unsecured: true; /** The actor that owns the collection. */
|
|
479
|
+
readonly owner: URL; /** The gateway that served the collection. */
|
|
480
|
+
readonly gateway: URL;
|
|
481
|
+
/**
|
|
482
|
+
* Opaque state for verifying the pages of a portable collection. Do not
|
|
483
|
+
* inspect it; property accessors pass it back automatically.
|
|
484
|
+
*/
|
|
485
|
+
readonly collectionContext: unknown;
|
|
486
|
+
} | {
|
|
487
|
+
/** Whether the document is accepted. */readonly verified: false; /** Why the document was not accepted. */
|
|
488
|
+
readonly reason: VerifyPortableObjectFailureReason;
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* Applies the [FEP-ef61] trust policy to a portable object fetched through
|
|
492
|
+
* a gateway.
|
|
493
|
+
*
|
|
494
|
+
* Portable actors, activities, objects, and collections with proofs are
|
|
495
|
+
* verified by {@link verifyPortableObjectProof}. A portable collection or
|
|
496
|
+
* collection page without a proof is accepted only if all of the following
|
|
497
|
+
* hold:
|
|
498
|
+
*
|
|
499
|
+
* - It was retrieved from a gateway: its final URL (`documentUrl`) is
|
|
500
|
+
* a compatible identifier for the same portable collection.
|
|
501
|
+
* - Its owner is determined unambiguously: the actor whose `inbox`,
|
|
502
|
+
* `outbox`, `followers`, `following`, or `liked` property referred to
|
|
503
|
+
* the collection, or the single actor in its `attributedTo`. A page
|
|
504
|
+
* inherits the owner of the collection it was reached from through
|
|
505
|
+
* `first`, `last`, `current`, `next`, or `prev`, and must not name
|
|
506
|
+
* another collection in `partOf`.
|
|
507
|
+
* - The owner's actor document is verified by its proof and lists the
|
|
508
|
+
* collection as its `inbox`, `outbox`, `followers`, `following`, or
|
|
509
|
+
* `liked`.
|
|
510
|
+
* - The gateway that served the collection is in the owner's `gateways`.
|
|
511
|
+
*
|
|
512
|
+
* Where the document came from and which object referred to it are passed
|
|
513
|
+
* by property accessors when this function is used as their
|
|
514
|
+
* `verifyPortableObject` option. Objects embedded in an unsecured
|
|
515
|
+
* collection accepted this way are not trusted: accessors dereference and
|
|
516
|
+
* verify them one by one.
|
|
517
|
+
*
|
|
518
|
+
* Note that acceptance through the gateway policy does not verify anything
|
|
519
|
+
* cryptographically; it only means that the owner trusts the gateway.
|
|
520
|
+
*
|
|
521
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
522
|
+
*
|
|
523
|
+
* @param jsonLd The JSON-LD document to verify.
|
|
524
|
+
* @param options Additional options. See also
|
|
525
|
+
* {@link VerifyPortableObjectOptions}.
|
|
526
|
+
* @returns The detailed result.
|
|
527
|
+
* @throws {TypeError} If the input is not a single JSON-LD object or has a
|
|
528
|
+
* malformed portable ID.
|
|
529
|
+
* @since 2.4.0
|
|
530
|
+
*/
|
|
531
|
+
declare function verifyPortableObject(jsonLd: unknown, options?: VerifyPortableObjectOptions): Promise<VerifyPortableObjectResult>;
|
|
532
|
+
//#endregion
|
|
533
|
+
export { createSignature as C, verifyJsonLd as D, signJsonLd as E, verifySignature as O, attachSignature as S, hasSignatureLike as T, verifyProof as _, CreateProofOptions as a, VerifyJsonLdOptions as b, VerifyPortableObjectProofFailureReason as c, VerifyProofOptions as d, createProof as f, verifyPortableObjectProof as g, verifyObject as h, verifyPortableObject as i, VerifyPortableObjectProofOptions as l, signObject as m, VerifyPortableObjectOptions as n, SignObjectOptions as o, hasProofLike as p, VerifyPortableObjectResult as r, VerifyObjectOptions as s, VerifyPortableObjectFailureReason as t, VerifyPortableObjectProofResult as u, CreateSignatureOptions as v, detachSignature as w, VerifySignatureOptions as x, SignJsonLdOptions as y };
|
package/dist/mod.cjs
CHANGED
|
@@ -3,14 +3,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-BalCrSsr.cjs");
|
|
5
5
|
require("./compat/mod.cjs");
|
|
6
|
-
const require_http = require("./http-
|
|
7
|
-
const require_federation = require("./federation-
|
|
6
|
+
const require_http = require("./http-BGShIsd6.cjs");
|
|
7
|
+
const require_federation = require("./federation-Coi_bg12.cjs");
|
|
8
8
|
const require_types = require("./types-Be2zbyeG.cjs");
|
|
9
|
-
const require_owner = require("./owner-
|
|
10
|
-
const require_kv_cache = require("./kv-cache-
|
|
9
|
+
const require_owner = require("./owner-D8ZpRusc.cjs");
|
|
10
|
+
const require_kv_cache = require("./kv-cache-CY6pDNoS.cjs");
|
|
11
11
|
require("./nodeinfo/mod.cjs");
|
|
12
12
|
require("./runtime/mod.cjs");
|
|
13
|
-
require("./sig
|
|
13
|
+
const require_sig = require("./sig-B1E2uyhQ.cjs");
|
|
14
14
|
require("./utils/mod.cjs");
|
|
15
15
|
//#endregion
|
|
16
16
|
exports.CircuitBreaker = require_federation.CircuitBreaker;
|
|
@@ -60,6 +60,7 @@ exports.signRequest = require_http.signRequest;
|
|
|
60
60
|
exports.validateAcceptSignature = require_http.validateAcceptSignature;
|
|
61
61
|
exports.verifyJsonLd = require_owner.verifyJsonLd;
|
|
62
62
|
exports.verifyObject = require_owner.verifyObject;
|
|
63
|
+
exports.verifyPortableObject = require_sig.verifyPortableObject;
|
|
63
64
|
exports.verifyPortableObjectProof = require_owner.verifyPortableObjectProof;
|
|
64
65
|
exports.verifyProof = require_owner.verifyProof;
|
|
65
66
|
exports.verifyRequest = require_http.verifyRequest;
|
package/dist/mod.d.cts
CHANGED
|
@@ -6,13 +6,13 @@ import { $ as MessageQueue, A as ObjectCallbackSetters, At as InboxListener, B a
|
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.cjs";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
8
8
|
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-Bfenkg_c.cjs";
|
|
9
|
-
import { C as verifyJsonLd,
|
|
9
|
+
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-pLbeNwcC.cjs";
|
|
10
10
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CyiSjRkk.cjs";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports {
|
|
15
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
15
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
18
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/mod.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ import { $ as MessageQueue, A as ObjectCallbackSetters, At as InboxListener, B a
|
|
|
6
6
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-BhNbN8Ed.js";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
8
8
|
import { a as RouterOptions, i as RouterError, n as handleWebFinger, o as RouterRouteResult, r as Router, t as WebFingerHandlerParameters } from "./mod-BhMvsgdF.js";
|
|
9
|
-
import { C as verifyJsonLd,
|
|
9
|
+
import { C as createSignature, D as verifyJsonLd, E as signJsonLd, O as verifySignature, S as attachSignature, T as hasSignatureLike, _ as verifyProof, a as CreateProofOptions, b as VerifyJsonLdOptions, c as VerifyPortableObjectProofFailureReason, d as VerifyProofOptions, f as createProof, g as verifyPortableObjectProof, h as verifyObject, i as verifyPortableObject, l as VerifyPortableObjectProofOptions, m as signObject, n as VerifyPortableObjectOptions, o as SignObjectOptions, p as hasProofLike, r as VerifyPortableObjectResult, s as VerifyObjectOptions, t as VerifyPortableObjectFailureReason, u as VerifyPortableObjectProofResult, v as CreateSignatureOptions, w as detachSignature, x as VerifySignatureOptions, y as SignJsonLdOptions } from "./mod-Dhm7SqyE.js";
|
|
10
10
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-C0BYc0OU.js";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports {
|
|
15
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
15
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
|
-
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
18
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CircuitBreaker, CircuitBreakerActivityDrop, CircuitBreakerBeforeSendDecision, CircuitBreakerCreateOptions, CircuitBreakerFailurePolicy, CircuitBreakerKvState, CircuitBreakerOptions, CircuitBreakerState, CircuitBreakerStateChange, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateProofOptions, CreateSignatureOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DoesActorOwnKeyOptions, Federatable, Federation, FederationBenchmarkOptions, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, ForwardActivityOptions, FulfillAcceptSignatureResult, GetActorOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, HashlinkMediaDispatcher, HashlinkMediaRequest, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, JsonValue, KeyCache, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MediaUploaderCallback, MediaUploaderSetters, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfo, NodeInfoDispatcher, NormalizedCircuitBreakerOptions, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboundService, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, PortableRequest, Protocol, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, Rfc9421SignRequestOptions, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, TaskDefinition, TaskDefinitionOptions, TaskEnqueueOptions, TaskHandler, TaskRegistry, UnverifiedActivityHandler, UnverifiedActivityReason, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyPortableObjectFailureReason, VerifyPortableObjectOptions, VerifyPortableObjectProofFailureReason, VerifyPortableObjectProofOptions, VerifyPortableObjectProofResult, VerifyPortableObjectResult, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, WebFingerHandlerParameters, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/mod.js
CHANGED
|
@@ -3,16 +3,16 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./rolldown-runtime-BC-Eo5Mj.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-DAtXl_Kc.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { F as validateAcceptSignature, M as formatAcceptSignature, N as fulfillAcceptSignature, P as parseAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, i as verifyRequest, l as fetchKeyDetailed, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-
|
|
7
|
-
import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-
|
|
6
|
+
import { F as validateAcceptSignature, M as formatAcceptSignature, N as fulfillAcceptSignature, P as parseAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, i as verifyRequest, l as fetchKeyDetailed, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-z5n7chWw.js";
|
|
7
|
+
import { a as respondWithObject, c as digest, d as parseCircuitBreakerKvState, f as createFederationBuilder, i as SendActivityError, l as CircuitBreaker, n as handleWebFinger, o as respondWithObjectIfAcceptable, r as createExponentialBackoffPolicy, s as buildCollectionSynchronizationHeader, t as createFederation, u as normalizeCircuitBreakerOptions } from "./middleware-1h_LgwXC.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-C_cNlNVK.js";
|
|
9
|
-
import {
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { C as signJsonLd, E as verifySignature, T as verifyJsonLd, _ as detachSignature, a as signObject, b as hasSignatureLike, c as verifyPortableObjectProof, d as verifyProof, g as createSignature, i as hasProofLike, m as attachSignature, n as getKeyOwner, r as createProof, s as verifyObject, t as doesActorOwnKey } from "./owner-BLBWXCNt.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-Cgj-kpQS.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
14
|
-
import "./sig
|
|
14
|
+
import { t as verifyPortableObject } from "./sig-Bb20Pyrd.js";
|
|
15
15
|
import "./utils/mod.js";
|
|
16
16
|
export * from "@fedify/vocab-runtime";
|
|
17
17
|
//#endregion
|
|
18
|
-
export { CircuitBreaker, InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
18
|
+
export { CircuitBreaker, InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, handleWebFinger, hasProofLike, hasSignatureLike, importJwk, kvCache, nodeInfoToJson, normalizeCircuitBreakerOptions, parseAcceptSignature, parseCircuitBreakerKvState, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-DG5QeQ8W.mjs";
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { b as handleNodeInfoJrd, o as createFederation, y as handleNodeInfo } from "../middleware-
|
|
8
|
+
import { b as handleNodeInfoJrd, o as createFederation, y as handleNodeInfo } from "../middleware-s-AZzx4r.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { I as name, L as version, c as fetchKey, f as validateCryptoKey, h as getFederationMetrics, m as getDurationMs, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, y as measureSignatureKeyFetch } from "./http-
|
|
3
|
+
import { I as name, L as version, c as fetchKey, f as validateCryptoKey, h as getFederationMetrics, m as getDurationMs, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, y as measureSignatureKeyFetch } from "./http-z5n7chWw.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, PUBLIC_COLLECTION, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1791,6 +1791,8 @@ async function preparePortableObjectProof(jsonLd, options) {
|
|
|
1791
1791
|
const proofValues = root[SECURITY_PROOF];
|
|
1792
1792
|
if (proofValues == null || Array.isArray(proofValues) && proofValues.length < 1) return {
|
|
1793
1793
|
prepared: false,
|
|
1794
|
+
root,
|
|
1795
|
+
objectType,
|
|
1794
1796
|
result: objectType === "collection" ? {
|
|
1795
1797
|
verified: false,
|
|
1796
1798
|
reason: { type: "unsecuredCollection" }
|
|
@@ -1894,6 +1896,8 @@ async function preparePortableObjectProof(jsonLd, options) {
|
|
|
1894
1896
|
}
|
|
1895
1897
|
return {
|
|
1896
1898
|
prepared: true,
|
|
1899
|
+
root,
|
|
1900
|
+
objectType,
|
|
1897
1901
|
objectId,
|
|
1898
1902
|
proofs,
|
|
1899
1903
|
rawProofValues,
|
|
@@ -1948,8 +1952,30 @@ async function verifyPortableObjectProofPolicy(jsonLd, key, options = {}) {
|
|
|
1948
1952
|
* @since 2.4.0
|
|
1949
1953
|
*/
|
|
1950
1954
|
async function verifyPortableObjectProof(jsonLd, options = {}) {
|
|
1955
|
+
return (await verifyPortableObjectProofWithRoot(jsonLd, options)).result;
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* Same as {@link verifyPortableObjectProof}, but also returns the expanded
|
|
1959
|
+
* root node and its FEP-2277 core type, so that a caller can apply further
|
|
1960
|
+
* policy, such as the gateway trust policy for unsecured collections, to the
|
|
1961
|
+
* same interpretation of the document.
|
|
1962
|
+
* @internal
|
|
1963
|
+
*/
|
|
1964
|
+
async function verifyPortableObjectProofWithRoot(jsonLd, options = {}) {
|
|
1951
1965
|
const prepared = await preparePortableObjectProof(jsonLd, options);
|
|
1952
|
-
if (!prepared.prepared) return
|
|
1966
|
+
if (!prepared.prepared) return {
|
|
1967
|
+
result: prepared.result,
|
|
1968
|
+
...prepared.root == null ? {} : { root: prepared.root },
|
|
1969
|
+
...prepared.objectType == null ? {} : { objectType: prepared.objectType }
|
|
1970
|
+
};
|
|
1971
|
+
const { root, objectType } = prepared;
|
|
1972
|
+
return {
|
|
1973
|
+
result: await verifyPreparedPortableObjectProof(jsonLd, prepared, options),
|
|
1974
|
+
root,
|
|
1975
|
+
objectType
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
async function verifyPreparedPortableObjectProof(jsonLd, prepared, options) {
|
|
1953
1979
|
const { proofs, rawProofValues, proofContextLoader } = prepared;
|
|
1954
1980
|
const keys = [];
|
|
1955
1981
|
const rawProofCandidatePool = {
|
|
@@ -2247,4 +2273,4 @@ async function getKeyOwner(keyId, options) {
|
|
|
2247
2273
|
return null;
|
|
2248
2274
|
}
|
|
2249
2275
|
//#endregion
|
|
2250
|
-
export {
|
|
2276
|
+
export { signJsonLd as C, wrapContextLoaderForJsonLd as D, verifySignature as E, normalizeOutgoingActivityJsonLd as O, isInvalidUrlTypeError as S, verifyJsonLd as T, detachSignature as _, signObject as a, hasSignatureLike as b, verifyPortableObjectProof as c, verifyProof as d, InvalidContextReferenceError as f, createSignature as g, compactJsonLd as h, hasProofLike as i, verifyPortableObjectProofPolicy as l, attachSignature as m, getKeyOwner as n, verifyMapLocalProof as o, assertSafeJsonLd as p, createProof as r, verifyObject as s, doesActorOwnKey as t, verifyPortableObjectProofWithRoot as u, getNormalizationContextLoader as v, verifyCompactJsonLd as w, isClearlyMalformedContextReference as x, hasSignature as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-Dmm3t92W.cjs");
|
|
3
|
-
const require_http = require("./http-
|
|
3
|
+
const require_http = require("./http-BGShIsd6.cjs");
|
|
4
4
|
let _logtape_logtape = require("@logtape/logtape");
|
|
5
5
|
let _fedify_vocab = require("@fedify/vocab");
|
|
6
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1794,6 +1794,8 @@ async function preparePortableObjectProof(jsonLd, options) {
|
|
|
1794
1794
|
const proofValues = root[SECURITY_PROOF];
|
|
1795
1795
|
if (proofValues == null || Array.isArray(proofValues) && proofValues.length < 1) return {
|
|
1796
1796
|
prepared: false,
|
|
1797
|
+
root,
|
|
1798
|
+
objectType,
|
|
1797
1799
|
result: objectType === "collection" ? {
|
|
1798
1800
|
verified: false,
|
|
1799
1801
|
reason: { type: "unsecuredCollection" }
|
|
@@ -1897,6 +1899,8 @@ async function preparePortableObjectProof(jsonLd, options) {
|
|
|
1897
1899
|
}
|
|
1898
1900
|
return {
|
|
1899
1901
|
prepared: true,
|
|
1902
|
+
root,
|
|
1903
|
+
objectType,
|
|
1900
1904
|
objectId,
|
|
1901
1905
|
proofs,
|
|
1902
1906
|
rawProofValues,
|
|
@@ -1951,8 +1955,30 @@ async function verifyPortableObjectProofPolicy(jsonLd, key, options = {}) {
|
|
|
1951
1955
|
* @since 2.4.0
|
|
1952
1956
|
*/
|
|
1953
1957
|
async function verifyPortableObjectProof(jsonLd, options = {}) {
|
|
1958
|
+
return (await verifyPortableObjectProofWithRoot(jsonLd, options)).result;
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Same as {@link verifyPortableObjectProof}, but also returns the expanded
|
|
1962
|
+
* root node and its FEP-2277 core type, so that a caller can apply further
|
|
1963
|
+
* policy, such as the gateway trust policy for unsecured collections, to the
|
|
1964
|
+
* same interpretation of the document.
|
|
1965
|
+
* @internal
|
|
1966
|
+
*/
|
|
1967
|
+
async function verifyPortableObjectProofWithRoot(jsonLd, options = {}) {
|
|
1954
1968
|
const prepared = await preparePortableObjectProof(jsonLd, options);
|
|
1955
|
-
if (!prepared.prepared) return
|
|
1969
|
+
if (!prepared.prepared) return {
|
|
1970
|
+
result: prepared.result,
|
|
1971
|
+
...prepared.root == null ? {} : { root: prepared.root },
|
|
1972
|
+
...prepared.objectType == null ? {} : { objectType: prepared.objectType }
|
|
1973
|
+
};
|
|
1974
|
+
const { root, objectType } = prepared;
|
|
1975
|
+
return {
|
|
1976
|
+
result: await verifyPreparedPortableObjectProof(jsonLd, prepared, options),
|
|
1977
|
+
root,
|
|
1978
|
+
objectType
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1981
|
+
async function verifyPreparedPortableObjectProof(jsonLd, prepared, options) {
|
|
1956
1982
|
const { proofs, rawProofValues, proofContextLoader } = prepared;
|
|
1957
1983
|
const keys = [];
|
|
1958
1984
|
const rawProofCandidatePool = {
|
|
@@ -2394,6 +2420,12 @@ Object.defineProperty(exports, "verifyPortableObjectProofPolicy", {
|
|
|
2394
2420
|
return verifyPortableObjectProofPolicy;
|
|
2395
2421
|
}
|
|
2396
2422
|
});
|
|
2423
|
+
Object.defineProperty(exports, "verifyPortableObjectProofWithRoot", {
|
|
2424
|
+
enumerable: true,
|
|
2425
|
+
get: function() {
|
|
2426
|
+
return verifyPortableObjectProofWithRoot;
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2397
2429
|
Object.defineProperty(exports, "verifyProof", {
|
|
2398
2430
|
enumerable: true,
|
|
2399
2431
|
get: function() {
|