import type { TAbiItem } from '../types/TAbi'; import type { TPlatform } from '../models/TPlatform'; import type { IWeb3Client, IWeb3ClientOptions } from './interfaces/IWeb3Client'; import { ClientPool, IRpcConfig, IPoolWeb3Request, WClient } from './ClientPool'; import { ClientEventsStream } from './ClientEventsStream'; import { ClientDebugMethods } from './debug/ClientDebugMethods'; import { TRpcContractCall } from '../rpc/RpcContract'; import { RpcLogFilterOptions, RpcSubscription } from '../rpc/RpcSubscription'; import { TEth } from '../models/TEth'; import { PromiseEvent } from '../class/PromiseEvent'; import { Rpc, RpcTypes } from '../rpc/Rpc'; import { TRpc } from '../rpc/RpcBase'; import { DataLike } from '../utils/types'; import { WalletClient } from './WalletClient'; export declare abstract class Web3Client implements IWeb3Client { TIMEOUT: number; abstract platform: TPlatform; abstract chainId: number; abstract chainToken: string; abstract defaultGasLimit: number; forked?: { platform: TPlatform; block?: number; }; defaultTxType: 0 | 1 | 2; defaultGasPriceRatio: number; minGasPriorityFee: number; blockTimeAvg: number; get network(): TPlatform; options: IWeb3ClientOptions; pool: ClientPool; debug: ClientDebugMethods; wallet: WalletClient; constructor(options: IWeb3ClientOptions); constructor(endpoints: IRpcConfig[]); request(req: TRpc.IRpcAction): Promise; batch(requests: TRpc.IRpcAction[]): Promise; getEventStream(address: TEth.Address, abi: TAbiItem[], event: string): ClientEventsStream; with(fn: (wClient: WClient) => Promise): Promise; getWeb3(options?: IPoolWeb3Request): Promise; getRpc(options?: IPoolWeb3Request): Promise; getNodeURL(options?: IPoolWeb3Request): Promise; subscribe(type: 'logs', options: RpcLogFilterOptions, callback?: (error: Error, log: TEth.Log) => void): Promise>; subscribe(type: 'newHeads' | 'newBlockHeaders', callback?: (error: Error, blockHeader: TEth.Block) => void): Promise>; subscribe(type: 'newPendingTransactions' | 'pendingTransactions', callback?: (error: Error, transactionHash: TEth.Hex) => void): Promise>; readContract(req: TRpcContractCall): Promise; readContractBatch(requests: TRpcContractCall[]): Promise; getBalance(address: TEth.Address, blockNumber?: DataLike): Promise; getBalances(addresses: TEth.Address[], blockNumber?: DataLike): Promise; getTransactionCount(address: TEth.Address, blockNumber?: DataLike): Promise; isSyncing(): Promise; getTransaction(txHash: TEth.Hex, opts?: IPoolWeb3Request): Promise; getTransactions(txHashes: TEth.Hex[], opts?: IPoolWeb3Request): Promise; getTransactionReceipt(txHash: TEth.Hex): Promise; getTransactionReceipts(hashes: TEth.Hex[]): Promise; getTransactionTrace(hash: string): Promise; getBlock(nr: number | "earliest" | "latest" | "pending" | "safe" | "finalized"): Promise; getBlocks(nrs: number[]): Promise[]>; getCode(address: TEth.Address): Promise<`0x${string}`>; /** * Get and extract EIP-7702 Delegator */ getDelegatedAddress(address: TEth.Address): Promise; getPendingTransactions(): Promise; getPoolStatus(): Promise<{ baseFee: bigint; pending: number; queued: number; }>; getStorageAt(address: TEth.Address, position: number | bigint | TEth.Hex, blockNumber?: DataLike): Promise<`0x${string}`>; getStorageAtBatched(address: TEth.Address, slots: (string | number | bigint)[], blockNumber?: DataLike): Promise; getGasPrice(): Promise<{ price: bigint; base?: bigint; priority?: bigint; }>; getGasPriorityFee(): Promise; getGasEstimation(from: TEth.Address, tx: TEth.TxLike): Promise; getAccounts(options?: IPoolWeb3Request): Promise; getChainId(options?: IPoolWeb3Request): Promise; switchChain(params: { chainId: number | string; }, options: IPoolWeb3Request): Promise; sendSignedTransaction(signedTxBuffer: TEth.Hex): PromiseEvent; sign(address: TEth.Address, message: string): Promise; signTypedData(address: TEth.Address, typedData: DataLike): Promise; sendTransaction(data: TEth.TxLike): PromiseEvent; getBlockNumber(): Promise; call(tx: TEth.TxLike): Promise; getBlockNumberCached(): Promise; getPastLogs(filter: RpcTypes.Filter, options?: { /** * For large block ranges and huge amounts of logs, streaming should be used, we pass the loaded logs in batches direct to onProgress * and do not aggregate to a final logs array to prevent memory issues. */ streamed?: boolean; /** * Override the default block range limits for all underlying RPC clients, otherwise the config will be used or * the RPC exception will be parsed. */ blockRangeLimits?: WClient['blockRangeLimits']; /** * When loading in batches the cb will be called with fetched and parsed logs on each iteration */ onProgress?(info: TLogsRangeProgress): void; }): Promise; getNodeInfos(options?: { timeout?: number; calls?: ('net_peerCount' | 'eth_blockNumber' | 'eth_syncing' | 'net_version')[]; }): Promise; getNodeStats(): { success: number; fail: number; ping: number; url: string; }[]; static url(options: IWeb3ClientOptions): any; static url(endpoints: IRpcConfig[], opts?: Partial): any; static url(url: string, opts?: Partial): T; } export type TLogsRangeProgress = { logs: TLogParsed[]; /** @deprecated Use logs for current logs buffer */ paged: TLogParsed[]; latestBlock: number; blocks: { total: number; loaded: number; }; blocksPerSecond: number; timeLeftSeconds: number; completed: boolean; };