import type { MempoolTxMetadata } from '../../../blockchain-provider/providers/interfaces';
/**
 * Maps tx hash → internal numeric id (memory-efficient).
 * Also provides reverse lookup: id → hash.
 */
export declare class TxHashIndex {
    private hashToId;
    private idToHash;
    private nextId;
    add(hash: string): number;
    getByHash(hash: string): number | undefined;
    getById(id: number): string | undefined;
    has(hash: string): boolean;
    hasId(id: number): boolean;
    remove(hash: string): void;
    size(): number;
    clear(): void;
    __getMap(): Map<number, string>;
    __setMap(m: Map<number, string>): void;
}
/**
 * Maps internal id → MempoolTxMetadata.
 * Stores only metadata (no input/calldata).
 */
export declare class MetadataStore {
    private store;
    get(id: number): MempoolTxMetadata | undefined;
    set(id: number, meta: MempoolTxMetadata): void;
    has(id: number): boolean;
    remove(id: number): void;
    size(): number;
    __getMap(): Map<number, MempoolTxMetadata>;
    __setMap(m: Map<number, MempoolTxMetadata>): void;
}
/**
 * Tracks which ids have been loaded (metadata fetched).
 * Stores: id → { timestamp, gasPrice, providerName }
 */
export interface LoadEntry {
    timestamp: number;
    effectiveGasPrice: string;
    providerName?: string;
}
export declare class LoadTracker {
    private store;
    add(id: number, entry: LoadEntry): void;
    has(id: number): boolean;
    get(id: number): LoadEntry | undefined;
    remove(id: number): void;
    count(): number;
    __getMap(): Map<number, LoadEntry>;
    __setMap(m: Map<number, LoadEntry>): void;
}
/**
 * Maps providerName → Set<internal id> for per-provider tracking.
 */
export declare class ProviderTxMap {
    private store;
    add(provider: string, id: number): void;
    get(provider: string): Set<number> | undefined;
    providers(): string[];
    remove(provider: string, id: number): void;
    removeId(id: number): void;
    __getMap(): Map<string, Set<number>>;
    __setMap(m: Map<string, Set<number>>): void;
}
/**
 * Nonce-based index for replacement detection.
 * Maps "${from}:${nonce}" → internal id.
 * EVM-specific — no equivalent in bitcoin.
 */
export declare class NonceIndex {
    private store;
    key(from: string, nonce: number): string;
    set(from: string, nonce: number, id: number): void;
    get(from: string, nonce: number): number | undefined;
    remove(from: string, nonce: number): void;
    removeById(id: number): void;
    __getMap(): Map<string, number>;
    __setMap(m: Map<string, number>): void;
}
/**
 * Adaptive batch sizer: adjusts per-provider fetch batch size
 * based on timing ratio (same algorithm as bitcoin).
 */
export declare class BatchSizer {
    private sizes;
    private readonly defaultSize;
    private readonly minSize;
    private readonly maxSize;
    constructor(defaultSize?: number, minSize?: number, maxSize?: number);
    get(provider: string): number;
    /** ratio > 1 → current was slower → shrink. ratio < 1 → faster → grow. */
    tune(provider: string, ratio: number): void;
    clear(): void;
}
