Struct cml_chain_wasm::certs::Certificate
source · pub struct Certificate(/* private fields */);Implementations§
source§impl Certificate
impl Certificate
sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Certificate, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Certificate, JsError>
- Create this type from CBOR bytes
sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<Certificate, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<Certificate, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl Certificate
impl Certificate
source§impl Certificate
impl Certificate
pub fn new_stake_registration(stake_credential: &StakeCredential) -> Self
pub fn new_stake_deregistration(stake_credential: &StakeCredential) -> Self
pub fn new_stake_delegation( stake_credential: &StakeCredential, pool: &Ed25519KeyHash ) -> Self
pub fn new_pool_registration(pool_params: &PoolParams) -> Self
pub fn new_pool_retirement(pool: &Ed25519KeyHash, epoch: Epoch) -> Self
pub fn new_reg_cert(stake_credential: &StakeCredential, coin: Coin) -> Self
pub fn new_unreg_cert(stake_credential: &StakeCredential, coin: Coin) -> Self
pub fn new_vote_deleg_cert( stake_credential: &StakeCredential, d_rep: &DRep ) -> Self
pub fn new_stake_vote_deleg_cert( stake_credential: &StakeCredential, pool: &Ed25519KeyHash, d_rep: &DRep ) -> Self
pub fn new_stake_reg_deleg_cert( stake_credential: &StakeCredential, pool: &Ed25519KeyHash, coin: Coin ) -> Self
pub fn new_vote_reg_deleg_cert( stake_credential: &StakeCredential, d_rep: &DRep, coin: Coin ) -> Self
pub fn new_stake_vote_reg_deleg_cert( stake_credential: &StakeCredential, pool: &Ed25519KeyHash, d_rep: &DRep, coin: Coin ) -> Self
pub fn new_auth_committee_hot_cert( committee_cold_credential: &CommitteeColdCredential, committee_hot_credential: &CommitteeHotCredential ) -> Self
pub fn new_resign_committee_cold_cert( committee_cold_credential: &CommitteeColdCredential, anchor: Option<Anchor> ) -> Self
pub fn new_reg_drep_cert( drep_credential: &DrepCredential, coin: Coin, anchor: Option<Anchor> ) -> Self
pub fn new_unreg_drep_cert(drep_credential: &DrepCredential, coin: Coin) -> Self
pub fn new_update_drep_cert( drep_credential: &DrepCredential, anchor: Option<Anchor> ) -> Self
pub fn kind(&self) -> CertificateKind
pub fn as_stake_registration(&self) -> Option<StakeRegistration>
pub fn as_stake_deregistration(&self) -> Option<StakeDeregistration>
pub fn as_stake_delegation(&self) -> Option<StakeDelegation>
pub fn as_pool_registration(&self) -> Option<PoolRegistration>
pub fn as_pool_retirement(&self) -> Option<PoolRetirement>
pub fn as_reg_cert(&self) -> Option<RegCert>
pub fn as_unreg_cert(&self) -> Option<UnregCert>
pub fn as_vote_deleg_cert(&self) -> Option<VoteDelegCert>
pub fn as_stake_vote_deleg_cert(&self) -> Option<StakeVoteDelegCert>
pub fn as_stake_reg_deleg_cert(&self) -> Option<StakeRegDelegCert>
pub fn as_vote_reg_deleg_cert(&self) -> Option<VoteRegDelegCert>
pub fn as_stake_vote_reg_deleg_cert(&self) -> Option<StakeVoteRegDelegCert>
pub fn as_auth_committee_hot_cert(&self) -> Option<AuthCommitteeHotCert>
pub fn as_resign_committee_cold_cert(&self) -> Option<ResignCommitteeColdCert>
pub fn as_reg_drep_cert(&self) -> Option<RegDrepCert>
pub fn as_unreg_drep_cert(&self) -> Option<UnregDrepCert>
pub fn as_update_drep_cert(&self) -> Option<UpdateDrepCert>
Trait Implementations§
source§impl AsRef<Certificate> for Certificate
impl AsRef<Certificate> for Certificate
source§fn as_ref(&self) -> &Certificate
fn as_ref(&self) -> &Certificate
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for Certificate
impl Clone for Certificate
source§fn clone(&self) -> Certificate
fn clone(&self) -> Certificate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for Certificate
impl Debug for Certificate
source§impl From<Certificate> for Certificate
impl From<Certificate> for Certificate
source§fn from(native: Certificate) -> Self
fn from(native: Certificate) -> Self
Converts to this type from the input type.
source§impl From<Certificate> for JsValue
impl From<Certificate> for JsValue
source§fn from(value: Certificate) -> Self
fn from(value: Certificate) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for Certificate
impl FromWasmAbi for Certificate
source§impl Into<Certificate> for Certificate
impl Into<Certificate> for Certificate
source§fn into(self) -> Certificate
fn into(self) -> Certificate
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for Certificate
impl IntoWasmAbi for Certificate
source§impl OptionFromWasmAbi for Certificate
impl OptionFromWasmAbi for Certificate
source§impl OptionIntoWasmAbi for Certificate
impl OptionIntoWasmAbi for Certificate
source§impl RefFromWasmAbi for Certificate
impl RefFromWasmAbi for Certificate
§type Anchor = Ref<'static, Certificate>
type Anchor = Ref<'static, Certificate>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for Certificate
impl RefMutFromWasmAbi for Certificate
Auto Trait Implementations§
impl Freeze for Certificate
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
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
Mutably borrows from an owned value. Read more
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>
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 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>
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 moresource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abisource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.