mirror of
https://github.com/logos-storage/nim-circom-compat.git
synced 2026-01-07 16:13:12 +00:00
update ffi
This commit is contained in:
parent
7a5a48453c
commit
2a913440ad
@ -20,6 +20,14 @@ const ERR_FAILED_TO_DESERIALIZE_PROOF* = 8
|
|||||||
|
|
||||||
const ERR_FAILED_TO_DESERIALIZE_INPUTS* = 9
|
const ERR_FAILED_TO_DESERIALIZE_INPUTS* = 9
|
||||||
|
|
||||||
|
const ERR_FAILED_TO_VERIFY_PROOF* = 10
|
||||||
|
|
||||||
|
const ERR_GET_PUB_INPUTS* = 11
|
||||||
|
|
||||||
|
const ERR_MAKING_PROOF* = 12
|
||||||
|
|
||||||
|
const ERR_SERIALIZE_PROOF* = 13
|
||||||
|
|
||||||
|
|
||||||
type CircomCompatCtx* {.incompleteStruct.} = object
|
type CircomCompatCtx* {.incompleteStruct.} = object
|
||||||
|
|
||||||
@ -38,13 +46,6 @@ proc release_circom_compat*(ctx_ptr: ptr ptr CircomCompatCtx): void {.importc: "
|
|||||||
|
|
||||||
proc release_buffer*(buff_ptr: ptr ptr Buffer): void {.importc: "release_buffer".}
|
proc release_buffer*(buff_ptr: ptr ptr Buffer): void {.importc: "release_buffer".}
|
||||||
|
|
||||||
## # Safety
|
|
||||||
#
|
|
||||||
proc push_input_u256_array*(ctx_ptr: ptr CircomCompatCtx,
|
|
||||||
name_ptr: pointer,
|
|
||||||
input_ptr: pointer,
|
|
||||||
len: uint): int32 {.importc: "push_input_u256_array".}
|
|
||||||
|
|
||||||
## # Safety
|
## # Safety
|
||||||
#
|
#
|
||||||
proc prove_circuit*(ctx_ptr: ptr CircomCompatCtx,
|
proc prove_circuit*(ctx_ptr: ptr CircomCompatCtx,
|
||||||
@ -57,6 +58,13 @@ proc verify_circuit*(ctx_ptr: ptr CircomCompatCtx,
|
|||||||
proof_bytes_ptr: ptr Buffer,
|
proof_bytes_ptr: ptr Buffer,
|
||||||
inputs_bytes_ptr: ptr Buffer): int32 {.importc: "verify_circuit".}
|
inputs_bytes_ptr: ptr Buffer): int32 {.importc: "verify_circuit".}
|
||||||
|
|
||||||
|
## # Safety
|
||||||
|
#
|
||||||
|
proc push_input_u256_array*(ctx_ptr: ptr CircomCompatCtx,
|
||||||
|
name_ptr: pointer,
|
||||||
|
input_ptr: pointer,
|
||||||
|
len: uint): int32 {.importc: "push_input_u256_array".}
|
||||||
|
|
||||||
proc push_input_numeric_i8*(ctx_ptr: ptr CircomCompatCtx,
|
proc push_input_numeric_i8*(ctx_ptr: ptr CircomCompatCtx,
|
||||||
name_ptr: pointer,
|
name_ptr: pointer,
|
||||||
input: int8): int32 {.importc: "push_input_numeric_i8".}
|
input: int8): int32 {.importc: "push_input_numeric_i8".}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user