Struct cml_chain_wasm::auxdata::AuxiliaryData
source · pub struct AuxiliaryData(/* private fields */);Implementations§
source§impl AuxiliaryData
impl AuxiliaryData
pub fn new() -> Self
pub fn metadata(&self) -> Option<Metadata>
pub fn native_scripts(&self) -> Option<NativeScriptList>
pub fn plutus_v1_scripts(&self) -> Option<PlutusV1ScriptList>
pub fn plutus_v2_scripts(&self) -> Option<PlutusV2ScriptList>
sourcepub fn add_metadata(&mut self, other: &Metadata)
pub fn add_metadata(&mut self, other: &Metadata)
Warning: overwrites any conflicting metadatum labels present
sourcepub fn add_native_scripts(&mut self, scripts: &NativeScriptList)
pub fn add_native_scripts(&mut self, scripts: &NativeScriptList)
Warning: does not check for duplicates and may migrate eras
sourcepub fn add_plutus_v1_scripts(&mut self, scripts: &PlutusV1ScriptList)
pub fn add_plutus_v1_scripts(&mut self, scripts: &PlutusV1ScriptList)
Warning: does not check for duplicates and may migrate eras
sourcepub fn add_plutus_v2_scripts(&mut self, scripts: &PlutusV2ScriptList)
pub fn add_plutus_v2_scripts(&mut self, scripts: &PlutusV2ScriptList)
Warning: does not check for duplicates and may migrate eras
sourcepub fn add(&mut self, other: &AuxiliaryData)
pub fn add(&mut self, other: &AuxiliaryData)
Adds everything present in other to self May change the era the aux data is in if necessary Warning: overwrites any metadatum labels present also does not check for duplicates in scripts
source§impl AuxiliaryData
impl AuxiliaryData
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<AuxiliaryData, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<AuxiliaryData, 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<AuxiliaryData, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<AuxiliaryData, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl AuxiliaryData
impl AuxiliaryData
source§impl AuxiliaryData
impl AuxiliaryData
pub fn new_shelley(shelley: &ShelleyFormatAuxData) -> Self
pub fn new_shelley_m_a(shelley_m_a: &ShelleyMaFormatAuxData) -> Self
pub fn new_conway(conway: &ConwayFormatAuxData) -> Self
pub fn kind(&self) -> AuxiliaryDataKind
pub fn as_shelley(&self) -> Option<ShelleyFormatAuxData>
pub fn as_shelley_m_a(&self) -> Option<ShelleyMaFormatAuxData>
pub fn as_conway(&self) -> Option<ConwayFormatAuxData>
Trait Implementations§
source§impl AsRef<AuxiliaryData> for AuxiliaryData
impl AsRef<AuxiliaryData> for AuxiliaryData
source§fn as_ref(&self) -> &AuxiliaryData
fn as_ref(&self) -> &AuxiliaryData
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for AuxiliaryData
impl Clone for AuxiliaryData
source§fn clone(&self) -> AuxiliaryData
fn clone(&self) -> AuxiliaryData
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 AuxiliaryData
impl Debug for AuxiliaryData
source§impl From<AuxiliaryData> for AuxiliaryData
impl From<AuxiliaryData> for AuxiliaryData
source§fn from(native: AuxiliaryData) -> Self
fn from(native: AuxiliaryData) -> Self
Converts to this type from the input type.
source§impl From<AuxiliaryData> for JsValue
impl From<AuxiliaryData> for JsValue
source§fn from(value: AuxiliaryData) -> Self
fn from(value: AuxiliaryData) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for AuxiliaryData
impl FromWasmAbi for AuxiliaryData
source§impl Into<AuxiliaryData> for AuxiliaryData
impl Into<AuxiliaryData> for AuxiliaryData
source§fn into(self) -> AuxiliaryData
fn into(self) -> AuxiliaryData
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for AuxiliaryData
impl IntoWasmAbi for AuxiliaryData
source§impl OptionFromWasmAbi for AuxiliaryData
impl OptionFromWasmAbi for AuxiliaryData
source§impl OptionIntoWasmAbi for AuxiliaryData
impl OptionIntoWasmAbi for AuxiliaryData
source§impl RefFromWasmAbi for AuxiliaryData
impl RefFromWasmAbi for AuxiliaryData
§type Anchor = Ref<'static, AuxiliaryData>
type Anchor = Ref<'static, AuxiliaryData>
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 AuxiliaryData
impl RefMutFromWasmAbi for AuxiliaryData
Auto Trait Implementations§
impl Freeze for AuxiliaryData
impl RefUnwindSafe for AuxiliaryData
impl Send for AuxiliaryData
impl Sync for AuxiliaryData
impl Unpin for AuxiliaryData
impl UnwindSafe for AuxiliaryData
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.