import { Asset, Chain } from '@xchainjs/xchain-util'; import { BigNumberish } from 'ethers'; import { Tx } from '../../types'; import { ETHTransactionInfoV2, GasOracleResponseV2, TokenBalanceParamV2, TokenTransactionInfoV2, TransactionHistoryParamV2 } from './etherscan-api-types-v2'; /** * Filter self txs * * @returns {T[]} * **/ export declare const filterSelfTxs: (txs: T[]) => T[]; /** * Check if the symbol is valid. * * @param {string|null|undefined} symbol * @returns {boolean} `true` or `false`. */ export declare const validateSymbol: (symbol?: string | null) => boolean; /** * Get transactions from ETH transaction * * @param {ETHTransactionInfo} tx * @returns {Tx} The parsed transaction. */ export declare const getTxFromEthTransaction: (tx: ETHTransactionInfoV2, gasAsset: Asset, decimals: number) => Tx; /** * Get transactions from token tx * * @param {TokenTransactionInfo} tx * @returns {Tx|null} The parsed transaction. */ export declare const getTxFromTokenTransaction: (tx: TokenTransactionInfoV2, chain: Chain, decimals: number) => Tx | null; /** * SafeGasPrice, ProposeGasPrice And FastGasPrice returned in string-Gwei * * @see https://etherscan.io/apis#gastracker * * @param {string} baseUrl The etherscan node url. * @param {number} chainId The chain id identifier https://docs.etherscan.io/etherscan-v2/getting-started/supported-chains. * @param {string} apiKey The etherscan API key. (optional) * @returns {GasOracleResponse} LastBlock, SafeGasPrice, ProposeGasPrice, FastGasPrice */ export declare const getGasOracle: (baseUrl: string, chainId: number, apiKey?: string) => Promise; /** * Get token balance * * @see https://etherscan.io/apis#tokens * * @param {string} baseUrl The etherscan node url. * @param {string} address The address. * @param {string} assetAddress The token contract address. * @param {number} chainId The chain id identifier https://docs.etherscan.io/etherscan-v2/getting-started/supported-chains. * @param {string} apiKey The etherscan API key. (optional) * @returns {BigNumberish} The token balance */ export declare const getTokenBalance: ({ baseUrl, address, assetAddress, chainId, apiKey, }: TokenBalanceParamV2 & { baseUrl: string; apiKey?: string; }) => Promise; /** * Get ETH transaction history * * @see https://etherscan.io/apis#accounts * * @param {string} baseUrl The etherscan node url. * @param {string} address The address. * @param {TransactionHistoryParam} params The search options. * @param {number} chainId The chain id identifier https://docs.etherscan.io/etherscan-v2/getting-started/supported-chains. * @param {string} apiKey The etherscan API key. (optional) * @returns {ETHTransactionInfo[]} The ETH transaction history */ export declare const getGasAssetTransactionHistory: ({ gasAsset, gasDecimals, baseUrl, address, page, offset, startblock, endblock, chainId, apiKey, }: TransactionHistoryParamV2 & { gasAsset: Asset; gasDecimals: number; baseUrl: string; apiKey?: string; }) => Promise; /** * Get token transaction history * * @see https://etherscan.io/apis#accounts * * @param {string} baseUrl The etherscan node url. * @param {string} address The address. * @param {TransactionHistoryParam} params The search options. * @param {string} apiKey The etherscan API key. (optional) * @returns {Tx[]} The token transaction history */ export declare const getTokenTransactionHistory: ({ gasDecimals, baseUrl, address, assetAddress, page, offset, startblock, endblock, chainId, apiKey, chain, }: TransactionHistoryParamV2 & { gasDecimals: number; chain: Chain; baseUrl: string; apiKey?: string; }) => Promise;