Constructs a new leaf node with the given nibbles and value.
The nibbles consumed by the leaf node.
The value held in the leaf node.
Only used for batchCOW to mark nodes to be copied
The nibbles consumed by the leaf node.
Memoizing RLP encoding of the serialized node
The value held in the leaf node.
When calling toString(), sets the length of the hashes printed.
When calling toString(), sets the length of the values printed. Values longer will be appended with ...
Returns the prefix for this leaf node.
Clears the memoized RLP node encoding
Serializes and computes the RLP encoding of the node and returns the length of the rlp encoding of the node. getNodeRlpSize also stores the computed rlp encoding for future references.
Serializes and computes the RLP encoding of the node Also stores it for future references.
Return the hash for the node.
An optional RLP encoded buffer of the node to use for hashing
A Buffer containing the hash for the node.
Converts to node to a human readable hash representation. This is set to the last n characters in the hash, as defined by HUMAN_READABLE_HASH_LENGTH.
A human readable hash string.
Returns the string representation of this node.
The string representation of this node.
Convert a buffer into a nibble representation.
The buffer to convert.
An array of nibbles.
Converts a buffer to the nibbles and prefix representation.
nibbles The nibbles to convert.
Return the intersecting prefix, which contains the nibbles shared by both n0 and n1 at the beginning of each nibble set.
The first set of nibbles
The second set of nibbles
A set of nibbles representing the intersecting prefix of both input sets.
Converts a set of nibbles to its representation as a hex string.
The nibbles to convert.
The input nibbles as a hex string.
Converts a set of nibbles and an attached prefix to its buffer representation.
The nibbles to convert.
The prefix for the nibbles to convert.
The representation of the nibbles with the given prefix as a buffer.
Converts a value to a human readable value. This is set to the first n characters of the hex representation of a value, as defined by HUMAN_READABLE_VAL_LENGTH.
The value to convert.
A human readable value string
Generated using TypeDoc
Represents a leaf node, which are terminal nodes in the tree which holds values.