Struct snarkvm_circuit::Request
source · pub struct Request<A>where
A: Aleo,{ /* private fields */ }
Implementations§
source§impl<A> Request<A>where
A: Aleo,
impl<A> Request<A>where A: Aleo,
sourcepub fn verify(
&self,
input_types: &[ValueType<<A as Environment>::Network>],
tpk: &Group<A>
) -> Boolean<A>
pub fn verify( &self, input_types: &[ValueType<<A as Environment>::Network>], tpk: &Group<A> ) -> Boolean<A>
Returns true
if the input IDs are derived correctly, the input records all belong to the caller,
and the signature is valid.
Verifies (challenge == challenge’) && (address == address’) && (serial_numbers == serial_numbers’) where: challenge’ := HashToScalar(r * G, pk_sig, pr_sig, caller, [tvk, tcm, function ID, input IDs])
sourcepub fn check_input_ids<const CREATE_MESSAGE: bool>(
network_id: &Integer<A, u16>,
program_id: &ProgramID<A>,
function_name: &Identifier<A>,
input_ids: &[InputID<A>],
inputs: &[Value<A>],
input_types: &[ValueType<<A as Environment>::Network>],
caller: &Address<A>,
sk_tag: &Field<A>,
tvk: &Field<A>,
tcm: &Field<A>,
signature: Option<&Signature<A>>
) -> (Boolean<A>, Option<Vec<Field<A>, Global>>)
pub fn check_input_ids<const CREATE_MESSAGE: bool>( network_id: &Integer<A, u16>, program_id: &ProgramID<A>, function_name: &Identifier<A>, input_ids: &[InputID<A>], inputs: &[Value<A>], input_types: &[ValueType<<A as Environment>::Network>], caller: &Address<A>, sk_tag: &Field<A>, tvk: &Field<A>, tcm: &Field<A>, signature: Option<&Signature<A>> ) -> (Boolean<A>, Option<Vec<Field<A>, Global>>)
Returns true
if the inputs match their input IDs.
Note: This method does not perform signature checks.
source§impl<A> Request<A>where
A: Aleo,
impl<A> Request<A>where A: Aleo,
sourcepub const fn network_id(&self) -> &Integer<A, u16>
pub const fn network_id(&self) -> &Integer<A, u16>
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> Eject for Request<A>where
A: Aleo,
impl<A> Eject for Request<A>where A: Aleo,
source§fn eject_mode(&self) -> Mode
fn eject_mode(&self) -> Mode
Ejects the mode of the request.
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> RefUnwindSafe for Request<A>where <A as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
impl<A> !Send for Request<A>
impl<A> !Sync for Request<A>
impl<A> Unpin for Request<A>where <A as Environment>::BaseField: Unpin,
impl<A> UnwindSafe for Request<A>where <A as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
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