import type { Abi, AbiStateMutability, ExtractAbiFunctions } from 'abitype'; import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError } from '../errors/abi.js'; import type { ErrorType } from '../errors/utils.js'; import type { ContractFunctionName, ContractFunctionReturnType } from '../types/contract.js'; import type { Hex } from '../types/data.js'; import type { IsNarrowable, UnionEvaluate } from '../types/utils.js'; import { type EncodeAbiParametersErrorType } from './encode.js'; import { type GetAbiItemErrorType } from './getItem.js'; export type EncodeFunctionResultParameters | undefined = ContractFunctionName, hasFunctions = abi extends Abi ? Abi extends abi ? true : [ExtractAbiFunctions] extends [never] ? false : true : true, allFunctionNames = ContractFunctionName> = { abi: abi; result?: ContractFunctionReturnType ? functionName : ContractFunctionName, never> | undefined; } & UnionEvaluate extends true ? abi['length'] extends 1 ? { functionName?: functionName | allFunctionNames | undefined; } : { functionName: functionName | allFunctionNames; } : { functionName?: functionName | allFunctionNames | undefined; }> & (hasFunctions extends true ? unknown : never); export type EncodeFunctionResultReturnType = Hex; export type EncodeFunctionResultErrorType = AbiFunctionOutputsNotFoundError | AbiFunctionNotFoundError | EncodeAbiParametersErrorType | GetAbiItemErrorType | ErrorType; export declare function encodeFunctionResult | undefined = undefined>(parameters: EncodeFunctionResultParameters): EncodeFunctionResultReturnType; //# sourceMappingURL=encodeFunctionResult.d.ts.map