Skip to main content

Module hash

Module hash 

Source
Expand description

Content-addressed event hashing for the Merkle-DAG.

This module provides hash verification and parent chain validation on top of the core hash computation in crate::event::writer::compute_event_hash.

§Merkle-DAG Properties

  • Each event’s hash covers its content AND its parent hashes.
  • Modifying any event invalidates the hashes of all its descendants.
  • Parent hashes are sorted lexicographically before hashing.
  • Hash format is text-prefixed (blake3:<payload>) with canonical base64url writes and legacy hex accepted for validation.

Enums§

HashError
Errors from DAG hash verification.
HashErrorCode
Machine-readable codes for HashError.

Functions§

verify_chain
Verify the Merkle-DAG integrity of a collection of events.
verify_event_hash
Verify that an event’s stored hash matches the hash of its content.