### Hierarchy

- BNClass

## Index

### Constructors

- constructor

### Methods

- add
- mul
- pow
- toArray
- toNumber
- toString
- ucmp

## Constructors

### constructor

- new BNClass(number: number | string | number[] | Uint8Array | Buffer | BNClass, endian?: Endianness): BNClass
- new BNClass(number: number | string | number[] | Uint8Array | Buffer | BNClass, base?: number | "hex", endian?: Endianness): BNClass

- - Defined in bn.ts:26

  #### Parameters

  - ##### number: number | string | number[] | Uint8Array | Buffer | BNClass

  - ##### Optional endian: Endianness

  #### Returns BNClass

- - Defined in bn.ts:27

  #### Parameters

  - ##### number: number | string | number[] | Uint8Array | Buffer | BNClass

  - ##### Optional base: number | "hex"

  - ##### Optional endian: Endianness

  #### Returns BNClass

## Methods

### add

- add(b: BNClass): BNClass

- - Defined in bn.ts:64
  description

    addition

  #### Parameters

  - ##### b: BNClass

  #### Returns BNClass

### mul

- mul(b: BNClass): BNClass

- - Defined in bn.ts:59
  description

    multiply

  #### Parameters

  - ##### b: BNClass

  #### Returns BNClass

### pow

- pow(b: BNClass): BNClass

- - Defined in bn.ts:54
  description

    raise `a` to the power of `b`

  #### Parameters

  - ##### b: BNClass

  #### Returns BNClass

### toArray

- toArray(endian?: Endianness, length?: number): number[]

- - Defined in bn.ts:34
  description

    convert to byte Array, and optionally zero pad to length, throwing if already exceeding

  #### Parameters

  - ##### Optional endian: Endianness

  - ##### Optional length: number

  #### Returns number[]

### toNumber

- toNumber(): number

- - Defined in bn.ts:49
  description

    convert to Javascript Number (limited to 53 bits)

  #### Returns number

### toString

- toString(base?: number | "hex", length?: number): string

- - Defined in bn.ts:39
  description

    convert to base-string and pad with zeroes

  #### Parameters

  - ##### Optional base: number | "hex"

  - ##### Optional length: number

  #### Returns string

### ucmp

- ucmp(b: BNClass): -1 | 0 | 1

- - Defined in bn.ts:44
  description

    compare numbers and return `-1 (a < b)`, `0 (a == b)`, or `1 (a > b)` depending on the comparison result

  #### Parameters

  - ##### b: BNClass

  #### Returns -1 | 0 | 1

Generated using TypeDoc