//#region src/refs.d.ts interface RefEntry { readonly hash: string; readonly invariants: readonly string[]; } type Refs = Readonly>; /** * The system head ref lives at `refs/head.json`. It is read (and its * corruption judged) through `readContractSpaceHeadRef`, not as a * user-authored ref, so {@link readRefsTolerant} excludes it. */ declare const HEAD_REF_NAME = "head"; /** * A single ref file that exists on disk but cannot be turned into a * {@link RefEntry} (unparseable JSON or schema-invalid content). The ref * is omitted from the result; the problem is surfaced for the integrity * layer to report as `refUnreadable` rather than aborting the load. */ interface RefLoadProblem { readonly refName: string; readonly detail: string; } declare function validateRefName(name: string): boolean; declare function validateRefValue(value: string): boolean; declare function readRef(refsDir: string, name: string): Promise; declare function readRefs(refsDir: string): Promise; declare function writeRef(refsDir: string, name: string, entry: RefEntry): Promise; declare function deleteRef(refsDir: string, name: string): Promise; /** * Index user-authored refs by the contract hash each ref points at. * Each bucket is sorted lex-asc for deterministic output. */ declare function refsByContractHash(refs: Refs): ReadonlyMap; /** * Read `migrations//refs/*.json` and index by destination hash. * Returns an empty map when the refs directory does not exist. */ declare function resolveRefsByContractHash(refsDir: string): Promise>; declare function resolveRef(refs: Refs, name: string): RefEntry; //#endregion export { deleteRef as a, refsByContractHash as c, validateRefName as d, validateRefValue as f, Refs as i, resolveRef as l, RefEntry as n, readRef as o, writeRef as p, RefLoadProblem as r, readRefs as s, HEAD_REF_NAME as t, resolveRefsByContractHash as u }; //# sourceMappingURL=refs-BNCUu58Y.d.mts.map