Skip to main content
Module

x/polkadot/mod.ts>util.hexToU8a

Package publishing for deno.land/x/polkadot
Go to Latest
function util.hexToU8a
import { util } from "https://deno.land/x/polkadot@0.2.12/mod.ts";
const { hexToU8a } = util;

Examples

import { hexToU8a } from 'https://deno.land/x/polkadot@0.2.12/util/mod.ts';

hexToU8a('0x80001f'); // Uint8Array([0x80, 0x00, 0x1f])
hexToU8a('0x80001f', 32); // Uint8Array([0x00, 0x80, 0x00, 0x1f])

Parameters

optional
value: HexString | string | null
optional
bitLength = [UNSUPPORTED]

Returns

Uint8Array