Skip to main content

blockfrost_openapi/models/
aggregator_features_message_capabilities.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4/// AggregatorFeaturesMessageCapabilities : Capabilities of the aggregator
5#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6pub struct AggregatorFeaturesMessageCapabilities {
7    /// Signed entity types that are signed by the aggregator
8    #[serde(rename = "signed_entity_types")]
9    pub signed_entity_types: Vec<SignedEntityTypes>,
10    #[serde(rename = "cardano_transactions_prover", skip_serializing_if = "Option::is_none")]
11    pub cardano_transactions_prover: Option<Box<models::AggregatorFeaturesMessageCapabilitiesCardanoTransactionsProver>>,
12}
13
14impl AggregatorFeaturesMessageCapabilities {
15    /// Capabilities of the aggregator
16    pub fn new(signed_entity_types: Vec<SignedEntityTypes>) -> AggregatorFeaturesMessageCapabilities {
17        AggregatorFeaturesMessageCapabilities {
18            signed_entity_types,
19            cardano_transactions_prover: None,
20        }
21    }
22}
23/// Signed entity types that are signed by the aggregator
24#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
25pub enum SignedEntityTypes {
26    #[serde(rename = "MithrilStakeDistribution")]
27    MithrilStakeDistribution,
28    #[serde(rename = "CardanoStakeDistribution")]
29    CardanoStakeDistribution,
30    #[serde(rename = "CardanoImmutableFilesFull")]
31    CardanoImmutableFilesFull,
32    #[serde(rename = "CardanoTransactions")]
33    CardanoTransactions,
34}
35
36impl Default for SignedEntityTypes {
37    fn default() -> SignedEntityTypes {
38        Self::MithrilStakeDistribution
39    }
40}
41