Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T: BaseCurrencyType

Hierarchy

  • Balance

Index

Constructors

constructor

  • new Balance<T>(integerBalance: undefined | number, type: T): Balance<T>
  • Type parameters

    • T: default<T>

    Parameters

    • integerBalance: undefined | number
    • type: T

    Returns Balance<T>

Properties

bigBalance

bigBalance: BigNumber

bigInteger

bigInteger: BigNumber

floatBalance

floatBalance: number

integerBalance

integerBalance: number

type

type: T

Methods

dividedBy

  • Parameters

    • n: number

    Returns Balance<T>

minus

  • Parameters

    Returns Balance<T>

plus

  • Parameters

    Returns Balance<T>

times

  • Parameters

    • n: number

    Returns Balance<T>

toDataCredits

toNetworkTokens

toString

  • toString(maxDecimalPlaces?: number, options?: StringFormatOptions): string
  • Parameters

    • Optional maxDecimalPlaces: number
    • Optional options: StringFormatOptions

    Returns string

toTestNetworkTokens

  • Parameters

    Returns Balance<default>

toUsd

Static fromFloat

  • fromFloat(float: number, currencyType: AnyCurrencyType): Balance<AnyCurrencyType>
  • Parameters

    • float: number
    • currencyType: AnyCurrencyType

    Returns Balance<AnyCurrencyType>

Static fromFloatAndTicker

  • fromFloatAndTicker(float: number, ticker: Ticker): Balance<AnyCurrencyType>
  • Parameters

    • float: number
    • ticker: Ticker

    Returns Balance<AnyCurrencyType>

Static fromIntAndTicker

  • fromIntAndTicker(integerBalance: number, ticker?: Ticker): Balance<default>
  • Parameters

    • integerBalance: number
    • Optional ticker: Ticker

    Returns Balance<default>

Generated using TypeDoc