Struct snarkvm_debug::prelude::Transition
pub struct Transition<N>where
N: Network,{ /* private fields */ }Implementations§
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub fn to_root(&self) -> Result<Field<N>, Error>
pub fn to_root(&self) -> Result<Field<N>, Error>
Returns the transition root, by computing the root for a Merkle tree of the input and output IDs.
pub fn to_path(
&self,
leaf: &TransitionLeaf<N>
) -> Result<MerklePath<N, snarkvm_console_program::::state_path::configuration::TransitionPath::{constant#0}>, Error>
pub fn to_path( &self, leaf: &TransitionLeaf<N> ) -> Result<MerklePath<N, snarkvm_console_program::::state_path::configuration::TransitionPath::{constant#0}>, Error>
Returns the Merkle path for the transition leaf.
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub const fn id(&self) -> &<N as Network>::TransitionID
pub const fn id(&self) -> &<N as Network>::TransitionID
Returns the transition ID.
pub const fn program_id(&self) -> &ProgramID<N>
pub const fn program_id(&self) -> &ProgramID<N>
Returns the program ID.
pub const fn function_name(&self) -> &Identifier<N>
pub const fn function_name(&self) -> &Identifier<N>
Returns the function name.
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub fn is_fee_private(&self) -> bool
pub fn is_fee_private(&self) -> bool
Returns true if this is a fee_private transition.
pub fn is_fee_public(&self) -> bool
pub fn is_fee_public(&self) -> bool
Returns true if this is a fee_public transition.
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub fn contains_serial_number(&self, serial_number: &Field<N>) -> bool
pub fn contains_serial_number(&self, serial_number: &Field<N>) -> bool
Returns true if the transition contains the given serial number.
pub fn contains_commitment(&self, commitment: &Field<N>) -> bool
pub fn contains_commitment(&self, commitment: &Field<N>) -> bool
Returns true if the transition contains the given commitment.
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub fn find_record(
&self,
commitment: &Field<N>
) -> Option<&Record<N, Ciphertext<N>>>
pub fn find_record( &self, commitment: &Field<N> ) -> Option<&Record<N, Ciphertext<N>>>
Returns the record with the corresponding commitment, if it exists.
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub fn input_ids(&self) -> impl ExactSizeIterator
pub fn input_ids(&self) -> impl ExactSizeIterator
Returns the input IDs.
pub fn serial_numbers(&self) -> impl Iterator<Item = &Field<N>>
pub fn serial_numbers(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the serial numbers, for inputs that are records.
Returns an iterator over the tags, for inputs that are records.
pub fn output_ids(&self) -> impl ExactSizeIterator
pub fn output_ids(&self) -> impl ExactSizeIterator
Returns the output IDs.
pub fn commitments(&self) -> impl Iterator<Item = &Field<N>>
pub fn commitments(&self) -> impl Iterator<Item = &Field<N>>
Returns an iterator over the commitments, for outputs that are records.
pub fn nonces(&self) -> impl Iterator<Item = &Group<N>>
pub fn nonces(&self) -> impl Iterator<Item = &Group<N>>
Returns an iterator over the nonces, for outputs that are records.
pub fn records(
&self
) -> impl Iterator<Item = (&Field<N>, &Record<N, Ciphertext<N>>)>
pub fn records( &self ) -> impl Iterator<Item = (&Field<N>, &Record<N, Ciphertext<N>>)>
Returns an iterator over the output records, as a tuple of (commitment, record).
§impl<N> Transition<N>where
N: Network,
impl<N> Transition<N>where
N: Network,
pub fn into_id(self) -> <N as Network>::TransitionID
pub fn into_id(self) -> <N as Network>::TransitionID
Returns the transition ID, and consumes self.
pub fn into_serial_numbers(self) -> impl Iterator<Item = Field<N>>
pub fn into_serial_numbers(self) -> impl Iterator<Item = Field<N>>
Returns a consuming iterator over the serial numbers, for inputs that are records.
Returns a consuming iterator over the tags, for inputs that are records.
pub fn into_commitments(self) -> impl Iterator<Item = Field<N>>
pub fn into_commitments(self) -> impl Iterator<Item = Field<N>>
Returns a consuming iterator over the commitments, for outputs that are records.
pub fn into_nonces(self) -> impl Iterator<Item = Group<N>>
pub fn into_nonces(self) -> impl Iterator<Item = Group<N>>
Returns a consuming iterator over the nonces, for outputs that are records.
pub fn into_records(
self
) -> impl Iterator<Item = (Field<N>, Record<N, Ciphertext<N>>)>
pub fn into_records( self ) -> impl Iterator<Item = (Field<N>, Record<N, Ciphertext<N>>)>
Returns a consuming iterator over the output records, as a tuple of (commitment, record).
Trait Implementations§
§impl<N> Clone for Transition<N>
impl<N> Clone for Transition<N>
§fn clone(&self) -> Transition<N>
fn clone(&self) -> Transition<N>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<N> Debug for Transition<N>where
N: Network,
impl<N> Debug for Transition<N>where
N: Network,
§impl<'de, N> Deserialize<'de> for Transition<N>where
N: Network,
impl<'de, N> Deserialize<'de> for Transition<N>where
N: Network,
§fn deserialize<D>(
deserializer: D
) -> Result<Transition<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Transition<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserializes the transition from a string or bytes.
§impl<N> Display for Transition<N>where
N: Network,
impl<N> Display for Transition<N>where
N: Network,
§impl<N> FromBytes for Transition<N>where
N: Network,
impl<N> FromBytes for Transition<N>where
N: Network,
§impl<N> FromStr for Transition<N>where
N: Network,
impl<N> FromStr for Transition<N>where
N: Network,
§impl<N> PartialEq for Transition<N>
impl<N> PartialEq for Transition<N>
§fn eq(&self, other: &Transition<N>) -> bool
fn eq(&self, other: &Transition<N>) -> bool
self and other values to be equal, and is used
by ==.§impl<N> Serialize for Transition<N>where
N: Network,
impl<N> Serialize for Transition<N>where
N: Network,
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serializes the transition into string or bytes.
§impl<N> ToBytes for Transition<N>where
N: Network,
impl<N> ToBytes for Transition<N>where
N: Network,
impl<N> Eq for Transition<N>
impl<N> StructuralEq for Transition<N>where
N: Network,
impl<N> StructuralPartialEq for Transition<N>where
N: Network,
Auto Trait Implementations§
impl<N> RefUnwindSafe for Transition<N>where
N: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe,
<N as Environment>::Scalar: 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 Environment>::Field: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Scalar: Unpin,
<N as Network>::TransitionID: Unpin,
impl<N> UnwindSafe for Transition<N>where
N: UnwindSafe,
<N as Environment>::Field: UnwindSafe,
<N as Environment>::Projective: UnwindSafe,
<N as Environment>::Scalar: UnwindSafe,
<N as Network>::TransitionID: UnwindSafe,
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
source§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
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>,
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.