Struct snarkvm_synthesizer_snark::VerifyingKey
source · pub struct VerifyingKey<N: Network> { /* private fields */ }
Implementations§
source§impl<N: Network> VerifyingKey<N>
impl<N: Network> VerifyingKey<N>
sourcepub const fn new(
verifying_key: Arc<CircuitVerifyingKey<N::PairingCurve>>
) -> Self
pub const fn new( verifying_key: Arc<CircuitVerifyingKey<N::PairingCurve>> ) -> Self
Initializes a new verifying key.
sourcepub fn verify(
&self,
function_name: &str,
inputs: &[N::Field],
proof: &Proof<N>
) -> bool
pub fn verify( &self, function_name: &str, inputs: &[N::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::Field>>)>,
proof: &Proof<N>
) -> bool
pub fn verify_batch( locator: &str, inputs: Vec<(VerifyingKey<N>, Vec<Vec<N::Field>>)>, proof: &Proof<N> ) -> bool
Returns true
if the batch proof is valid for the given public inputs.
Methods from Deref<Target = CircuitVerifyingKey<N::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 + Network> Clone for VerifyingKey<N>where
N::PairingCurve: Clone,
impl<N: Clone + Network> Clone for VerifyingKey<N>where
N::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: Network> Debug for VerifyingKey<N>
impl<N: Network> Debug for VerifyingKey<N>
source§impl<N: Network> Deref for VerifyingKey<N>
impl<N: Network> Deref for VerifyingKey<N>
source§impl<'de, N: Network> Deserialize<'de> for VerifyingKey<N>
impl<'de, N: Network> Deserialize<'de> for VerifyingKey<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the verifying key from a string or bytes.
source§impl<N: Network> Display for VerifyingKey<N>
impl<N: Network> Display for VerifyingKey<N>
source§impl<N: Network> FromBytes for VerifyingKey<N>
impl<N: Network> FromBytes for VerifyingKey<N>
source§impl<N: Network> FromStr for VerifyingKey<N>
impl<N: Network> FromStr for VerifyingKey<N>
source§impl<N: Network> Parser for VerifyingKey<N>
impl<N: Network> Parser for VerifyingKey<N>
source§impl<N: PartialEq + Network> PartialEq for VerifyingKey<N>where
N::PairingCurve: PartialEq,
impl<N: PartialEq + Network> PartialEq for VerifyingKey<N>where
N::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: Network> Serialize for VerifyingKey<N>
impl<N: Network> Serialize for VerifyingKey<N>
source§impl<N: Network> ToBytes for VerifyingKey<N>
impl<N: Network> ToBytes for VerifyingKey<N>
impl<N: Eq + Network> Eq for VerifyingKey<N>where
N::PairingCurve: Eq,
impl<N: Network> StructuralPartialEq for VerifyingKey<N>
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 Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.