import type { Abi, AbiStateMutability, ExtractAbiFunction, ExtractAbiFunctions } from 'abitype'; import { type AbiFunctionNotFoundErrorType } from '../../errors/abi.js'; import type { ContractFunctionArgs, ContractFunctionName } from '../../types/contract.js'; import type { ConcatHexErrorType } from '../data/concat.js'; import { type ToFunctionSelectorErrorType } from '../hash/toFunctionSelector.js'; import type { ErrorType } from '../../errors/utils.js'; import type { Hex } from '../../types/misc.js'; import type { IsNarrowable, UnionEvaluate } from '../../types/utils.js'; import { type FormatAbiItemErrorType } from './formatAbiItem.js'; import { type GetAbiItemErrorType } from './getAbiItem.js'; export type PrepareEncodeFunctionDataParameters | undefined = ContractFunctionName, hasFunctions = abi extends Abi ? Abi extends abi ? true : [ExtractAbiFunctions] extends [never] ? false : true : true, allArgs = ContractFunctionArgs ? functionName : ContractFunctionName>, allFunctionNames = ContractFunctionName> = { abi: abi; } & UnionEvaluate extends true ? abi['length'] extends 1 ? { functionName?: functionName | allFunctionNames | Hex | undefined; } : { functionName: functionName | allFunctionNames | Hex; } : { functionName?: functionName | allFunctionNames | Hex | undefined; }> & UnionEvaluate<{ args?: allArgs | undefined; }> & (hasFunctions extends true ? unknown : never); export type PrepareEncodeFunctionDataReturnType | undefined = ContractFunctionName> = { abi: abi extends Abi ? functionName extends ContractFunctionName ? [ExtractAbiFunction] : Abi : Abi; functionName: Hex; }; export type PrepareEncodeFunctionDataErrorType = AbiFunctionNotFoundErrorType | ConcatHexErrorType | FormatAbiItemErrorType | GetAbiItemErrorType | ToFunctionSelectorErrorType | ErrorType; export declare function prepareEncodeFunctionData | undefined = undefined>(parameters: PrepareEncodeFunctionDataParameters): PrepareEncodeFunctionDataReturnType; //# sourceMappingURL=prepareEncodeFunctionData.d.ts.map