new WOK(wallet, scoreAddress)
Create a WOK
Parameters:
Name | Type | Description |
---|---|---|
wallet |
Wallet | |
scoreAddress |
String | contract address of WOK |
- Source:
Methods
-
<async> balanceOf(owner)
-
Returns balance of WOK for the specified owner
Parameters:
Name Type Description owner
String address of owner
- Source:
Returns:
- Type
- Promise.<Number>
-
<async> decimals()
-
Returns decimals
- Source:
Returns:
- Type
- Promise.<Number>
-
<async> name()
-
Returns name
- Source:
Returns:
- Type
- Promise.<String>
-
<async> symbol()
-
Returns symbol
- Source:
Returns:
- Type
- Promise.<String>
-
<async> totalSupply()
-
Returns total supply
- Source:
Returns:
- Type
- Promise.<Number>
-
<async> transfer(to, value, data)
-
Transfer WOK to the specified recipient
Parameters:
Name Type Description to
String address of the recipient
value
Number the amount to transfer
data
String optional
- Source:
Returns:
txHash
- Type
- Promise.<String>