Persistent Merkle Tree
Persistent Merkle Tree (optimized & sparse & fixed-size) in Rust.
## References
- https://github.com/Rate-Limiting-Nullifier/pmtree
---
## 🛠 Install
```bash
cargo add zk-kit-pmt
```
## 📜 Usage
```rust
struct MemoryDB(HashMap);
struct MyKeccak(());
#[derive(Default)]
struct MemoryDBConfig;
impl Database for MemoryDB {
type Config = MemoryDBConfig;
fn new(_db_config: MemoryDBConfig) -> PmtreeResult {
Ok(MemoryDB(HashMap::new()))
}
fn load(_db_config: MemoryDBConfig) -> PmtreeResult {
Err(PmtreeErrorKind::DatabaseError(
DatabaseErrorKind::CannotLoadDatabase,
))
}
fn get(&self, key: DBKey) -> PmtreeResult