import { type AssertSizeErrorType } from '../data/assertSize.js'; import { type TrimErrorType } from '../data/trim.js'; import { type InvalidHexBooleanErrorType } from '../errors/data.js'; import type { ErrorType } from '../errors/utils.js'; import type { Bytes, Hex } from '../types/data.js'; import { type HexToBytesErrorType } from './toBytes.js'; export type FromHexParameters = to | { size?: number | undefined; to: to; }; export type FromHexReturnType = to extends 'string' ? string : to extends 'bigint' ? bigint : to extends 'number' ? number : to extends 'bytes' ? Bytes : to extends 'boolean' ? boolean : never; export type FromHexErrorType = HexToNumberErrorType | HexToBigIntErrorType | HexToBoolErrorType | HexToStringErrorType | HexToBytesErrorType | ErrorType; export declare function fromHex(hex: Hex, toOrOpts: FromHexParameters): FromHexReturnType; export type HexToBigIntOpts = { signed?: boolean | undefined; size?: number | undefined; }; export type HexToBigIntErrorType = AssertSizeErrorType | ErrorType; export declare function hexToBigInt(hex: Hex, opts?: HexToBigIntOpts): bigint; export type HexToBoolOpts = { size?: number | undefined; }; export type HexToBoolErrorType = AssertSizeErrorType | InvalidHexBooleanErrorType | TrimErrorType | ErrorType; export declare function hexToBool(hex_: Hex, opts?: HexToBoolOpts): boolean; export type HexToNumberOpts = HexToBigIntOpts; export type HexToNumberErrorType = HexToBigIntErrorType | ErrorType; export declare function hexToNumber(hex: Hex, opts?: HexToNumberOpts): number; export type HexToStringOpts = { size?: number | undefined; }; export type HexToStringErrorType = AssertSizeErrorType | HexToBytesErrorType | TrimErrorType | ErrorType; export declare function hexToString(hex: Hex, opts?: HexToStringOpts): string; //# sourceMappingURL=fromHex.d.ts.map