import { StorageNode, SegmentWithProof, FileInfo } from '../node/index.js'; import { FixedPriceFlow } from '../contracts/flow/FixedPriceFlow.js'; import { RetryOpts } from '../types.js'; import { MerkleTree } from '../file/index.js'; import { ethers } from 'ethers'; import { UploadOption, UploadTask } from './types.js'; import { AbstractFile } from '../file/AbstractFile.js'; import { ShardConfig } from '../common/index.js'; export declare class Uploader { nodes: StorageNode[]; provider: ethers.JsonRpcProvider; flow: FixedPriceFlow; gasPrice: bigint; gasLimit: bigint; constructor(nodes: StorageNode[], providerRpc: string, flow: FixedPriceFlow, gasPrice?: bigint, gasLimit?: bigint); uploadFile(file: AbstractFile, opts: UploadOption, retryOpts?: RetryOpts): Promise<[ { txHash: string; rootHash: string; txSeq: number; }, Error | null ]>; /** * Upload file with automatic splitting into fragments if it exceeds fragmentSize * @param file File to upload * @param fragmentSize Maximum size of each fragment * @param opts Upload options * @param retryOpts Retry options * @returns Promise resolving to arrays of transaction hashes and root hashes */ splitableUpload(file: AbstractFile, opts?: UploadOption, retryOpts?: RetryOpts): Promise<[ { txHashes: string[]; rootHashes: string[]; txSeqs: number[]; }, Error | null ]>; private wrapEncryption; private submitLogEntryNoReceipt; private resolveSubmitter; private findExistingFileInfo; processLogs(receipt: ethers.TransactionReceipt): Promise; waitForReceipt(txHash: string, opts?: RetryOpts): Promise; waitForLogEntry(root: string, finalityRequired: boolean, txSeq: number, useTxSeq: boolean, onProgress?: (message: string) => void): Promise; processTasksInParallel(file: AbstractFile, tree: MerkleTree, tasks: UploadTask[], retryOpts?: RetryOpts): Promise<(number | Error)[]>; nextSgmentIndex(config: ShardConfig, startIndex: number): number; splitTasks(info: FileInfo, tree: MerkleTree, opts?: UploadOption): Promise; getSegment(file: AbstractFile, tree: MerkleTree, segIndex: number): Promise<[boolean, SegmentWithProof | null, Error | null]>; uploadTask(file: AbstractFile, tree: MerkleTree, uploadTask: UploadTask, retryOpts?: RetryOpts): Promise; private isAlreadyUploadedError; private isRetryableError; private getErrorType; } //# sourceMappingURL=Uploader.d.ts.map