Module near_primitives::merkle
source · Structs
- Merkle tree that only maintains the path for the next leaf, i.e, when a new leaf is inserted, the existing
path
is its proof. The root can be computed by foldingpath
from right but is not explicitly maintained to save space. The size of the object is O(log(n)) where n is the number of leaves in the tree, i.e,size
.
Enums
Functions
- Merklize an array of items. If the array is empty, returns hash of 0
- Verify merkle path for given item and corresponding path.