Crate merkle [] [src]

merkle implements a Merkle Tree in Rust.

Structs

MerkleTree

A Merkle tree is a binary tree, with values of type T at the leafs, and where every node holds the hash of the concatenation of the hashes of its children nodes.

Proof

An inclusion proof represent the fact that value is a member of a MerkleTree with root hash root_hash, and hash function digest. A proof is a linked-list of ProofBlocks. TODO: Represent a proof as a vector of ProofBlock instead of a linked-list?

ProofBlock

A ProofBlock is a linked-list holding the hash of the node, the hash of its sibling node, and the rest of the inclusion proof.

Enums

Positioned

Tags a value so that we know from in branch (if any) it was found.

Traits

MerkleDigest

The sole purpose of this trait is to extend the standard crypto::digest::Digest with a couple utility functions.