import { UploadResult, ProcessedFile } from '../types/submit.types.js'; export interface PinMetadata { name?: string; keyvalues?: Record; } export declare class PinataService { private pinataJwt; private semaphore; private rateLimiter; private requestCount; private lastCountReset; private readonly pinataApiUrl; constructor(pinataJwt: string, _pinataSecretApiKey?: string, maxConcurrentUploads?: number, rateLimitPerMinute?: number); private processUpload; /** * Internal method to upload a single file's content to Pinata v2 API (CID v0). * Includes retry logic. */ private uploadFileInternal; uploadFile(data: Buffer, metadata: PinMetadata): Promise; uploadBatch(files: (ProcessedFile & { binaryData?: Buffer; metadata?: any; })[]): Promise; /** * Track request count and log statistics */ private trackRequest; /** * Recursively get all files in a directory * @param dir - Directory path * @returns Array of file paths */ private getAllFiles; /** * Get relative path from base directory * @param base - Base directory path * @param file - File path * @returns Relative path with only parent directory and filename */ private getRelativePath; /** * Upload an entire directory to Pinata, preserving the directory structure. * @param directoryPath - The absolute path to the directory to upload * @param metadata - Optional metadata for the upload * @returns UploadResult with the CID of the uploaded directory */ uploadDirectory(directoryPath: string, metadata?: PinMetadata): Promise; } //# sourceMappingURL=pinata.service.d.ts.map