Releases: olivmath/merkletreers
Releases · olivmath/merkletreers
Custom Hash Functions Support
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
What's Changed
- 2-derive-clone-partialeq-eq-to-struct-merkletree by @palinko91 in #4
- feat: compatible Merkle tree by @olivmath in #9
- Docs/update by @olivmath in #10
New Contributors
- @palinko91 made their first contribution in #4
Full Changelog: 0.4.1...1.2.0