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