import type { CompiledCircuit } from "./compile/index.js"; import type { SimCircuit } from "../sim/engine/sim-engine.js"; /** The record families (core/src/carry.rs). */ export declare const CARRY_FAMILY: { readonly capacitor: 1; readonly ic: 2; readonly battery: 3; readonly psu: 4; readonly slow: 5; readonly latch: 6; readonly sag: 7; }; /** Every family's layout version this side reads. */ export declare const CARRY_VERSION = 1; export interface CarryRecord { readonly device: number; readonly family: number; readonly version: number; readonly values: readonly number[]; } /** One side of a reload: a circuit and what it compiled to. */ export interface CarrySource { readonly circuit: SimCircuit; readonly compiled: CompiledCircuit; } /** Splits a carry buffer into its records. Throws on a malformed one. */ export declare function decodeCarry(buf: ArrayLike): CarryRecord[]; /** The buffer form of `records`, as the program's `CARRY` block holds them. */ export declare function encodeCarry(records: readonly CarryRecord[]): number[]; /** * The EEPROMs of `to` whose state a reload from `from` carries (same id and * kind, same authored contents, as classic's `contentsHash`), mapped to the * image the old engine holds: the host loads it as the new ROM blob, so a * written byte survives the reload (classic carries `bytes` with the rest). * `images` are the old engine's current images by component id. */ export declare function eepromCarryImages(from: SimCircuit, to: SimCircuit, images: ReadonlyMap): Map; /** * Moves `records` (taken off the engine that ran `from`) onto `to`'s devices, * sorted by device then family: what `to`'s load seeds before its settle. */ export declare function mapCarry(records: readonly CarryRecord[], from: CarrySource, to: CarrySource): CarryRecord[];