Search
Preparing search index...
The search index is not available
moonlet-core
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"core/amount"
Amount
Class Amount
Hierarchy
Amount
Index
Constructors
constructor
Properties
coin
value
config
Methods
assert
Same
Coins
divided
By
minus
multiplied
By
plus
to
Big
Number
to
Number
to
String
with
Unit
add
Config
Constructors
constructor
new
Amount
(
value
:
number
|
BigNumber
, coin
:
string
, unit
?:
string
)
:
Amount
Creates an instance of amount.
Parameters
value:
number
|
BigNumber
coin:
string
Optional
unit:
string
Returns
Amount
Properties
coin
coin
:
string
Private
value
value
:
BigNumber
Static
config
config
:
Map
<
string
,
object
>
= new Map()
Methods
Private
assert
Same
Coins
assert
Same
Coins
(
coin1
:
any
, coin2
:
any
)
:
void
Parameters
coin1:
any
coin2:
any
Returns
void
divided
By
divided
By
(
amount
:
Amount
)
:
Amount
Parameters
amount:
Amount
Returns
Amount
minus
minus
(
amount
:
Amount
)
:
Amount
Parameters
amount:
Amount
Returns
Amount
multiplied
By
multiplied
By
(
amount
:
Amount
)
:
Amount
Parameters
amount:
Amount
Returns
Amount
plus
plus
(
amount
:
Amount
)
:
Amount
Parameters
amount:
Amount
Returns
Amount
to
Big
Number
to
Big
Number
(
unit
?:
string
)
:
BigNumber
Parameters
Optional
unit:
string
Returns
BigNumber
to
Number
to
Number
(
unit
?:
string
)
:
number
Parameters
Optional
unit:
string
Returns
number
to
String
to
String
(
unit
?:
string
)
:
string
Parameters
Optional
unit:
string
Returns
string
Private
with
Unit
with
Unit
(
unit
:
any
, cb
:
any
)
:
any
Parameters
unit:
any
cb:
any
Returns
any
Static
add
Config
add
Config
(
config
:
IBlockchainConfig
)
:
void
Add configuration
Parameters
config:
IBlockchainConfig
Returns
void
Globals
"core/amount"
Amount
constructor
coin
value
config
assert
Same
Coins
divided
By
minus
multiplied
By
plus
to
Big
Number
to
Number
to
String
with
Unit
add
Config
Generated using
TypeDoc
Creates an instance of amount.