import type { AbiParameter, AbiParameterKind, AbiParametersToPrimitiveTypes, AbiParameterToPrimitiveType } from 'abitype'; import * as AbiParameters from '../AbiParameters.js'; import * as Address from '../Address.js'; import * as Bytes from '../Bytes.js'; import * as Errors from '../Errors.js'; import * as Hex from '../Hex.js'; import type * as Cursor from './cursor.js'; import type { Compute, IsNarrowable, UnionToIntersection } from './types.js'; /** @internal */ export type ParameterToPrimitiveType = AbiParameterToPrimitiveType; /** @internal */ export type ToObject = IsNarrowable extends true ? Compute; } : { [key in index]: AbiParameterToPrimitiveType; }; }[number]>> : unknown; /** @internal */ export type ToPrimitiveTypes = AbiParametersToPrimitiveTypes; /** @internal */ export type Tuple = ParameterToPrimitiveType; /** @internal */ export declare function decodeParameter(cursor: Cursor.Cursor, param: AbiParameters.Parameter, options: { checksumAddress?: boolean | undefined; staticPosition: number; }): any[]; export declare namespace decodeParameter { type ErrorType = decodeArray.ErrorType | decodeTuple.ErrorType | decodeAddress.ErrorType | decodeBool.ErrorType | decodeBytes.ErrorType | decodeNumber.ErrorType | decodeString.ErrorType | AbiParameters.InvalidTypeError | Errors.GlobalErrorType; } /** @internal */ export declare function decodeAddress(cursor: Cursor.Cursor, options?: { checksum?: boolean | undefined; }): (number | `0x${string}`)[]; export declare namespace decodeAddress { type ErrorType = Hex.fromBytes.ErrorType | Bytes.slice.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function decodeArray(cursor: Cursor.Cursor, param: AbiParameters.Parameter, options: { checksumAddress?: boolean | undefined; length: number | null; staticPosition: number; }): (number | unknown[])[]; export declare namespace decodeArray { type ErrorType = Bytes.toNumber.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function decodeBool(cursor: Cursor.Cursor): (number | boolean)[]; export declare namespace decodeBool { type ErrorType = Bytes.toBoolean.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function decodeBytes(cursor: Cursor.Cursor, param: AbiParameters.Parameter, { staticPosition }: { staticPosition: number; }): (string | number)[]; export declare namespace decodeBytes { type ErrorType = Hex.fromBytes.ErrorType | Bytes.toNumber.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function decodeNumber(cursor: Cursor.Cursor, param: AbiParameters.Parameter): (number | bigint)[]; export declare namespace decodeNumber { type ErrorType = Bytes.toNumber.ErrorType | Bytes.toBigInt.ErrorType | Errors.GlobalErrorType; } /** @internal */ export type TupleAbiParameter = AbiParameters.Parameter & { components: readonly AbiParameters.Parameter[]; }; /** @internal */ export declare function decodeTuple(cursor: Cursor.Cursor, param: TupleAbiParameter, options: { checksumAddress?: boolean | undefined; staticPosition: number; }): any[]; export declare namespace decodeTuple { type ErrorType = Bytes.toNumber.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function decodeString(cursor: Cursor.Cursor, { staticPosition }: { staticPosition: number; }): (string | number)[]; export declare namespace decodeString { type ErrorType = Bytes.toNumber.ErrorType | Bytes.toString.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function encodeParameters(parameters: readonly AbiParameters.Parameter[], values: readonly unknown[], options?: encodeParameters.Options): Hex.Hex; export declare namespace encodeParameters { type Options = { checksumAddress?: boolean | undefined; prefix?: Hex.Hex | undefined; }; type ErrorType = AbiParameters.LengthMismatchError | AbiParameters.InvalidArrayError | AbiParameters.ArrayLengthMismatchError | AbiParameters.BytesSizeMismatchError | AbiParameters.InvalidTypeError | Address.assert.ErrorType | Hex.IntegerOutOfRangeError | Hex.fromBytes.ErrorType | Errors.GlobalErrorType; } /** @internal */ export declare function getArrayComponents(type: string): [length: number | null, innerType: string] | undefined; /** @internal */ export declare function hasDynamicChild(param: AbiParameters.Parameter): any; //# sourceMappingURL=abiParameters.d.ts.map