import { BlockWithFullTransactions, BlockWithTransactionHashes, Log, TransactionReceipt } from '@ethercast/model'; import BigNumber from 'bignumber.js'; import EthClient, { BlockParameter, LogFilter, SendTransactionParameters } from './eth-client'; import { Method } from './json-rpc-methods'; import { MethodParameter } from './util'; /** * This client interacts with the JSON RPC via HTTP/HTTPS */ export default class EthHTTPClient implements EthClient { private readonly endpointUrl; private nextRequestId; constructor({ endpointUrl }: { endpointUrl: string; }); eth_getBlockByHash(hash: string, includeFullTransactions: false): Promise; eth_getBlockByHash(hash: string, includeFullTransactions: true): Promise; eth_getBlockByNumber(blockNumber: BlockParameter, includeFullTransactions: false): Promise; eth_getBlockByNumber(blockNumber: BlockParameter, includeFullTransactions: true): Promise; net_version(): Promise; web3_clientVersion: () => Promise; eth_blockNumber: () => Promise; eth_getLogs: (filter: LogFilter) => Promise; eth_getTransactionReceipt(hash: string): Promise; eth_getTransactionReceipts(hashes: string[]): Promise; eth_sendTransaction(params: SendTransactionParameters): Promise; cmd(method: Method, ...params: MethodParameter[]): Promise; private rpc; }