pub enum OutputID<N: Network> {
Constant(Field<N>),
Public(Field<N>),
Private(Field<N>),
Record(Field<N>, Field<N>, Field<N>),
ExternalRecord(Field<N>),
Future(Field<N>),
DynamicRecord(Field<N>),
DynamicFuture(Field<N>),
}Variants§
Constant(Field<N>)
The hash of the constant output.
Public(Field<N>)
The hash of the public output.
Private(Field<N>)
The ciphertext hash of the private output.
Record(Field<N>, Field<N>, Field<N>)
The (commitment, checksum, sender_ciphertext) tuple of the record output.
ExternalRecord(Field<N>)
The hash of the external record’s (function_id, record, tvk, output index).
Future(Field<N>)
The hash of the future output.
DynamicRecord(Field<N>)
The hash of the dynamic record’s (function_id, dynamic record, tvk, output index).
DynamicFuture(Field<N>)
The hash of the dynamic future’s (function_id, dynamic future, tcm, output index).
Implementations§
Source§impl<N: Network> OutputID<N>
impl<N: Network> OutputID<N>
Sourcepub fn constant(
function_id: Field<N>,
output: &Value<N>,
tcm: Field<N>,
index: u16,
) -> Result<Self>
pub fn constant( function_id: Field<N>, output: &Value<N>, tcm: Field<N>, index: u16, ) -> Result<Self>
Computes the output ID for a constant output.
Constructs the preimage as (function_id || output || tcm || index) and hashes it.
Sourcepub fn public(
function_id: Field<N>,
output: &Value<N>,
tcm: Field<N>,
index: u16,
) -> Result<Self>
pub fn public( function_id: Field<N>, output: &Value<N>, tcm: Field<N>, index: u16, ) -> Result<Self>
Computes the output ID for a public output.
Constructs the preimage as (function_id || output || tcm || index) and hashes it.
Sourcepub fn private(
function_id: Field<N>,
output: &Value<N>,
tvk: Field<N>,
index: u16,
) -> Result<Self>
pub fn private( function_id: Field<N>, output: &Value<N>, tvk: Field<N>, index: u16, ) -> Result<Self>
Computes the output ID for a private output.
Encrypts the output using the output view key derived from tvk and hashes the ciphertext.
Sourcepub fn record(
signer: &Address<N>,
program_id: &ProgramID<N>,
record_name: &Identifier<N>,
output: &Value<N>,
tvk: Field<N>,
output_register: &Register<N>,
) -> Result<Self>
pub fn record( signer: &Address<N>, program_id: &ProgramID<N>, record_name: &Identifier<N>, output: &Value<N>, tvk: Field<N>, output_register: &Register<N>, ) -> Result<Self>
Computes the output ID for a record output.
Encrypts the record using tvk and returns the (commitment, checksum, sender_ciphertext) tuple.
Sourcepub fn external_record(
function_id: Field<N>,
output: &Value<N>,
tvk: Field<N>,
index: u16,
) -> Result<Self>
pub fn external_record( function_id: Field<N>, output: &Value<N>, tvk: Field<N>, index: u16, ) -> Result<Self>
Computes the output ID for an external record output.
Constructs the preimage as (function_id || output || tvk || index) and hashes it.
Sourcepub fn future(
function_id: Field<N>,
output: &Value<N>,
tcm: Field<N>,
index: u16,
) -> Result<Self>
pub fn future( function_id: Field<N>, output: &Value<N>, tcm: Field<N>, index: u16, ) -> Result<Self>
Computes the output ID for a future output.
Constructs the preimage as (function_id || output || tcm || index) and hashes it.
Trait Implementations§
impl<N: Eq + Network> Eq for OutputID<N>
impl<N: Network> StructuralPartialEq for OutputID<N>
Auto Trait Implementations§
impl<N> Freeze for OutputID<N>
impl<N> RefUnwindSafe for OutputID<N>
impl<N> Send for OutputID<N>
impl<N> Sync for OutputID<N>
impl<N> Unpin for OutputID<N>
impl<N> UnsafeUnpin for OutputID<N>
impl<N> UnwindSafe for OutputID<N>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more