Struct miden_objects::transaction::TransactionInputs
source · pub struct TransactionInputs { /* private fields */ }Expand description
Contains the data required to execute a transaction.
Implementations§
source§impl TransactionInputs
impl TransactionInputs
sourcepub fn new(
account: Account,
account_seed: Option<Word>,
block_header: BlockHeader,
block_chain: ChainMmr,
input_notes: InputNotes<InputNote>,
) -> Result<Self, TransactionInputError>
pub fn new( account: Account, account_seed: Option<Word>, block_header: BlockHeader, block_chain: ChainMmr, input_notes: InputNotes<InputNote>, ) -> Result<Self, TransactionInputError>
Returns new TransactionInputs instantiated with the specified parameters.
§Errors
Returns an error if:
- For a new account, account seed is not provided or the provided seed is invalid.
- For an existing account, account seed was provided.
sourcepub fn account(&self) -> &Account
pub fn account(&self) -> &Account
Returns account against which the transaction is to be executed.
sourcepub fn account_seed(&self) -> Option<Word>
pub fn account_seed(&self) -> Option<Word>
For newly-created accounts, returns the account seed; for existing accounts, returns None.
sourcepub fn block_header(&self) -> &BlockHeader
pub fn block_header(&self) -> &BlockHeader
Returns block header for the block referenced by the transaction.
sourcepub fn block_chain(&self) -> &ChainMmr
pub fn block_chain(&self) -> &ChainMmr
Returns chain MMR containing authentication paths for all notes consumed by the transaction.
sourcepub fn input_notes(&self) -> &InputNotes<InputNote>
pub fn input_notes(&self) -> &InputNotes<InputNote>
Returns the notes to be consumed in the transaction.
sourcepub fn into_parts(
self,
) -> (Account, Option<Word>, BlockHeader, ChainMmr, InputNotes<InputNote>)
pub fn into_parts( self, ) -> (Account, Option<Word>, BlockHeader, ChainMmr, InputNotes<InputNote>)
Consumes these transaction inputs and returns their underlying components.
Trait Implementations§
source§impl Clone for TransactionInputs
impl Clone for TransactionInputs
source§fn clone(&self) -> TransactionInputs
fn clone(&self) -> TransactionInputs
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 TransactionInputs
impl Debug for TransactionInputs
source§impl PartialEq for TransactionInputs
impl PartialEq for TransactionInputs
source§fn eq(&self, other: &TransactionInputs) -> bool
fn eq(&self, other: &TransactionInputs) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for TransactionInputs
impl StructuralPartialEq for TransactionInputs
Auto Trait Implementations§
impl Freeze for TransactionInputs
impl RefUnwindSafe for TransactionInputs
impl Send for TransactionInputs
impl Sync for TransactionInputs
impl Unpin for TransactionInputs
impl UnwindSafe for TransactionInputs
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)