Skip to content

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.

pub fn genesis(&self) -> &PublicKey

K₀, from which the community id derives.

pub fn key(&self) -> &PublicKey

The current root key Kₙ.

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.

pub fn rotation_seq(&self) -> u64

n: the last rotation_seq, 0 when never rotated.

pub const fn suite(&self) -> u8

The suite of the current key (the last new_suite).

Clone, Debug, Eq, PartialEq, StructuralPartialEq

Full rustdoc page