import * as plugins from './smartnetwork.plugins.js';
export interface SpeedOptions {
    parallelStreams?: number;
    duration?: number;
}
export declare class CloudflareSpeed {
    private opts;
    constructor(opts?: SpeedOptions);
    speedTest(): Promise<{
        ip: string;
        serverLocation: {
            shortId: string;
            name: string;
            availableLocations: {
                [key: string]: string;
            };
        };
        downloadSpeed: string;
        uploadSpeed: string;
        maxTime: number;
        minTime: number;
        averageTime: number;
        medianTime: number;
        jitter: number;
    }>;
    measureLatency(): Promise<{
        maxTime: number;
        minTime: number;
        averageTime: number;
        medianTime: number;
        jitter: number;
    }>;
    measureDownload(bytes: number, iterations: number): Promise<number[]>;
    measureUpload(bytes: number, iterations: number): Promise<number[]>;
    measureSpeed(bytes: number, duration: number): Promise<number>;
    fetchServerLocations(): Promise<{
        [key: string]: string;
    }>;
    get(hostname: string, path: string): Promise<string>;
    download(bytes: number): Promise<number[]>;
    upload(bytes: number): Promise<number[]>;
    request(options: plugins.https.RequestOptions, data?: string): Promise<number[]>;
    /**
     * Fetch Cloudflare's trace endpoint and parse key=value lines to a record.
     */
    fetchCfCdnCgiTrace(): Promise<Record<string, string>>;
}
