namespace StellaOps.Provcache; /// /// Repository for evidence chunk storage and retrieval. /// public interface IEvidenceChunkRepository { /// /// Gets all chunks for a proof root. /// /// The proof root to get chunks for. /// Cancellation token. /// Ordered list of chunks. Task> GetChunksAsync( string proofRoot, CancellationToken cancellationToken = default); /// /// Gets a specific chunk by index. /// /// The proof root. /// The chunk index. /// Cancellation token. /// The chunk or null if not found. Task GetChunkAsync( string proofRoot, int chunkIndex, CancellationToken cancellationToken = default); /// /// Gets chunks in a range (for paged retrieval). /// /// The proof root. /// Starting chunk index (inclusive). /// Number of chunks to retrieve. /// Cancellation token. /// Ordered list of chunks in the range. Task> GetChunkRangeAsync( string proofRoot, int startIndex, int count, CancellationToken cancellationToken = default); /// /// Gets the chunk manifest (metadata without blobs). /// /// The proof root. /// Cancellation token. /// The chunk manifest. Task GetManifestAsync( string proofRoot, CancellationToken cancellationToken = default); /// /// Stores multiple chunks for a proof root. /// /// The proof root. /// The chunks to store. /// Cancellation token. Task StoreChunksAsync( string proofRoot, IEnumerable chunks, CancellationToken cancellationToken = default); /// /// Deletes all chunks for a proof root. /// /// The proof root. /// Cancellation token. /// Number of chunks deleted. Task DeleteChunksAsync( string proofRoot, CancellationToken cancellationToken = default); /// /// Gets total chunk count for a proof root. /// /// The proof root. /// Cancellation token. /// Number of chunks. Task GetChunkCountAsync( string proofRoot, CancellationToken cancellationToken = default); /// /// Gets total storage size for a proof root. /// /// The proof root. /// Cancellation token. /// Total bytes stored. Task GetTotalSizeAsync( string proofRoot, CancellationToken cancellationToken = default); }