import type { PublicContractsDB } from './public_db_sources.js'; /** * Identifies the contract data a single simulation reads. The AVM's contract-data lookups during a * `simulate` call are answered from `contractsDB`; `forkId` and `timestamp` scope those lookups to the * world-state fork being simulated against. How this reaches the AVM (in-process call, IPC callback * server, ...) is the implementation's concern — callers only supply the context. */ export interface AvmContractsDBContext { contractsDB: PublicContractsDB; forkId: number; timestamp: bigint; } /** * Something that can run AVM simulations, independent of how the work is dispatched (a single external * process, a pool of them, or an in-process stub). Callers hold this and never see the underlying transport. */ export interface AvmSimulator { /** * Run a fast simulation and return the msgpack-encoded result. `context` supplies the contracts DB whose * data the simulation reads. If `signal` aborts, the simulation stops at the next cancellation checkpoint. */ simulate(inputBuffer: Uint8Array, context: AvmContractsDBContext, signal?: AbortSignal): Promise; /** Run a simulation collecting proving hints and return the msgpack-encoded result. */ simulateWithHints(inputBuffer: Uint8Array): Promise; /** Release any resources held by the underlying implementation. */ destroy?(): Promise; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXZtX3NpbXVsYXRvci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3B1YmxpYy9hdm1fc2ltdWxhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFaEU7Ozs7O0dBS0c7QUFDSCxNQUFNLFdBQVcscUJBQXFCO0lBQ3BDLFdBQVcsRUFBRSxpQkFBaUIsQ0FBQztJQUMvQixNQUFNLEVBQUUsTUFBTSxDQUFDO0lBQ2YsU0FBUyxFQUFFLE1BQU0sQ0FBQztDQUNuQjtBQUVEOzs7R0FHRztBQUNILE1BQU0sV0FBVyxZQUFZO0lBQzNCOzs7T0FHRztJQUNILFFBQVEsQ0FBQyxXQUFXLEVBQUUsVUFBVSxFQUFFLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLENBQUMsRUFBRSxXQUFXLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQzdHLHVGQUF1RjtJQUN2RixpQkFBaUIsQ0FBQyxXQUFXLEVBQUUsVUFBVSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUNoRSxtRUFBbUU7SUFDbkUsT0FBTyxDQUFDLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0NBQzNCIn0=