From dc4acc36d4cb16d2c88c35f8f032ff6bc8e00926 Mon Sep 17 00:00:00 2001 From: tiagofneto Date: Wed, 7 Feb 2024 16:55:54 +0000 Subject: [PATCH] main verification --- src/lib.cairo | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib.cairo b/src/lib.cairo index 9fd981e13..205702e7d 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -15,10 +15,11 @@ mod vector_commitment; mod tests; use cairo_verifier::{ - deserialization::stark::StarkProofWithSerde, stark::{StarkProof, StarkProofImpl} + deserialization::stark::StarkProofWithSerde, stark::{StarkProof, StarkProofImpl}, + air::public_input::PublicInputTrait }; -fn main(serialized_proof: Array) { +fn main(serialized_proof: Array) -> (felt252, felt252) { let mut serialized_proof_span = serialized_proof.span(); let stark_proof: StarkProof = Serde::< StarkProofWithSerde @@ -27,4 +28,7 @@ fn main(serialized_proof: Array) { .into(); stark_proof.verify(); + let (program_hash, output_hash) = stark_proof.public_input.verify(); + + (program_hash, output_hash) }