/** * Effect record construction and decoding: in-toto Statement v1 predicates, * DSSE envelopes, segment lines and record hashes. * * Verifiers check the exact decoded payload bytes; they never reserialize a * statement before signature verification. * * @see docs/contracts/effect-ledger.v1.md "Envelope and record" */ import type { LedgerSigningKey } from './keys.js'; import { type EffectPredicate, type EffectSegmentLine, type EffectStatement } from './types.js'; /** Wrap a predicate in a Statement whose single subject is the target reference and its digest. */ export declare function statementFor(predicate: EffectPredicate): EffectStatement; /** `"sha256:"` plus hex SHA-256 of the DSSE PAE of exact payload bytes. */ export declare function recordHashFor(payload: Uint8Array): string; /** * Validate, scan and sign a statement into a segment line. `recordHash` is the * PAE hash of the payload, except for a tombstone, which keeps the original. */ export declare function signSegmentLine(statement: EffectStatement, key: LedgerSigningKey, recordHash?: string): EffectSegmentLine; export interface DecodedLine { line: EffectSegmentLine; payload: Buffer; statement: EffectStatement; } /** * Parse one segment line and its statement. Returns a failure reason instead of * throwing so the verifier can report every broken line. */ export declare function decodeSegmentLine(text: string): DecodedLine | { failure: string; }; /** Recompute a non-tombstone record's ID from its signed identity fields. */ export declare function effectIdBindingHolds(predicate: EffectPredicate): boolean; /** The subject binds the target (or, for a tombstone, the effect ID) to its digest. */ export declare function subjectBindingHolds(statement: EffectStatement): boolean; /** The time a record's signature must fall inside its key window. */ export declare function signedAt(predicate: EffectPredicate): string; //# sourceMappingURL=records.d.ts.map