/** * Block Format Detection Service * * This service provides functionality for detecting and validating block formats * based on magic bytes, version, and CRC8 integrity checks. * * @module services/blockFormatService */ import { StructuredBlockType } from '../constants'; import { BlockType } from '../enumerations/blockType'; /** * Result of block format detection */ export interface BlockFormatResult { /** * Whether the block format is valid */ isValid: boolean; /** * The detected block type */ blockType: BlockType | StructuredBlockType; /** * The header version (for structured blocks) */ version: number; /** * Error message if format is invalid */ error?: string; /** * Whether this is a structured block (has 0xBC prefix) */ isStructured?: boolean; /** * Whether this appears to be encrypted data (has 0x04 ECIES magic) */ isEncrypted?: boolean; } export declare function detectBlockFormat(data: Uint8Array, creatorIdLength?: number): BlockFormatResult; /** * Check whether raw CBL data has a TarballCBL structured block header. * * This is a lightweight check that inspects only the first two bytes: * byte 0 = 0xBC (magic prefix) * byte 1 = StructuredBlockType.TarballCBL (0x07) * * @param data - Raw block data * @returns `true` if the data starts with a TarballCBL header * * @see Requirement 6.2 — block detection logic recognises TarballCBL */ export declare function isTarballCblData(data: Uint8Array): boolean; //# sourceMappingURL=blockFormatService.d.ts.map