Fold a merkle branch from a leaf up to the root.
leaf hash, internal byte order
sibling hashes bottom-up, internal byte order
0-based index of the leaf in the tree
Optional
total leaf count, if known (strongly recommended)
Fold a merkle branch from a leaf up to the root.