Package io.goodforgod.api.etherscan
Class AccountAPIProvider
java.lang.Object
io.goodforgod.api.etherscan.BasicProvider
io.goodforgod.api.etherscan.AccountAPIProvider
- All Implemented Interfaces:
AccountAPI
Account API Implementation
- Since:
- 28.10.2018
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAccountAPIProvider(RequestQueueManager requestQueueManager, String baseUrl, EthHttpClient executor, Converter converter, int retryCount) -
Method Summary
Modifier and TypeMethodDescription@NotNull BalanceAddress ETH balance@NotNull TokenBalanceERC20 token balance for addressMaximum 20 address for single batch request If address MORE THAN 20, then there will be more than 1 request performedblocksMined(@NotNull String address) All blocks mined by addressAll txs for given addresstxsErc1155(@NotNull String address) txsErc1155(@NotNull String address, long startBlock) txsErc1155(@NotNull String address, long startBlock, long endBlock) All ERC-721 (NFT) token txs for given addresstxsErc1155(@NotNull String address, @NotNull String contractAddress) txsErc1155(@NotNull String address, @NotNull String contractAddress, long startBlock) txsErc1155(@NotNull String address, @NotNull String contractAddress, long startBlock, long endBlock) All ERC-721 (NFT) token txs for given addressAll ERC-20 token txs for given addressAll ERC-20 token txs for given address and contract addressAll ERC-721 (NFT) token txs for given addressAll ERC-721 (NFT) token txs for given address@NotNull List<TxInternal>txsInternal(@NotNull String address) @NotNull List<TxInternal>txsInternal(@NotNull String address, long startBlock) @NotNull List<TxInternal>txsInternal(@NotNull String address, long startBlock, long endBlock) All internal txs for given address@NotNull List<TxInternal>txsInternalByHash(@NotNull String txhash) All internal tx for given transaction hashMethods inherited from class io.goodforgod.api.etherscan.BasicProvider
convert, getMaximumOffset, getRequestUsingOffset, getResponse, getResponse, getResponse, postRequest, postRequest, postRequest
-
Constructor Details
-
AccountAPIProvider
public AccountAPIProvider(RequestQueueManager requestQueueManager, String baseUrl, EthHttpClient executor, Converter converter, int retryCount)
-
-
Method Details
-
balance
@NotNull public @NotNull Balance balance(@NotNull @NotNull String address) throws EtherScanException Description copied from interface:AccountAPIAddress ETH balance- Specified by:
balancein interfaceAccountAPI- Parameters:
address- get balance for- Returns:
- balance
- Throws:
EtherScanException- parent exception class
-
balance
@NotNull public @NotNull TokenBalance balance(@NotNull @NotNull String address, @NotNull @NotNull String contract) throws EtherScanException Description copied from interface:AccountAPIERC20 token balance for address- Specified by:
balancein interfaceAccountAPI- Parameters:
address- get balance forcontract- token contract- Returns:
- token balance for address
- Throws:
EtherScanException- parent exception class
-
balances
@NotNull public @NotNull List<Balance> balances(@NotNull @NotNull List<String> addresses) throws EtherScanException Description copied from interface:AccountAPIMaximum 20 address for single batch request If address MORE THAN 20, then there will be more than 1 request performed- Specified by:
balancesin interfaceAccountAPI- Parameters:
addresses- addresses to get balances for- Returns:
- list of balances
- Throws:
EtherScanException- parent exception class
-
txs
- Specified by:
txsin interfaceAccountAPI- Throws:
EtherScanException
-
txs
@NotNull public @NotNull List<Tx> txs(@NotNull @NotNull String address, long startBlock) throws EtherScanException - Specified by:
txsin interfaceAccountAPI- Throws:
EtherScanException
-
txs
@NotNull public @NotNull List<Tx> txs(@NotNull @NotNull String address, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll txs for given address- Specified by:
txsin interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsInternal
@NotNull public @NotNull List<TxInternal> txsInternal(@NotNull @NotNull String address) throws EtherScanException - Specified by:
txsInternalin interfaceAccountAPI- Throws:
EtherScanException
-
txsInternal
@NotNull public @NotNull List<TxInternal> txsInternal(@NotNull @NotNull String address, long startBlock) throws EtherScanException - Specified by:
txsInternalin interfaceAccountAPI- Throws:
EtherScanException
-
txsInternal
@NotNull public @NotNull List<TxInternal> txsInternal(@NotNull @NotNull String address, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll internal txs for given address- Specified by:
txsInternalin interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsInternalByHash
@NotNull public @NotNull List<TxInternal> txsInternalByHash(@NotNull @NotNull String txhash) throws EtherScanException Description copied from interface:AccountAPIAll internal tx for given transaction hash- Specified by:
txsInternalByHashin interfaceAccountAPI- Parameters:
txhash- transaction hash- Returns:
- internal txs list
- Throws:
EtherScanException- parent exception class
-
txsErc20
@NotNull public @NotNull List<TxErc20> txsErc20(@NotNull @NotNull String address) throws EtherScanException - Specified by:
txsErc20in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc20
@NotNull public @NotNull List<TxErc20> txsErc20(@NotNull @NotNull String address, long startBlock) throws EtherScanException - Specified by:
txsErc20in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc20
@NotNull public @NotNull List<TxErc20> txsErc20(@NotNull @NotNull String address, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll ERC-20 token txs for given address- Specified by:
txsErc20in interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsErc20
@NotNull public @NotNull List<TxErc20> txsErc20(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress) throws EtherScanException - Specified by:
txsErc20in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc20
@NotNull public @NotNull List<TxErc20> txsErc20(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress, long startBlock) throws EtherScanException - Specified by:
txsErc20in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc20
@NotNull public @NotNull List<TxErc20> txsErc20(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll ERC-20 token txs for given address and contract address- Specified by:
txsErc20in interfaceAccountAPI- Parameters:
address- get txs forcontractAddress- contract address to get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsErc721
@NotNull public @NotNull List<TxErc721> txsErc721(@NotNull @NotNull String address) throws EtherScanException - Specified by:
txsErc721in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc721
@NotNull public @NotNull List<TxErc721> txsErc721(@NotNull @NotNull String address, long startBlock) throws EtherScanException - Specified by:
txsErc721in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc721
@NotNull public @NotNull List<TxErc721> txsErc721(@NotNull @NotNull String address, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll ERC-721 (NFT) token txs for given address- Specified by:
txsErc721in interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsErc721
@NotNull public @NotNull List<TxErc721> txsErc721(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll ERC-721 (NFT) token txs for given address- Specified by:
txsErc721in interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsErc721
@NotNull public @NotNull List<TxErc721> txsErc721(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress, long startBlock) throws EtherScanException - Specified by:
txsErc721in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc721
@NotNull public @NotNull List<TxErc721> txsErc721(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress) throws EtherScanException - Specified by:
txsErc721in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc1155
@NotNull public @NotNull List<TxErc1155> txsErc1155(@NotNull @NotNull String address, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll ERC-721 (NFT) token txs for given address- Specified by:
txsErc1155in interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsErc1155
@NotNull public @NotNull List<TxErc1155> txsErc1155(@NotNull @NotNull String address, long startBlock) throws EtherScanException - Specified by:
txsErc1155in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc1155
@NotNull public @NotNull List<TxErc1155> txsErc1155(@NotNull @NotNull String address) throws EtherScanException - Specified by:
txsErc1155in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc1155
@NotNull public @NotNull List<TxErc1155> txsErc1155(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress, long startBlock, long endBlock) throws EtherScanException Description copied from interface:AccountAPIAll ERC-721 (NFT) token txs for given address- Specified by:
txsErc1155in interfaceAccountAPI- Parameters:
address- get txs forstartBlock- tx from this blockNumberendBlock- tx to this blockNumber- Returns:
- txs for address
- Throws:
EtherScanException- parent exception class
-
txsErc1155
@NotNull public @NotNull List<TxErc1155> txsErc1155(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress, long startBlock) throws EtherScanException - Specified by:
txsErc1155in interfaceAccountAPI- Throws:
EtherScanException
-
txsErc1155
@NotNull public @NotNull List<TxErc1155> txsErc1155(@NotNull @NotNull String address, @NotNull @NotNull String contractAddress) throws EtherScanException - Specified by:
txsErc1155in interfaceAccountAPI- Throws:
EtherScanException
-
blocksMined
@NotNull public @NotNull List<Block> blocksMined(@NotNull @NotNull String address) throws EtherScanException Description copied from interface:AccountAPIAll blocks mined by address- Specified by:
blocksMinedin interfaceAccountAPI- Parameters:
address- address to search for- Returns:
- blocks mined
- Throws:
EtherScanException- parent exception class
-