Certificate

Enum Certificate 

Source
pub enum Certificate {
Show 17 variants StakeRegistration(StakeRegistration), StakeDeregistration(StakeDeregistration), StakeDelegation(StakeDelegation), PoolRegistration(PoolRegistration), PoolRetirement(PoolRetirement), RegCert(RegCert), UnregCert(UnregCert), VoteDelegCert(VoteDelegCert), StakeVoteDelegCert(StakeVoteDelegCert), StakeRegDelegCert(StakeRegDelegCert), VoteRegDelegCert(VoteRegDelegCert), StakeVoteRegDelegCert(StakeVoteRegDelegCert), AuthCommitteeHotCert(AuthCommitteeHotCert), ResignCommitteeColdCert(ResignCommitteeColdCert), RegDrepCert(RegDrepCert), UnregDrepCert(UnregDrepCert), UpdateDrepCert(UpdateDrepCert),
}

Variants§

§

StakeRegistration(StakeRegistration)

Will be deprecated in the next era. Use RegCert instead which takes an explicit deposit amount, as that can change.

§

StakeDeregistration(StakeDeregistration)

Will be deprecated in the next era. Use UnregCert instead which takes an explicit deposit amount, as that can change.

§

StakeDelegation(StakeDelegation)

Delegate to a take pool only

§

PoolRegistration(PoolRegistration)

§

PoolRetirement(PoolRetirement)

§

RegCert(RegCert)

Registers a stake credential.

§

UnregCert(UnregCert)

Unregisters a stake credential.

§

VoteDelegCert(VoteDelegCert)

Delegate to a DRep for voting only

§

StakeVoteDelegCert(StakeVoteDelegCert)

Delegate to a stake pool and a DRep

§

StakeRegDelegCert(StakeRegDelegCert)

Register a stake credential and delegate to a pool in a single cert

§

VoteRegDelegCert(VoteRegDelegCert)

Register a stake credential and delegate to a DRep in a single cert

§

StakeVoteRegDelegCert(StakeVoteRegDelegCert)

Register a stake credential and delegate to a pool and a DRep in a single cert

§

AuthCommitteeHotCert(AuthCommitteeHotCert)

§

ResignCommitteeColdCert(ResignCommitteeColdCert)

§

RegDrepCert(RegDrepCert)

§

UnregDrepCert(UnregDrepCert)

§

UpdateDrepCert(UpdateDrepCert)

Implementations§

Source§

impl Certificate

Source

pub fn new_stake_registration(stake_credential: StakeCredential) -> Self

Will be deprecated in the next era. Use RegCert instead which takes an explicit deposit amount, as that can change.

Source

pub fn new_stake_deregistration(stake_credential: StakeCredential) -> Self

Will be deprecated in the next era. Use UnregCert instead which takes an explicit deposit amount, as that can change.

Source

pub fn new_stake_delegation( stake_credential: StakeCredential, pool: Ed25519KeyHash, ) -> Self

Delegate to a take pool only

Source

pub fn new_pool_registration(pool_params: PoolParams) -> Self

Source

pub fn new_pool_retirement(pool: Ed25519KeyHash, epoch: Epoch) -> Self

Source

pub fn new_reg_cert(stake_credential: StakeCredential, deposit: Coin) -> Self

Registers a stake credential.

Source

pub fn new_unreg_cert(stake_credential: StakeCredential, deposit: Coin) -> Self

Unregisters a stake credential.

Source

pub fn new_vote_deleg_cert( stake_credential: StakeCredential, d_rep: DRep, ) -> Self

Delegate to a DRep for voting only

Source

pub fn new_stake_vote_deleg_cert( stake_credential: StakeCredential, pool: Ed25519KeyHash, d_rep: DRep, ) -> Self

Delegate to a stake pool and a DRep

Source

pub fn new_stake_reg_deleg_cert( stake_credential: StakeCredential, pool: Ed25519KeyHash, deposit: Coin, ) -> Self

Register a stake credential and delegate to a pool in a single cert

Source

pub fn new_vote_reg_deleg_cert( stake_credential: StakeCredential, d_rep: DRep, deposit: Coin, ) -> Self

Register a stake credential and delegate to a DRep in a single cert

Source

pub fn new_stake_vote_reg_deleg_cert( stake_credential: StakeCredential, pool: Ed25519KeyHash, d_rep: DRep, deposit: Coin, ) -> Self

Register a stake credential and delegate to a pool and a DRep in a single cert

Source

pub fn new_auth_committee_hot_cert( committee_cold_credential: CommitteeColdCredential, committee_hot_credential: CommitteeHotCredential, ) -> Self

Source

pub fn new_resign_committee_cold_cert( committee_cold_credential: CommitteeColdCredential, anchor: Option<Anchor>, ) -> Self

Source

pub fn new_reg_drep_cert( drep_credential: DrepCredential, deposit: Coin, anchor: Option<Anchor>, ) -> Self

Source

pub fn new_unreg_drep_cert( drep_credential: DrepCredential, deposit: Coin, ) -> Self

Source

pub fn new_update_drep_cert( drep_credential: DrepCredential, anchor: Option<Anchor>, ) -> Self

Trait Implementations§

Source§

impl Clone for Certificate

Source§

fn clone(&self) -> Certificate

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Certificate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Certificate

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Deserialize for Certificate

Source§

fn deserialize<R: BufRead + Seek>( raw: &mut Deserializer<R>, ) -> Result<Self, DeserializeError>

Source§

fn from_cbor_bytes(data: &[u8]) -> Result<Self, DeserializeError>
where Self: Sized,

from-bytes using the exact CBOR format specified in the CDDL binary spec. For hashes/addresses/etc this will include the CBOR bytes type/len/etc.
Source§

impl JsonSchema for Certificate

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for Certificate

Source§

fn serialize<'se, W: Write>( &self, serializer: &'se mut Serializer<W>, force_canonical: bool, ) -> Result<&'se mut Serializer<W>>

Source§

fn to_cbor_bytes(&self) -> Vec<u8>

Bytes of a structure using the CBOR bytes as per the CDDL spec which for foo = bytes will include the CBOR bytes type/len, etc. This gives the original bytes in the case where this was created from bytes originally, or will use whatever the specific encoding details are present in any encoding details struct for the type.
Source§

fn to_canonical_cbor_bytes(&self) -> Vec<u8>

Bytes of a structure using the CBOR bytes as per the CDDL spec which for foo = bytes will include the CBOR bytes type/len, etc. This gives the canonically encoded CBOR bytes always
Source§

impl Serialize for Certificate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromBytes for T
where T: Deserialize,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,