plebeia

Merkle Patricia tree implementation
Library plebeia
type t

the type for the node hash.

Non Extenders have the fixed 224bit (28byte) length.

Extenders have variable lengths from 30 bytes to 256 bytes.

val encoding : t Data_encoding.t
val to_hex_string : t -> string

Hex string representation of t

Compute node hash of a node

val of_internal : t -> t -> t
val of_bud : t option -> t
val of_leaf : Value.t -> t
val of_extender : Segment.t -> t -> t
val prefix : t -> Hash.t

Get the first 224bits of the node hash

val compute : Plebeia__Context.t -> Plebeia__Node.node -> Plebeia__Node.view * t

Compute the node hash of the given node. It may traverse the node loading subnodes from the disk to obtain or compute the node hashes of subnodes if necessary.