Package io.keyko.nevermined.api
Interface TokensAPI
-
- All Known Implementing Classes:
TokensImpl
public interface TokensAPIExposes the Public API related with the request and transfer of Ocean Tokens
-
-
Method Summary
All Methods Instance Methods Abstract 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
-
-
-
Method Detail
-
request
org.web3j.protocol.core.methods.response.TransactionReceipt request(BigInteger amount) throws EthereumException
Request a number of Ocean Tokens- Parameters:
amount- Number of tokens requested- Returns:
- TransactionReceipt tx receipt
- Throws:
EthereumException- EVM error
-
transfer
org.web3j.protocol.core.methods.response.TransactionReceipt transfer(String receiverAccount, BigInteger amount) throws EthereumException
Transfer tokens from one account to the receiver address- Parameters:
receiverAccount- Address of the transfer receiveramount- Amount of tokens to transfer- Returns:
- boolean indicating success/failure of the transfer
- Throws:
EthereumException- EVM error
-
-