lssa/core_primitives/src/nullifier.rs

19 lines
531 B
Rust
Raw Normal View History

2025-03-17 13:18:44 +02:00
use crate::merkle_tree_public::TreeHashType;
use monotree::database::MemoryDB;
use monotree::hasher::Blake3;
2025-03-17 13:41:53 +02:00
use monotree::Monotree;
2025-03-17 13:18:44 +02:00
use serde::{Deserialize, Serialize};
//ToDo: Update Nullifier model, when it is clear
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)]
///General nullifier object
pub struct UTXONullifier {
pub utxo_hash: TreeHashType,
}
pub struct NullifierSparseMerkleTree {
pub curr_root: Option<TreeHashType>,
pub tree: Monotree<MemoryDB, Blake3>,
pub hasher: Blake3,
}