Struct signed::ChainHead
zaun_community_protocol::signed::ChainHead · Struct
pub struct ChainHead { … }Every root key of a verified chain, K₀ (genesis) to Kₙ (current). Only
super::verify_chain creates one.
Methods
Section titled “Methods”genesis
Section titled “genesis”pub fn genesis(&self) -> &PublicKeyK₀, from which the community id derives.
pub fn key(&self) -> &PublicKeyThe current root key Kₙ.
key_at
Section titled “key_at”pub fn key_at(&self, rotation_seq: u64) -> Option<&PublicKey>The root key after rotation rotation_seq (K₀ for 0), if the chain is that long.
rotation_seq
Section titled “rotation_seq”pub fn rotation_seq(&self) -> u64n: the last rotation_seq, 0 when never rotated.
pub const fn suite(&self) -> u8The suite of the current key (the last new_suite).
Trait implementations
Section titled “Trait implementations”Clone, Debug, Eq, PartialEq, StructuralPartialEq