Struct mithril_common::entities::CertificateMetadata
source · pub struct CertificateMetadata {
pub network: String,
pub protocol_version: ProtocolVersion,
pub protocol_parameters: ProtocolParameters,
pub initiated_at: DateTime<Utc>,
pub sealed_at: DateTime<Utc>,
pub signers: Vec<StakeDistributionParty>,
}
Expand description
CertificateMetadata represents the metadata associated to a Certificate
Fields§
§network: String
Cardano network
protocol_version: ProtocolVersion
Protocol Version (semver) Useful to achieve backward compatibility of the certificates (including of the multi signature) part of METADATA(p,n)
protocol_parameters: ProtocolParameters
Protocol parameters part of METADATA(p,n)
initiated_at: DateTime<Utc>
Date and time when the certificate was initiated Represents the time at which the single signatures registration is opened part of METADATA(p,n)
sealed_at: DateTime<Utc>
Date and time when the certificate was sealed Represents the time at which the quorum of single signatures was reached so that they were aggregated into a multi signature part of METADATA(p,n)
signers: Vec<StakeDistributionParty>
The list of the active signers with their stakes and verification keys part of METADATA(p,n)
Implementations§
source§impl CertificateMetadata
impl CertificateMetadata
sourcepub fn new<T: Into<String>, U: Into<ProtocolVersion>>(
network: T,
protocol_version: U,
protocol_parameters: ProtocolParameters,
initiated_at: DateTime<Utc>,
sealed_at: DateTime<Utc>,
signers: Vec<StakeDistributionParty>,
) -> CertificateMetadata
pub fn new<T: Into<String>, U: Into<ProtocolVersion>>( network: T, protocol_version: U, protocol_parameters: ProtocolParameters, initiated_at: DateTime<Utc>, sealed_at: DateTime<Utc>, signers: Vec<StakeDistributionParty>, ) -> CertificateMetadata
CertificateMetadata factory
sourcepub fn get_stake_distribution(&self) -> StakeDistribution
pub fn get_stake_distribution(&self) -> StakeDistribution
Deduce the stake distribution from the metadata signers
sourcepub fn compute_hash(&self) -> String
pub fn compute_hash(&self) -> String
Computes the hash of the certificate metadata
Trait Implementations§
source§impl Clone for CertificateMetadata
impl Clone for CertificateMetadata
source§fn clone(&self) -> CertificateMetadata
fn clone(&self) -> CertificateMetadata
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CertificateMetadata
impl Debug for CertificateMetadata
source§impl PartialEq for CertificateMetadata
impl PartialEq for CertificateMetadata
impl StructuralPartialEq for CertificateMetadata
Auto Trait Implementations§
impl Freeze for CertificateMetadata
impl RefUnwindSafe for CertificateMetadata
impl Send for CertificateMetadata
impl Sync for CertificateMetadata
impl Unpin for CertificateMetadata
impl UnwindSafe for CertificateMetadata
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more