1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate::internal_prelude::*;

// This file is for concepts which are version-independent

define_raw_transaction_payload!(RawIntent);
define_wrapped_hash!(
    /// A hash of the intent, used as the transaction id.
    /// The engine guarantees each intent hash can only be committed once.
    IntentHash
);

pub trait HasIntentHash {
    fn intent_hash(&self) -> IntentHash;
}

define_raw_transaction_payload!(RawSignedIntent);
define_wrapped_hash!(SignedIntentHash);

pub trait HasSignedIntentHash {
    fn signed_intent_hash(&self) -> SignedIntentHash;
}

define_raw_transaction_payload!(RawNotarizedTransaction);
define_wrapped_hash!(NotarizedTransactionHash);

pub trait HasNotarizedTransactionHash {
    fn notarized_transaction_hash(&self) -> NotarizedTransactionHash;
}

define_raw_transaction_payload!(RawSystemTransaction);
define_wrapped_hash!(SystemTransactionHash);

pub trait HasSystemTransactionHash {
    fn system_transaction_hash(&self) -> SystemTransactionHash;
}

define_raw_transaction_payload!(RawFlashTransaction);
define_wrapped_hash!(FlashTransactionHash);

pub trait HasFlashTransactionHash {
    fn flash_transaction_hash(&self) -> FlashTransactionHash;
}