public interface WalletTokenAdminService
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
balanceOf(String address)
Get token balance of a wallet address (on blockchain)
|
void |
createAdminAccount()
Generates admin account wallet and store it internally in eXo Server
|
Wallet |
createAdminAccount(String privateKey,
String issuerUsername)
Creates admin account wallet using provided private key and store it
internally in eXo Server
|
String |
generateHash(String rawTransaction) |
int |
getAdminLevel(String address)
Get admin level of a wallet address from token (on blockchain)
|
Wallet |
getAdminWallet() |
String |
getAdminWalletAddress() |
BigInteger |
getEtherBalanceOf(String address)
Get ether balance of a wallet address (on blockchain)
|
TransactionDetail |
initialize(TransactionDetail transactionDetail,
String issuerUsername)
Initializes (on blockchain) a receiver wallet address using 'Admin' wallet
by using funds transmitted in transaction detail.
|
boolean |
isApprovedAccount(String address)
Checks if a wallet address is approved on token (on blockchain)
|
boolean |
isInitializedAccount(String address)
Checks whether the wallet is initialized or not (on blockchain)
|
void |
refreshContractDetailFromBlockchain(ContractDetail contractDetail,
Set<String> contractModifications)
Retrieves contract details from blockchain, like: - Sell price - Owner -
Symbol - Name ...
|
void |
retrieveWalletInformationFromBlockchain(Wallet wallet,
ContractDetail contractDetail,
Set<String> walletModifications)
Retrieves wallet details from blockchain
|
TransactionDetail |
reward(TransactionDetail transactionDetail,
String issuerUsername)
Send rewarded token amounts (on blockchain) to a receiver wallet address
using 'Admin' wallet.
|
TransactionDetail |
sendEther(TransactionDetail transactionDetail,
String issuerUsername)
Send ether (on blockchain) to a receiver wallet address using 'Admin'
wallet.
|
TransactionDetail |
sendToken(TransactionDetail transactionDetail,
String issuerUsername)
Send token (on blockchain) to a receiver wallet address using 'Admin'
wallet.
|
void createAdminAccount()
Wallet createAdminAccount(String privateKey, String issuerUsername) throws IllegalAccessException
privateKey - admin account wallet private keyissuerUsername - current user creating walletIllegalAccessException - if current user is not allowed to create
admin wallet accountWallet getAdminWallet()
String getAdminWalletAddress()
String generateHash(String rawTransaction)
rawTransaction - raw transaction to send to blockchainTransactionDetail reward(TransactionDetail transactionDetail, String issuerUsername) throws Exception
transactionDetail - issuerUsername - TransactionDetail with the hash of the transaction sent in
blockchainExceptionTransactionDetail initialize(TransactionDetail transactionDetail, String issuerUsername) throws Exception
transactionDetail - issuerUsername - TransactionDetail with the hash of the transaction sent in
blockchainExceptionTransactionDetail sendEther(TransactionDetail transactionDetail, String issuerUsername) throws Exception
transactionDetail - issuerUsername - TransactionDetail with the hash of the transaction sent in
blockchainExceptionTransactionDetail sendToken(TransactionDetail transactionDetail, String issuerUsername) throws Exception
transactionDetail - issuerUsername - TransactionDetail with the hash of the transaction sent in
blockchainExceptionBigInteger balanceOf(String address) throws Exception
address - TransactionDetail with the hash of the transaction sent in
blockchainExceptionBigInteger getEtherBalanceOf(String address) throws Exception
address - TransactionDetail with the hash of the transaction sent in
blockchainExceptionboolean isInitializedAccount(String address) throws Exception
address - TransactionDetail with the hash of the transaction sent in
blockchainExceptionint getAdminLevel(String address) throws Exception
address - TransactionDetail with the hash of the transaction sent in
blockchainExceptionboolean isApprovedAccount(String address) throws Exception
address - TransactionDetail with the hash of the transaction sent in
blockchainExceptionvoid refreshContractDetailFromBlockchain(ContractDetail contractDetail, Set<String> contractModifications)
contractDetail - existing contract detail retrieved from internal
database to refresh its attributes.contractModifications - list of called method names to change contract
state on blockchain. This parameter will be used to know which
methods to call to refresh contract state in order to optimize the
number of calls to Blockchainvoid retrieveWalletInformationFromBlockchain(Wallet wallet, ContractDetail contractDetail, Set<String> walletModifications) throws Exception
wallet - object to refreshcontractDetail - contract details attributeswalletModifications - list of called method names to change wallet
state on blockchain. This parameter will be used to know which
methods to call to refresh wallet state in order to optimize the
number of calls to BlockchainExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.