pub struct KeyRotationEvent {
pub sequence: u64,
pub previous_hash: String,
pub old_public_key: Vec<u8>,
pub new_public_key: Vec<u8>,
pub timestamp: DateTime<Utc>,
pub rotation_signature: Vec<u8>,
}Expand description
Represents a key rotation event in the KERI Key Event Log (KEL).
This is a high-level representation of a key rotation that can be serialized to JSON for storage and transmission. The actual KERI event format (CESR) is handled at the storage layer.
Fields§
§sequence: u64Sequence number in the KEL (incrementing from 0)
previous_hash: StringHash of the previous event for backward chain verification. Empty string for inception events (sequence 0).
old_public_key: Vec<u8>Old public key being rotated from (32 bytes for Ed25519).
new_public_key: Vec<u8>New public key being rotated to (32 bytes for Ed25519).
timestamp: DateTime<Utc>ISO 8601 timestamp of the rotation event.
rotation_signature: Vec<u8>Signature proving authority to rotate (signed by the old key). This proves the holder of the old key authorized the rotation.
Implementations§
Source§impl KeyRotationEvent
impl KeyRotationEvent
Sourcepub fn new(
sequence: u64,
previous_hash: String,
old_public_key: Vec<u8>,
new_public_key: Vec<u8>,
timestamp: DateTime<Utc>,
rotation_signature: Vec<u8>,
) -> Self
pub fn new( sequence: u64, previous_hash: String, old_public_key: Vec<u8>, new_public_key: Vec<u8>, timestamp: DateTime<Utc>, rotation_signature: Vec<u8>, ) -> Self
Creates a new KeyRotationEvent.
Sourcepub fn canonical_bytes_for_signing(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes_for_signing(&self) -> Vec<u8> ⓘ
Returns the canonical bytes for signing this event.
The canonical form includes all fields except the rotation_signature, serialized deterministically.
Trait Implementations§
Source§impl Clone for KeyRotationEvent
impl Clone for KeyRotationEvent
Source§fn clone(&self) -> KeyRotationEvent
fn clone(&self) -> KeyRotationEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more