Struct cml_chain_wasm::transaction::ScriptPubkey
source · pub struct ScriptPubkey(/* private fields */);Implementations§
source§impl ScriptPubkey
impl ScriptPubkey
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<ScriptPubkey, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<ScriptPubkey, 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<ScriptPubkey, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<ScriptPubkey, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl ScriptPubkey
impl ScriptPubkey
source§impl ScriptPubkey
impl ScriptPubkey
pub fn ed25519_key_hash(&self) -> Ed25519KeyHash
pub fn new(ed25519_key_hash: &Ed25519KeyHash) -> Self
Trait Implementations§
source§impl AsRef<ScriptPubkey> for ScriptPubkey
impl AsRef<ScriptPubkey> for ScriptPubkey
source§fn as_ref(&self) -> &ScriptPubkey
fn as_ref(&self) -> &ScriptPubkey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for ScriptPubkey
impl Clone for ScriptPubkey
source§fn clone(&self) -> ScriptPubkey
fn clone(&self) -> ScriptPubkey
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 ScriptPubkey
impl Debug for ScriptPubkey
source§impl From<ScriptPubkey> for JsValue
impl From<ScriptPubkey> for JsValue
source§fn from(value: ScriptPubkey) -> Self
fn from(value: ScriptPubkey) -> Self
Converts to this type from the input type.
source§impl From<ScriptPubkey> for ScriptPubkey
impl From<ScriptPubkey> for ScriptPubkey
source§fn from(native: ScriptPubkey) -> Self
fn from(native: ScriptPubkey) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for ScriptPubkey
impl FromWasmAbi for ScriptPubkey
source§impl Into<ScriptPubkey> for ScriptPubkey
impl Into<ScriptPubkey> for ScriptPubkey
source§fn into(self) -> ScriptPubkey
fn into(self) -> ScriptPubkey
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for ScriptPubkey
impl IntoWasmAbi for ScriptPubkey
source§impl OptionFromWasmAbi for ScriptPubkey
impl OptionFromWasmAbi for ScriptPubkey
source§impl OptionIntoWasmAbi for ScriptPubkey
impl OptionIntoWasmAbi for ScriptPubkey
source§impl RefFromWasmAbi for ScriptPubkey
impl RefFromWasmAbi for ScriptPubkey
§type Anchor = Ref<'static, ScriptPubkey>
type Anchor = Ref<'static, ScriptPubkey>
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 ScriptPubkey
impl RefMutFromWasmAbi for ScriptPubkey
Auto Trait Implementations§
impl Freeze for ScriptPubkey
impl RefUnwindSafe for ScriptPubkey
impl Send for ScriptPubkey
impl Sync for ScriptPubkey
impl Unpin for ScriptPubkey
impl UnwindSafe for ScriptPubkey
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.