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: StringCardano network
protocol_version: ProtocolVersionProtocol Version (semver) Useful to achieve backward compatibility of the certificates (including of the multi signature) part of METADATA(p,n)
protocol_parameters: ProtocolParametersProtocol 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§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