Companion object for MerkleTrieNode with constructors and type definitions.
Attributes
- Companion
- trait
- Source
- MerkleTrieNode.scala
- Graph
-
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MerkleTrieNode.type
Members list
Type members
Classlikes
Branch node with only child nodes.
Branch node with only child nodes.
Value parameters
- children
-
array of 16 optional child node hashes
- prefix
-
the common prefix for all children
Attributes
- Source
- MerkleTrieNode.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MerkleTrieNodeclass Objecttrait Matchableclass AnyShow all
Branch node with both child nodes and a value.
Branch node with both child nodes and a value.
Value parameters
- children
-
array of 16 optional child node hashes
- prefix
-
the common prefix for all children
- value
-
the value stored at this branch
Attributes
- Source
- MerkleTrieNode.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MerkleTrieNodeclass Objecttrait Matchableclass AnyShow all
Companion object for Children providing constructors.
Companion object for Children providing constructors.
Attributes
- Source
- MerkleTrieNode.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Children.type
Terminal node storing a key-value pair.
Terminal node storing a key-value pair.
Value parameters
- prefix
-
the key suffix for this leaf
- value
-
the value stored in this leaf
Attributes
- Source
- MerkleTrieNode.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MerkleTrieNodeclass Objecttrait Matchableclass AnyShow all
Types
Array of 16 optional child node hashes.
Refinement constraint requiring exactly 16 elements in a Children vector.
Refinement constraint requiring exactly 16 elements in a Children vector.
Attributes
- Source
- MerkleTrieNode.scala
Hash value of a Merkle Trie node.
Root hash of a Merkle Trie.
Inherited and Abstract types
The names of the product elements
The name of the type
Value members
Concrete methods
Creates a branch node.
Creates a branch node.
Value parameters
- children
-
the children array
- prefix
-
the common prefix
Attributes
- Returns
-
new Branch node
- Source
- MerkleTrieNode.scala
Creates a branch node with data.
Creates a branch node with data.
Value parameters
- children
-
the children array
- prefix
-
the common prefix
- value
-
the value to store
Attributes
- Returns
-
new BranchWithData node
- Source
- MerkleTrieNode.scala
Creates a leaf node.
Creates a leaf node.
Value parameters
- prefix
-
the key suffix
- value
-
the value to store
Attributes
- Returns
-
new Leaf node
- Source
- MerkleTrieNode.scala
Givens
Givens
Cats Eq instance for MerkleTrieNode.
Decodes a MerkleTrieNode from bytes.
Decodes a MerkleTrieNode from bytes.
Decoding format:
- Leaf: 1 + prefix + value
- Branch: 2 + prefix + children
- BranchWithData: 3 + prefix + children + value
Attributes
- Source
- MerkleTrieNode.scala
Encodes a MerkleTrieNode to bytes.
Encodes a MerkleTrieNode to bytes.
Encoding format:
- Leaf: 1 + prefix + value
- Branch: 2 + prefix + children
- BranchWithData: 3 + prefix + children + value
Attributes
- Source
- MerkleTrieNode.scala
Hash instance for MerkleTrieNode.
Extensions
Extensions
Updates a child at the given index.
Updates a child at the given index.
Value parameters
- i
-
index (0-15)
- v
-
new child hash value
Attributes
- Returns
-
updated children array
- Source
- MerkleTrieNode.scala