Package io.keyko.nevermined.api.impl
Class TokensImpl
- java.lang.Object
-
- io.keyko.nevermined.api.impl.TokensImpl
-
-
Field Summary
Fields Modifier and Type Field Description private AccountsManageraccountsManager
-
Constructor Summary
Constructors Constructor Description TokensImpl(AccountsManager accountsManager)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.web3j.protocol.core.methods.response.TransactionReceiptrequest(BigInteger amount)Request a number of Ocean Tokensorg.web3j.protocol.core.methods.response.TransactionReceipttransfer(String receiverAccount, BigInteger amount)Transfer tokens from one account to the receiver address
-
-
-
Field Detail
-
accountsManager
private AccountsManager accountsManager
-
-
Constructor Detail
-
TokensImpl
public TokensImpl(AccountsManager accountsManager)
Constructor- Parameters:
accountsManager- the accountsManager
-
-
Method Detail
-
request
public org.web3j.protocol.core.methods.response.TransactionReceipt request(BigInteger amount) throws EthereumException
Description copied from interface:TokensAPIRequest a number of Ocean Tokens- Specified by:
requestin interfaceTokensAPI- Parameters:
amount- Number of tokens requested- Returns:
- TransactionReceipt tx receipt
- Throws:
EthereumException- EVM error
-
transfer
public org.web3j.protocol.core.methods.response.TransactionReceipt transfer(String receiverAccount, BigInteger amount) throws EthereumException
Description copied from interface:TokensAPITransfer tokens from one account to the receiver address- Specified by:
transferin interfaceTokensAPI- Parameters:
receiverAccount- Address of the transfer receiveramount- Amount of tokens to transfer- Returns:
- boolean indicating success/failure of the transfer
- Throws:
EthereumException- EVM error
-
-