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
use crate::{
    identifier::{DigestIdentifier, KeyIdentifier},
    ledger::LedgerCommand,
};

use super::approval::TapleMessages;

pub fn request_lce(who_asked: KeyIdentifier, subject_id: DigestIdentifier) -> TapleMessages {
    TapleMessages::LedgerMessages(LedgerCommand::GetLCE {
        who_asked,
        subject_id,
    })
}

pub fn request_event(
    who_asked: KeyIdentifier,
    subject_id: DigestIdentifier,
    sn: u64,
) -> TapleMessages {
    TapleMessages::LedgerMessages(LedgerCommand::GetEvent {
        who_asked,
        subject_id,
        sn,
    })
}

pub fn request_gov_event(
    who_asked: KeyIdentifier,
    subject_id: DigestIdentifier,
    sn: u64,
) -> TapleMessages {
    TapleMessages::LedgerMessages(LedgerCommand::GetNextGov {
        who_asked,
        subject_id,
        sn,
    })
}