/** * Read-side helpers shared by lookup, verification and purge: the keyring, * decoded segments, and the per-line checks that bind a signed record to its * segment position, chain, scope, identity and key window. */ import { type DecodedLine } from './records.js'; import { type LedgerPaths } from './store.js'; import type { EffectKeyring, EffectScope } from './types.js'; /** The stored keyring, or null before the first write. Not verified here. */ export declare function readKeyring(paths: LedgerPaths): Promise; export interface ReadLine { writer: string; index: number; text: string; decoded?: DecodedLine; failure?: string; } export interface ReadSegment { writer: string; torn: boolean; lines: ReadLine[]; } export declare function readWriterSegment(paths: LedgerPaths, writer: string): Promise; export declare function readAllSegments(paths: LedgerPaths): Promise; /** * Every check that binds one decoded line to its place. Returns the failure * reasons (empty when the line verifies). */ export declare function lineFailures(keyring: EffectKeyring, scope: EffectScope, writer: string, index: number, decoded: DecodedLine, previousHash: string | null): string[]; /** Merge order for readers: `(recordedAt, writer, seq)`. */ export declare function mergeOrder(a: DecodedLine, b: DecodedLine): number; //# sourceMappingURL=reader.d.ts.map