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 Details

    • EthereumWalletTokenAdminService

      public EthereumWalletTokenAdminService(org.exoplatform.container.PortalContainer container, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.wallet.service.WalletService walletService, EthereumClientConnector clientConnector)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.picocontainer.Startable
    • stop

      public void stop()
      Specified by:
      stop in interface org.picocontainer.Startable
    • createAdminAccount

      public void createAdminAccount()
      Specified by:
      createAdminAccount in interface org.exoplatform.wallet.service.WalletTokenAdminService
    • createAdminAccount

      public org.exoplatform.wallet.model.Wallet createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
      Specified by:
      createAdminAccount in interface org.exoplatform.wallet.service.WalletTokenAdminService
      Throws:
      IllegalAccessException
    • getAdminWalletAddress

      public String getAdminWalletAddress()
      Specified by:
      getAdminWalletAddress in interface org.exoplatform.wallet.service.WalletTokenAdminService
    • isInitializedAccount

      public final boolean isInitializedAccount(org.exoplatform.wallet.model.Wallet wallet) throws Exception
      Specified by:
      isInitializedAccount in interface org.exoplatform.wallet.service.WalletTokenAdminService
      Throws:
      Exception
    • getTokenBalanceOf

      public final BigInteger getTokenBalanceOf(String address) throws Exception
      Specified by:
      getTokenBalanceOf in interface org.exoplatform.wallet.service.WalletTokenAdminService
      Throws:
      Exception
    • getEtherBalanceOf

      public final BigInteger getEtherBalanceOf(String address) throws Exception
      Specified by:
      getEtherBalanceOf in interface org.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:
      sendEther in interface org.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:
      sendToken in interface org.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:
      reward in interface org.exoplatform.wallet.service.WalletTokenAdminService
      Throws:
      Exception
    • boostAdminTransactions

      public void boostAdminTransactions()
      Specified by:
      boostAdminTransactions in interface org.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:
      retrieveWalletInformationFromBlockchain in interface org.exoplatform.wallet.service.WalletTokenAdminService
      Throws:
      Exception
    • getStatisticParameters

      public Map<String,Object> getStatisticParameters(String operation, Object result, Object... methodArgs)
      Specified by:
      getStatisticParameters in interface org.exoplatform.wallet.statistic.ExoWalletStatisticService
    • generateHash

      public String generateHash(String rawTransaction)
      Specified by:
      generateHash in interface org.exoplatform.wallet.service.WalletTokenAdminService
    • getTokenBalanceOfFromBlockchain

      public final BigInteger getTokenBalanceOfFromBlockchain(String address) throws Exception
      Throws:
      Exception
    • executeReadOperation

      public Object executeReadOperation(String contractAddress, String methodName, Object... arguments) throws Exception
      Throws:
      Exception
    • initAdminWallet

      public void initAdminWallet()