Formatting

This commit is contained in:
Mark Spanbroek 2024-01-22 16:43:11 +01:00 committed by markspanbroek
parent 33614ee218
commit 862ea56e8b
1 changed files with 6 additions and 6 deletions

View File

@ -9,14 +9,14 @@ const PUBLIC_INPUT_FILE_NAME = "example-proof/public.json"
function G1ToStruct(point) { function G1ToStruct(point) {
return { return {
x: point[0], x: point[0],
y: point[1] y: point[1],
} }
} }
function G2ToStruct(point) { function G2ToStruct(point) {
return { return {
x: [point[0][1], point[0][0]], x: [point[0][1], point[0][0]],
y: [ point[1][1], point[1][0] ] y: [point[1][1], point[1][0]],
} }
} }
@ -25,9 +25,9 @@ function loadProof(name) {
fs.readFileSync(`${BASE_PATH}/${name}/${PROOF_FILE_NAME}`) fs.readFileSync(`${BASE_PATH}/${name}/${PROOF_FILE_NAME}`)
) )
return { return {
a: G1ToStruct(proof['pi_a']), a: G1ToStruct(proof["pi_a"]),
b: G2ToStruct(proof['pi_b']), b: G2ToStruct(proof["pi_b"]),
c: G1ToStruct(proof['pi_c']) c: G1ToStruct(proof["pi_c"]),
} }
} }