1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::types::Hash;
use crate::{Input, Output};

#[derive(Clone, PartialEq, Eq, Debug)]
pub struct Transaction {
    /// The protocol version, is currently expected to be 1 or 2 (BIP 68).
    pub version: u32,
    /// Block number before which this transaction is valid, or 0 for
    /// valid immediately.
    pub lock_time: u32,
    //TODO inputs and outputs.
    //
    pub inputs: Vec<Input>,
    pub outputs: Vec<Output>,
}

impl Transaction {
    //TODO implement - see hsd primitives
    //we should keep similar behavior with hash and witness hash
    pub fn hash(&self) -> Hash {
        Default::default()
    }
}