Skip to content

Version 0.4.1

Compare
Choose a tag to compare
@msmolyakov msmolyakov released this 16 Sep 10:02
· 27 commits to master since this release

What's new:

  • Creating Merkle tree and proofs of its elements:
List<byte[]> leafs = asList("one".getBytes(), "two".getBytes(), "three".getBytes());
MerkleTree tree = new MerkleTree(leafs);
byte[] rootHash = tree.rootHash();
byte[] proof = tree.proofByLeaf("two".getBytes()).get();

Then you can use these root hash and proof in checkMerkleProof() function in smart contracts.