Skip to main content

compute_next_commitment

Function compute_next_commitment 

Source
pub fn compute_next_commitment(public_key: &[u8]) -> String
Expand description

Compute next-key commitment hash for pre-rotation.

The commitment is computed by:

  1. Hashing the public key bytes with Blake3
  2. Encoding the hash as Base64url (no padding)
  3. Prefixing with ‘E’ (KERI derivation code for Blake3-256)

This commitment is included in the current event’s ‘n’ field and must be satisfied by the next rotation event’s ‘k’ field.

§Arguments

  • public_key - The raw public key bytes (32 bytes for Ed25519)

§Returns

A commitment string like “EO8CE5RH3wHBrXyFay3MOXq5YqaL6L48pf0fu7IUhL0J”