Functions

u8aToHex

▸ u8aToHex(value?: Uint8Array | null, bitLength?: number, isPrefixed?: boolean): string

Defined in u8a/toHex.ts:21

name: u8aToHex

summary: Creates a hex string from a Uint8Array object.

description: UInt8Array input values return the actual hex string. null or undefined values returns an 0x string.

example:

import { u8aToHex } from '@polkadot/util';

u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f
1
2
3

Parameters:

Name Type Default value
Optional value Uint8Array | null -
Default value bitLength number -1
Default value isPrefixed boolean true

Returns: string


Last Updated: 2/26/2019, 11:50:54 AM