Struct snarkvm_polycommit::sonic_pc::commitment::commitment::CommitmentVar
source · [−]pub struct CommitmentVar<TargetCurve: PairingEngine, BaseCurve: PairingEngine, PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>> {
pub comm: PG::G1Gadget,
}
Expand description
Var for an optionally hiding Sonic-KZG10 commitment.
Fields
comm: PG::G1Gadget
Commitment.
Trait Implementations
sourceimpl<TargetCurve, BaseCurve, PG> AllocGadget<Commitment<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> AllocGadget<Commitment<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Commitment<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Commitment<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Commitment<TargetCurve>>, CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
fn alloc_input_checked<Fn, T, CS>(cs: CS, f: Fn) -> Result<Self, SynthesisError> where
Fn: FnOnce() -> Result<T, SynthesisError>,
T: Borrow<V>,
CS: ConstraintSystem<F>,
sourceimpl<TargetCurve, BaseCurve, PG> Clone for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> Clone for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
sourceimpl<TargetCurve, BaseCurve, PG> PrepareGadget<PreparedCommitmentVar<TargetCurve, BaseCurve, PG>, <BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> PrepareGadget<PreparedCommitmentVar<TargetCurve, BaseCurve, PG>, <BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
fn prepare<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<PreparedCommitmentVar<TargetCurve, BaseCurve, PG>, SynthesisError>
sourceimpl<TargetCurve, BaseCurve, PG> ToBytesGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> ToBytesGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
fn to_bytes<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
sourcefn to_bytes_strict<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
fn to_bytes_strict<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
Additionally checks if the produced list of booleans is ‘valid’.
sourceimpl<TargetCurve, BaseCurve, PG> ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> ToConstraintFieldGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
sourcefn to_constraint_field<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<<BaseCurve as PairingEngine>::Fr>>, SynthesisError>
fn to_constraint_field<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<Vec<FpGadget<<BaseCurve as PairingEngine>::Fr>>, SynthesisError>
Converts self
to FpGadget<F>
variables.
sourceimpl<TargetCurve, BaseCurve, PG> ToMinimalBitsGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
impl<TargetCurve, BaseCurve, PG> ToMinimalBitsGadget<<BaseCurve as PairingEngine>::Fr> for CommitmentVar<TargetCurve, BaseCurve, PG> where
TargetCurve: PairingEngine,
BaseCurve: PairingEngine,
PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
fn to_minimal_bits<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
&self,
cs: CS
) -> Result<Vec<Boolean>, SynthesisError>
Auto Trait Implementations
impl<TargetCurve, BaseCurve, PG> RefUnwindSafe for CommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: RefUnwindSafe,
impl<TargetCurve, BaseCurve, PG> Send for CommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Send,
impl<TargetCurve, BaseCurve, PG> Sync for CommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Sync,
impl<TargetCurve, BaseCurve, PG> Unpin for CommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: Unpin,
impl<TargetCurve, BaseCurve, PG> UnwindSafe for CommitmentVar<TargetCurve, BaseCurve, PG> where
<PG as PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>>::G1Gadget: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more