Packages

A hash tree or Merkle tree is a tree in which every non-leaf node is labelled with the hash of the labels or values (in case of leaves) of its child nodes. Hash trees are useful because they allow efficient and secure verification of the contents of large data structures.

Current section

Files

Jump to
merkle_tree lib merkle_tree node.ex
Raw

lib/merkle_tree/node.ex

defmodule MerkleTree.Node do
@moduledoc """
This module implements a tree node abstraction.
"""
defstruct [:value, :children, :height]
@type t :: %__MODULE__{
value: String.t,
children: [MerkleTree.Node.t],
height: non_neg_integer
}
end