import type { Abi, AbiStateMutability, ExtractAbiFunctions } from 'abitype'; import { type AbiFunctionNotFoundErrorType, type AbiFunctionOutputsNotFoundErrorType } from '../errors/abi.js'; import type { ErrorType } from '../errors/utils.js'; import type { ContractFunctionArgs, ContractFunctionName, ContractFunctionReturnType, Widen } 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 GetAbiItemErrorType } from './getItem.js'; export type DecodeFunctionResultParameters | undefined = ContractFunctionName, args extends ContractFunctionArgs ? functionName : ContractFunctionName> = ContractFunctionArgs ? functionName : ContractFunctionName>, hasFunctions = abi extends Abi ? Abi extends abi ? true : [ExtractAbiFunctions] extends [never] ? false : true : true, allArgs = ContractFunctionArgs ? functionName : ContractFunctionName>, allFunctionNames = ContractFunctionName> = { abi: abi; data: Hex; } & UnionEvaluate extends true ? abi['length'] extends 1 ? { functionName?: functionName | allFunctionNames | undefined; } : { functionName: functionName | allFunctionNames; } : { functionName?: functionName | allFunctionNames | undefined; }> & UnionEvaluate : never : never) | undefined; } : { args?: allArgs | (Widen & (args extends allArgs ? unknown : never)) | undefined; }> & (hasFunctions extends true ? unknown : never); export type DecodeFunctionResultReturnType | undefined = ContractFunctionName, args extends ContractFunctionArgs ? functionName : ContractFunctionName> = ContractFunctionArgs ? functionName : ContractFunctionName>> = ContractFunctionReturnType ? functionName : ContractFunctionName, args>; export type DecodeFunctionResultErrorType = AbiFunctionNotFoundErrorType | AbiFunctionOutputsNotFoundErrorType | DecodeAbiParametersErrorType | GetAbiItemErrorType | ErrorType; export declare function decodeFunctionResult | undefined = undefined, const args extends ContractFunctionArgs ? functionName : ContractFunctionName> = ContractFunctionArgs ? functionName : ContractFunctionName>>(parameters: DecodeFunctionResultParameters): DecodeFunctionResultReturnType; //# sourceMappingURL=decodeFunctionResult.d.ts.map