Expand description
Hash chain helpers: canonicalization, chain construction, chain verification.
Enums§
- Chain
Error - Errors raised by chain verification.
Constants§
- HASH_
PREFIX - Hash prefix for SHA-256 digests in this protocol.
Functions§
- append_
event - Compute and assign
this_event_hashfor an event, given the previous chain tip. - append_
event_ value - Value-based chain production: seal a raw event JSON value onto the chain.
- append_
event_ value_ signed - Value-based chain production with an event SIGNATURE (v0.7 §3.5).
- canonicalize
- Canonicalize a JSON value to RFC 8785 (JCS) bytes for hashing.
- compute_
event_ hash - Compute
this_event_hashfor an event represented as a JSON value withthis_event_hashabsent. - event_
value_ for_ hashing - Produce the hashing view of an event JSON value (normative; see the Python
SDK’s
_event_to_canonical_dict, the single point of truth): - verify_
chain - Verify a sequence of events forms a valid hash chain.
- verify_
chain_ values - Verify a chain of events supplied as raw JSON values. Returns the tip hash.
- verify_
event - Verify a single event’s
this_event_hashmatches its recomputed hash. - verify_
event_ value - Verify a single event supplied as a raw JSON value.