pub struct InvocationScript { /* private fields */ }
Expand description
An invocation script is part of a witness and is simply a sequence of neo-vm instructions.
The invocation script usually is the input to the verification script.
In most cases it will contain a signature that is checked in the verification script.
Implementations§
Source§impl InvocationScript
impl InvocationScript
Sourcepub fn set_script(&mut self, val: Vec<u8>) -> &mut Self
pub fn set_script(&mut self, val: Vec<u8>) -> &mut Self
This invocation script as a byte array
Source§impl InvocationScript
impl InvocationScript
Sourcepub fn new_with_script(script: Vec<u8>) -> Self
pub fn new_with_script(script: Vec<u8>) -> Self
Creates an invocation script with the given script.
It is recommended to use InvocationScript::from_signature
or InvocationScript::from_message_and_key_pair
when you need a signature invocation script.
§Arguments
script
- The script as a byte array
pub fn from_serialized_script(script: Vec<u8>) -> Self
Sourcepub fn from_signature(signature: Secp256r1Signature) -> Self
pub fn from_signature(signature: Secp256r1Signature) -> Self
Sourcepub fn from_message_and_key_pair(
message: Vec<u8>,
key_pair: &KeyPair,
) -> Result<Self, BuilderError>
pub fn from_message_and_key_pair( message: Vec<u8>, key_pair: &KeyPair, ) -> Result<Self, BuilderError>
Sourcepub fn from_signatures(signatures: &[Secp256r1Signature]) -> Self
pub fn from_signatures(signatures: &[Secp256r1Signature]) -> Self
Source§impl InvocationScript
impl InvocationScript
Sourcepub fn get_signatures(&self) -> Vec<Secp256r1Signature>
pub fn get_signatures(&self) -> Vec<Secp256r1Signature>
Unbundles the script into a list of signatures if this invocation script contains signatures.
§Returns
The list of signatures found in this script
Trait Implementations§
Source§impl Clone for InvocationScript
impl Clone for InvocationScript
Source§fn clone(&self) -> InvocationScript
fn clone(&self) -> InvocationScript
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InvocationScript
impl Debug for InvocationScript
Source§impl<'de> Deserialize<'de> for InvocationScript
impl<'de> Deserialize<'de> for InvocationScript
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for InvocationScript
impl Hash for InvocationScript
Source§impl NeoSerializable for InvocationScript
impl NeoSerializable for InvocationScript
Source§impl PartialEq for InvocationScript
impl PartialEq for InvocationScript
Source§impl Serialize for InvocationScript
impl Serialize for InvocationScript
impl Eq for InvocationScript
impl StructuralPartialEq for InvocationScript
Auto Trait Implementations§
impl Freeze for InvocationScript
impl RefUnwindSafe for InvocationScript
impl Send for InvocationScript
impl Sync for InvocationScript
impl Unpin for InvocationScript
impl UnwindSafe for InvocationScript
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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