Class AccountApiProvider

  • All Implemented Interfaces:
    IAccountApi

    public class AccountApiProvider
    extends java.lang.Object
    implements IAccountApi
    Account API Implementation
    Since:
    28.10.2018
    See Also:
    IAccountApi
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull Balance balance​(java.lang.String address)
      Address ETH balance
      @NotNull TokenBalance balance​(java.lang.String address, java.lang.String contract)
      ERC20 token balance for address
      @NotNull 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
      @NotNull java.util.List<Block> minedBlocks​(java.lang.String address)
      All blocks mined by address
      @NotNull java.util.List<Tx> txs​(java.lang.String address)  
      @NotNull java.util.List<Tx> txs​(java.lang.String address, long startBlock)  
      @NotNull java.util.List<Tx> txs​(java.lang.String address, long startBlock, long endBlock)
      All txs for given address
      @NotNull java.util.List<TxInternal> txsInternal​(java.lang.String address)  
      @NotNull java.util.List<TxInternal> txsInternal​(java.lang.String address, long startBlock)  
      @NotNull java.util.List<TxInternal> txsInternal​(java.lang.String address, long startBlock, long endBlock)
      All internal txs for given address
      @NotNull java.util.List<TxInternal> txsInternalByHash​(java.lang.String txhash)
      All internal tx for given transaction hash
      @NotNull java.util.List<TxToken> txsNftToken​(java.lang.String address)  
      @NotNull java.util.List<TxToken> txsNftToken​(java.lang.String address, long startBlock)  
      @NotNull java.util.List<TxToken> txsNftToken​(java.lang.String address, long startBlock, long endBlock)
      All ERC-721 (NFT) token txs for given address
      @NotNull java.util.List<TxToken> txsToken​(java.lang.String address)  
      @NotNull java.util.List<TxToken> txsToken​(java.lang.String address, long startBlock)  
      @NotNull java.util.List<TxToken> txsToken​(java.lang.String address, long startBlock, long endBlock)
      All ERC-20 token txs for given address
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • balance

        @NotNull
        public @NotNull Balance balance​(java.lang.String address)
                                 throws ApiException
        Description copied from interface: IAccountApi
        Address ETH balance
        Specified by:
        balance in interface IAccountApi
        Parameters:
        address - get balance for
        Returns:
        balance
        Throws:
        ApiException - parent exception class
      • balance

        @NotNull
        public @NotNull TokenBalance balance​(java.lang.String address,
                                             java.lang.String contract)
                                      throws ApiException
        Description copied from interface: IAccountApi
        ERC20 token balance for address
        Specified by:
        balance in interface IAccountApi
        Parameters:
        address - get balance for
        contract - token contract
        Returns:
        token balance for address
        Throws:
        ApiException - parent exception class
      • balances

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

        @NotNull
        public @NotNull java.util.List<Tx> txs​(java.lang.String address,
                                               long startBlock,
                                               long endBlock)
                                        throws ApiException
        Description copied from interface: IAccountApi
        All txs for given address
        Specified by:
        txs in interface IAccountApi
        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
        public @NotNull java.util.List<TxInternal> txsInternal​(java.lang.String address,
                                                               long startBlock,
                                                               long endBlock)
                                                        throws ApiException
        Description copied from interface: IAccountApi
        All internal txs for given address
        Specified by:
        txsInternal in interface IAccountApi
        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
        public @NotNull java.util.List<TxInternal> txsInternalByHash​(java.lang.String txhash)
                                                              throws ApiException
        Description copied from interface: IAccountApi
        All internal tx for given transaction hash
        Specified by:
        txsInternalByHash in interface IAccountApi
        Parameters:
        txhash - transaction hash
        Returns:
        internal txs list
        Throws:
        ApiException - parent exception class
      • txsToken

        @NotNull
        public @NotNull java.util.List<TxToken> txsToken​(java.lang.String address,
                                                         long startBlock,
                                                         long endBlock)
                                                  throws ApiException
        Description copied from interface: IAccountApi
        All ERC-20 token txs for given address
        Specified by:
        txsToken in interface IAccountApi
        Parameters:
        address - get txs for
        startBlock - tx from this blockNumber
        endBlock - tx to this blockNumber
        Returns:
        txs for address
        Throws:
        ApiException - parent exception class
      • txsNftToken

        @NotNull
        public @NotNull java.util.List<TxToken> txsNftToken​(java.lang.String address,
                                                            long startBlock,
                                                            long endBlock)
                                                     throws ApiException
        Description copied from interface: IAccountApi
        All ERC-721 (NFT) token txs for given address
        Specified by:
        txsNftToken in interface IAccountApi
        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
        public @NotNull java.util.List<Block> minedBlocks​(java.lang.String address)
                                                   throws ApiException
        Description copied from interface: IAccountApi
        All blocks mined by address
        Specified by:
        minedBlocks in interface IAccountApi
        Parameters:
        address - address to search for
        Returns:
        blocks mined
        Throws:
        ApiException - parent exception class