Struct snarkvm_dpc::transition::transition::Transition
source · [−]pub struct Transition<N: Network> { /* private fields */ }
Implementations
sourceimpl<N: Network> Transition<N>
impl<N: Network> Transition<N>
sourcepub fn verify(
&self,
inner_circuit_id: N::InnerCircuitID,
ledger_root: N::LedgerRoot,
local_transitions_root: N::TransactionID
) -> bool
pub fn verify(
&self,
inner_circuit_id: N::InnerCircuitID,
ledger_root: N::LedgerRoot,
local_transitions_root: N::TransactionID
) -> bool
Returns true
if the transition ID is well-formed and the transition proof is valid.
sourcepub fn contains_serial_number(&self, serial_number: &N::SerialNumber) -> bool
pub fn contains_serial_number(&self, serial_number: &N::SerialNumber) -> bool
Returns true
if the given serial number exists.
sourcepub fn contains_commitment(&self, commitment: &N::Commitment) -> bool
pub fn contains_commitment(&self, commitment: &N::Commitment) -> bool
Returns true
if the given commitment exists.
sourcepub fn transition_id(&self) -> N::TransitionID
pub fn transition_id(&self) -> N::TransitionID
Returns the transition ID.
sourcepub fn serial_numbers(
&self
) -> impl Iterator<Item = &N::SerialNumber> + Debug + '_
pub fn serial_numbers(
&self
) -> impl Iterator<Item = &N::SerialNumber> + Debug + '_
Returns a reference to the serial numbers.
sourcepub fn commitments(&self) -> impl Iterator<Item = &N::Commitment> + Debug + '_
pub fn commitments(&self) -> impl Iterator<Item = &N::Commitment> + Debug + '_
Returns a reference to the commitments.
sourcepub fn ciphertexts(
&self
) -> impl Iterator<Item = &N::RecordCiphertext> + Debug + '_
pub fn ciphertexts(
&self
) -> impl Iterator<Item = &N::RecordCiphertext> + Debug + '_
Returns a reference to the ciphertexts.
sourcepub fn value_balance(&self) -> &AleoAmount
pub fn value_balance(&self) -> &AleoAmount
Returns a reference to the value balance.
sourcepub fn events(&self) -> impl Iterator<Item = &Event<N>> + Debug + '_
pub fn events(&self) -> impl Iterator<Item = &Event<N>> + Debug + '_
Returns a reference to the events.
sourcepub fn proof(&self) -> &N::OuterProof
pub fn proof(&self) -> &N::OuterProof
Returns a reference to the transition proof.
sourcepub fn to_decrypted_records<'a>(
&'a self,
decryption_key: &'a DecryptionKey<N>
) -> impl Iterator<Item = Record<N>> + 'a
pub fn to_decrypted_records<'a>(
&'a self,
decryption_key: &'a DecryptionKey<N>
) -> impl Iterator<Item = Record<N>> + 'a
Returns records from the transaction belonging to the given account view key.
sourcepub fn to_records(&self) -> impl Iterator<Item = Record<N>> + Debug + '_
pub fn to_records(&self) -> impl Iterator<Item = Record<N>> + Debug + '_
Returns the decrypted records using record view key events, if they exist.
sourcepub fn to_transition_inclusion_proof(
&self,
leaf: impl ToBytes
) -> Result<MerklePath<N::TransitionIDParameters>>
pub fn to_transition_inclusion_proof(
&self,
leaf: impl ToBytes
) -> Result<MerklePath<N::TransitionIDParameters>>
Returns an inclusion proof for the transition tree.
Trait Implementations
sourceimpl<N: Network> Clone for Transition<N> where
N: Network,
impl<N: Network> Clone for Transition<N> where
N: Network,
sourceimpl<N: Network> Debug for Transition<N> where
N: Network,
impl<N: Network> Debug for Transition<N> where
N: Network,
sourceimpl<'de, N: Network> Deserialize<'de> for Transition<N>
impl<'de, N: Network> Deserialize<'de> for Transition<N>
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<N: Network> Display for Transition<N>
impl<N: Network> Display for Transition<N>
sourceimpl<N: Network> FromBytes for Transition<N>
impl<N: Network> FromBytes for Transition<N>
sourceimpl<N: Network> FromStr for Transition<N>
impl<N: Network> FromStr for Transition<N>
sourceimpl<N: Network> Hash for Transition<N>
impl<N: Network> Hash for Transition<N>
sourceimpl<N: Network> PartialEq<Transition<N>> for Transition<N> where
N: Network,
impl<N: Network> PartialEq<Transition<N>> for Transition<N> where
N: Network,
sourceimpl<N: Network> Serialize for Transition<N>
impl<N: Network> Serialize for Transition<N>
sourceimpl<N: Network> ToBytes for Transition<N>
impl<N: Network> ToBytes for Transition<N>
impl<N: Network> Eq for Transition<N> where
N: Network,
Auto Trait Implementations
impl<N> RefUnwindSafe for Transition<N> where
N: RefUnwindSafe,
<N as Network>::Commitment: RefUnwindSafe,
<N as Network>::FunctionID: RefUnwindSafe,
<N as Network>::OuterProof: RefUnwindSafe,
<N as Network>::ProgramAffineCurve: RefUnwindSafe,
<N as Network>::RecordCiphertext: RefUnwindSafe,
<N as Network>::RecordViewKey: RefUnwindSafe,
<N as Network>::SerialNumber: RefUnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
impl<N> Send for Transition<N>
impl<N> Sync for Transition<N>
impl<N> Unpin for Transition<N> where
N: Unpin,
<N as Network>::Commitment: Unpin,
<N as Network>::FunctionID: Unpin,
<N as Network>::OuterProof: Unpin,
<N as Network>::ProgramAffineCurve: Unpin,
<N as Network>::RecordCiphertext: Unpin,
<N as Network>::RecordViewKey: Unpin,
<N as Network>::SerialNumber: Unpin,
<N as Network>::TransitionID: Unpin,
impl<N> UnwindSafe for Transition<N> where
N: UnwindSafe,
<N as Network>::Commitment: UnwindSafe,
<N as Network>::FunctionID: UnwindSafe,
<N as Network>::OuterProof: UnwindSafe,
<N as Network>::ProgramAffineCurve: UnwindSafe,
<N as Network>::RecordCiphertext: UnwindSafe,
<N as Network>::RecordViewKey: UnwindSafe,
<N as Network>::SerialNumber: UnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more