Interface IAccountApi

  • All Known Implementing Classes:
    AccountApiProvider

    public interface IAccountApi
    EtherScan - API Descriptions https://etherscan.io/apis#accounts
    Since:
    28.10.2018
    Author:
    GoodforGod
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Balance balance​(java.lang.String address)
      Address ETH balance
      TokenBalance balance​(java.lang.String address, java.lang.String contract)
      ERC20 token balance for address
      java.util.List<Balance> balances​(java.util.List<java.lang.String> addresses)
      Maximum 20 address for single batch request If address MORE THAN 20, then there will be more than 1 request performed
      java.util.List<Block> minedBlocks​(java.lang.String address)
      All blocks mined by address
      java.util.List<Tx> txs​(java.lang.String address)  
      java.util.List<Tx> txs​(java.lang.String address, long startBlock)  
      java.util.List<Tx> txs​(java.lang.String address, long startBlock, long endBlock)
      All txs for given address
      java.util.List<TxInternal> txsInternal​(java.lang.String address)  
      java.util.List<TxInternal> txsInternal​(java.lang.String address, long startBlock)  
      java.util.List<TxInternal> txsInternal​(java.lang.String address, long startBlock, long endBlock)
      All internal txs for given address
      java.util.List<TxInternal> txsInternalByHash​(java.lang.String txhash)
      All internal tx for given transaction hash
      java.util.List<TxToken> txsToken​(java.lang.String address)  
      java.util.List<TxToken> txsToken​(java.lang.String address, long startBlock)  
      java.util.List<TxToken> txsToken​(java.lang.String address, long startBlock, long endBlock)
      All token txs for given address
    • Method Detail

      • balance

        @NotNull
        Balance balance​(java.lang.String address)
                 throws ApiException
        Address ETH balance
        Parameters:
        address - get balance for
        Returns:
        balance
        Throws:
        ApiException - parent exception class
      • balance

        @NotNull
        TokenBalance balance​(java.lang.String address,
                             java.lang.String contract)
                      throws ApiException
        ERC20 token balance for address
        Parameters:
        address - get balance for
        contract - token contract
        Returns:
        token balance for address
        Throws:
        ApiException - parent exception class
      • balances

        @NotNull
        java.util.List<Balance> balances​(java.util.List<java.lang.String> addresses)
                                  throws ApiException
        Maximum 20 address for single batch request If address MORE THAN 20, then there will be more than 1 request performed
        Parameters:
        addresses - addresses to get balances for
        Returns:
        list of balances
        Throws:
        ApiException - parent exception class
      • txs

        @NotNull
        java.util.List<Tx> txs​(java.lang.String address,
                               long startBlock,
                               long endBlock)
                        throws ApiException
        All txs for given address
        Parameters:
        address - get txs for
        startBlock - tx from this blockNumber
        endBlock - tx to this blockNumber
        Returns:
        txs for address
        Throws:
        ApiException - parent exception class
      • txsInternal

        @NotNull
        java.util.List<TxInternal> txsInternal​(java.lang.String address,
                                               long startBlock,
                                               long endBlock)
                                        throws ApiException
        All internal txs for given address
        Parameters:
        address - get txs for
        startBlock - tx from this blockNumber
        endBlock - tx to this blockNumber
        Returns:
        txs for address
        Throws:
        ApiException - parent exception class
      • txsInternalByHash

        @NotNull
        java.util.List<TxInternal> txsInternalByHash​(java.lang.String txhash)
                                              throws ApiException
        All internal tx for given transaction hash
        Parameters:
        txhash - transaction hash
        Returns:
        internal txs list
        Throws:
        ApiException - parent exception class
      • txsToken

        @NotNull
        java.util.List<TxToken> txsToken​(java.lang.String address,
                                         long startBlock,
                                         long endBlock)
                                  throws ApiException
        All token txs for given address
        Parameters:
        address - get txs for
        startBlock - tx from this blockNumber
        endBlock - tx to this blockNumber
        Returns:
        txs for address
        Throws:
        ApiException - parent exception class
      • minedBlocks

        @NotNull
        java.util.List<Block> minedBlocks​(java.lang.String address)
                                   throws ApiException
        All blocks mined by address
        Parameters:
        address - address to search for
        Returns:
        blocks mined
        Throws:
        ApiException - parent exception class