pub struct ProvingKey<N: Network> { /* private fields */ }
Implementations§
Source§impl<N: Network> ProvingKey<N>
impl<N: Network> ProvingKey<N>
Sourcepub const fn new(
proving_key: Arc<CircuitProvingKey<N::PairingCurve, VarunaHidingMode>>,
) -> Self
pub const fn new( proving_key: Arc<CircuitProvingKey<N::PairingCurve, VarunaHidingMode>>, ) -> Self
Initializes a new proving key.
Sourcepub fn prove<R: Rng + CryptoRng>(
&self,
function_name: &str,
assignment: &Assignment<N::Field>,
rng: &mut R,
) -> Result<Proof<N>>
pub fn prove<R: Rng + CryptoRng>( &self, function_name: &str, assignment: &Assignment<N::Field>, rng: &mut R, ) -> Result<Proof<N>>
Returns a proof for the given assignment on the circuit.
Sourcepub fn prove_batch<R: Rng + CryptoRng>(
locator: &str,
assignments: &[(ProvingKey<N>, Vec<Assignment<N::Field>>)],
rng: &mut R,
) -> Result<Proof<N>>
pub fn prove_batch<R: Rng + CryptoRng>( locator: &str, assignments: &[(ProvingKey<N>, Vec<Assignment<N::Field>>)], rng: &mut R, ) -> Result<Proof<N>>
Returns a proof for the given batch of proving keys and assignments.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for ProvingKey<N>where
N::PairingCurve: Clone,
impl<N: Clone + Network> Clone for ProvingKey<N>where
N::PairingCurve: Clone,
Source§fn clone(&self) -> ProvingKey<N>
fn clone(&self) -> ProvingKey<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 ProvingKey<N>
impl<N: Network> Debug for ProvingKey<N>
Source§impl<N: Network> Deref for ProvingKey<N>
impl<N: Network> Deref for ProvingKey<N>
Source§type Target = CircuitProvingKey<<N as Environment>::PairingCurve, VarunaHidingMode>
type Target = CircuitProvingKey<<N as Environment>::PairingCurve, VarunaHidingMode>
The resulting type after dereferencing.
Source§impl<'de, N: Network> Deserialize<'de> for ProvingKey<N>
impl<'de, N: Network> Deserialize<'de> for ProvingKey<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 proving key from a string or bytes.
Source§impl<N: Network> Display for ProvingKey<N>
impl<N: Network> Display for ProvingKey<N>
Source§impl<N: Network> FromBytes for ProvingKey<N>
impl<N: Network> FromBytes for ProvingKey<N>
Source§impl<N: Network> FromStr for ProvingKey<N>
impl<N: Network> FromStr for ProvingKey<N>
Source§impl<N: Network> Parser for ProvingKey<N>
impl<N: Network> Parser for ProvingKey<N>
Source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into the proving key.
Source§impl<N: Network> Serialize for ProvingKey<N>
impl<N: Network> Serialize for ProvingKey<N>
Auto Trait Implementations§
impl<N> Freeze for ProvingKey<N>
impl<N> RefUnwindSafe for ProvingKey<N>where
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Environment>::Field: RefUnwindSafe,
impl<N> Send for ProvingKey<N>
impl<N> Sync for ProvingKey<N>
impl<N> Unpin for ProvingKey<N>
impl<N> UnwindSafe for ProvingKey<N>where
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Environment>::Field: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>,
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