feat: upgrade to zerokit 0.3.2

This commit is contained in:
Richard Ramos 2023-09-05 14:36:16 -04:00
parent 70f1ff564b
commit 1d6d18a03e
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760
5 changed files with 11 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -53,6 +53,10 @@ bool atomic_operation(struct RLN *ctx,
const struct Buffer *leaves_buffer, const struct Buffer *leaves_buffer,
const struct Buffer *indices_buffer); const struct Buffer *indices_buffer);
bool seq_atomic_operation(struct RLN *ctx,
const struct Buffer *leaves_buffer,
const struct Buffer *indices_buffer);
bool get_root(const struct RLN *ctx, struct Buffer *output_buffer); bool get_root(const struct RLN *ctx, struct Buffer *output_buffer);
bool get_proof(const struct RLN *ctx, uintptr_t index, struct Buffer *output_buffer); bool get_proof(const struct RLN *ctx, uintptr_t index, struct Buffer *output_buffer);

View File

@ -213,6 +213,12 @@ func (r *RLN) AtomicOperation(index uint, leaves []byte, indices []byte) bool {
return bool(C.atomic_operation(r.ptr, C.uintptr_t(index), leavesBuffer, indicesBuffer)) return bool(C.atomic_operation(r.ptr, C.uintptr_t(index), leavesBuffer, indicesBuffer))
} }
func (r *RLN) SeqAtomicOperation(leaves []byte, indices []byte) bool {
leavesBuffer := toCBufferPtr(leaves)
indicesBuffer := toCBufferPtr(indices)
return bool(C.seq_atomic_operation(r.ptr, leavesBuffer, indicesBuffer))
}
func (r *RLN) DeleteLeaf(index uint) bool { func (r *RLN) DeleteLeaf(index uint) bool {
return bool(C.delete_leaf(r.ptr, C.uintptr_t(index))) return bool(C.delete_leaf(r.ptr, C.uintptr_t(index)))
} }

@ -1 +1 @@
Subproject commit d015c4ab591cb7b260a92a077d3cd1d76609667f Subproject commit b51896c3a710f567fc7e054681767d6547a8eb9b