import BlockDataType from './enumerations/blockDataType'; import { BlockSize } from './enumerations/blockSize'; import BlockType from './enumerations/blockType'; import { IBaseBlockMetadata } from './interfaces/blocks/metadata/blockMetadata'; /** * BlockMetadata provides utility functions for working with block metadata. * These functions ensure consistent metadata handling across the system. */ export declare class BlockMetadata implements IBaseBlockMetadata { private readonly _size; private readonly _type; private readonly _dataType; private readonly _lengthWithoutPadding; private readonly _dateCreated; constructor(size: BlockSize, type: BlockType, dataType: BlockDataType, lengthWithoutPadding: number, dateCreated?: Date); /** * Convert metadata to JSON string * @returns JSON representation of metadata */ toJson(): string; /** * Parse metadata from JSON representation using type guards. * Handles: * 1. Type validation with descriptive errors * 2. Type conversion * 3. Optional fields * 4. Custom attributes * 5. Robust date parsing with timezone support * * @param json - JSON string containing metadata * @returns Parsed BlockMetadata instance * @throws JsonValidationError if JSON is invalid or required fields are missing/invalid */ static fromJson(json: string): BlockMetadata; static fromJsonAdditionalData>(data: any): T; get size(): BlockSize; get type(): BlockType; get dataType(): BlockDataType; get lengthWithoutPadding(): number; get dateCreated(): Date; } //# sourceMappingURL=blockMetadata.d.ts.map