Class KeeperService


  • public class KeeperService
    extends Object
    • Field Detail

      • log

        protected static final org.apache.logging.log4j.Logger log
      • web3

        private org.web3j.protocol.admin.Admin web3
      • address

        private String address
      • password

        private String password
      • credentials

        private org.web3j.crypto.Credentials credentials
      • credentialsFile

        private String credentialsFile
      • txManager

        private org.web3j.tx.TransactionManager txManager
      • gasProvider

        private org.web3j.tx.gas.ContractGasProvider gasProvider
      • DEFAULT_GAS_PRICE

        private static final BigInteger DEFAULT_GAS_PRICE
      • DEFAULT_GAS_LIMIT

        private static final BigInteger DEFAULT_GAS_LIMIT
    • Constructor Detail

      • KeeperService

        private KeeperService​(org.web3j.protocol.Web3jService web3jService)
      • KeeperService

        private KeeperService​(String url,
                              String address,
                              String password,
                              String credentialsFile,
                              int txAttempts,
                              long txSleepDuration)
                       throws IOException,
                              org.web3j.crypto.CipherException
        Throws:
        IOException
        org.web3j.crypto.CipherException
    • Method Detail

      • getInstance

        public static KeeperService getInstance​(String url,
                                                String address,
                                                String password,
                                                String credentialsFile,
                                                int txAttempts,
                                                long txSleepDuration)
                                         throws IOException,
                                                org.web3j.crypto.CipherException
        Initializes the KeeperService object given a Keeper url, user and password
        Parameters:
        url - Parity Keeper url (ie. http://localhost:8545)
        address - User ethereum address
        password - User password
        credentialsFile - Path to the file with the local credentials
        Returns:
        KeeperService
        Throws:
        IOException - IOException
        org.web3j.crypto.CipherException - CipherException
      • getInstance

        public static KeeperService getInstance​(org.web3j.protocol.Web3jService web3jService)
      • getWeb3

        public org.web3j.protocol.admin.Admin getWeb3()
        Get the Web3j instance
        Returns:
        web3j
      • setCredentials

        public KeeperService setCredentials​(org.web3j.crypto.Credentials credentials)
      • getCredentials

        public org.web3j.crypto.Credentials getCredentials()
                                                    throws IOException,
                                                           org.web3j.crypto.CipherException
        Throws:
        IOException
        org.web3j.crypto.CipherException
      • getContractGasProviderInstance

        public static org.web3j.tx.gas.ContractGasProvider getContractGasProviderInstance​(BigInteger gasPrice,
                                                                                          BigInteger gasLimit)
      • getTxManager

        public org.web3j.tx.TransactionManager getTxManager()
      • getContractGasProvider

        public org.web3j.tx.gas.ContractGasProvider getContractGasProvider()
      • getAddress

        public String getAddress()