import type { ExecutionError, ForeignCallHandler } from '@aztec/noir-acvm_js'; import type { FunctionArtifactWithContractName } from '@aztec/stdlib/abi'; import type { NoirCompiledCircuit, NoirCompiledCircuitWithName } from '@aztec/stdlib/noir'; import { type ACIRCallback, type ACIRExecutionResult } from './acvm/acvm.js'; import type { ACVMWitness } from './acvm/acvm_types.js'; import type { ACVMSuccess } from './acvm_native.js'; /** * Low level simulation interface */ export interface CircuitSimulator { /** * Execute a protocol circuit/generate a witness * @param input - The initial witness map defining all of the inputs to `circuit`. * @param artifact - ACIR circuit bytecode and its metadata. * @param callback - A callback to process any foreign calls from the circuit. Can be undefined as for native * ACVM simulator we don't process foreign calls. * @returns The solved witness calculated by executing the circuit on the provided inputs. */ executeProtocolCircuit(input: ACVMWitness, artifact: NoirCompiledCircuitWithName, callback: ForeignCallHandler | undefined): Promise; /** * Execute a user circuit (smart contract function)/generate a witness * @param input - The initial witness map defining all of the inputs to `circuit`. * @param artifact - Contract function ACIR circuit bytecode and its metadata. * @param callback - A callback to process any foreign calls from the circuit. * @returns The solved witness calculated by executing the circuit on the provided inputs, as well as the return * witness indices as specified by the circuit. */ executeUserCircuit(input: ACVMWitness, artifact: FunctionArtifactWithContractName, callback: ACIRCallback): Promise; } export type DecodedError = ExecutionError & { decodedAssertionPayload?: any; noirCallStack?: string[]; }; export declare function enrichNoirError(artifact: NoirCompiledCircuit, originalError: ExecutionError): DecodedError; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2lyY3VpdF9zaW11bGF0b3IuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wcml2YXRlL2NpcmN1aXRfc2ltdWxhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGNBQWMsRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRzlFLE9BQU8sS0FBSyx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