Class 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 Detail

    • Method Detail

      • 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
      • isApprovedAccount

        public final boolean isApprovedAccount​(String address)
                                        throws Exception
        Specified by:
        isApprovedAccount in interface org.exoplatform.wallet.service.WalletTokenAdminService
        Throws:
        Exception
      • getAdminLevel

        public final int getAdminLevel​(String address)
                                throws Exception
        Specified by:
        getAdminLevel in interface org.exoplatform.wallet.service.WalletTokenAdminService
        Throws:
        Exception
      • isInitializedAccount

        public final boolean isInitializedAccount​(String address)
                                           throws Exception
        Specified by:
        isInitializedAccount in interface org.exoplatform.wallet.service.WalletTokenAdminService
        Throws:
        Exception
      • balanceOf

        public final BigInteger balanceOf​(String address)
                                   throws Exception
        Specified by:
        balanceOf 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
      • initialize

        public final org.exoplatform.wallet.model.transaction.TransactionDetail initialize​(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail,
                                                                                           String issuerUsername)
                                                                                    throws Exception
        Specified by:
        initialize 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
      • 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
      • refreshContractDetailFromBlockchain

        public void refreshContractDetailFromBlockchain​(org.exoplatform.wallet.model.ContractDetail contractDetail,
                                                        Set<String> contractModifications)
        Specified by:
        refreshContractDetailFromBlockchain in interface org.exoplatform.wallet.service.WalletTokenAdminService
      • 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