import { type BytesLike, type ErrorFragment, type EventFragment, type FunctionFragment, Result } from 'ethers'; /** * Get error data from an error object, if possible * @param err - error object * @returns error data if found **/ export declare function getErrorData(err: unknown): string | undefined; /** * Try to parse selector and data with any known ABI * selector must be either: * - Error, Function or Event name or signature * - 4-byte for Error or Function selector (first 4B of its keccak256(signature)) * - 32-byte for Event topicHash (keccak256(signature)) * If data is provided, it will be parsed with the fragment's inputs. For events, only the * non-indexed arguments are parsed. * * @param selector - error, function or event selector * @param data - data to parse as fragment's inputs * @returns Fragment and contract name, if found, and parsed data if possible **/ export declare function parseWithFragment(selector: string, data?: BytesLike): readonly [ fragment: ErrorFragment | FunctionFragment | EventFragment, contractName: string, parsed?: Result ] | undefined; /** * Recursively parse error data, returning an array of key/value pairs, where key is the path to * error, and error maybe an error description or format, or the raw data if not parsable. * * @param key - key to use for the error data * @param data - error bytearray data to parse * @returns array of key/value pairs **/ export declare function recursiveParseError(key: string, data: unknown): (readonly [key: string, error: unknown])[]; /** * Parses error data and transaction responses to extract human-readable info. * @param data - Raw error data or transaction response. * @returns Parsed error information or undefined. */ export declare function parseData(data: unknown): Record | undefined; //# sourceMappingURL=errors.d.ts.map