Skip to main content

SpendParams

Struct SpendParams 

Source
pub struct SpendParams {
    pub source_txid: [u8; 32],
    pub source_output_index: u32,
    pub source_satoshis: u64,
    pub locking_script: LockingScript,
    pub transaction_version: i32,
    pub other_inputs: Vec<TxInput>,
    pub outputs: Vec<TxOutput>,
    pub input_index: usize,
    pub unlocking_script: UnlockingScript,
    pub input_sequence: u32,
    pub lock_time: u32,
    pub memory_limit: Option<usize>,
}
Expand description

Parameters for constructing a Spend validator.

Fields§

§source_txid: [u8; 32]

The transaction ID of the source UTXO (32 bytes, internal byte order).

§source_output_index: u32

The index of the output in the source transaction.

§source_satoshis: u64

The satoshi value of the source UTXO.

§locking_script: LockingScript

The locking script of the source UTXO.

§transaction_version: i32

The version of the spending transaction.

§other_inputs: Vec<TxInput>

Other inputs in the spending transaction (excluding this one).

§outputs: Vec<TxOutput>

Outputs of the spending transaction.

§input_index: usize

The index of this input in the spending transaction.

§unlocking_script: UnlockingScript

The unlocking script for this spend.

§input_sequence: u32

The sequence number of this input.

§lock_time: u32

The lock time of the spending transaction.

§memory_limit: Option<usize>

Optional memory limit in bytes (default: 32MB).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V