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

x/polkadot/util/mod.ts>bnToU8a

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

Examples

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

bnToU8a(new BN(0x1234)); // => [0x12, 0x34]

Type Parameters

ExtToBn extends ToBn

Parameters

optional
value:
| BN
| bigint
| number
| null
optional
unnamed 1 = [UNSUPPORTED]

Returns

Uint8Array