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>,
) -> Boolean<A>
pub fn verify( &self, input_types: &[ValueType<A::Network>], tpk: &Group<A>, root_tvk: Option<Field<A>>, is_root: Boolean<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, input IDs])
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>>,
) -> (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>>, ) -> (Boolean<A>, Option<Vec<Field<A>>>)
Returns true
if the inputs match their input IDs.
Note: This method does not perform signature checks.
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.
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)
Ejects the mode and primitive value of the circuit type.
Source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
Returns
true
if the circuit is a constant.Source§fn is_private(&self) -> bool
fn is_private(&self) -> bool
Returns
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>
impl<A> UnwindSafe for Request<A>
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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