pub struct Request<A: Aleo> { /* private fields */ }Implementations§
Source§impl<A: Aleo> Request<A>
impl<A: Aleo> Request<A>
Sourcepub fn verify(
&self,
input_types: &[ValueType<A::Network>],
tpk: &Group<A>,
root_tvk: Option<Field<A>>,
is_root: Boolean<A>,
program_checksum: Option<Field<A>>,
) -> Boolean<A>
pub fn verify( &self, input_types: &[ValueType<A::Network>], tpk: &Group<A>, root_tvk: Option<Field<A>>, is_root: Boolean<A>, program_checksum: Option<Field<A>>, ) -> Boolean<A>
Returns true if the input IDs are derived correctly, the input records all belong to the signer,
and the signature is valid.
Verifies (challenge == challenge’) && (address == address’) && (serial_numbers == serial_numbers’) where: challenge’ := HashToScalar(r * G, pk_sig, pr_sig, signer, [tvk, tcm, function ID, is_root, program checksum?, input IDs]) The program checksum must be provided if the program has a constructor and should not be provided otherwise.
Sourcepub fn check_input_ids<const CREATE_MESSAGE: bool>(
network_id: &U16<A>,
program_id: &ProgramID<A>,
function_name: &Identifier<A>,
input_ids: &[InputID<A>],
inputs: &[Value<A>],
input_types: &[ValueType<A::Network>],
signer: &Address<A>,
sk_tag: &Field<A>,
tvk: &Field<A>,
tcm: &Field<A>,
signature: Option<&Signature<A>>,
function_id: Option<Field<A>>,
) -> (Boolean<A>, Option<Vec<Field<A>>>)
pub fn check_input_ids<const CREATE_MESSAGE: bool>( network_id: &U16<A>, program_id: &ProgramID<A>, function_name: &Identifier<A>, input_ids: &[InputID<A>], inputs: &[Value<A>], input_types: &[ValueType<A::Network>], signer: &Address<A>, sk_tag: &Field<A>, tvk: &Field<A>, tcm: &Field<A>, signature: Option<&Signature<A>>, function_id: Option<Field<A>>, ) -> (Boolean<A>, Option<Vec<Field<A>>>)
Returns true if the inputs match their input IDs.
Note: This method does not perform signature checks.
The function_id parameter is optional for backwards compatibility. When None, the
function ID is computed from the network ID, program ID, and function name. When Some,
the provided function ID is used directly. This is critical for dynamic dispatch where the
function ID must be passed in to ensure circuit size does not depend on the length of the
program or function name.
Source§impl<A: Aleo> Request<A>
impl<A: Aleo> Request<A>
Sourcepub const fn network_id(&self) -> &U16<A>
pub const fn network_id(&self) -> &U16<A>
Returns the network ID.
Sourcepub const fn program_id(&self) -> &ProgramID<A>
pub const fn program_id(&self) -> &ProgramID<A>
Returns the program ID.
Sourcepub const fn function_name(&self) -> &Identifier<A>
pub const fn function_name(&self) -> &Identifier<A>
Returns the function name.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Returns whether or not the request is dynamic.
Trait Implementations§
Source§impl<A: Aleo> Eject for Request<A>
impl<A: Aleo> Eject for Request<A>
Source§fn eject_mode(&self) -> Mode
fn eject_mode(&self) -> Mode
Ejects the mode of the request.
Source§fn eject_value(&self) -> Self::Primitive
fn eject_value(&self) -> Self::Primitive
Ejects the request as a primitive.
type Primitive = Request<<A as Environment>::Network>
Source§fn eject(&self) -> (Mode, Self::Primitive)
fn eject(&self) -> (Mode, Self::Primitive)
Source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
true if the circuit is a constant.Source§fn is_private(&self) -> bool
fn is_private(&self) -> bool
true if the circuit is a private.Auto Trait Implementations§
impl<A> !Freeze for Request<A>
impl<A> !RefUnwindSafe for Request<A>
impl<A> Send for Request<A>
impl<A> !Sync for Request<A>
impl<A> Unpin for Request<A>where
<A as Environment>::BaseField: Unpin,
<<A as Environment>::Network as Environment>::Projective: Unpin,
<A as Environment>::ScalarField: Unpin,
<A as Environment>::Network: Unpin,
impl<A> UnsafeUnpin for Request<A>
impl<A> UnwindSafe for Request<A>where
<A as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
<<A as Environment>::Network as Environment>::Projective: UnwindSafe,
<A as Environment>::ScalarField: UnwindSafe,
<A as Environment>::Network: 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<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