import type { Hex } from "viem"; /** * Recursively extracts, if it exists, the revert data hex string from an error. * * When a contract call reverts, Viem throws an `Error` whose `data` property * contains the hex-encoded revert reason. That `data` may live on the top-level * error or deeper in a chain of `cause` errors. This function walks down the * `cause` chain until it finds a valid `0x` hex string. * * @param error - The thrown Viem `Error` object, which may include a `data` field * or nested `cause` errors carrying the revert data. * @returns The `0x` hex string representing the revert data. * * @throws If no valid `0x` prefixed hex string revert data is found anywhere in the error chain. */ export declare function extractRevertError(error: unknown): { name: string; message: string; data: Hex; }; //# sourceMappingURL=extract-revert-error.d.ts.map