Enum tx_bakery::utils::script::ScriptOrRef
source · pub enum ScriptOrRef {
RefScript(TransactionInput, PlutusScript),
PlutusScript(PlutusScript),
}
Expand description
Plutus Script
Variants§
RefScript(TransactionInput, PlutusScript)
Script will be used from a reference input
PlutusScript(PlutusScript)
Script will be added as script witness
Implementations§
source§impl ScriptOrRef
impl ScriptOrRef
pub fn from_bytes(bytes: Vec<u8>) -> Result<Self>
pub fn from_script(script: Script) -> Result<Self>
pub fn into_ref_script(self, tx_in: TransactionInput) -> Self
pub fn get_script(self) -> PlutusScript
pub fn get_script_hash(&self) -> ScriptHash
pub fn get_script_size(&self) -> usize
pub fn get_version(self) -> Language
pub fn as_validator(self) -> (ValidatorHash, ScriptOrRef)
pub fn as_minting_policy(self) -> (MintingPolicyHash, ScriptOrRef)
pub fn with_script_hash(self) -> (ScriptHash, ScriptOrRef)
Trait Implementations§
source§impl Clone for ScriptOrRef
impl Clone for ScriptOrRef
source§fn clone(&self) -> ScriptOrRef
fn clone(&self) -> ScriptOrRef
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 moreAuto Trait Implementations§
impl Freeze for ScriptOrRef
impl RefUnwindSafe for ScriptOrRef
impl Send for ScriptOrRef
impl Sync for ScriptOrRef
impl Unpin for ScriptOrRef
impl UnwindSafe for ScriptOrRef
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more