mithril_signer/entities/
beacon_to_sign.rs

1use chrono::{DateTime, Utc};
2
3use mithril_common::entities::{Epoch, SignedEntityType};
4
5/// Beacon to sign
6#[derive(Debug, Clone, PartialEq)]
7pub struct BeaconToSign {
8    /// The epoch when the beacon was issued
9    pub epoch: Epoch,
10
11    /// The signed entity type to sign
12    pub signed_entity_type: SignedEntityType,
13
14    /// Datetime when the beacon was initiated
15    pub initiated_at: DateTime<Utc>,
16}
17
18impl BeaconToSign {
19    /// Create a new `BeaconToSign`
20    pub fn new(
21        epoch: Epoch,
22        signed_entity_type: SignedEntityType,
23        initiated_at: DateTime<Utc>,
24    ) -> Self {
25        Self {
26            epoch,
27            signed_entity_type,
28            initiated_at,
29        }
30    }
31}