import { Bytes } from './bytes';
import { BrandedType, FlavoredType } from '../types';
/**
 * Nominal type to represent hex strings WITHOUT '0x' prefix.
 * For example for 32 bytes hex representation you have to use 64 length.
 * TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208
 */
export declare type HexString<Length extends number = number> = FlavoredType<string & {
    readonly length: Length;
}, 'HexString'>;
/**
 * Type for HexString with prefix.
 * The main hex type used internally should be non-prefixed HexString
 * and therefore this type should be used as least as possible.
 * Because of that it does not contain the Length property as the variables
 * should be validated and converted to HexString ASAP.
 */
export declare type PrefixedHexString = BrandedType<string, 'PrefixedHexString'>;
/**
 * Creates unprefixed hex string from wide range of data.
 *
 * TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208
 *
 * @param input
 * @param len of the resulting HexString WITHOUT prefix!
 */
export declare function makeHexString<L extends number>(input: string | number | Uint8Array | unknown, len?: L): HexString<L>;
/**
 * Converts a hex string to Uint8Array
 *
 * @param hex string input without 0x prefix!
 */
export declare function hexToBytes<Length extends number, LengthHex extends number = number>(hex: HexString<LengthHex>): Bytes<Length>;
/**
 * Converts array of number or Uint8Array to HexString without prefix.
 *
 * @param bytes   The input array
 * @param len     The length of the non prefixed HexString
 */
export declare function bytesToHex<Length extends number = number>(bytes: Uint8Array, len?: Length): HexString<Length>;
/**
 * Converts integer number to hex string.
 *
 * Optionally provides '0x' prefix or padding
 *
 * @param int         The positive integer to be converted
 * @param len     The length of the non prefixed HexString
 */
export declare function intToHex<Length extends number = number>(int: number, len?: Length): HexString<Length>;
/**
 * Type guard for HexStrings.
 * Requires no 0x prefix!
 *
 * TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208
 *
 * @param s string input
 * @param len expected length of the HexString
 */
export declare function isHexString<Length extends number = number>(s: unknown, len?: number): s is HexString<Length>;
/**
 * Type guard for PrefixedHexStrings.
 * Does enforce presence of 0x prefix!
 *
 * @param s string input
 */
export declare function isPrefixedHexString(s: unknown): s is PrefixedHexString;
/**
 * Verifies if the provided input is a HexString.
 *
 * TODO: Make Length mandatory: https://github.com/ethersphere/bee-js/issues/208
 *
 * @param s string input
 * @param len expected length of the HexString
 * @param name optional name for the asserted value
 * @returns HexString or throws error
 */
export declare function assertHexString<Length extends number = number>(s: unknown, len?: number, name?: string): asserts s is HexString<Length>;
/**
 * Verifies if the provided input is a PrefixedHexString.
 *
 * @param s string input
 * @param len expected length of the HexString
 * @param name optional name for the asserted value
 * @returns HexString or throws error
 */
export declare function assertPrefixedHexString(s: string, name?: string): asserts s is PrefixedHexString;
