import { ECIESService, PlatformID } from '@digitaldefiance/ecies-lib'; import { IBlockCapacityParams, IBlockCapacityResult } from '../interfaces/blockCapacity'; import { CBLService } from '../services/cblService'; /** * Service for calculating block capacities based on block type and parameters */ export declare class BlockCapacityCalculator { private readonly cblService; private readonly eciesService; constructor(cblService: CBLService, eciesService: ECIESService); /** * Calculate the capacity for a block with the given parameters * * @param params - The block capacity parameters * @returns The calculated block capacity result * @throws {EnhancedValidationError} If block size, block type, or encryption type is invalid * @throws {BlockCapacityError} If capacity calculation fails or CBL data is invalid * * @see Requirements 5.1, 5.2, 5.3, 5.5, 6.1, 6.2, 6.5, 7.2, 7.3, 12.3, 12.4, 12.5, 12.6 */ calculateCapacity(params: IBlockCapacityParams): IBlockCapacityResult; /** * Calculate overhead for a specific block type using exhaustive switch. * * @param blockType - The block type to calculate overhead for * @param params - The block capacity parameters * @param details - The overhead breakdown to update * @returns Object indicating whether capacity should be aligned to tuple size * @throws {BlockCapacityError} If block type requires CBL data but none provided * * @see Requirements 6.1, 6.2, 6.5 */ private calculateBlockTypeOverhead; /** * Calculate encryption overhead based on encryption type and block type. * * @param params - The block capacity parameters * @param details - The overhead breakdown to update * @throws {BlockCapacityError} If recipient count is invalid for multi-recipient encryption * * @see Requirements 5.3, 12.5, 12.6 */ private calculateEncryptionOverhead; /** * Validate CBL data (wraps cblService calls with error context). * * @param cbl - The CBL data containing fileName and mimeType * @throws {BlockCapacityError} If CBL validation fails * * @see Requirements 7.2, 7.3, 12.7 */ private validateCBLData; /** * Calculate the base CBL header size dynamically based on the provider */ private calculateCBLBaseHeaderSize; /** * Calculate extended CBL overhead based on filename and mimetype */ private calculateExtendedCBLOverhead; } //# sourceMappingURL=blockCapacity.service.d.ts.map