CommitmentTree.Node (Anoma v0.29.0)
Summary
Functions
Creates a new internal node. Children is a tuple of size spec.splay, each element of which is either a binary or another node.
Creates a new internal node, all children of which are empty.
Produces a proof for leaf #cursor of node, taking the form of a nested tuple, as described in proof.ex
Types
Functions
Link to this function
new(spec, children)
@spec new(CommitmentTree.Spec.t(), tuple()) :: t()
Creates a new internal node. Children is a tuple of size spec.splay, each element of which is either a binary or another node.
Link to this function
new_empty(spec)
@spec new_empty(CommitmentTree.Spec.t()) :: t()
Creates a new internal node, all children of which are empty.
Link to this function
prove(spec, node, cursor)
@spec prove(CommitmentTree.Spec.t(), t(), integer()) :: tuple()
Produces a proof for leaf #cursor of node, taking the form of a nested tuple, as described in proof.ex