utils.BN
class used for big numbers manipulation
example:
const one = new BN(1);
const two = new BN('2');
// work above Number.MAX_SAFE_INTEGER limit
const maxSafeInteger = new BN(Number.MAX_SAFE_INTEGER);
const maxSafeIntegerPlusOne = maxSafeInteger.add(one);
-
BN
↳
BN
• new BN(number
, base?
, endian?
): BN
Name | Type |
---|---|
number |
string | number | Buffer | Uint8Array | BN | number [] |
base? |
number | "hex" |
endian? |
Endianness |
BNJS.constructor
• new BN(number
, endian?
): BN
Name | Type |
---|---|
number |
string | number | Buffer | Uint8Array | BN | number [] |
endian? |
Endianness |
BNJS.constructor