Merkle Tree Utilities. Copyright (c) 2013 Alexander Færøy
Authors: Alexander Færøy (ahf@0x90.dk
).
This module contains utilities for creating and traversing Merkle Tree's. objects.
hash() = peculium_core_types:hash()
abstract datatype: merkle_tree_node()
transaction() = peculium_core_types:transaction()
from_transactions/1 | Create a Merkle tree from a list of transactions. |
hash/1 | Utility function for getting the hash of a given Merkle tree node. |
left/1 | Utility function for getting the left child of a given Merkle tree node. |
right/1 | Utility function for getting the right child of a given Merkle tree node. |
from_transactions(Transactions::[transaction(), ...]) -> merkle_tree_node()
Create a Merkle tree from a list of transactions. This function takes a list of transactions and returns the root node of the Merkle tree.
hash(TreeNode::merkle_tree_node()) -> hash()
Utility function for getting the hash of a given Merkle tree node.
left(TreeNode::merkle_tree_node()) -> merkle_tree_node()
Utility function for getting the left child of a given Merkle tree node.
right(TreeNode::merkle_tree_node()) -> merkle_tree_node()
Utility function for getting the right child of a given Merkle tree node.