import { type FeeMarket1559Tx as FeeMarketEIP1559Transaction, type TypedTransaction } from "./tx.js"; import { Account, Address, type PrefixedHexString } from "./util.js"; export interface ImpersonatedTx extends FeeMarketEIP1559Transaction { isImpersonated: true; } export type TxPoolTransaction = TypedTransaction | ImpersonatedTx; export type TxPoolBlock = { transactions: TxPoolTransaction[]; header: { baseFeePerGas?: bigint; gasLimit: bigint; }; }; export interface TxPoolVm { blockchain: { getCanonicalHeadBlock(): Promise; }; stateManager: { getAccount(address: Address): Promise; }; deepCopy(): Promise; } export interface TxPoolOptions { vm: TxPoolVm; maxSize?: number; maxPerSender?: number; } export type TxPoolObject = { tx: TxPoolTransaction; hash: UnprefixedHash; added: number; error?: Error; }; export type TxPoolAddResult = { error: null; hash: PrefixedHexString; } | { error: string; hash: PrefixedHexString; }; type UnprefixedAddress = string; type UnprefixedHash = string; export declare class TxPool { private vm; private maxSize; private maxPerSender; private opened; running: boolean; private _cleanupInterval; private _logInterval; pool: Map; txsInNonceOrder: Map; txsByHash: Map; txsByNonce: Map>; txsInPool: number; private handled; BLOCKS_BEFORE_TARGET_HEIGHT_ACTIVATION: number; POOLED_STORAGE_TIME_LIMIT: number; HANDLED_CLEANUP_TIME_LIMIT: number; constructor({ vm, maxSize, maxPerSender }: TxPoolOptions); deepCopy(opt: TxPoolOptions): TxPool; open(): boolean; start(): boolean; private validateTxGasBump; private validate; addUnverified(tx: TxPoolTransaction): Promise; add(tx: TxPoolTransaction, requireSignature?: boolean, skipBalance?: boolean): Promise; getByHash(txHashes: string): TxPoolTransaction | null; getByHash(txHashes: ReadonlyArray): TxPoolTransaction[]; removeByHash(txHash: string): void; removeNewBlockTxs(newBlocks: TxPoolBlock[]): void; cleanup(): void; private normalizedGasPrice; private txGasPrice; getBySenderAddress(address: Address): Promise; getPendingTransactions(): Promise; getTransactionStatus(txHash: string): Promise<"pending" | "mined" | "unknown">; private events; on(event: "txadded" | "txremoved", callback: (hash: string) => void): () => void; private fireEvent; onBlockAdded(block: TxPoolBlock): Promise; onChainReorganization(removedBlocks: TxPoolBlock[], addedBlocks: TxPoolBlock[]): Promise; txsByPriceAndNonce({ baseFee, allowedBlobs }?: { baseFee?: bigint; allowedBlobs?: number; }): Promise; stop(): boolean; close(): void; clear(): Promise; logStats(): void; _logPoolStats(): void; } export {}; //# sourceMappingURL=txpool.d.ts.map