import type { AbiParameter } from "../abi.js"; /** * A value in the shape that the encoder expects. Aggregates are always * positional, because we strip the parameter names before encoding. */ export type NormalizedAbiValue = bigint | boolean | string | Uint8Array | NormalizedAbiValue[]; /** * An ABI parameter with every name removed, recursively. */ export interface UnnamedAbiParameter { readonly type: string; readonly components?: readonly UnnamedAbiParameter[]; } /** * Parses a Solidity fixed-size bytes type name, like `bytes32`, into its size. * * @param type The type name to parse. * @returns The size in bytes, from 1 to 32, or `undefined` if it isn't a * fixed-size bytes type. */ export declare function parseFixedBytesType(type: string): number | undefined; /** * Throws if two of the given parameters share a name. * * This is checked against the parameter list rather than the value, so that the * array and object input shapes fail the same way. * * @param parameters The parameters to check. * @param path The path of their container, or undefined at the top level. * @throws DuplicateAbiParameterNameError If a name is repeated. */ export declare function assertNoDuplicateAbiParameterNames(parameters: readonly AbiParameter[], path?: string): void; /** * Removes the names of a list of ABI parameters, recursively. * * The encoder derives the shape of the value it expects from whether the * parameters are named: named ones take an object keyed by name, unnamed ones * take a positional array. Dropping the names makes every aggregate positional, * at every nesting level. * * @param parameters The parameters to strip. * @returns The same parameters, without their names. */ export declare function toUnnamedAbiParameters(parameters: readonly AbiParameter[]): UnnamedAbiParameter[]; /** * Converts a value into the shape that the encoder expects for a parameter, * validating it against the parameter's Solidity type. * * @param parameter The ABI parameter to normalize the value for. * @param value The value to normalize. * @param path The path of the parameter, used to report errors. * @returns The normalized value. * @throws InvalidAbiValueError If the value can't be encoded as the type. * @throws AbiValueOutOfBoundsError If a numeric value is out of the type's range. * @throws UnsupportedAbiTypeError If the type itself can't be encoded. */ export declare function normalizeAbiValue(parameter: AbiParameter, value: unknown, path: string): Promise; //# sourceMappingURL=abi.d.ts.map