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; private symmetricKey?; private privateKey?; constructor(nodes: StorageNode[]); withSymmetricKey(key: Uint8Array | string): this; withPrivateKey(key: Uint8Array | string): this; private hasDecryptionKey; /** * 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; /** * 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; downloadFile(root: Hash, filePath: string, proof: boolean): Promise; private downloadFileRaw; downloadFragments(roots: string[], filename: string, withProof?: boolean): Promise; /** * 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 downloadFileRawToBlob; 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; } //# sourceMappingURL=Downloader.d.ts.map