import { AztecAddress } from '@aztec/stdlib/aztec-address';
import { type ContractData } from './contract_data.js';
/**
 * Renders the unformatted TypeScript content for `standard_contract_data.ts`. Run {@link formatTs}
 * on the result before comparing against the committed file — the committed file has been
 * prettier-formatted, so unformatted bytes will not byte-match.
 */
export declare function renderOutputFile(names: string[], contractData: ContractData[]): string;
/**
 * Renders the content for each `standard_addresses.nr` twin. Format-stable — `nargo fmt` will not
 * rewrite the output, so the bytes returned here are byte-equal to what should be on disk.
 */
export declare function renderNoirAddresses(rows: {
    nrConst: string;
    address: AztecAddress;
}[]): string;
/**
 * Formats TypeScript content with the repo's prettier config so the bytes emitted by the generator
 * (and the expected bytes used by the drift test) match what the eventual `format` step in
 * bootstrap.sh produces. Without this normalization the drift check would false-positive on every
 * run since the raw template-string output differs from the prettier-formatted committed content.
 *
 * The typescript/estree plugins are loaded eagerly and passed explicitly: prettier 3's default
 * lazy-loading via ESM dynamic import is unreliable under jest's `experimental-vm-modules` (the
 * VM context can tear down before the dynamic import resolves), which causes intermittent
 * `Cannot read properties of undefined (reading 'estree')` failures.
 */
export declare function formatTs(filePath: string, content: string): Promise<string>;
/** A rendered target file: the destination path and the exact bytes that should be on disk. */
export type RenderedTarget = {
    path: string;
    content: string;
};
/**
 * Renders every generator output target (the TS data file plus each `standard_addresses.nr` twin)
 * from a list of derived `ContractData`. The TS output is prettier-formatted so the result is
 * byte-comparable against the committed file. Both the generator and the drift test build their
 * comparison against this single function.
 */
export declare function renderAllTargets(names: string[], contractData: ContractData[]): Promise<RenderedTarget[]>;
/**
 * Reads a file's current content, or returns `null` if it doesn't exist. Used by the generator to
 * compare against freshly rendered output before deciding to overwrite, and by the drift test to
 * compare the committed file's bytes against the expected bytes.
 */
export declare function readIfExists(filePath: string): Promise<string | null>;
/**
 * Compares `content` against the bytes currently at `filePath`. If they differ (including the file
 * not existing), writes the new content and returns `true`. If they match, leaves the file
 * untouched and returns `false`. Skipping the write when the content is identical avoids mtime
 * churn that would otherwise re-trigger downstream build steps on every generator run.
 */
export declare function writeIfChanged(filePath: string, content: string): Promise<boolean>;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJpZnQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kcmlmdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFNM0QsT0FBTyxFQUNMLEtBQUssWUFBWSxFQUtsQixNQUFNLG9CQUFvQixDQUFDO0FBa0U1Qjs7OztHQUlHO0FBQ0gsd0JBQWdCLGdCQUFnQixDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsRUFBRSxZQUFZLEVBQUUsWUFBWSxFQUFFLEdBQUcsTUFBTSxDQWV0RjtBQUVEOzs7R0FHRztBQUNILHdCQUFnQixtQkFBbUIsQ0FBQyxJQUFJLEVBQUU7SUFBRSxPQUFPLEVBQUUsTUFBTSxDQUFDO0lBQUMsT0FBTyxFQUFFLFlBQVksQ0FBQTtDQUFFLEVBQUUsR0FBRyxNQUFNLENBYzlGO0FBRUQ7Ozs7Ozs7Ozs7R0FVRztBQUNILHdCQUFzQixRQUFRLENBQUMsUUFBUSxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FZakY7QUFFRCwrRkFBK0Y7QUFDL0YsTUFBTSxNQUFNLGNBQWMsR0FBRztJQUFFLElBQUksRUFBRSxNQUFNLENBQUM7SUFBQyxPQUFPLEVBQUUsTUFBTSxDQUFBO0NBQUUsQ0FBQztBQUUvRDs7Ozs7R0FLRztBQUNILHdCQUFzQixnQkFBZ0IsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLEVBQUUsWUFBWSxFQUFFLFlBQVksRUFBRSxHQUFHLE9BQU8sQ0FBQyxjQUFjLEVBQUUsQ0FB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