Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/mod.ts>util.numberToU8a

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

Examples

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

numberToU8a(0x1234); // => [0x12, 0x34]

Parameters

optional
value: number | null
optional
bitLength = [UNSUPPORTED]

Returns

Uint8Array