remove outdated common/sec/nullifier.rs file

This commit is contained in:
Sergio Chouhy 2025-10-17 15:35:06 -03:00
parent 0b44afa4f6
commit e0fd94152a
3 changed files with 3 additions and 14 deletions

View File

@ -5,7 +5,6 @@ use sha2::{Digest, Sha256, digest::FixedOutput};
pub mod block;
pub mod commitment;
pub mod execution_input;
pub mod nullifier;
pub mod rpc_primitives;
pub mod sequencer_client;
pub mod transaction;

View File

@ -1,10 +0,0 @@
use serde::{Deserialize, Serialize};
use crate::TreeHashType;
//ToDo: Update Nullifier model, when it is clear
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
///General nullifier object
pub struct UTXONullifier {
pub utxo_hash: TreeHashType,
}

View File

@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use sha2::{Digest, digest::FixedOutput};
pub type TreeHashType = [u8; 32];
pub type HashType = [u8; 32];
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum NSSATransaction {
@ -72,11 +72,11 @@ impl TryFrom<&EncodedTransaction> for NSSATransaction {
impl EncodedTransaction {
/// Computes and returns the SHA-256 hash of the JSON-serialized representation of `self`.
pub fn hash(&self) -> TreeHashType {
pub fn hash(&self) -> HashType {
let bytes_to_hash = borsh::to_vec(&self).unwrap();
let mut hasher = sha2::Sha256::new();
hasher.update(&bytes_to_hash);
TreeHashType::from(hasher.finalize_fixed())
HashType::from(hasher.finalize_fixed())
}
pub fn log(&self) {