path buffer
number of nibbles
is leaf node
encoded path
Decompose a bitmask to get number of bit's indices
bitmask
array of the indices of bits
Calculate branch hash. Hash(encodedPath + 16 links)
encoded path of the branch in hexadecimal format
branch links array
branch hash (Hash(encodedPath + links))
Calculate leaf hash. Hash(encodedPath + leaf value)
encoded path of the leaf in hexadecimal format
leaf value
leaf hash (Hash(encodedPath + leaf value))
Calculate path length from given nibbles count
Nibbles count
the length of the path
Is branch node
node marker
if tree node is branch
Is leaf node
node marker
if tree node is leaf
Get byte at given nibble index
path buffer
nibble index
byte
Parse branch tree node
partial raw buffer
merkle tree path
number of nibbles
unprocess raw buffer
Parse leaf tree node
partial raw buffer
merkle tree path
number of nibbles
unprocess raw buffer
Recursively parse raw tree
raw tree buffer
merkle tree
Generated using TypeDoc
Encode path depends on node type and nibble count