func (a AccumulatorWitness) VerifyWitness(acc *Accumulator, p *PublicCoin) (bool, error) {
	temp, err := NewAccumulatorWithValue(a.witness.params, a.witness.denomination, a.witness.value)
	if err != nil {
		return false, err
	}

	temp.Accumulate(&a.element)

	return temp.value == acc.value && a.element.Equal(*p), nil
}
// VerifyWitness verifies that a witness matches the accumulator.
VerifyWitness verifies that a witness matches the accumulator.
// VerifyWitness verifies that a witness matches the accumulator .
func (a AccumulatorWitness) VerifyWitness(acc *Accumulator, p *PublicCoin) (bool, error) {
	temp, err := NewAccumulatorWithValue(a.witness.params, a.witness.denomination, a.witness.value)
	if err != nil {
		return false, err
	}
	temp.Accumulate(&a.element)
	return temp.value == acc.value && a.element.Equal(*p), nil
}
func ( a AccumulatorWitness ) VerifyWitness ( acc * Accumulator , p * PublicCoin ) ( bool , error ) { temp , err := NewAccumulatorWithValue ( a . witness . params , a . witness . denomination , a . witness . value ) if err != nil { return false , err } temp . Accumulate ( & a . element ) return temp . value == acc . value && a . element . Equal ( * p ) , nil }
VerifyWitness verifies that a witness matches the accumulator.
VerifyWitness verifies that a witness matches the accumulator .