pub enum ConfirmedTransaction<N: Network> {
    AcceptedDeploy(u32, Transaction<N>, Vec<FinalizeOperation<N>>),
    AcceptedExecute(u32, Transaction<N>, Vec<FinalizeOperation<N>>),
    RejectedDeploy(u32, Transaction<N>, Rejected<N>, Vec<FinalizeOperation<N>>),
    RejectedExecute(u32, Transaction<N>, Rejected<N>, Vec<FinalizeOperation<N>>),
}
Expand description

The confirmed transaction.

Variants§

§

AcceptedDeploy(u32, Transaction<N>, Vec<FinalizeOperation<N>>)

The accepted deploy transaction is composed of (index, deploy_transaction, finalize_operations).

§

AcceptedExecute(u32, Transaction<N>, Vec<FinalizeOperation<N>>)

The accepted execute transaction is composed of (index, execute_transaction, finalize_operations).

§

RejectedDeploy(u32, Transaction<N>, Rejected<N>, Vec<FinalizeOperation<N>>)

The rejected deploy transaction is composed of (index, fee_transaction, rejected_deployment, finalize_operations).

§

RejectedExecute(u32, Transaction<N>, Rejected<N>, Vec<FinalizeOperation<N>>)

The rejected execute transaction is composed of (index, fee_transaction, rejected_execution, finalize_operations).

Implementations§

source§

impl<N: Network> ConfirmedTransaction<N>

source

pub fn accepted_deploy( index: u32, transaction: Transaction<N>, finalize_operations: Vec<FinalizeOperation<N>> ) -> Result<Self>

Returns a new instance of an accepted deploy transaction.

source

pub fn accepted_execute( index: u32, transaction: Transaction<N>, finalize_operations: Vec<FinalizeOperation<N>> ) -> Result<Self>

Returns a new instance of an accepted execute transaction.

source

pub fn rejected_deploy( index: u32, transaction: Transaction<N>, rejected: Rejected<N>, finalize_operations: Vec<FinalizeOperation<N>> ) -> Result<Self>

Returns a new instance of a rejected deploy transaction.

source

pub fn rejected_execute( index: u32, transaction: Transaction<N>, rejected: Rejected<N>, finalize_operations: Vec<FinalizeOperation<N>> ) -> Result<Self>

Returns a new instance of a rejected execute transaction.

source§

impl<N: Network> ConfirmedTransaction<N>

source

pub const fn is_accepted(&self) -> bool

Returns ‘true’ if the confirmed transaction is accepted.

source

pub const fn is_rejected(&self) -> bool

Returns ‘true’ if the confirmed transaction is rejected.

source

pub fn contains_unconfirmed_transaction_id( &self, unconfirmed_transaction_id: &N::TransactionID ) -> bool

Returns true if the confirmed transaction represents the given unconfirmed transaction ID.

source§

impl<N: Network> ConfirmedTransaction<N>

source

pub const fn index(&self) -> u32

Returns the confirmed transaction index.

source

pub const fn variant(&self) -> &str

Returns the human-readable variant of the confirmed transaction.

source

pub const fn transaction(&self) -> &Transaction<N>

Returns the transaction.

source

pub fn into_transaction(self) -> Transaction<N>

Returns the transaction.

source

pub fn num_finalize(&self) -> usize

Returns the number of finalize operations.

source

pub const fn finalize_operations(&self) -> &Vec<FinalizeOperation<N>>

Returns the finalize operations for the confirmed transaction.

source

pub fn to_rejected_id(&self) -> Result<Option<Field<N>>>

Returns the rejected ID, if the confirmed transaction is rejected.

source

pub fn to_rejected(&self) -> Option<&Rejected<N>>

Returns the rejected object, if the confirmed transaction is rejected.

source

pub fn to_unconfirmed_transaction_id(&self) -> Result<N::TransactionID>

Returns the unconfirmed transaction ID, which is defined as the transaction ID prior to confirmation. When a transaction is rejected, its fee transition is used to construct the confirmed transaction ID, changing the original transaction ID.

source

pub fn to_unconfirmed_transaction(&self) -> Result<Transaction<N>>

Returns the unconfirmed transaction, which is defined as the transaction prior to confirmation. When a transaction is rejected, its fee transition is used to construct the confirmed transaction, changing the original transaction.

Methods from Deref<Target = Transaction<N>>§

