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(org.exoplatform.container.PortalContainer container, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.wallet.service.WalletService walletService, EthereumClientConnector clientConnector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)BigIntegergetTokenBalanceOf(String address)BigIntegergetTokenBalanceOfFromBlockchain(String address)booleanisInitializedAccount(org.exoplatform.wallet.model.Wallet wallet)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(org.exoplatform.container.PortalContainer container, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.wallet.service.WalletService walletService, 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
-
getTokenBalanceOf
public final BigInteger getTokenBalanceOf(String address) throws Exception
- Specified by:
getTokenBalanceOfin 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
-
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()
- Specified by:
boostAdminTransactionsin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
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
-
getStatisticParameters
public Map<String,Object> getStatisticParameters(String operation, Object result, Object... methodArgs)
- Specified by:
getStatisticParametersin interfaceorg.exoplatform.wallet.statistic.ExoWalletStatisticService
-
generateHash
public String generateHash(String rawTransaction)
- Specified by:
generateHashin interfaceorg.exoplatform.wallet.service.WalletTokenAdminService
-
getTokenBalanceOfFromBlockchain
public final BigInteger getTokenBalanceOfFromBlockchain(String address) throws Exception
- Throws:
Exception
-
-