From 460c3948fe288d2f33579b51af76c620f21a19d8 Mon Sep 17 00:00:00 2001 From: Gregor Date: Thu, 26 May 2022 14:29:07 +0200 Subject: [PATCH] [snarkyjs] convert pickles proof to tx proof type --- .../snarky_js_bindings/lib/snarky_js_bindings_lib.ml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml b/src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml index 7d7da009956..df24c5ce368 100644 --- a/src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml +++ b/src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml @@ -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 ->