/** * Compact-CSV parser — reads the per-pattern boolean compact control file * that `compactReceiver` JS writes and `commitment_report` reads back to * attribute compacted bytes. * * Counterpart to `compact-csv-writer.ts`. The rate cap CSV uses a different * format (numeric bytes::reason:action, container-keyed) and is parsed by * `cap-csv-parser.ts`. This parser is for the compact CSV only. * * Row format: `,::` * Header: `fieldSet,value` * * Tolerances: * - Blank lines and CRLF endings are skipped. * - `#` comment lines are skipped. * - Header line (`fieldSet,value`) is skipped. * - Value may be just `true`|`false` (no epoch, no reason). * - Value may be `true::` (no epoch, reason present). * - Unrecognised boolean token → row pushed to malformed_lines. */ export interface CompactCsvRow { /** Stable pattern identity (tenx_hash or symbolMessage, depending on receiver config). */ pattern_hash: string; /** true = encode; false = pass through. */ encode: boolean; /** * Unix epoch seconds at which this row expires. `undefined` when the * row carries no epoch token (non-expiring entry). */ untilEpoch?: number; /** Human-readable reason label, or empty string when absent. */ reason: string; } export interface ParseCompactCsvResult { rows: CompactCsvRow[]; /** pattern_hash → CompactCsvRow for fast lookup. */ by_pattern: Map; /** Lines that could not be parsed (preserved verbatim for caveat surfacing). */ malformed_lines: string[]; } /** * Parse a compact-CSV string into rows + a pattern_hash lookup map. * * Returns an empty result when `content` is undefined/empty/whitespace. * Does not mutate the caller's string. */ export declare function parseCompactCsv(content?: string | null): ParseCompactCsvResult;