diff --git a/storage/src/commitment.rs b/storage/src/commitment.rs new file mode 100644 index 0000000..0874bc7 --- /dev/null +++ b/storage/src/commitment.rs @@ -0,0 +1,8 @@ +use serde::{Deserialize, Serialize}; + +use crate::merkle_tree_public::CommitmentHashType; + +#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq)] +pub struct Commitment { + pub commitment_hash: CommitmentHashType, +} diff --git a/storage/src/lib.rs b/storage/src/lib.rs index 684dcc8..708fd80 100644 --- a/storage/src/lib.rs +++ b/storage/src/lib.rs @@ -12,6 +12,7 @@ pub mod block; pub mod error; pub mod merkle_tree_public; pub mod nullifier; +pub mod commitment; pub mod nullifier_sparse_merkle_tree; pub mod transaction; pub mod utxo_commitment; diff --git a/storage/src/merkle_tree_public/mod.rs b/storage/src/merkle_tree_public/mod.rs index 8a34631..f1fc89e 100644 --- a/storage/src/merkle_tree_public/mod.rs +++ b/storage/src/merkle_tree_public/mod.rs @@ -3,3 +3,4 @@ pub mod merkle_tree; pub mod tree_leav_item; pub type TreeHashType = [u8; 32]; +pub type CommitmentHashType = Vec;