Module near_primitives::merkle[][src]

Structs

MerklePathItem
PartialMerkleTree

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 folding path 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

Direction

Functions

combine_hash
compute_root_from_path
compute_root_from_path_and_item
merklize

Merklize an array of items. If the array is empty, returns hash of 0

verify_hash
verify_path

Verify merkle path for given item and corresponding path.

Type Definitions

MerklePath