UNPKG

540 BTypeScriptView Raw
1import type { HexString } from '../types';
2/**
3 * @name u8aToHex
4 * @summary Creates a hex string from a Uint8Array object.
5 * @description
6 * `UInt8Array` input values return the actual hex string. `null` or `undefined` values returns an `0x` string.
7 * @example
8 * <BR>
9 *
10 * ```javascript
11 * import { u8aToHex } from '@polkadot/util';
12 *
13 * u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
14 * ```
15 */
16export declare function u8aToHex(value?: Uint8Array | null, bitLength?: number, isPrefixed?: boolean): HexString;