Constructors
constructor
- new Balance<T>(integerBalance: undefined | number, type: T): Balance<T>
-
Type parameters
Parameters
-
integerBalance: undefined | number
-
type: T
Properties
bigBalance
bigBalance: BigNumber
bigInteger
bigInteger: BigNumber
floatBalance
floatBalance: number
integerBalance
integerBalance: number
type
type: T
Methods
dividedBy
-
Parameters
minus
-
Parameters
plus
-
Parameters
times
-
Parameters
toDataCredits
-
Parameters
toNetworkTokens
-
Parameters
toString
- toString(maxDecimalPlaces?: number, options?: StringFormatOptions): string
-
Parameters
-
Optional maxDecimalPlaces: number
-
Optional options: StringFormatOptions
Returns string
toTestNetworkTokens
-
Parameters
Returns Balance<default>
toUsd
-
Parameters
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>