lssa/storage/src/transaction.rs

29 lines
766 B
Rust
Raw Normal View History

2024-10-10 14:09:31 +03:00
use serde::{Deserialize, Serialize};
use crate::merkle_tree_public::TreeHashType;
2024-10-10 14:09:31 +03:00
#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
pub enum TxKind {
Public,
Private,
Shielded,
Deshielded,
}
2024-10-10 14:09:31 +03:00
#[derive(Debug, Serialize, Deserialize, Clone)]
///General transaction object
pub struct Transaction {
pub hash: TreeHashType,
pub tx_kind: TxKind,
///Tx input data (public part)
pub execution_input: Vec<u8>,
///Tx output data (public_part)
pub execution_output: Vec<u8>,
///Tx output utxo commitments
pub utxo_commitments_created_hashes: Vec<TreeHashType>,
///Tx output nullifiers
pub nullifier_created_hashes: Vec<TreeHashType>,
///Execution proof (private part)
pub execution_proof_private: String,
2024-10-10 14:09:31 +03:00
}