import { type SenderManager } from "./index.js"; import type { EventManager, GasPriceManager } from "../handlers/index.js"; import type { InterfaceReputationManager, Mempool, StatusManager } from "../mempool/index.js"; import type { HexData32, SubmittedBundleInfo, UserOpInfo } from "../types/index.js"; import { type Metrics } from "../utils/index.js"; import { type Address, type Hex } from "viem"; import type { AltoConfig } from "../createConfig.js"; import { type BundleStatus } from "./getBundleStatus.js"; export declare class BundleManager { private readonly reputationManager; private readonly config; private readonly mempool; private readonly statusManager; private readonly logger; private readonly metrics; private readonly eventManager; private readonly senderManager; private cachedLatestBlock; private readonly receiptCache; private readonly gasPriceManager; private readonly pendingBundles; constructor({ config, mempool, statusManager, metrics, reputationManager, eventManager, senderManager, gasPriceManager }: { config: AltoConfig; mempool: Mempool; statusManager: StatusManager; metrics: Metrics; reputationManager: InterfaceReputationManager; eventManager: EventManager; senderManager: SenderManager; gasPriceManager: GasPriceManager; }); getPendingBundles(): SubmittedBundleInfo[]; getBundleStatuses(pendingBundles: SubmittedBundleInfo[]): Promise; processIncludedBundle({ submittedBundle, bundleReceipt, blockReceivedTimestamp }: { submittedBundle: SubmittedBundleInfo; bundleReceipt: BundleStatus<"included">; blockReceivedTimestamp: number; }): Promise; /** * The reasons for reverted bundles are: * 1. complete bundle was frontrun * - cancel bundle * - need to wait for one more block to see if the userOp was frontrun * * 2. partial bundle was frontrun * - filter out non-frontrun userOps and resubmit * - need to wait for one more block to see if the userOp was frontrun * * 3. partial bundle was reverted * - filter out reverted userOps and resubmit * * 4. full bundle was reverted * - cancel bundle * - need to wait for one more block to see if the userOp was frontrun */ processRevertedBundle({ submittedBundle, blockReceivedTimestamp, bundleReceipt }: { submittedBundle: SubmittedBundleInfo; blockReceivedTimestamp: number; bundleReceipt: BundleStatus<"reverted">; }): Promise; processInternalErrorBundle({ submittedBundle, error }: { submittedBundle: SubmittedBundleInfo; error: string; }): Promise; trackBundle(submittedBundle: SubmittedBundleInfo): void; getLatestBlockWithCache(): Promise; private freeSubmittedBundle; stopTrackingBundle(submittedBundle: SubmittedBundleInfo): void; private processIncludedUserOps; getUserOpStatus({ userOpInfo, entryPoint, bundlerTxs, blockReceivedTimestamp, blockWaitCount }: { userOpInfo: UserOpInfo; entryPoint: Address; bundlerTxs: Hex[]; blockReceivedTimestamp: number; blockWaitCount?: number; }): Promise<"not_found" | "included" | "frontran">; getUserOpReceipt(userOpHash: HexData32): Promise<{ sender: `0x${string}`; userOpHash: `0x${string}`; nonce: bigint; success: boolean; actualGasCost: bigint; actualGasUsed: bigint; entryPoint: `0x${string}`; logs: { address: `0x${string}`; data: `0x${string}`; transactionHash: `0x${string}`; logIndex: bigint; transactionIndex: bigint; blockHash: `0x${string}`; blockNumber: bigint; topics: `0x${string}`[]; }[]; receipt: { gasUsed: bigint; to: `0x${string}` | null; status: bigint | null; transactionHash: `0x${string}`; contractAddress: `0x${string}` | null; transactionIndex: bigint; blockHash: `0x${string}`; blockNumber: bigint; from: `0x${string}`; cumulativeGasUsed: bigint; logs: { address: `0x${string}`; data: `0x${string}`; transactionHash: `0x${string}`; logIndex: bigint; transactionIndex: bigint; blockHash: `0x${string}`; blockNumber: bigint; topics: `0x${string}`[]; }[]; logsBloom: string; effectiveGasPrice?: bigint | null | undefined; }; paymaster?: `0x${string}` | undefined; reason?: `0x${string}` | undefined; } | null>; private checkAccountDeployment; } //# sourceMappingURL=bundleManager.d.ts.map