Skip to content

Latest commit

 

History

History
68 lines (41 loc) · 1.17 KB

utils.BN.md

File metadata and controls

68 lines (41 loc) · 1.17 KB

iexec / Exports / utils / BN

Class: BN

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);

Hierarchy

  • BN

    BN

Table of contents

Constructors

Constructors

constructor

new BN(number, base?, endian?): BN

Parameters

Name Type
number string | number | Buffer | Uint8Array | BN | number[]
base? number | "hex"
endian? Endianness

Returns

BN

Inherited from

BNJS.constructor

new BN(number, endian?): BN

Parameters

Name Type
number string | number | Buffer | Uint8Array | BN | number[]
endian? Endianness

Returns

BN

Inherited from

BNJS.constructor