import { Logger } from 'common-stuff';
import { TorrentAdapter, TorrentAdapterTorrent, TorrentAdapterFile } from '.';
export interface TorrentClientTorrent extends TorrentAdapterTorrent {
    created: Date;
    updated: Date;
    infoHash: string;
    link: string;
    files: TorrentClientFile[];
}
export interface TorrentClientFile extends TorrentAdapterFile {
    type: string;
}
export interface TorrentClientConfig {
    useDefaultTrackers?: boolean;
    announce?: string[];
    urlList?: string[];
    peerAddresses?: string[];
    ttl: number;
    path: string;
    logger: Logger;
}
export declare class TorrentClient {
    protected config: TorrentClientConfig;
    protected adapter: TorrentAdapter;
    protected torrents: Record<string, TorrentClientTorrent>;
    protected cleanLocked: boolean;
    constructor(config: TorrentClientConfig, adapter: TorrentAdapter);
    static create(config: TorrentClientConfig, adapter?: TorrentAdapter): Promise<TorrentClient>;
    getTorrents(): TorrentClientTorrent[];
    getTorrent(infoHash: string): TorrentClientTorrent | undefined;
    removeTorrent(infoHash: string): Promise<void>;
    addTorrent(link: string): Promise<TorrentClientTorrent>;
    destroy(): Promise<void>;
    protected checkForExpiredTorrents(): Promise<void>;
}
