Skip to main content

blockfrost_openapi/models/
certificate_pending_message.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4/// CertificatePendingMessage : CertificatePendingMessage represents all the information related to the certificate currently expecting to receive quorum of single signatures
5#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6pub struct CertificatePendingMessage {
7    /// Cardano chain epoch number
8    #[serde(rename = "epoch")]
9    pub epoch: i64,
10    #[serde(rename = "beacon", skip_serializing_if = "Option::is_none")]
11    pub beacon: Option<models::CardanoDbBeacon>,
12    /// Entity type of the message that is signed
13    #[serde(rename = "entity_type")]
14    pub entity_type: std::collections::HashMap<String, serde_json::Value>,
15    #[serde(rename = "protocol")]
16    pub protocol: models::ProtocolParameters,
17    #[serde(rename = "next_protocol")]
18    pub next_protocol: models::ProtocolParameters,
19    #[serde(rename = "signers")]
20    pub signers: Vec<models::Signer>,
21    #[serde(rename = "next_signers")]
22    pub next_signers: Vec<models::Signer>,
23}
24
25impl CertificatePendingMessage {
26    /// CertificatePendingMessage represents all the information related to the certificate currently expecting to receive quorum of single signatures
27    pub fn new(epoch: i64, entity_type: std::collections::HashMap<String, serde_json::Value>, protocol: models::ProtocolParameters, next_protocol: models::ProtocolParameters, signers: Vec<models::Signer>, next_signers: Vec<models::Signer>) -> CertificatePendingMessage {
28        CertificatePendingMessage {
29            epoch,
30            beacon: None,
31            entity_type,
32            protocol,
33            next_protocol,
34            signers,
35            next_signers,
36        }
37    }
38}
39