import type { Point } from '@aztec/foundation/curves/grumpkin'; import type { FailingFunction, NoirCallStack } from '@aztec/stdlib/errors'; import { ExecutionError } from '../../common/errors.js'; import { CheckedPublicExecutionError } from '../public_errors.js'; /** * Avm-specific errors should derive from this */ export declare abstract class AvmExecutionError extends CheckedPublicExecutionError { constructor(message: string); } export declare class ArithmeticError extends AvmExecutionError { constructor(message: string); } /** * Error is thrown when the program counter goes to an invalid location. * There is no instruction at the provided pc */ export declare class InvalidProgramCounterError extends AvmExecutionError { constructor(pc: number, max: number); } /** * Error is thrown when the program counter points to a byte * of an invalid opcode. */ export declare class InvalidOpcodeError extends AvmExecutionError { constructor(str: string); } /** * Error is thrown during parsing. */ export declare class AvmParsingError extends AvmExecutionError { constructor(str: string); } /** * Error is thrown when the tag has an invalid value. */ export declare class InvalidTagValueError extends AvmExecutionError { constructor(tagValue: number); } /** * Error thrown during an instruction's execution (during its execute()). */ export declare class InstructionExecutionError extends AvmExecutionError { constructor(message: string); } /** * Error thrown on failed AVM memory tag check. */ export declare class TagCheckError extends AvmExecutionError { static forBaseAddress(gotTag: string): TagCheckError; static forIndirectAddress(address: number, gotTag: string): TagCheckError; static forOffset(offset: number, gotTag: string, expectedTag: string): TagCheckError; static forTag(gotTag: string, expectedTag: string): TagCheckError; constructor(message: string); } /** * Error is thrown when a relative memory address resolved to an offset which * is out of range, i.e, greater than maxUint32. */ export declare class RelativeAddressOutOfRangeError extends AvmExecutionError { constructor(baseAddr: number, relOffset: number); } /** * Error is thrown when a memory slice contains addresses which are * out of range, i.e, greater than maxUint32. */ export declare class MemorySliceOutOfRangeError extends AvmExecutionError { constructor(baseAddr: number, size: number); } /** Error thrown when out of gas. */ export declare class OutOfGasError extends AvmExecutionError { constructor(dimensions: string[]); } /** * Error is thrown when one of the supplied points does not lie on the Grumpkin curve. Specific for ECADD opcode. */ export declare class EcAddPointNotOnCurveError extends AvmExecutionError { constructor(pointIndex: number, point: Point); } /** * Error is thrown when some inputs of ToRadixBE are not valid. */ export declare class InvalidToRadixInputsError extends AvmExecutionError { constructor(errorString: string); } /** * Error is thrown when a static call attempts to alter some state */ export declare class StaticCallAlterationError extends InstructionExecutionError { constructor(); } /** * Meaningfully named alias for ExecutionError when used in the context of the AVM. * Maintains a recursive structure reflecting the AVM's external callstack/errorstack, where * options.cause is the error that caused this error (if this is not the root-cause itself). */ export declare class AvmRevertReason extends ExecutionError { constructor(message: string, failingFunction: FailingFunction, noirCallStack: NoirCallStack, options?: ErrorOptions); } /** * Helper to annotate errors occurring during instruction fetching. */ export declare function duringInstrFetch(error: Error, pc: number): Error; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvcHVibGljL2F2bS9lcnJvcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDL0QsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLGFBQWEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRTNFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN4RCxPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUVsRTs7R0FFRztBQUNILDhCQUFzQixpQkFBa0IsU0FBUSwyQkFBMkI7SUFDekUsWUFBWSxPQUFPLEVBQUUsTUFBTSxFQUcxQjtDQUNGO0FBRUQscUJBQWEsZUFBZ0IsU0FBUSxpQkFBaUI7SUFDcEQsWUFBWSxPQUFPLEVBQUUsTUFBTSxFQUcxQjtDQUNGO0FBRUQ7OztHQUdHO0FBQ0gscUJBQWEsMEJBQTJCLFNBQVEsaUJBQWlCO0lBQy9ELFlBQVksRUFBRSxFQUFFLE1BQU0sRUFBRSxHQUFHLEVBQU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