UNPKG

routescan-client

Version:

A set of classes to work with evm-compatible blockchain observers

1 lines 46 kB
{"version":3,"sources":["../src/types/chains.ts","../src/data/chains.ts","../src/classes/Transport.ts","../src/types/params.ts","../src/classes/BlockExplorer.ts"],"sourcesContent":["import { BlockExplorerType } from '../types/type';\n\nexport enum Chain {\n NotSpecified = 0,\n\n Ethereum = 1,\n EthereumGoerli = 5,\n EthereumHolesky = 17000,\n EthereumSepolia = 11155111,\n\n Optimism = 10,\n OptimismGoerli = 420,\n OptimismSepolia = 11155420,\n\n FlareMainnet = 14,\n FlareTestnet = 114,\n\n Cronos = 25,\n CronosTestnet = 338,\n\n BinanceSmartChain = 56,\n BinanceSmartChainTestnet = 97,\n\n BinanceOpBnbMainnet = 204,\n BinanceOpBnbTestnet = 5611,\n\n Polygon = 137,\n PolygonMumbai = 80001,\n PolygonAmoy = 80002,\n\n Mint = 185,\n MintSepolia = 1687,\n\n Fantom = 250,\n FantomTestnet = 4002,\n\n Filecoin = 314,\n\n ZkSyncEra = 324,\n\n Mantle = 5000,\n MantleSepolia = 5003,\n\n Base = 8453,\n BaseGoerli = 84531,\n BaseSepolia = 84532,\n\n Arbitrum = 42161,\n ArbitrumNova = 42170,\n ArbitrumGoerli = 421613,\n ArbitrumSepolia = 421614,\n\n AvalancheCChain = 43114,\n AvalancheCChainFuji = 43113,\n\n Celo = 42220,\n CeloAlfajores = 44787,\n\n Linea = 59144,\n LineaGoerli = 59140,\n LineaSepolia = 59141,\n\n Taiko = 167000,\n TaikoHeklaL2 = 167009,\n\n Dexalot = 432204,\n DexalotTestnet = 432201,\n\n Palm = 11297108109,\n PalmTestnet = 11297108099\n}\n\nexport interface ChainItem {\n id: Chain;\n blockExplorerType: BlockExplorerType;\n blockExplorerUrl: string;\n}\n","import { BlockExplorerType } from '../types/type';\nimport { Chain, ChainItem } from '../types/chains';\n\nexport const chains: ChainItem[] = [\n {\n id: Chain.Ethereum,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.etherscan.io/api'\n },\n {\n id: Chain.EthereumHolesky,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-holesky.etherscan.io/api'\n },\n {\n id: Chain.EthereumSepolia,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-sepolia.etherscan.io/api'\n },\n\n {\n id: Chain.Optimism,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-optimistic.etherscan.io/api'\n },\n {\n id: Chain.OptimismSepolia,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-sepolia-optimistic.etherscan.io/api'\n },\n\n {\n id: Chain.BinanceSmartChain,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.bscscan.com/api'\n },\n {\n id: Chain.BinanceSmartChainTestnet,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-testnet.bscscan.com/api'\n },\n\n {\n id: Chain.BinanceOpBnbMainnet,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-opbnb.bscscan.com/api'\n },\n {\n id: Chain.BinanceOpBnbTestnet,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-opbnb-testnet.bscscan.com/api'\n },\n\n {\n id: Chain.Fantom,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.ftmscan.com/api'\n },\n {\n id: Chain.FantomTestnet,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-testnet.ftmscan.com/api'\n },\n\n {\n id: Chain.Polygon,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.polygonscan.com/api'\n },\n {\n id: Chain.PolygonMumbai,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-testnet.polygonscan.com/api'\n },\n {\n id: Chain.PolygonAmoy,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-amoy.polygonscan.com/api'\n },\n\n {\n id: Chain.Base,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.basescan.org/api'\n },\n {\n id: Chain.BaseSepolia,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-sepolia.basescan.org/api'\n },\n\n {\n id: Chain.Arbitrum,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.arbiscan.io/api'\n },\n {\n id: Chain.ArbitrumNova,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-nova.arbiscan.io/api'\n },\n {\n id: Chain.ArbitrumSepolia,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-sepolia.arbiscan.io/api'\n },\n\n {\n id: Chain.AvalancheCChain,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api'\n },\n {\n id: Chain.AvalancheCChainFuji,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/testnet/evm/43113/etherscan/api'\n },\n\n {\n id: Chain.Celo,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.celoscan.io/api'\n },\n {\n id: Chain.CeloAlfajores,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-alfajores.celoscan.io/api'\n },\n\n {\n id: Chain.Linea,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.lineascan.build/api'\n },\n {\n id: Chain.LineaSepolia,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-sepolia.lineascan.build/api'\n },\n\n {\n id: Chain.Taiko,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.taikoscan.io/api'\n },\n {\n id: Chain.TaikoHeklaL2,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-hekla.taikoscan.io/api'\n },\n\n {\n id: Chain.Dexalot,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/mainnet/evm/432204/etherscan/api'\n },\n {\n id: Chain.DexalotTestnet,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/testnet/evm/432201/etherscan/api'\n },\n\n {\n id: Chain.FlareMainnet,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/mainnet/evm/14/etherscan/api'\n },\n {\n id: Chain.FlareTestnet,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/testnet/evm/114/etherscan/api'\n },\n\n {\n id: Chain.Mantle,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api.mantlescan.xyz/api'\n },\n {\n id: Chain.MantleSepolia,\n blockExplorerType: BlockExplorerType.Ethereum,\n blockExplorerUrl: 'https://api-sepolia.mantlescan.xyz/api'\n },\n\n {\n id: Chain.Mint,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/mainnet/evm/185/etherscan/api'\n },\n {\n id: Chain.MintSepolia,\n blockExplorerType: BlockExplorerType.Routescan,\n blockExplorerUrl: 'https://api.routescan.io/v2/network/testnet/evm/1687/etherscan/api'\n }\n];\n","import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nexport interface Transport {\n getApiKey(): string;\n getUrl(): string;\n get<T>(options: any): Promise<AxiosResponse<T>>;\n post<T>(options?: any, params?: any): Promise<AxiosResponse<T>>;\n}\n\nexport class AxiosTransport implements Transport {\n constructor(\n protected readonly url: string,\n protected readonly apiKey: string,\n protected readonly options: AxiosRequestConfig = {}\n ) {}\n\n public async get<T>(options: any): Promise<AxiosResponse<T>> {\n const { apiKey } = this;\n\n const response = await axios.get<T>(this.url, {\n ...this.options,\n headers: {\n 'User-Agent': ''\n },\n params: {\n apikey: apiKey,\n ...options\n }\n });\n\n return response;\n }\n\n public async post<T>(options: any = {}, params: any = {}): Promise<AxiosResponse<T>> {\n const { apiKey } = this;\n\n const response = await axios.post<T>(this.url, options, {\n ...this.options,\n params: {\n apikey: apiKey,\n ...params\n },\n headers: {\n 'User-Agent': ''\n }\n });\n\n return response;\n }\n\n public getApiKey(): string {\n return this.apiKey;\n }\n\n public getUrl(): string {\n return this.url;\n }\n}\n","export enum BlockExplorerModule {\n Account = 'account',\n Block = 'block',\n Contract = 'contract',\n Logs = 'logs',\n Proxy = 'proxy',\n Transaction = 'transaction'\n}\n\nexport enum BlockExplorerAction {\n Balance = 'balance',\n BalanceMulti = 'balancemulti',\n GetBlockByTime = 'getblocknobytime',\n GetBlockCountdown = 'getblockcountdown',\n GetLogs = 'getLogs',\n TokenBalance = 'tokenbalance',\n TxList = 'txlist',\n TokenTxList = 'tokentx',\n TxListInternal = 'txlistinternal',\n eth_blockNumber = 'eth_blockNumber',\n eth_getBlockByNumber = 'eth_getBlockByNumber',\n eth_getUncleByBlockNumberAndIndex = 'eth_getUncleByBlockNumberAndIndex',\n eth_getBlockTransactionCountByNumber = 'eth_getBlockTransactionCountByNumber',\n eth_getTransactionByHash = 'eth_getTransactionByHash',\n eth_getTransactionByBlockNumberAndIndex = 'eth_getTransactionByBlockNumberAndIndex',\n eth_getTransactionCount = 'eth_getTransactionCount',\n eth_sendRawTransaction = 'eth_sendRawTransaction',\n eth_getTransactionReceipt = 'eth_getTransactionReceipt',\n eth_call = 'eth_call',\n eth_getCode = 'eth_getCode',\n eth_getStorageAt = 'eth_getStorageAt',\n eth_gasPrice = 'eth_gasPrice',\n eth_estimateGas = 'eth_estimateGas',\n GetStatus = 'getstatus',\n GetTexReceiptStatus = 'gettxreceiptstatus',\n VerifySourceCode = 'verifysourcecode'\n}\n\nexport enum BlockExplorerTag {\n Earliest = 'earliest',\n Pending = 'pending',\n Latest = 'latest'\n}\n\nexport enum BlockExplorerStatus {\n Success = '1',\n Fail = '0'\n}\n\nexport enum BlockExplorerSort {\n Asc = 'asc',\n Desc = 'desc'\n}\n\nexport enum BlockExplorerClosest {\n Before = 'before',\n After = 'after'\n}\n\nexport enum BlockExplorerTopicOperation {\n And = 'and',\n Or = 'or'\n}\n\nexport enum BlockExplorerCodeFormat {\n SoliditySingleFile = 'solidity-single-file',\n SolidityStandardJsonInput = 'solidity-standard-json-input'\n}\n","import { AxiosRequestConfig } from 'axios';\n\nimport { chains } from '../data/chains';\nimport { BlockExplorerType } from '../types/type';\nimport { Chain, ChainItem } from '../types/chains';\nimport { AxiosTransport, Transport } from './Transport';\nimport { BlockExplorer } from '../interfaces/BlockExplorer';\nimport { BlockExplorerBlockItem, BlockExplorerBlockUncleItem, BlockCountdownTime } from '../types/block';\nimport {\n BlockExplorerAction,\n BlockExplorerClosest,\n BlockExplorerModule,\n BlockExplorerStatus,\n BlockExplorerTag\n} from '../types/params';\nimport {\n BlockExplorerErc20TokenTransferEvent,\n BlockExplorerReceiptStatus,\n BlockExplorerTransaction,\n BlockExplorerTxInternal,\n BlockExplorerTxInternalByTxHash,\n BlockExplorerTxReceipt,\n BlockExplorerTxRpc,\n BlockExplorerTxStatus\n} from '../types/transaction';\nimport {\n BlockExplorerBlockCountdownTimeResponse,\n BlockExplorerBlockIdResponse,\n BlockExplorerContractExecutionStatusResponse,\n BlockExplorerEthBlockByNumberResponse,\n BlockExplorerEthBlockNumberResponse,\n BlockExplorerEthBlockTransactionCountByNumberResponse,\n BlockExplorerEthCallResponse,\n BlockExplorerEthEstimateGasResponse,\n BlockExplorerEthGasPriceResponse,\n BlockExplorerEthGetCodeResponse,\n BlockExplorerEthGetStorageAtResponse,\n BlockExplorerEthGetTransactionReceiptResponse,\n BlockExplorerEthSendRawTransactionResponse,\n BlockExplorerEthTransactionByBlockNumberAndIndexResponse,\n BlockExplorerEthTransactionByHashResponse,\n BlockExplorerEthTransactionCountResponse,\n BlockExplorerEthUncleByBlockNumberAndIndexResponse,\n BlockExplorerInternalTxListByHashResponse,\n BlockExplorerInternalTxListResponse,\n BlockExplorerTransactionReceiptStatusResponse,\n BlockExplorerTxListResponse,\n BlockExplorerVerifySoliditySourceCodeResponse,\n EventLog,\n GetAccountBalanceResponse,\n GetAccountTokenBalanceResponse,\n GetAccountsBalanceResponse,\n GetErc20TokenTransferEventsListResponse,\n GetEventLogsByAddressFilteredResponse,\n GetEventLogsByAddressResponse,\n GetEventLogsByTopicsResponse\n} from '../types/block-explorer';\nimport {\n GetAccountBalanceOptions,\n GetAccountTokenBalanceOptions,\n GetAccountsBalanceOptions,\n GetBlockCountdownTimeOptions,\n GetBlockNumberByTimestampOptions,\n GetInternalTxListByAddressOptions,\n GetNormalTxListByAddressOptions,\n GetEventLogsByAddressFilteredOptions,\n GetEventLogsByTopicsOptions,\n GetEventLogsByAddressOptions,\n GetErc20TokenTransferEventsListOptions,\n GetInternalTxListByTxHashOptions,\n GetEthBlockByNumberOptions,\n GetEthUncleByBlockNumberAndIndexOptions,\n GetEthBlockTransactionCountByNumberOptions,\n GetEthTransactionByHashOptions,\n GetEthTransactionByBlockNumberAndIndexOptions,\n GetEthTransactionCountOptions,\n GetEthSendRawTransactionOptions,\n GetEthTransactionReceiptOptions,\n GetEthCallOptions,\n GetEthCodeOptions,\n GetEthStorageAtOptions,\n GetEthEstimateGasOptions,\n GetContractExecutionStatusOptions,\n VerifySoliditySourceCodeOptions\n} from '../types/options';\n\nconst TX_NO_FOUND_MESSAGE = 'No transactions found';\n\nexport interface BlockExplorerOptions {\n /**\n * @description Chain id\n */\n chain: Chain;\n /**\n * @description API key to work with blockchain explorer\n */\n apiKey?: string;\n /**\n * @description Custom block explorer url\n */\n url?: string;\n /**\n * Axios request config\n */\n axiosOptions?: AxiosRequestConfig;\n}\n\nexport abstract class BlockExplorerCommon implements BlockExplorer {\n protected chain: Chain = Chain.NotSpecified;\n protected transport: Transport;\n\n constructor(options: BlockExplorerOptions) {\n const { apiKey = '', chain, url = '', axiosOptions = {} } = options;\n\n this.chain = chain;\n const transportUrl = url || this.getBlockExplorerUrl(chain);\n this.transport = new AxiosTransport(transportUrl, apiKey, axiosOptions);\n }\n\n public abstract getBlockCountdownTime(options: GetBlockCountdownTimeOptions): Promise<BlockCountdownTime>;\n public abstract getBlockNumberByTimestamp(options: GetBlockNumberByTimestampOptions): Promise<number>;\n public abstract getAccountBalance(options: GetAccountBalanceOptions): Promise<bigint>;\n public abstract getAccountTokenBalance(options: GetAccountTokenBalanceOptions): Promise<bigint>;\n public abstract getAccountsBalances(options: GetAccountsBalanceOptions): Promise<{ account: string; balance: BigInt }[]>;\n public abstract getNormalTxListByAddress(options: GetNormalTxListByAddressOptions): Promise<BlockExplorerTransaction[]>;\n public abstract getInternalTxListByAddress(options: GetInternalTxListByAddressOptions): Promise<BlockExplorerTxInternal[]>;\n public abstract getInternalTxListByTxHash(\n options: GetInternalTxListByTxHashOptions\n ): Promise<BlockExplorerTxInternalByTxHash[]>;\n public abstract getErc20TokenTransferEventsList(\n options: GetErc20TokenTransferEventsListOptions\n ): Promise<BlockExplorerErc20TokenTransferEvent[]>;\n public abstract getEventLogsByAddress(options: GetEventLogsByAddressOptions): Promise<EventLog[]>;\n public abstract getEventLogsByTopics(options: GetEventLogsByTopicsOptions): Promise<EventLog[]>;\n public abstract getEventLogsByAddressFiltered(options: GetEventLogsByAddressFilteredOptions): Promise<EventLog[]>;\n public abstract eth_blockNumber(): Promise<bigint>;\n public abstract eth_getBlockByNumber(options: GetEthBlockByNumberOptions): Promise<BlockExplorerBlockItem>;\n public abstract eth_getUncleByBlockNumberAndIndex(\n options: GetEthUncleByBlockNumberAndIndexOptions\n ): Promise<BlockExplorerBlockUncleItem>;\n public abstract eth_getBlockTransactionCountByNumber(options: GetEthBlockTransactionCountByNumberOptions): Promise<bigint>;\n public abstract eth_getTransactionByHash(options: GetEthTransactionByHashOptions): Promise<BlockExplorerTxRpc>;\n public abstract eth_getTransactionByBlockNumberAndIndex(\n options: GetEthTransactionByBlockNumberAndIndexOptions\n ): Promise<BlockExplorerTxRpc>;\n public abstract eth_getTransactionCount(options: GetEthTransactionCountOptions): Promise<bigint>;\n public abstract eth_sendRawTransaction(options: GetEthSendRawTransactionOptions): Promise<string>;\n public abstract eth_getTransactionReceipt(options: GetEthTransactionReceiptOptions): Promise<BlockExplorerTxReceipt>;\n public abstract eth_call(options: GetEthCallOptions): Promise<string>;\n public abstract eth_getCode(options: GetEthCodeOptions): Promise<string>;\n public abstract eth_getStorageAt(options: GetEthStorageAtOptions): Promise<string>;\n public abstract eth_gasPrice(): Promise<string>;\n public abstract eth_estimateGas(options: GetEthEstimateGasOptions): Promise<string>;\n public abstract getContractExecutionStatus(options: GetContractExecutionStatusOptions): Promise<BlockExplorerTxStatus>;\n public abstract checkTransactionReceiptStatus(options: GetContractExecutionStatusOptions): Promise<BlockExplorerReceiptStatus>;\n public abstract verifySoliditySourceCode(options: VerifySoliditySourceCodeOptions): Promise<string>;\n\n protected abstract getBlockExplorerUrl(chain: Chain): string;\n\n public static build(options: BlockExplorerOptions): BlockExplorer {\n try {\n const { chain } = options;\n const chainOptions = BlockExplorerCommon.getChainOptions(chain);\n\n const { blockExplorerType } = chainOptions;\n switch (blockExplorerType) {\n case BlockExplorerType.Ethereum:\n return new BlockExplorerEthereum(options);\n case BlockExplorerType.Routescan:\n return new BlockExplorerRoutescan(options);\n }\n } catch (e) {\n return new BlockExplorerEthereum(options);\n }\n }\n\n public getChain(): Chain {\n return this.chain;\n }\n\n public getApiKey(): string {\n return this.transport.getApiKey();\n }\n\n public getUrl(): string {\n return this.transport.getUrl();\n }\n\n public static getChainOptions(chain?: Chain): ChainItem {\n if (!chain) {\n throw new Error(`Chain id not specified`);\n }\n\n const chainOptions = chains.find(({ id }) => id === chain);\n if (!chainOptions) {\n throw new Error(`Chain with id of ${chain} is not supported`);\n }\n\n return chainOptions;\n }\n}\n\nexport class BlockExplorerEthereum extends BlockExplorerCommon {\n private checkResponseStatus(response: any) {\n if (response.data.status && response.data.status !== BlockExplorerStatus.Success) {\n throw new Error(JSON.stringify(response.data));\n }\n\n if (response.data?.error?.message) {\n throw new Error(JSON.stringify(response.data));\n }\n }\n\n public async getBlockCountdownTime(options: GetBlockCountdownTimeOptions): Promise<BlockCountdownTime> {\n const response = await this.transport.get<BlockExplorerBlockCountdownTimeResponse>({\n ...options,\n module: BlockExplorerModule.Block,\n action: BlockExplorerAction.GetBlockCountdown\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getBlockNumberByTimestamp(options: GetBlockNumberByTimestampOptions) {\n const { closest = BlockExplorerClosest.After, timestamp } = options;\n\n const response = await this.transport.get<BlockExplorerBlockIdResponse>({\n module: BlockExplorerModule.Block,\n action: BlockExplorerAction.GetBlockByTime,\n closest,\n timestamp\n });\n\n this.checkResponseStatus(response);\n return Number(response.data.result);\n }\n\n public async getAccountBalance(options: GetAccountBalanceOptions) {\n const { address, tag = BlockExplorerTag.Latest } = options;\n\n const response = await this.transport.get<GetAccountBalanceResponse>({\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.Balance,\n address,\n tag\n });\n\n this.checkResponseStatus(response);\n return BigInt(response.data.result);\n }\n\n public async getAccountsBalances(options: GetAccountsBalanceOptions) {\n const { address, tag = BlockExplorerTag.Latest } = options;\n\n const response = await this.transport.get<GetAccountsBalanceResponse>({\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.BalanceMulti,\n address,\n tag\n });\n\n this.checkResponseStatus(response);\n\n return response.data.result.map(({ account, balance }) => ({\n account,\n balance: BigInt(balance)\n }));\n }\n\n public async getNormalTxListByAddress(options: GetNormalTxListByAddressOptions) {\n const response = await this.transport.get<BlockExplorerTxListResponse>({\n ...options,\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.TxList\n });\n\n if (response.data.message === TX_NO_FOUND_MESSAGE) {\n return [];\n }\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getInternalTxListByAddress(options: GetNormalTxListByAddressOptions): Promise<BlockExplorerTxInternal[]> {\n const response = await this.transport.get<BlockExplorerInternalTxListResponse>({\n ...options,\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.TxListInternal\n });\n\n if (response.data.message === TX_NO_FOUND_MESSAGE) {\n return [];\n }\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getInternalTxListByTxHash(options: GetInternalTxListByTxHashOptions): Promise<BlockExplorerTxInternalByTxHash[]> {\n const response = await this.transport.get<BlockExplorerInternalTxListByHashResponse>({\n ...options,\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.TxListInternal\n });\n\n if (response.data.message === TX_NO_FOUND_MESSAGE) {\n return [];\n }\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getErc20TokenTransferEventsList(\n options: GetErc20TokenTransferEventsListOptions\n ): Promise<BlockExplorerErc20TokenTransferEvent[]> {\n const response = await this.transport.get<GetErc20TokenTransferEventsListResponse>({\n ...options,\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.TokenTxList\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getAccountTokenBalance(options: GetAccountTokenBalanceOptions) {\n const { address, contractAddress, tag = BlockExplorerTag.Latest } = options;\n\n const response = await this.transport.get<GetAccountTokenBalanceResponse>({\n module: BlockExplorerModule.Account,\n action: BlockExplorerAction.TokenBalance,\n address,\n contractaddress: contractAddress,\n tag\n });\n\n this.checkResponseStatus(response);\n return BigInt(response.data.result);\n }\n\n public async getEventLogsByAddress(options: GetEventLogsByAddressOptions): Promise<EventLog[]> {\n const response = await this.transport.get<GetEventLogsByAddressResponse>({\n ...options,\n module: BlockExplorerModule.Logs,\n action: BlockExplorerAction.GetLogs\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getEventLogsByTopics(options: GetEventLogsByTopicsOptions) {\n const response = await this.transport.get<GetEventLogsByTopicsResponse>({\n ...options,\n module: BlockExplorerModule.Logs,\n action: BlockExplorerAction.GetLogs\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async getEventLogsByAddressFiltered(options: GetEventLogsByAddressFilteredOptions) {\n const response = await this.transport.get<GetEventLogsByAddressFilteredResponse>({\n ...options,\n module: BlockExplorerModule.Logs,\n action: BlockExplorerAction.GetLogs\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n protected getBlockExplorerUrl(chain: Chain = this.chain): string {\n const chainOptions = BlockExplorerCommon.getChainOptions(chain);\n const { blockExplorerUrl } = chainOptions;\n return blockExplorerUrl;\n }\n\n /**\n * Contracts\n * https://routescan.io/documentation/etherscan-compatibility/contracts\n */\n\n public async verifySoliditySourceCode(options: VerifySoliditySourceCodeOptions): Promise<string> {\n const response = await this.transport.post<BlockExplorerVerifySoliditySourceCodeResponse>(\n {\n ...options\n },\n {\n module: BlockExplorerModule.Contract,\n action: BlockExplorerAction.VerifySourceCode\n }\n );\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n /**\n * Geth/Parity Proxy\n * https://docs.etherscan.io/api-endpoints/geth-parity-proxy\n */\n\n public async eth_blockNumber(): Promise<bigint> {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthBlockNumberResponse>({\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_blockNumber\n });\n\n this.checkResponseStatus(response);\n return BigInt(response.data.result as string);\n }\n\n public async eth_getBlockByNumber(options: GetEthBlockByNumberOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthBlockByNumberResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getBlockByNumber\n });\n\n this.checkResponseStatus(response);\n return response.data.result as BlockExplorerBlockItem;\n }\n\n public async eth_getUncleByBlockNumberAndIndex(options: GetEthUncleByBlockNumberAndIndexOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthUncleByBlockNumberAndIndexResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getUncleByBlockNumberAndIndex\n });\n\n this.checkResponseStatus(response);\n return response.data.result as BlockExplorerBlockUncleItem;\n }\n\n public async eth_getBlockTransactionCountByNumber(options: GetEthBlockTransactionCountByNumberOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthBlockTransactionCountByNumberResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getBlockTransactionCountByNumber\n });\n\n this.checkResponseStatus(response);\n return BigInt(response.data.result as string);\n }\n\n public async eth_getTransactionByHash(options: GetEthTransactionByHashOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthTransactionByHashResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getTransactionByHash\n });\n\n this.checkResponseStatus(response);\n return response.data.result as BlockExplorerTxRpc;\n }\n\n public async eth_getTransactionByBlockNumberAndIndex(options: GetEthTransactionByBlockNumberAndIndexOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthTransactionByBlockNumberAndIndexResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getTransactionByBlockNumberAndIndex\n });\n\n this.checkResponseStatus(response);\n return response.data.result as BlockExplorerTxRpc;\n }\n\n public async eth_getTransactionCount(options: GetEthTransactionCountOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthTransactionCountResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getTransactionCount\n });\n\n this.checkResponseStatus(response);\n return BigInt(response.data.result as string);\n }\n\n public async eth_sendRawTransaction(options: GetEthSendRawTransactionOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthSendRawTransactionResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_sendRawTransaction\n });\n\n this.checkResponseStatus(response);\n return response.data.result as string;\n }\n\n public async eth_getTransactionReceipt(options: GetEthTransactionReceiptOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthGetTransactionReceiptResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getTransactionReceipt\n });\n\n this.checkResponseStatus(response);\n return response.data.result as BlockExplorerTxReceipt;\n }\n\n public async eth_call(options: GetEthCallOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthCallResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_call\n });\n\n this.checkResponseStatus(response);\n return response.data.result as string;\n }\n\n public async eth_getCode(options: GetEthCodeOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthGetCodeResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getCode\n });\n\n this.checkResponseStatus(response);\n return response.data.result as string;\n }\n\n public async eth_getStorageAt(options: GetEthStorageAtOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthGetStorageAtResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_getStorageAt\n });\n\n this.checkResponseStatus(response);\n return response.data.result as string;\n }\n\n public async eth_gasPrice(): Promise<string> {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthGasPriceResponse>({\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_gasPrice\n });\n\n this.checkResponseStatus(response);\n return response.data.result as string;\n }\n\n public async eth_estimateGas(options: GetEthEstimateGasOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerEthEstimateGasResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Proxy,\n action: BlockExplorerAction.eth_estimateGas\n });\n\n this.checkResponseStatus(response);\n return response.data.result as string;\n }\n\n public async getContractExecutionStatus(options: GetContractExecutionStatusOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerContractExecutionStatusResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Transaction,\n action: BlockExplorerAction.GetStatus\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n\n public async checkTransactionReceiptStatus(options: GetContractExecutionStatusOptions) {\n const { chain: chainid } = this;\n\n const response = await this.transport.get<BlockExplorerTransactionReceiptStatusResponse>({\n ...options,\n chainid,\n module: BlockExplorerModule.Transaction,\n action: BlockExplorerAction.GetTexReceiptStatus\n });\n\n this.checkResponseStatus(response);\n return response.data.result;\n }\n}\n\nexport class BlockExplorerRoutescan extends BlockExplorerEthereum {}\n"],"mappings":";AAEO,IAAK,QAAL,kBAAKA,WAAL;AACL,EAAAA,cAAA,kBAAe,KAAf;AAEA,EAAAA,cAAA,cAAW,KAAX;AACA,EAAAA,cAAA,oBAAiB,KAAjB;AACA,EAAAA,cAAA,qBAAkB,QAAlB;AACA,EAAAA,cAAA,qBAAkB,YAAlB;AAEA,EAAAA,cAAA,cAAW,MAAX;AACA,EAAAA,cAAA,oBAAiB,OAAjB;AACA,EAAAA,cAAA,qBAAkB,YAAlB;AAEA,EAAAA,cAAA,kBAAe,MAAf;AACA,EAAAA,cAAA,kBAAe,OAAf;AAEA,EAAAA,cAAA,YAAS,MAAT;AACA,EAAAA,cAAA,mBAAgB,OAAhB;AAEA,EAAAA,cAAA,uBAAoB,MAApB;AACA,EAAAA,cAAA,8BAA2B,MAA3B;AAEA,EAAAA,cAAA,yBAAsB,OAAtB;AACA,EAAAA,cAAA,yBAAsB,QAAtB;AAEA,EAAAA,cAAA,aAAU,OAAV;AACA,EAAAA,cAAA,mBAAgB,SAAhB;AACA,EAAAA,cAAA,iBAAc,SAAd;AAEA,EAAAA,cAAA,UAAO,OAAP;AACA,EAAAA,cAAA,iBAAc,QAAd;AAEA,EAAAA,c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SAAS,KAAK;AAAA,EACvB;AAAA,EAEA,MAAa,gBAAgB,SAAmC;AAC9D,UAAM,EAAE,OAAO,QAAQ,IAAI;AAE3B,UAAM,WAAW,MAAM,KAAK,UAAU,IAAyC;AAAA,MAC7E,GAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,SAAK,oBAAoB,QAAQ;AACjC,WAAO,SAAS,KAAK;AAAA,EACvB;AAAA,EAEA,MAAa,2BAA2B,SAA4C;AAClF,UAAM,EAAE,OAAO,QAAQ,IAAI;AAE3B,UAAM,WAAW,MAAM,KAAK,UAAU,IAAkD;AAAA,MACtF,GAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,SAAK,oBAAoB,QAAQ;AACjC,WAAO,SAAS,KAAK;AAAA,EACvB;AAAA,EAEA,MAAa,8BAA8B,SAA4C;AACrF,UAAM,EAAE,OAAO,QAAQ,IAAI;AAE3B,UAAM,WAAW,MAAM,KAAK,UAAU,IAAmD;AAAA,MACvF,GAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,SAAK,oBAAoB,QAAQ;AACjC,WAAO,SAAS,KAAK;AAAA,EACvB;AACF;AAEO,IAAM,yBAAN,cAAqC,sBAAsB;AAAC;","names":["Chain","BlockExplorerModule","BlockExplorerAction","BlockExplorerTag","BlockExplorerStatus","BlockExplorerSort","BlockExplorerClosest","BlockExplorerTopicOperation","BlockExplorerCodeFormat"]}