import type { Idl } from "@coral-xyz/anchor"; import type { IdlErrorCode } from "@coral-xyz/anchor/dist/esm/idl.js"; import type { AnchorError } from "./index.js"; export type ErrorMap = { [K in AnchorError["name"]]: AnchorError & { name: K; }; }; /** * Generates the error mapping * @param idl * @returns */ export declare const generateErrorMap: (idl: T) => ErrorMap; /** * Returns a RegExp which matches the message of a program error. * @param err * @returns */ export declare const matchError: (err: IdlErrorCode) => RegExp; /** * Returns a RegExp which matches the code of a custom program error. * @param err * @returns */ export declare const matchErrorCode: (code: number) => RegExp; //# sourceMappingURL=errors.d.ts.map