import { Logger, LogLevel } from "./adapters/logger";
import { providers } from "ethers";
import { ChainId } from "./adapters/web3/model";
import { TransfersRepository } from "./adapters/db/transfers-repository";
import { Transfer } from "./model";
export declare enum TransfersHistoryEvent {
    TransfersUpdated = "TransfersUpdated"
}
export declare type TransfersUpdatedEventListenerParams = {
    depositorAddr: string;
    filledTransfersCount: number;
    pendingTransfersCount: number;
};
export declare type TrackableAddress = "all" | string;
export declare type TransfersUpdatedEventListener = (params: TransfersUpdatedEventListenerParams) => void;
export declare type TransfersHistoryClientEventListener = TransfersUpdatedEventListener;
export declare type TransfersHistoryClientParams = {
    chains: {
        chainId: ChainId;
        provider: providers.Provider;
        spokePoolContractAddr: string;
        lowerBoundBlockNumber?: number;
    }[];
    pollingIntervalSeconds?: number;
};
export declare class TransfersHistoryClient {
    private logger;
    private transfersRepository;
    private eventEmitter;
    private web3Providers;
    private spokePoolInstances;
    private eventsQueriers;
    private eventsServices;
    private pollingIntervalSeconds;
    private pollingTimers;
    private fetchingState;
    constructor(config: TransfersHistoryClientParams, logger?: Logger, transfersRepository?: TransfersRepository);
    setLogLevel(level: LogLevel): void;
    startFetchingTransfers(depositorAddr: TrackableAddress): Promise<void>;
    stopFetchingTransfers(depositorAddr: string): void;
    on(event: TransfersHistoryEvent, cb: TransfersHistoryClientEventListener): void;
    private initSpokePoolEventsQueryServices;
    private getEventsForDepositor;
    private insertFundsDepositedEvent;
    private insertFilledRelayEvent;
    private handleSpeedUpDepositEvent;
    getFilledTransfers(depositorAddr: TrackableAddress, limit?: number, offset?: number): Transfer[];
    getPendingTransfers(depositorAddr: TrackableAddress, limit?: number, offset?: number): Transfer[];
}
