mithril_common/crypto_helper/types/
alias.rs1use crate::crypto_helper::cardano::{
2 KeyRegWrapper, ProtocolInitializerErrorWrapper, ProtocolRegistrationErrorWrapper,
3 StmInitializerWrapper,
4};
5
6use mithril_stm::{
7 AggregationError, ClosedKeyReg, Index, Stake, StmClerk, StmParameters, StmSigner,
8};
9
10use blake2::{digest::consts::U32, Blake2b};
11
12pub type ProtocolVersion<'a> = &'a str;
14
15pub(crate) type D = Blake2b<U32>;
17
18pub type ProtocolPartyId = String;
20
21pub type ProtocolStake = Stake;
23
24pub type ProtocolStakeDistribution = Vec<(ProtocolPartyId, ProtocolStake)>;
26
27pub type ProtocolParameters = StmParameters;
29
30pub type ProtocolLotteryIndex = Index;
32
33pub type ProtocolSigner = StmSigner<D>;
35
36pub type ProtocolInitializer = StmInitializerWrapper;
38
39pub type ProtocolClerk = StmClerk<D>;
41
42pub type ProtocolKeyRegistration = KeyRegWrapper;
44
45pub type ProtocolClosedKeyRegistration = ClosedKeyReg<D>;
47
48pub type ProtocolRegistrationError = ProtocolRegistrationErrorWrapper;
51
52pub type ProtocolInitializerError = ProtocolInitializerErrorWrapper;
54
55pub type ProtocolAggregationError = AggregationError;