Class EthereumWalletTokenAdminService
- java.lang.Object
-
- org.exoplatform.wallet.blockchain.service.EthereumWalletTokenAdminService
-
- All Implemented Interfaces:
org.exoplatform.wallet.service.WalletTokenAdminService,org.exoplatform.wallet.statistic.ExoWalletStatisticService,org.picocontainer.Startable
public class EthereumWalletTokenAdminService extends Object implements org.exoplatform.wallet.service.WalletTokenAdminService, org.picocontainer.Startable, org.exoplatform.wallet.statistic.ExoWalletStatisticService
-
-
Constructor Summary
Constructors Constructor Description EthereumWalletTokenAdminService(EthereumClientConnector clientConnector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigIntegerbalanceOf(String address)voidboostAdminTransactions()voidcreateAdminAccount()org.exoplatform.wallet.model.WalletcreateAdminAccount(String privateKey, String currentUser)ObjectexecuteReadOperation(String contractAddress, String methodName, Object... arguments)StringgenerateHash(String rawTransaction)StringgetAdminWalletAddress()BigIntegergetEtherBalanceOf(String address)Map<String,Object>getStatisticParameters(String operation, Object result, Object... methodArgs)org.exoplatform.wallet.model.transaction.TransactionDetailinitialize(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername)booleanisInitializedAccount(org.exoplatform.wallet.model.Wallet wallet)voidrefreshContractDetailFromBlockchain(org.exoplatform.wallet.model.ContractDetail contractDetail, Set<String> contractModifications)voidretrieveWalletInformationFromBlockchain(org.exoplatform.wallet.model.Wallet wallet, org.exoplatform.wallet.model.ContractDetail contractDetail, Set<String> walletModifications)org.exoplatform.wallet.model.transaction.TransactionDetailreward(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername)org.exoplatform.wallet.model.transaction.TransactionDetailsendEther(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String currentUserId)org.exoplatform.wallet.model.transaction.TransactionDetailsendToken(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername)voidstart()voidstop()
-
-
-
Constructor Detail
-
EthereumWalletTokenAdminService
public EthereumWalletTokenAdminService(EthereumClientConnector clientConnector)
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()
- Specified by:
stopin interfaceorg.picocontainer.Startable
-
createAdminAccount
public void createAdminAccount()
- Specified by:
createAdminAccountin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
createAdminAccount
public org.exoplatform.wallet.model.Wallet createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
- Specified by:
createAdminAccountin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
IllegalAccessException
-
getAdminWalletAddress
public String getAdminWalletAddress()
- Specified by:
getAdminWalletAddressin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
isInitializedAccount
public final boolean isInitializedAccount(org.exoplatform.wallet.model.Wallet wallet) throws Exception- Specified by:
isInitializedAccountin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
balanceOf
public final BigInteger balanceOf(String address) throws Exception
- Specified by:
balanceOfin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
getEtherBalanceOf
public final BigInteger getEtherBalanceOf(String address) throws Exception
- Specified by:
getEtherBalanceOfin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
initialize
public final org.exoplatform.wallet.model.transaction.TransactionDetail initialize(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) throws Exception- Specified by:
initializein interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
sendEther
public org.exoplatform.wallet.model.transaction.TransactionDetail sendEther(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String currentUserId) throws Exception- Specified by:
sendEtherin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
sendToken
public final org.exoplatform.wallet.model.transaction.TransactionDetail sendToken(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) throws Exception- Specified by:
sendTokenin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
reward
public final org.exoplatform.wallet.model.transaction.TransactionDetail reward(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail, String issuerUsername) throws Exception- Specified by:
rewardin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
boostAdminTransactions
public void boostAdminTransactions() throws Exception- Specified by:
boostAdminTransactionsin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
retrieveWalletInformationFromBlockchain
public void retrieveWalletInformationFromBlockchain(org.exoplatform.wallet.model.Wallet wallet, org.exoplatform.wallet.model.ContractDetail contractDetail, Set<String> walletModifications) throws Exception- Specified by:
retrieveWalletInformationFromBlockchainin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService- Throws:
Exception
-
refreshContractDetailFromBlockchain
public void refreshContractDetailFromBlockchain(org.exoplatform.wallet.model.ContractDetail contractDetail, Set<String> contractModifications)- Specified by:
refreshContractDetailFromBlockchainin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
executeReadOperation
public Object executeReadOperation(String contractAddress, String methodName, Object... arguments) throws Exception
- Throws:
Exception
-
getStatisticParameters
public Map<String,Object> getStatisticParameters(String operation, Object result, Object... methodArgs)
- Specified by:
getStatisticParametersin interfaceorg.exoplatform.wallet.statistic.ExoWalletStatisticService
-
-