add asynccircom backend
This commit is contained in:
parent
5e39fe8380
commit
2e26a77e90
|
@ -12,8 +12,8 @@ import ../../types
|
||||||
import ./circomcompat
|
import ./circomcompat
|
||||||
|
|
||||||
const
|
const
|
||||||
CompletitionTimeout = 1.seconds # Maximum await time for completition after receiving a signal
|
CompletionTimeout = 1.seconds # Maximum await time for completition after receiving a signal
|
||||||
CompletitionRetryDelay = 10.millis
|
CompletionRetryDelay = 10.millis
|
||||||
|
|
||||||
type
|
type
|
||||||
AsyncCircomCompat* = object
|
AsyncCircomCompat* = object
|
||||||
|
@ -40,3 +40,11 @@ proc verify*[H](
|
||||||
## Verify a proof using a ctx
|
## Verify a proof using a ctx
|
||||||
##
|
##
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
proc init*(
|
||||||
|
_: type AsyncCircomCompat,
|
||||||
|
params: CircomCompatParams
|
||||||
|
): AsyncCircomCompat =
|
||||||
|
## Create a new async circom
|
||||||
|
##
|
||||||
|
AsyncCircomCompat(params)
|
||||||
|
|
|
@ -54,7 +54,8 @@ proc release*(self: CircomCompat) =
|
||||||
|
|
||||||
proc prove*[H](
|
proc prove*[H](
|
||||||
self: CircomCompat,
|
self: CircomCompat,
|
||||||
input: ProofInputs[H]): ?!CircomProof =
|
input: ProofInputs[H]
|
||||||
|
): ?!CircomProof =
|
||||||
## Encode buffers using a ctx
|
## Encode buffers using a ctx
|
||||||
##
|
##
|
||||||
|
|
||||||
|
@ -168,7 +169,8 @@ proc prove*[H](
|
||||||
proc verify*[H](
|
proc verify*[H](
|
||||||
self: CircomCompat,
|
self: CircomCompat,
|
||||||
proof: CircomProof,
|
proof: CircomProof,
|
||||||
inputs: ProofInputs[H]): ?!bool =
|
inputs: ProofInputs[H]
|
||||||
|
): ?!bool =
|
||||||
## Verify a proof using a ctx
|
## Verify a proof using a ctx
|
||||||
##
|
##
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue