import type { Abi, ExtractAbiFunctionNames } from 'abitype'; import { type AbiFunctionNotFoundErrorType, type AbiFunctionOutputsNotFoundErrorType } from '../../errors/abi.js'; import type { ContractFunctionResult, GetFunctionArgs, InferFunctionName } from '../../types/contract.js'; import type { Hex } from '../../types/misc.js'; import type { ErrorType } from '../../errors/utils.js'; import { type DecodeAbiParametersErrorType } from './decodeAbiParameters.js'; import { type GetAbiItemErrorType } from './getAbiItem.js'; export type DecodeFunctionResultParameters> = { functionName?: _FunctionName; data: Hex; } & (TFunctionName extends string ? { abi: TAbi; } & Partial> : _FunctionName extends string ? { abi: [TAbi[number]]; } & Partial> : never); export type DecodeFunctionResultReturnType[number] : string> = TFunctionName extends string ? ContractFunctionResult : ContractFunctionResult; export type DecodeFunctionResultErrorType = AbiFunctionNotFoundErrorType | AbiFunctionOutputsNotFoundErrorType | DecodeAbiParametersErrorType | GetAbiItemErrorType | ErrorType; export declare function decodeFunctionResult({ abi, args, functionName, data, }: DecodeFunctionResultParameters): DecodeFunctionResultReturnType; //# sourceMappingURL=decodeFunctionResult.d.ts.map