UNPKG

459 BTypeScriptView Raw
1/**
2 * @name hexToU8a
3 * @summary Creates a Uint8Array object from a hex string.
4 * @description
5 * Hex input values return the actual bytes value converted to a string. Anything that is not a hex string (including the `0x` prefix) throws an error.
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { hexToString } from '@polkadot/util';
11 *
12 * hexToU8a('0x68656c6c6f'); // hello
13 * ```
14 */
15export declare function hexToString(_value?: string | null): string;