/** * Binary helper functions * @module */ /** * Uint8Array to hex string */ declare function bytes2Hex(bytes: Uint8Array): string; /** * Hex string as Uint8Array */ declare function hex2Bytes(hex: string): Uint8Array; /** * Uint8Array to bit string */ declare function bytes2Bits(bytes: Uint8Array): string; /** * Bit string to Uint8Array */ declare function bits2Bytes(bits: string): Uint8Array; /** * Uint8Array to Positive BigInt */ declare function bytes2BigInt(bytes: Uint8Array): bigint; /** * Positive BigInt to Uint8Array * Big-endian order */ declare function bigInt2Bytes(bigInt: bigint, size?: number): Uint8Array; /** * Positive BigInt numbers to hex string * Big-endian order */ declare function bigInt2Hex(bigInt: bigint, size?: number): string; /** * Positive base 10 numbers to hex string * Big-endian order * Use parseInt for vice-versa */ declare function dec2Hex(dec: number, size?: number): string; /** * Positive base 10 numbers to bit string * Big-endian order * Use parseInt for vice-versa */ declare function dec2Bits(dec: number, size?: number): string; /** * Chunks strings into same size chunks * The last chunk will be smaller if a clean division is not possible */ declare function strChunks(str: string, size: number): Array; export { bytes2Hex, hex2Bytes, bytes2Bits, bits2Bytes, bytes2BigInt, bigInt2Bytes, bigInt2Hex, dec2Hex, dec2Bits, strChunks, };