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
use crate::jcli::command::votes::CommitteeCommand;

mod communication_key;
mod member_key;

pub use communication_key::CommunicationKey;
pub use member_key::MemberKey;

pub struct Committee {
    committee_command: CommitteeCommand,
}

impl Committee {
    pub fn new(committee_command: CommitteeCommand) -> Self {
        Self { committee_command }
    }

    pub fn member_key(self) -> MemberKey {
        MemberKey::new(self.committee_command.member_key())
    }

    pub fn communication_key(self) -> CommunicationKey {
        CommunicationKey::new(self.committee_command.communication_key())
    }
}