/** * @fileoverview Deterministic binary serialization for Merkle inclusion proofs * and consistency proofs. * * Uses only browser-compatible APIs (DataView, Uint8Array) — no Node.js Buffer. * * @see Design: Merkle Tree Commitment Layer — Proof Serialization * @see Requirements 10.1, 10.2, 10.3, 10.4, 10.7, 10.8, 15.4 */ import { IConsistencyProof } from '../interfaces/ledger/consistencyProof'; import { IMerkleProof } from '../interfaces/ledger/merkleProof'; /** * Deterministic binary serializer for Merkle inclusion proofs and consistency proofs. * * All methods are static. Uses only Uint8Array and DataView for browser compatibility. */ export declare class ProofSerializer { /** * Serialize an inclusion proof to a Uint8Array. * * Binary format: * | Offset | Size | Field | * |--------|-----------------|------------| * | 0 | 1 | version | * | 1 | 1 | proofType | * | 2 | 64 | leafHash | * | 66 | 4 | leafIndex | * | 70 | 4 | treeSize | * | 74 | 2 | pathLength | * | 76 | pathLength × 65 | path | */ static serializeInclusionProof(proof: IMerkleProof): Uint8Array; /** * Deserialize a Uint8Array into an inclusion proof. * * @throws LedgerSerializationError for truncated, malformed, or unrecognized data */ static deserializeInclusionProof(data: Uint8Array): IMerkleProof; /** * Serialize a consistency proof to a Uint8Array. * * Binary format: * | Offset | Size | Field | * |--------|-------------------|-------------| * | 0 | 1 | version | * | 1 | 1 | proofType | * | 2 | 4 | earlierSize | * | 6 | 4 | laterSize | * | 10 | 2 | hashCount | * | 12 | hashCount × 64 | hashes | */ static serializeConsistencyProof(proof: IConsistencyProof): Uint8Array; /** * Deserialize a Uint8Array into a consistency proof. * * @throws LedgerSerializationError for truncated, malformed, or unrecognized data */ static deserializeConsistencyProof(data: Uint8Array): IConsistencyProof; } //# sourceMappingURL=proofSerializer.d.ts.map