/** * Effect ledger keyring: public Ed25519 keys with validity windows, extended * only by rotations signed by both the prior and the successor key. * * @see docs/contracts/effect-ledger.v1.md "Signing and keyring" */ import type { LedgerSigningKey } from './keys.js'; import { type EffectKeyring, type EffectKeyringKey, type EffectKeyRotationBody, type EffectScope } from './types.js'; export type SignatureCheck = 'ok' | 'unknown-keyid' | 'key-window' | 'signature-invalid'; /** `"sha256:"` plus hex SHA-256 of `canonicalJson(keyring)`, as recorded in checkpoints. */ export declare function keyringDigest(keyring: EffectKeyring): string; /** `validFrom ≤ t < validUntil`, and before `revokedAt` for a revoked key. */ export declare function keyValidAt(key: EffectKeyringKey, at: string): boolean; /** Check one DSSE signature against the keyring at signing time `at`. */ export declare function checkSignature(keyring: EffectKeyring, keyid: string, sig: string, payloadType: string, payload: Uint8Array, at: string): SignatureCheck; /** * Structural and cryptographic keyring check. Returns a failure reason, or * null when the keyring is a genesis key extended only by valid rotations. */ export declare function keyringFailure(keyring: unknown, scope?: EffectScope): string | null; export declare function assertKeyring(keyring: unknown, scope?: EffectScope): asserts keyring is EffectKeyring; /** The key currently allowed to sign: the last one in the rotation chain. */ export declare function activeKey(keyring: EffectKeyring): EffectKeyringKey; export declare function createGenesisKeyring(scope: EffectScope, key: LedgerSigningKey, validFrom: string): EffectKeyring; /** * Extend `keyring` with a rotation from `prior` (which must be the active key) * to `successor`, signed by both. The prior key's window closes at * `effectiveAt`; records it signed earlier stay verifiable. */ export declare function rotateKeyring(keyring: EffectKeyring, prior: LedgerSigningKey, successor: LedgerSigningKey, effectiveAt: string, reason?: EffectKeyRotationBody['reason']): EffectKeyring; //# sourceMappingURL=keyring.d.ts.map