import { WorkerPool } from 'workerpool'; /** * Handles validation of input before processing it for C2PA metadata * * @public */ export declare class Validator { #private; static readonly VALID_MIME_TYPES: string[]; static readonly DEFAULT_DETECTION_LENGTH = 65535; constructor(pool: WorkerPool, detectionLength: number | undefined); /** * Sanitizes mime type strings for proper file type checking * * @remarks * We need to do this since some Content-Types can coming in such as `image/jpeg; charset=utf-8`. * * @param type - The mime type of the asset */ static sanitizeMimeType(type: string): string; /** * Checks if the asset has a mime type that is compatible with C2PA * * @param type - The mime type of the asset to check */ static isValidMimeType(type: string): boolean; /** * Scans an individual binary chunk for a C2PA metadata marker * * @param chunk - the chunk to check for the metadata marker * @param shouldTransfer - `true` to pass this chunk as a transferable object */ scanChunk(chunk: ArrayBuffer, shouldTransfer?: boolean): Promise; /** * Scans a buffer/Blob for a C2PA metadata marker * * @remarks * This will automatically handle both a `ArrayBuffer` or a `Blob` as input * and automatically decide if it should be passed as a transferable object or not. * It will then pass it to `scanChunk` for the actual processing. * * @param input - The buffer/blob to scan */ scanInput(input: ArrayBuffer | Blob): Promise; } //# sourceMappingURL=Validator.d.ts.map