import { StorageNode, FileInfo } from '../node/index.js';
import { Hash } from '../types.js';
import { ShardConfig } from '../common/index.js';
export declare class Downloader {
    nodes: StorageNode[];
    shardConfigs: ShardConfig[];
    startSegmentIndex: number;
    endSegmentIndex: number;
    constructor(nodes: StorageNode[]);
    /**
     * Downloads a single file by root hash, writing to `filePath`.
     * Node.js only — uses the `fs` module.
     */
    download(root: Hash, filePath: string, proof?: boolean): Promise<Error | null>;
    /**
     * Downloads multiple files by root hashes, concatenating them into
     * a single file at `filePath`.
     * Node.js only — uses the `fs` module.
     */
    download(roots: Hash[], filePath: string, proof?: boolean): Promise<Error | null>;
    downloadFile(root: Hash, filePath: string, proof: boolean): Promise<Error | null>;
    downloadFragments(roots: string[], filename: string, withProof?: boolean): Promise<Error | null>;
    /**
     * Downloads a single file into a Blob — browser and Node.js safe.
     */
    downloadToBlob(root: Hash, proof?: boolean): Promise<[Blob, Error | null]>;
    /**
     * Downloads multiple files and concatenates them into a single Blob —
     * browser and Node.js safe.
     */
    downloadToBlob(roots: Hash[], proof?: boolean): Promise<[Blob, Error | null]>;
    private downloadFileToBlob;
    private downloadFileHelperToBlob;
    private downloadFragmentsToBlob;
    queryFile(root: string): Promise<[FileInfo | null, Error | null]>;
    downloadTask(info: FileInfo, segmentOffset: number, taskInd: number, numChunks: number, _proof: boolean): Promise<[Uint8Array, Error | null]>;
    downloadFileHelper(filePath: string, info: FileInfo, proof: boolean): Promise<Error | null>;
}
//# sourceMappingURL=Downloader.d.ts.map