Node.js implementation of Merkel tree and Patricia Tree used in Ethereum blockchain
This class has the following methods:
-
createTree(transactionList)
Adds layers to the tree for the passed transaction list
-
verify(transaction)
Checks if the transaction is valid or not
This class has the following methods:
-
add(transaction)
Add transaction to the trie
-
get(hash)
Get transaction from the trie for the passed trie
-
remove(hash)
Remove the trnasaction with the hash if found