import { type AssertSizeErrorType } from '../data/assertSize.js'; import { type TrimErrorType } from '../data/trim.js'; import type { ErrorType } from '../errors/utils.js'; import type { Bytes, Hex } from '../types/data.js'; import { type HexToBigIntErrorType, type HexToNumberErrorType } from './fromHex.js'; import { type BytesToHexErrorType } from './toHex.js'; export type FromBytesParameters = to | { size?: number | undefined; to: to; }; export type FromBytesReturnType = to extends 'string' ? string : to extends 'hex' ? Hex : to extends 'bigint' ? bigint : to extends 'number' ? number : to extends 'boolean' ? boolean : never; export type FromBytesErrorType = BytesToHexErrorType | BytesToBigIntErrorType | BytesToBoolErrorType | BytesToNumberErrorType | BytesToStringErrorType | ErrorType; export declare function fromBytes(bytes: Bytes, toOrOpts: FromBytesParameters): FromBytesReturnType; export type BytesToBigIntOpts = { signed?: boolean | undefined; size?: number | undefined; }; export type BytesToBigIntErrorType = BytesToHexErrorType | HexToBigIntErrorType | ErrorType; export declare function bytesToBigInt(bytes: Bytes, opts?: BytesToBigIntOpts): bigint; export type BytesToBoolOpts = { size?: number | undefined; }; export type BytesToBoolErrorType = AssertSizeErrorType | TrimErrorType | ErrorType; export declare function bytesToBool(bytes_: Bytes, opts?: BytesToBoolOpts): boolean; export type BytesToNumberOpts = BytesToBigIntOpts; export type BytesToNumberErrorType = BytesToHexErrorType | HexToNumberErrorType | ErrorType; export declare function bytesToNumber(bytes: Bytes, opts?: BytesToNumberOpts): number; export type BytesToStringOpts = { size?: number | undefined; }; export type BytesToStringErrorType = AssertSizeErrorType | TrimErrorType | ErrorType; export declare function bytesToString(bytes_: Bytes, opts?: BytesToStringOpts): string; //# sourceMappingURL=fromBytes.d.ts.map