import type { Abi, ExtractAbiError } from 'abitype'; import { type AbiDecodingZeroDataErrorType, type AbiErrorSignatureNotFoundErrorType } from '../errors/abi.js'; import type { ErrorType } from '../errors/utils.js'; import { type ToFunctionSelectorErrorType } from '../hash/toFunctionSelector.js'; import type { AbiItem, ContractErrorArgs, ContractErrorName } from '../types/contract.js'; import type { Hex } from '../types/data.js'; import type { IsNarrowable, UnionEvaluate } from '../types/utils.js'; import { type DecodeAbiParametersErrorType } from './decode.js'; import { type FormatAbiItemErrorType } from './format.js'; export type DecodeErrorResultParameters = { abi?: abi | undefined; data: Hex; }; export type DecodeErrorResultReturnType = ContractErrorName> = IsNarrowable extends true ? UnionEvaluate<{ [errorName in allErrorNames]: { abiItem: abi extends Abi ? Abi extends abi ? AbiItem : ExtractAbiError : AbiItem; args: ContractErrorArgs; errorName: errorName; }; }[allErrorNames]> : { abiItem: AbiItem; args: readonly unknown[] | undefined; errorName: string; }; export type DecodeErrorResultErrorType = AbiDecodingZeroDataErrorType | AbiErrorSignatureNotFoundErrorType | DecodeAbiParametersErrorType | FormatAbiItemErrorType | ToFunctionSelectorErrorType | ErrorType; export declare function decodeErrorResult(parameters: DecodeErrorResultParameters): DecodeErrorResultReturnType; //# sourceMappingURL=decodeErrorResult.d.ts.map