import { AzethError, type AzethErrorCode } from '@azeth/common'; /** Attempt to decode a Solidity custom error from a thrown error object. * * Tries each Azeth contract ABI in sequence until one successfully decodes * the revert data. Returns the mapped AzethErrorCode and a human-readable * message, or undefined if the error is not a recognized contract revert. */ export declare function decodeContractError(err: unknown): { code: AzethErrorCode; message: string; } | undefined; /** Wrap an unknown error, attempting contract error decoding first. * * Drop-in replacement for the existing catch-block pattern: * catch (err) { throw wrapContractError(err, 'NETWORK_ERROR'); } * * If the error is already an AzethError, re-throws it unchanged. * If the error contains revert data matching a known contract error, * throws an AzethError with the specific code and message. * Otherwise, throws an AzethError with the provided fallback code. */ export declare function wrapContractError(err: unknown, fallbackCode: AzethErrorCode): AzethError; //# sourceMappingURL=errors.d.ts.map