chore: bump zerokit v0.3.5 to include proof with witness (#3)

Co-authored-by: Richard Ramos <info@richardramos.me>
This commit is contained in:
Alvaro Revuelta 2024-01-24 09:11:01 +01:00 committed by GitHub
parent a8b8c6ab4b
commit 5e43875081
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 18 additions and 1 deletions

Binary file not shown.

View File

@ -71,6 +71,10 @@ bool generate_rln_proof(struct RLN *ctx,
const struct Buffer *input_buffer,
struct Buffer *output_buffer);
bool generate_rln_proof_with_witness(struct RLN *ctx,
const struct Buffer *input_buffer,
struct Buffer *output_buffer);
bool verify_rln_proof(const struct RLN *ctx,
const struct Buffer *proof_buffer,
bool *proof_is_valid_ptr);

View File

@ -159,6 +159,19 @@ func (r *RLN) GenerateRLNProof(input []byte) ([]byte, error) {
return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len)), nil
}
func (r *RLN) GenerateRLNProofWithWitness(input []byte) ([]byte, error) {
inputBuffer := toCBufferPtr(input)
var output []byte
out := toBuffer(output)
if !bool(C.generate_rln_proof_with_witness(r.ptr, inputBuffer, &out)) {
return nil, errors.New("could not generate the proof with witness")
}
return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len)), nil
}
func (r *RLN) VerifyWithRoots(input []byte, roots []byte) (bool, error) {
proofBuf := toCBufferPtr(input)
rootBuf := toCBufferPtr(roots)

@ -1 +1 @@
Subproject commit b903d8d740e0b8b82057bcc5377ddce05ae5676b
Subproject commit b0be32943e94de9f3c905c97ebd849e446e58f77