import type { Abi, AbiStateMutability } from 'abitype'; import { type SliceErrorType } from '../data/slice.js'; import { AbiFunctionSignatureNotFoundError } 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 DecodeAbiParametersErrorType } from './decode.js'; import { type FormatAbiItemErrorType } from './format.js'; export type DecodeFunctionDataParameters = { abi: abi; data: Hex; }; export type DecodeFunctionDataReturnType = ContractFunctionName> = IsNarrowable extends true ? UnionEvaluate<{ [functionName in allFunctionNames]: { args: ContractFunctionArgs; functionName: functionName; }; }[allFunctionNames]> : { args: readonly unknown[] | undefined; functionName: string; }; export type DecodeFunctionDataErrorType = AbiFunctionSignatureNotFoundError | DecodeAbiParametersErrorType | FormatAbiItemErrorType | ToFunctionSelectorErrorType | SliceErrorType | ErrorType; export declare function decodeFunctionData(parameters: DecodeFunctionDataParameters): DecodeFunctionDataReturnType; //# sourceMappingURL=decodeFunctionData.d.ts.map