Struct miden_objects::transaction::ProvenTransaction
source · pub struct ProvenTransaction { /* private fields */ }Expand description
Result of executing and proving a transaction. Contains all the data required to verify that a transaction was executed correctly.
Implementations§
source§impl ProvenTransaction
impl ProvenTransaction
sourcepub fn new(
account_id: AccountId,
initial_account_hash: Digest,
final_account_hash: Digest,
input_notes: InputNotes<Nullifier>,
output_notes: OutputNotes<NoteEnvelope>,
tx_script_root: Option<Digest>,
block_ref: Digest,
proof: ExecutionProof
) -> Self
pub fn new( account_id: AccountId, initial_account_hash: Digest, final_account_hash: Digest, input_notes: InputNotes<Nullifier>, output_notes: OutputNotes<NoteEnvelope>, tx_script_root: Option<Digest>, block_ref: Digest, proof: ExecutionProof ) -> Self
Returns a new ProvenTransaction instantiated from the provided parameters.
sourcepub fn id(&self) -> TransactionId
pub fn id(&self) -> TransactionId
Returns unique identifier of this transaction.
sourcepub fn account_id(&self) -> AccountId
pub fn account_id(&self) -> AccountId
Returns ID of the account against which this transaction was executed.
sourcepub fn initial_account_hash(&self) -> Digest
pub fn initial_account_hash(&self) -> Digest
Returns the initial account state hash.
sourcepub fn final_account_hash(&self) -> Digest
pub fn final_account_hash(&self) -> Digest
Returns the final account state hash.
sourcepub fn account_details(&self) -> Option<&AccountDetails>
pub fn account_details(&self) -> Option<&AccountDetails>
Returns the account details.
sourcepub fn input_notes(&self) -> &InputNotes<Nullifier>
pub fn input_notes(&self) -> &InputNotes<Nullifier>
Returns a reference to the notes consumed by the transaction.
sourcepub fn output_notes(&self) -> &OutputNotes<NoteEnvelope>
pub fn output_notes(&self) -> &OutputNotes<NoteEnvelope>
Returns a reference to the notes produced by the transaction.
sourcepub fn get_output_note_details(&self, note_id: &NoteId) -> Option<&Note>
pub fn get_output_note_details(&self, note_id: &NoteId) -> Option<&Note>
Returns the NoteId details, if present.
sourcepub fn tx_script_root(&self) -> Option<Digest>
pub fn tx_script_root(&self) -> Option<Digest>
Returns the script root of the transaction.
sourcepub fn proof(&self) -> &ExecutionProof
pub fn proof(&self) -> &ExecutionProof
Returns the proof of the transaction.
Trait Implementations§
source§impl Clone for ProvenTransaction
impl Clone for ProvenTransaction
source§fn clone(&self) -> ProvenTransaction
fn clone(&self) -> ProvenTransaction
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 ProvenTransaction
impl Debug for ProvenTransaction
source§impl Deserializable for ProvenTransaction
impl Deserializable for ProvenTransaction
source§fn read_from<R: ByteReader>(
source: &mut R
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source, attempts to deserialize these bytes
into Self, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl From<&ProvenTransaction> for TransactionId
impl From<&ProvenTransaction> for TransactionId
source§fn from(tx: &ProvenTransaction) -> Self
fn from(tx: &ProvenTransaction) -> Self
Converts to this type from the input type.
source§impl Serializable for ProvenTransaction
impl Serializable for ProvenTransaction
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self into bytes and writes these bytes into the target.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ProvenTransaction
impl Send for ProvenTransaction
impl Sync for ProvenTransaction
impl Unpin for ProvenTransaction
impl UnwindSafe for ProvenTransaction
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