Struct snarkvm_synthesizer::prelude::VerifyingKey
source · pub struct VerifyingKey<N>where
N: Network,{ /* private fields */ }
Implementations§
source§impl<N> VerifyingKey<N>where
N: Network,
impl<N> VerifyingKey<N>where N: Network,
sourcepub const fn new(
verifying_key: Arc<CircuitVerifyingKey<<N as Environment>::PairingCurve>>
) -> VerifyingKey<N>
pub const fn new( verifying_key: Arc<CircuitVerifyingKey<<N as Environment>::PairingCurve>> ) -> VerifyingKey<N>
Initializes a new verifying key.
sourcepub fn verify(
&self,
function_name: &str,
inputs: &[<N as Environment>::Field],
proof: &Proof<N>
) -> bool
pub fn verify( &self, function_name: &str, inputs: &[<N as Environment>::Field], proof: &Proof<N> ) -> bool
Returns true
if the proof is valid for the given public inputs.
sourcepub fn verify_batch(
locator: &str,
inputs: Vec<(VerifyingKey<N>, Vec<Vec<<N as Environment>::Field>>)>,
proof: &Proof<N>
) -> bool
pub fn verify_batch( locator: &str, inputs: Vec<(VerifyingKey<N>, Vec<Vec<<N as Environment>::Field>>)>, proof: &Proof<N> ) -> bool
Returns true
if the batch proof is valid for the given public inputs.
Methods from Deref<Target = CircuitVerifyingKey<<N as Environment>::PairingCurve>>§
sourcepub fn iter(&self) -> impl Iterator<Item = &KZGCommitment<E>>
pub fn iter(&self) -> impl Iterator<Item = &KZGCommitment<E>>
Iterate over the commitments to indexed polynomials in self
.
Trait Implementations§
source§impl<N> Clone for VerifyingKey<N>where
N: Clone + Network,
<N as Environment>::PairingCurve: Clone,
impl<N> Clone for VerifyingKey<N>where N: Clone + Network, <N as Environment>::PairingCurve: Clone,
source§fn clone(&self) -> VerifyingKey<N>
fn clone(&self) -> VerifyingKey<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<N> Debug for VerifyingKey<N>where
N: Network,
impl<N> Debug for VerifyingKey<N>where N: Network,
source§impl<N> Deref for VerifyingKey<N>where
N: Network,
impl<N> Deref for VerifyingKey<N>where N: Network,
§type Target = CircuitVerifyingKey<<N as Environment>::PairingCurve>
type Target = CircuitVerifyingKey<<N as Environment>::PairingCurve>
The resulting type after dereferencing.
source§impl<'de, N> Deserialize<'de> for VerifyingKey<N>where
N: Network,
impl<'de, N> Deserialize<'de> for VerifyingKey<N>where N: Network,
source§fn deserialize<D>(
deserializer: D
) -> Result<VerifyingKey<N>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<VerifyingKey<N>, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserializes the verifying key from a string or bytes.
source§impl<N> Display for VerifyingKey<N>where
N: Network,
impl<N> Display for VerifyingKey<N>where N: Network,
source§impl<N> FromBytes for VerifyingKey<N>where
N: Network,
impl<N> FromBytes for VerifyingKey<N>where N: Network,
source§impl<N> FromStr for VerifyingKey<N>where
N: Network,
impl<N> FromStr for VerifyingKey<N>where N: Network,
source§impl<N> Parser for VerifyingKey<N>where
N: Network,
impl<N> Parser for VerifyingKey<N>where N: Network,
source§impl<N> PartialEq for VerifyingKey<N>where
N: PartialEq + Network,
<N as Environment>::PairingCurve: PartialEq,
impl<N> PartialEq for VerifyingKey<N>where N: PartialEq + Network, <N as Environment>::PairingCurve: PartialEq,
source§fn eq(&self, other: &VerifyingKey<N>) -> bool
fn eq(&self, other: &VerifyingKey<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N> Serialize for VerifyingKey<N>where
N: Network,
impl<N> Serialize for VerifyingKey<N>where N: Network,
source§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 verifying key into string or bytes.
source§impl<N> ToBytes for VerifyingKey<N>where
N: Network,
impl<N> ToBytes for VerifyingKey<N>where N: Network,
impl<N> Eq for VerifyingKey<N>where N: Eq + Network, <N as Environment>::PairingCurve: Eq,
impl<N> StructuralEq for VerifyingKey<N>where N: Network,
impl<N> StructuralPartialEq for VerifyingKey<N>where N: Network,
Auto Trait Implementations§
impl<N> RefUnwindSafe for VerifyingKey<N>where <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
impl<N> Send for VerifyingKey<N>
impl<N> Sync for VerifyingKey<N>
impl<N> Unpin for VerifyingKey<N>
impl<N> UnwindSafe for VerifyingKey<N>where <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: 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
§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>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.