import { VerificationCheck } from '../../types/check.js'; /** * Problem `type` URI for an expired credential. * * Uses the same `https://www.w3.org/TR/vc-data-model#...` placeholder host * as the rest of the catalog (see {@link ../../problem-types.ts}); treat it * as an opaque key until a real error registry exists. Kept as a standalone * constant rather than mirrored into the core `ProblemTypes` map because the * validity suite is opt-in (passed via `additionalSuites`), following the * same "vertical catalogs live with their suite" convention as the * OpenBadges submodule. */ export declare const EXPIRED_PROBLEM_TYPE = "https://www.w3.org/TR/vc-data-model#CREDENTIAL_EXPIRED"; /** * Machine-readable `code` values carried on this check's `'skipped'` * outcomes. Branch on these rather than on the prose `reason` -- the three * causes are not interchangeable: `noExpiration` means the credential * genuinely never expires, while `unparseableDate` means an expiry exists * but could not be evaluated (an issuer defect a consumer may well want to * surface as a warning rather than a pass). */ export declare const EXPIRATION_SKIP_CODES: { /** The subject carried no verifiable credential. */ readonly noCredential: "no-credential"; /** The credential has no `validUntil` / `expirationDate`. */ readonly noExpiration: "no-expiration"; /** An expiry value exists but does not parse as a date. */ readonly unparseableDate: "unparseable-date"; }; /** * Credential expiration check. * * Reads the credential's expiry off `validUntil` (VC 2.0) or `expirationDate` * (VC 1.x) and compares it against "now". This is a non-fatal informational * check: an expired credential is reported as a warning, not a hard * cryptographic failure. * * "Now" is read from the injected clock -- `context.timeService.dateNowMs()` * when present, else `Date.now()` -- so the check is deterministic under a * fake time service in tests. * * Skipped when (each cause tagged with its {@link EXPIRATION_SKIP_CODES} * entry on the outcome's `code`): * - No credential in the subject (`no-credential`). * - Credential has no expiration date (`no-expiration`). * - The expiration date is not a valid date (`unparseable-date`). * * Success when: * - The credential is within its validity period. * * Failure ({@link EXPIRED_PROBLEM_TYPE}) when: * - The expiration instant is in the past. */ export declare const expirationCheck: VerificationCheck; //# sourceMappingURL=expiration-check.d.ts.map