Functions

bnToBn

▸ bnToBn(value?: BN | number | null): BN

Defined in bn/toBn.ts:23

name: bnToBn

summary: Creates a BN value from a BN.js bignumber or number input.

description: null inputs returns a 0x0 result, BN values returns the value, numnbers returns a BN representation.

example:

import BN from 'bn.js';
import { bnToBn } from '@polkadot/util';

bnToBn(0x1234); // => BN(0x1234)
bnToBn(new BN(0x1234)); // => BN(0x1234)
1
2
3
4
5

Parameters:

Name Type
Optional value BN | number | null

Returns: BN


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