org.sigilaris.core.merkle.MerkleTrieNode
See theMerkleTrieNode companion object
Represents a node in a Merkle Trie.
Merkle Trie consists of three types of nodes:
Leaf: Terminal node storing a key-value pair
Branch: Branch node with only child nodes
BranchWithData: Branch node with both child nodes and a value
Attributes
-
See also
-
-
Example
-
val leaf = MerkleTrieNode.leaf(
prefix = ByteVector(0x12, 0x34).toNibbles,
value = ByteVector(0xab, 0xcd),
)
-
Companion
-
object
-
Source
-
MerkleTrieNode.scala
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Known subtypes
-
Members list
Returns the prefix nibbles of this node.
Returns the children array if this node has children.
Returns the children array if this node has children.
Attributes
-
Returns
-
Some(children) for Branch or BranchWithData, None for Leaf
-
Source
-
MerkleTrieNode.scala
Returns the value stored in this node if present.
Returns the value stored in this node if present.
Attributes
-
Returns
-
Some(value) for Leaf or BranchWithData, None for Branch
-
Source
-
MerkleTrieNode.scala
Returns a new node with the updated children.
Returns a new node with the updated children.
Value parameters
-
children
-
the new children array
Attributes
-
Returns
-
node with updated children
-
Source
-
MerkleTrieNode.scala
Returns a new node with the updated prefix.
Returns a new node with the updated prefix.
Value parameters
-
prefix
-
the new prefix
Attributes
-
Returns
-
node with updated prefix
-
Source
-
MerkleTrieNode.scala
Returns a new node with the updated value.
Returns a new node with the updated value.
Value parameters
-
value
-
the new value
Attributes
-
Returns
-
node with updated value
-
Source
-
MerkleTrieNode.scala
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
-
Returns
-
a string representation of the object.
-
Definition Classes
-
Any
-
Source
-
MerkleTrieNode.scala