Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Tokens

Hierarchy

  • FixedPoint
    • Tokens

Index

Constructors

constructor

  • new Tokens(amount: BN): Tokens

Properties

Readonly amount

amount: BN

Static Readonly DIV

DIV: number = 100

Methods

add

  • add(other: this): this
  • Parameters

    • other: this

    Returns this

Protected check

  • check(other: FixedPoint, type?: Function): void
  • Parameters

    • other: FixedPoint
    • Default value type: Function = this.constructor

    Returns void

cmp

  • cmp(other: this): number
  • Parameters

    • other: this

    Returns number

div

  • div(ratio: Ratio): this
  • Parameters

    Returns this

divFloor

  • divFloor(ratio: Ratio): this
  • Parameters

    Returns this

divRound

  • divRound(ratio: Ratio): this
  • Parameters

    Returns this

divToRatio

  • divToRatio(other: this): Ratio
  • Parameters

    • other: this

    Returns Ratio

eq

  • eq(other: this): boolean
  • Parameters

    • other: this

    Returns boolean

gte

  • gte(other: this): boolean
  • Parameters

    • other: this

    Returns boolean

isZero

  • isZero(): boolean
  • Returns boolean

lte

  • lte(other: this): boolean
  • Parameters

    • other: this

    Returns boolean

mul

  • mul(ratio: Ratio): this
  • Parameters

    Returns this

mulCeil

  • mulCeil(ratio: Ratio): this
  • Parameters

    Returns this

mulRound

  • mulRound(ratio: Ratio): this
  • Parameters

    Returns this

sub

  • sub(other: this): this
  • Parameters

    • other: this

    Returns this

toJSON

  • toJSON(): string
  • Returns string

toNumber

  • toNumber(): number
  • Returns number

toRate

  • Parameters

    Returns Tokens

toString

  • toString(radix?: number): string
  • Parameters

    • Default value radix: number = 10

    Returns string

toWei

  • Parameters

    Returns Wei

toWeiAt

  • Parameters

    Returns Wei

zeroToNull

  • zeroToNull(): this | null
  • Returns this | null

Static min

Static of

  • Parameters

    • num: number

    Returns Tokens

Static parse

  • Parameters

    • str: string

    Returns Tokens

Generated using TypeDoc