import type { FunctionFragment, AbiParamsCommon, GetOutputsType, ContractAbiInterface } from '../types/ABI.js'; import type { FunctionSelector } from '../types/Contract.js'; export declare function decodeParams(names: string[], types: string[], output: string, ignoreMethodHash?: boolean): any; export declare function encodeParams(types: string[], values: any[]): string; export declare function encodeParamsV2ByABI(funABI: FunctionFragment, args: any[]): string; export declare function decodeParamsV2ByABI(funABI: T, data: string | Uint8Array): GetOutputsType; export declare function encodeFunctionData(funcABI: FunctionFragment, args?: any[]): string; export declare function buildFullTypeDefinition(typeDef: AbiParamsCommon): string; export declare function buildFunctionSelector(fragment: F): FunctionSelector; /** Distinct input-arities of the named overloads, ascending — for arg-count errors. */ export declare function overloadArities(abi: ContractAbiInterface, functionName: string): number[]; /** * Resolve the ABI fragment for a (possibly overloaded) function call, using the * supplied args (arity, then runtime types) to pick the correct overload. * A non-overloaded name resolves to its single fragment regardless of args; the * full signature (e.g. `"transfer(address,uint256)"`) may be passed as * `functionName` to select an overload explicitly. * * Used only by the contract read/write namespaces; the legacy Contract/Method * layer keeps its own selector/signature-keyed resolution. */ export declare function resolveFunctionFragment(abi: ContractAbiInterface, functionName: string, args: readonly unknown[] | undefined): FunctionFragment; export declare function isReadOnlyFunctionFragment(fragment: FunctionFragment): boolean;