Struct cml_chain_wasm::byron::SpendingData
source · pub struct SpendingData(/* private fields */);Implementations§
source§impl SpendingData
impl SpendingData
sourcepub fn to_cbor_bytes(&self) -> Vec<u8>
pub fn to_cbor_bytes(&self) -> Vec<u8>
- Serialize this type to CBOR bytes.
- This type does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<SpendingData, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<SpendingData, 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 does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<SpendingData, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<SpendingData, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl SpendingData
impl SpendingData
pub fn new_spending_data_pub_key(pubkey: &Bip32PublicKey) -> Self
pub fn new_spending_data_script(script: &ByronScript) -> Self
pub fn new_spending_data_redeem(redeem: &PublicKey) -> Self
pub fn kind(&self) -> SpendingDataKind
pub fn as_spending_data_pub_key(&self) -> Option<Bip32PublicKey>
pub fn as_spending_data_script(&self) -> Option<ByronScript>
pub fn as_spending_data_redeem(&self) -> Option<PublicKey>
Trait Implementations§
source§impl AsRef<SpendingData> for SpendingData
impl AsRef<SpendingData> for SpendingData
source§fn as_ref(&self) -> &SpendingData
fn as_ref(&self) -> &SpendingData
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for SpendingData
impl Clone for SpendingData
source§fn clone(&self) -> SpendingData
fn clone(&self) -> SpendingData
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 SpendingData
impl Debug for SpendingData
source§impl From<SpendingData> for JsValue
impl From<SpendingData> for JsValue
source§fn from(value: SpendingData) -> Self
fn from(value: SpendingData) -> Self
Converts to this type from the input type.
source§impl From<SpendingData> for SpendingData
impl From<SpendingData> for SpendingData
source§fn from(native: SpendingData) -> Self
fn from(native: SpendingData) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for SpendingData
impl FromWasmAbi for SpendingData
source§impl Into<SpendingData> for SpendingData
impl Into<SpendingData> for SpendingData
source§fn into(self) -> SpendingData
fn into(self) -> SpendingData
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for SpendingData
impl IntoWasmAbi for SpendingData
source§impl OptionFromWasmAbi for SpendingData
impl OptionFromWasmAbi for SpendingData
source§impl OptionIntoWasmAbi for SpendingData
impl OptionIntoWasmAbi for SpendingData
source§impl RefFromWasmAbi for SpendingData
impl RefFromWasmAbi for SpendingData
§type Anchor = Ref<'static, SpendingData>
type Anchor = Ref<'static, SpendingData>
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 SpendingData
impl RefMutFromWasmAbi for SpendingData
Auto Trait Implementations§
impl Freeze for SpendingData
impl RefUnwindSafe for SpendingData
impl Send for SpendingData
impl Sync for SpendingData
impl Unpin for SpendingData
impl UnwindSafe for SpendingData
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> 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.