Skip to content

Releases: olivmath/merkletreers

Custom Hash Functions Support

05 Dec 18:32

Choose a tag to compare

What's New

Custom Hash Functions Support

You can now use your own hash functions with MerkleTree! Implement the Hashable trait to use any hashing algorithm you need.
use merkletreers::{MerkleTree, Hashable};

struct MyCustomHasher;

impl Hashable for MyCustomHasher {
    fn hash(data: &[u8]) -> [u8; 32] {
        // Your custom hash implementation
    }
}

let tree = MerkleTree::<MyCustomHasher>::new(leaves);

Issue #11 - Duplicate Leaves Behavior

Documented and clarified how the library handles duplicate leaves in the tree. This is consistent with standard Merkle Tree implementations.

Test Coverage

✅ Custom Hash Function: 13 tests passing
✅ Issue #11 Investigation: 5 tests passing
✅ Total: 27 tests passing

Installation

[dependencies]
merkletreers = "1.3.0"

Full Changelog: v1.2.0...v1.3.0

1.2.0

06 Feb 04:08
1.2.0
4332046

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.4.1...1.2.0