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 to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
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 to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
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
Sourcepub fn new_stake_registration(stake_credential: &StakeCredential) -> Self
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.
Sourcepub fn new_stake_deregistration(stake_credential: &StakeCredential) -> Self
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.
Sourcepub fn new_stake_delegation(
stake_credential: &StakeCredential,
pool: &Ed25519KeyHash,
) -> Self
pub fn new_stake_delegation( stake_credential: &StakeCredential, pool: &Ed25519KeyHash, ) -> Self
Delegate to a take pool only
pub fn new_pool_registration(pool_params: &PoolParams) -> Self
pub fn new_pool_retirement(pool: &Ed25519KeyHash, epoch: Epoch) -> Self
Sourcepub fn new_reg_cert(stake_credential: &StakeCredential, deposit: Coin) -> Self
pub fn new_reg_cert(stake_credential: &StakeCredential, deposit: Coin) -> Self
Registers a stake credential.
Sourcepub fn new_unreg_cert(stake_credential: &StakeCredential, deposit: Coin) -> Self
pub fn new_unreg_cert(stake_credential: &StakeCredential, deposit: Coin) -> Self
Unregisters a stake credential.
Sourcepub fn new_vote_deleg_cert(
stake_credential: &StakeCredential,
d_rep: &DRep,
) -> Self
pub fn new_vote_deleg_cert( stake_credential: &StakeCredential, d_rep: &DRep, ) -> Self
Delegate to a DRep for voting only
Sourcepub fn new_stake_vote_deleg_cert(
stake_credential: &StakeCredential,
pool: &Ed25519KeyHash,
d_rep: &DRep,
) -> Self
pub fn new_stake_vote_deleg_cert( stake_credential: &StakeCredential, pool: &Ed25519KeyHash, d_rep: &DRep, ) -> Self
Delegate to a stake pool and a DRep
Sourcepub fn new_stake_reg_deleg_cert(
stake_credential: &StakeCredential,
pool: &Ed25519KeyHash,
deposit: Coin,
) -> Self
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
Sourcepub fn new_vote_reg_deleg_cert(
stake_credential: &StakeCredential,
d_rep: &DRep,
deposit: Coin,
) -> Self
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
Sourcepub fn new_stake_vote_reg_deleg_cert(
stake_credential: &StakeCredential,
pool: &Ed25519KeyHash,
d_rep: &DRep,
deposit: Coin,
) -> Self
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
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, deposit: Coin, anchor: Option<Anchor>, ) -> Self
pub fn new_unreg_drep_cert( drep_credential: &DrepCredential, deposit: 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 duplicate 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 LongRefFromWasmAbi for Certificate
impl LongRefFromWasmAbi 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
Source§type Anchor = RcRef<Certificate>
type Anchor = RcRef<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
Source§impl TryFromJsValue for Certificate
impl TryFromJsValue for Certificate
Source§impl VectorFromWasmAbi for Certificate
impl VectorFromWasmAbi for Certificate
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Certificate]>
Source§impl VectorIntoJsValue for Certificate
impl VectorIntoJsValue for Certificate
fn vector_into_jsvalue(vector: Box<[Certificate]>) -> JsValue
Source§impl VectorIntoWasmAbi for Certificate
impl VectorIntoWasmAbi for Certificate
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Certificate]>) -> Self::Abi
Source§impl WasmDescribeVector for Certificate
impl WasmDescribeVector for Certificate
impl SupportsConstructor for Certificate
impl SupportsInstanceProperty for Certificate
impl SupportsStaticProperty 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> 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>
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,
Source§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.