pub struct BatchCommitment {
pub commitments: Vec<PedersenCommitment>,
pub openings: Vec<PedersenOpening>,
}Expand description
A batch of commitment openings.
Fields§
§commitments: Vec<PedersenCommitment>Commitments in this batch.
openings: Vec<PedersenOpening>Openings for each commitment.
Implementations§
Source§impl BatchCommitment
impl BatchCommitment
Sourcepub fn commit_batch(params: &PedersenParams, values: &[Scalar]) -> Self
pub fn commit_batch(params: &PedersenParams, values: &[Scalar]) -> Self
Create a batch of commitments to random values.
Sourcepub fn commit_batch_u64(params: &PedersenParams, values: &[u64]) -> Self
pub fn commit_batch_u64(params: &PedersenParams, values: &[u64]) -> Self
Create a batch of commitments to u64 values.
Sourcepub fn verify_all(&self, params: &PedersenParams) -> bool
pub fn verify_all(&self, params: &PedersenParams) -> bool
Verify all openings in the batch.
Sourcepub fn aggregate(&self) -> (PedersenCommitment, PedersenOpening)
pub fn aggregate(&self) -> (PedersenCommitment, PedersenOpening)
Aggregate all commitments using random linear combination. Returns (aggregated_commitment, aggregated_opening).
Trait Implementations§
Source§impl Clone for BatchCommitment
impl Clone for BatchCommitment
Source§fn clone(&self) -> BatchCommitment
fn clone(&self) -> BatchCommitment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BatchCommitment
impl RefUnwindSafe for BatchCommitment
impl Send for BatchCommitment
impl Sync for BatchCommitment
impl Unpin for BatchCommitment
impl UnsafeUnpin for BatchCommitment
impl UnwindSafe for BatchCommitment
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