pub fn verify_bulletproof<T>(
    rng: &mut T,
    proof: crate::util::ringct::Bulletproof,
    commitments: Vec<EdwardsPoint>,
) -> Result<(), ProofError>
where
    T: RngCore + CryptoRng,
{
    let amount_bits = 64;
    let n_commitments = commitments.len();
    let commitments = commitments
        .into_iter()
        .map(|c| c * INV_EIGHT)
        .collect::<Vec<_>>();

    let bp_gens = BulletproofGens::new(amount_bits, n_commitments);
    let pc_gens = PedersenGens::default();

    let proof = RangeProof::try_from(proof).map_err(|_| ProofError::FormatError)?;
    proof.verify_multiple_with_rng(&bp_gens, &pc_gens, &commitments, amount_bits, rng)
}
/// Verify that the `proof` is valid for the provided Pedersen commitments.
Verify that the `proof` is valid for the provided Pedersen commitments.
Verify that the ` proof ` is valid for the provided Pedersen commitments .
pub fn verify_bulletproof<T>(
    rng: &mut T,
    proof: crate::util::ringct::Bulletproof,
    commitments: Vec<EdwardsPoint>,
) -> Result<(), ProofError>
where
    T: RngCore + CryptoRng,
{
    let amount_bits = 64;
    let n_commitments = commitments.len();
    let commitments = commitments
        .into_iter()
        .map(|c| c * INV_EIGHT)
        .collect::<Vec<_>>();
    let bp_gens = BulletproofGens::new(amount_bits, n_commitments);
    let pc_gens = PedersenGens::default();
    let proof = RangeProof::try_from(proof).map_err(|_| ProofError::FormatError)?;
    proof.verify_multiple_with_rng(&bp_gens, &pc_gens, &commitments, amount_bits, rng)
}
pub fn verify_bulletproof < T > ( rng : & mut T , proof : crate :: util :: ringct :: Bulletproof , commitments : Vec < EdwardsPoint > , ) -> Result < ( ) , ProofError > where T : RngCore + CryptoRng , { let amount_bits = 64 ; let n_commitments = commitments . len ( ) ; let commitments = commitments . into_iter ( ) . map ( | c | c * INV_EIGHT ) . collect :: < Vec < _ > > ( ) ; let bp_gens = BulletproofGens :: new ( amount_bits , n_commitments ) ; let pc_gens = PedersenGens :: default ( ) ; let proof = RangeProof :: try_from ( proof ) . map_err ( | _ | ProofError :: FormatError ) ? ; proof . verify_multiple_with_rng ( & bp_gens , & pc_gens , & commitments , amount_bits , rng ) }
Verify that the `proof` is valid for the provided Pedersen commitments.
Verify that the ` proof ` is valid for the provided Pedersen commitments .
rng
&mut T
proof
crate::util::ringct::Bulletproof
commitments
Vec<EdwardsPoint>
rng
&mut T
proof
crate::util::ringct::Bulletproof
commitments
Vec<EdwardsPoint>