/** * @fileoverview ACL Document serialization/deserialization helpers * * Converts IAclDocument instances to/from JSON strings, handling: * - Uint8Array fields ↔ hex string encoding * - Date fields ↔ ISO 8601 string encoding * - All other fields pass through as-is * * Follows the locationRecordToJSON/locationRecordFromJSON pattern * used elsewhere in brightchain-lib. * * @see BrightDB Write ACLs design, ACL Document JSON Schema * @see Requirements 2.7 */ import { WriteMode } from '../../enumerations/writeMode'; import { IAclDocument } from './aclDocument'; import { IAclScope } from './writeAcl'; /** * JSON-serializable representation of IAclDocument. * * Uint8Array fields are hex-encoded strings. * Date fields are ISO 8601 strings. */ export interface SerializedAclDocument { documentId: string; writeMode: WriteMode; authorizedWriters: string[]; aclAdministrators: string[]; scope: IAclScope; version: number; createdAt: string; updatedAt: string; creatorPublicKey: string; creatorSignature: string; previousVersionBlockId?: string; } /** * Serialize an IAclDocument to a JSON string. * * - Uint8Array fields (authorizedWriters, aclAdministrators, * creatorPublicKey, creatorSignature) are hex-encoded. * - Date fields (createdAt, updatedAt) are ISO 8601 strings. * - All other fields pass through unchanged. * * @param doc - The ACL document to serialize * @returns JSON string representation * @see Requirements 2.7 */ export declare function serializeAclDocument(doc: IAclDocument): string; /** * Deserialize a JSON string into an IAclDocument. * * - Hex-encoded strings are converted back to Uint8Array. * - ISO 8601 strings are converted back to Date objects. * - All other fields pass through unchanged. * * @param json - JSON string to deserialize * @returns The deserialized ACL document * @throws Error if the JSON is malformed or contains invalid data * @see Requirements 2.7 */ export declare function deserializeAclDocument(json: string): IAclDocument; //# sourceMappingURL=aclDocumentSerialization.d.ts.map