source

pub fn to_root(&self) -> Result<Field<N>>

Returns the transaction root, by computing the root for a Merkle tree of the transition IDs.

source

pub fn to_leaf(&self, id: &Field<N>) -> Result<TransactionLeaf<N>>

Returns the Merkle leaf for the given ID of a function or transition in the transaction.

source

pub fn to_path(&self, leaf: &TransactionLeaf<N>) -> Result<TransactionPath<N>>

Returns the Merkle path for the transaction leaf.

source

pub fn to_tree(&self) -> Result<TransactionTree<N>>

The Merkle tree of transition IDs for the transaction.

source

pub fn is_deploy(&self) -> bool

Returns true if the transaction is a deploy transaction.

source

pub fn is_execute(&self) -> bool

Returns true if the transaction is an execute transaction.

source

pub fn is_fee(&self) -> bool

Returns true if the transaction is a fee transaction.

source

pub fn contains_split(&self) -> bool

Returns true if this transaction contains a call to credits.aleo/split.

source

pub fn owner(&self) -> Option<&ProgramOwner<N>>

Returns Some(owner) if the transaction is a deployment. Otherwise, returns None.

source

pub fn deployment(&self) -> Option<&Deployment<N>>

Returns Some(deployment) if the transaction is a deployment. Otherwise, returns None.

source

pub fn execution(&self) -> Option<&Execution<N>>

Returns Some(execution) if the transaction is an execution. Otherwise, returns None.

source

pub fn id(&self) -> N::TransactionID

Returns the transaction ID.

source

pub fn fee_amount(&self) -> Result<U64<N>>

Returns the transaction total fee.

source

pub fn base_fee_amount(&self) -> Result<U64<N>>

Returns the transaction base fee.

source

pub fn priority_fee_amount(&self) -> Result<U64<N>>

Returns the transaction priority fee.

source

pub fn fee_transition(&self) -> Option<Fee<N>>

Returns the fee transition.

source

pub fn contains_transition(&self, transition_id: &N::TransitionID) -> bool

Returns true if the transaction contains the given transition ID.

source

pub fn contains_serial_number(&self, serial_number: &Field<N>) -> bool

Returns true if the transaction contains the given serial number.

source

pub fn contains_commitment(&self, commitment: &Field<N>) -> bool

Returns true if the transaction contains the given commitment.

source

pub fn find_transition( &self, transition_id: &N::TransitionID ) -> Option<&Transition<N>>

Returns the transition with the corresponding transition ID, if it exists.

source

pub fn find_transition_for_serial_number( &self, serial_number: &Field<N> ) -> Option<&Transition<N>>

Returns the transition for the given serial number, if it exists.

source

pub fn find_transition_for_commitment( &self, commitment: &Field<N> ) -> Option<&Transition<N>>

Returns the transition for the given commitment, if it exists.

source

pub fn find_record( &self, commitment: &Field<N> ) -> Option<&Record<N, Ciphertext<N>>>

Returns the record with the corresponding commitment, if it exists.

source

pub fn transition_ids( &self ) -> impl '_ + DoubleEndedIterator<Item = &N::TransitionID>

Returns an iterator over the transition IDs, for all transitions.

source

pub fn transitions( &self ) -> impl '_ + DoubleEndedIterator<Item = &Transition<N>>

Returns an iterator over all transitions.

source

pub fn input_ids(&self) -> impl '_ + Iterator<Item = &Field<N>>

Returns an iterator over the input IDs, for all transition inputs that are records.

source

pub fn serial_numbers(&self) -> impl '_ + Iterator<Item = &Field<N>>

Returns an iterator over the serial numbers, for all transition inputs that are records.

source

pub fn tags(&self) -> impl '_ + Iterator<Item = &Field<N>>

Returns an iterator over the tags, for all transition inputs that are records.

source

pub fn output_ids(&self) -> impl '_ + Iterator<Item = &Field<N>>

Returns an iterator over the output IDs, for all transition inputs that are records.

source

pub fn commitments(&self) -> impl '_ + Iterator<Item = &Field<N>>

Returns an iterator over the commitments, for all transition outputs that are records.

source

pub fn records( &self ) -> impl '_ + Iterator<Item = (&Field<N>, &Record<N, Ciphertext<N>>)>

Returns an iterator over the records, for all transition outputs that are records.

source

