Skip to content

Commit

Permalink
[snarkyjs] convert pickles proof to tx proof type
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed May 26, 2022
1 parent 7f1f44c commit 460c394
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1714,15 +1714,19 @@ let pickles_compile (choices : pickles_rule_js Js.js_array Js.t) =
(* TODO: get rid of Obj.magic, this should be an empty "H3.T" *)
let prevs = Obj.magic [] in
let statement = Zkapp_statement.(statement_js |> of_js |> to_constant) in
prover ?handler:None prevs statement |> Promise_js_helpers.to_js
let proof_promise = prover ?handler:None prevs statement in
proof_promise
|> Promise.map ~f:Pickles.Side_loaded.Proof.of_proof
|> Promise_js_helpers.to_js
in
prove
in
let rec to_js_provers :
type a b c.
(a, b, c, Zkapp_statement.Constant.t, proof Promise.t) Pickles.Provers.t
-> (zkapp_statement_js -> proof Promise_js_helpers.js_promise) list =
function
-> ( zkapp_statement_js
-> Pickles.Side_loaded.Proof.t Promise_js_helpers.js_promise )
list = function
| [] ->
[]
| p :: ps ->
Expand Down

0 comments on commit 460c394

Please sign in to comment.