Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose dummy proof to Snarkyjs #11943

Merged
merged 3 commits into from
Sep 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lib/snarky_js_bindings/lib/snarky_js_bindings_lib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2298,6 +2298,11 @@ let verify (public_input : public_input_js) (proof : proof)
Pickles.Side_loaded.verify_promise ~typ [ (vk, public_input, proof) ]
|> Promise.map ~f:Js.bool |> Promise_js_helpers.to_js

let dummy_base64_proof () =
let n2 = Pickles_types.Nat.N2.n in
let proof = Pickles.Proof.dummy n2 n2 n2 ~domain_log2:15 in
Proof2.to_base64 proof |> Js.string

let pickles =
object%js
val compile = pickles_compile
Expand All @@ -2306,6 +2311,8 @@ let pickles =

val verify = verify

val dummyBase64Proof = dummy_base64_proof

val proofToBase64 = proof_to_base64

val proofOfBase64 = proof_of_base64
Expand Down