pub trait BlockHeaderTrait: PartialEq + Debug + Clone + Serialize + DeserializeOwned {
    type Hash: Clone;

    // Required methods
    fn prev_hash(&self) -> Self::Hash;
    fn hash(&self) -> Self::Hash;
}
Expand description

A block header, typically used in the context of an underlying DA blockchain.

Required Associated Types§

source

type Hash: Clone

Each block header must have a unique canonical hash.

Required Methods§

source

fn prev_hash(&self) -> Self::Hash

Each block header must contain the hash of the previous block.

source

fn hash(&self) -> Self::Hash

Hash the type to get the digest.

Implementors§