pub fn nonces(&self) -> impl '_ + Iterator<Item = &Group<N>>

Returns an iterator over the nonces, for all transition outputs that are records.

source

pub fn transition_public_keys( &self ) -> impl '_ + DoubleEndedIterator<Item = &Group<N>>

Returns an iterator over the transition public keys, for all transitions.

source

pub fn transition_commitments( &self ) -> impl '_ + DoubleEndedIterator<Item = &Field<N>>

Returns an iterator over the transition commitments, for all transitions.

Trait Implementations§

source§

impl<N: Clone + Network> Clone for ConfirmedTransaction<N>

source§

fn clone(&self) -> ConfirmedTransaction<N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<N: Network> Debug for ConfirmedTransaction<N>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Prints the confirmed transaction as a JSON-string.

source§

impl<N: Network> Deref for ConfirmedTransaction<N>

source§

fn deref(&self) -> &Self::Target

Returns a reference to the valid transaction.

§

type Target = Transaction<N>

The resulting type after dereferencing.
source§

impl<'de, N: Network> Deserialize<'de> for ConfirmedTransaction<N>

source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserializes the confirmed transaction from a string or bytes.

source§

impl<N: Network> Display for ConfirmedTransaction<N>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Displays the confirmed transaction as a JSON-string.

source§

impl<N: Network> FromBytes for ConfirmedTransaction<N>

source§

fn read_le<R: Read>(reader: R) -> IoResult<Self>

Reads the confirmed transaction from a buffer.

§

fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>where Self: Sized,

Returns Self from a byte array in little-endian order.
source§

impl<'a, N: Network> FromIterator<&'a ConfirmedTransaction<N>> for Transactions<N>

source§

fn from_iter<T: IntoIterator<Item = &'a ConfirmedTransaction<N>>>( iter: T ) -> Self

Initializes from an iterator of transactions.

source§

impl<N: Network> FromIterator<ConfirmedTransaction<N>> for Transactions<N>

source§

fn from_iter<T: IntoIterator<Item = ConfirmedTransaction<N>>>(iter: T) -> Self

Initializes from an iterator of transactions.

source§

impl<N: Network> FromStr for ConfirmedTransaction<N>

source§

fn from_str(status: &str) -> Result<Self, Self::Err>

Initializes the confirmed transaction from a JSON-string.

§

type Err = Error

The associated error which can be returned from parsing.
source§

impl<N: PartialEq + Network> PartialEq for ConfirmedTransaction<N>

source§

fn eq(&self, other: &ConfirmedTransaction<N>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<N: Network> Serialize for ConfirmedTransaction<N>

source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serializes the confirmed transaction into string or bytes.

source§

impl<N: Network> ToBytes for ConfirmedTransaction<N>

source§

fn write_le<W: Write>(&self, writer: W) -> IoResult<()>

Writes the confirmed transaction to a buffer.

§

fn to_bytes_le(&self) -> Result<Vec<u8>, Error>where Self: Sized,

Returns self as a byte array in little-endian order.
source§

impl<N: Eq + Network> Eq for ConfirmedTransaction<N>

source§

impl<N: Network> StructuralEq for ConfirmedTransaction<N>

source§

impl<N: Network> StructuralPartialEq for ConfirmedTransaction<N>

Auto Trait Implementations§

§

impl<N> RefUnwindSafe for ConfirmedTransaction<N>where N: RefUnwindSafe, <N as Environment>::Field: RefUnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe, <N as Network>::StateRoot: RefUnwindSafe, <N as Network>::TransactionID: RefUnwindSafe, <N as Network>::TransitionID: RefUnwindSafe,

§

impl<N> Send for ConfirmedTransaction<N>

§

impl<N> Sync for ConfirmedTransaction<N>

§

impl<N> Unpin for ConfirmedTransaction<N>where N: Unpin, <N as Environment>::Field: Unpin, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin, <N as Network>::StateRoot: Unpin, <N as Network>::TransactionID: Unpin, <N as Network>::TransitionID: Unpin,

§

impl<N> UnwindSafe for ConfirmedTransaction<N>where N: UnwindSafe, <N as Environment>::Field: UnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe + RefUnwindSafe, <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: UnwindSafe, <N as Network>::StateRoot: UnwindSafe, <N as Network>::TransactionID: UnwindSafe, <N as Network>::TransitionID: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,

§

fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,

§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

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

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,