tree = MerkleTree()
# raw bytes or str bytes
tree.add_node('00')
tree.add_node('01')
tree.add_node('02')
# extra node is added during make to provide a perfect binary tree
tree.make()
tree.get_root()
'8633f3f58bd5719152d1f244ad09616dbad359515721e8a59ad0eb1823ae3531'
tree.get_proof(2) # node index
[{'right': 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'}, {'left': '49d03a195e239b52779866b33024210fc7dc66e9c2998975c0aa45c1702549d5'}]
proof = [{'right': 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'}, {'left': '49d03a195e239b52779866b33024210fc7dc66e9c2998975c0aa45c1702549d5'}]
root = '8633f3f58bd5719152d1f244ad09616dbad359515721e8a59ad0eb1823ae3531'
tree.validate_proof(proof, '02', root)
True