diff --git a/plonky2x/core/src/backend/circuit/output.rs b/plonky2x/core/src/backend/circuit/output.rs index c4b23a742..84631df59 100644 --- a/plonky2x/core/src/backend/circuit/output.rs +++ b/plonky2x/core/src/backend/circuit/output.rs @@ -81,6 +81,23 @@ impl, const D: usize> PublicOutput { } } + pub fn proof_read(&mut self) -> V::ValueType { + match self { + PublicOutput::Proofs(output) => { + let elements = output.drain(0..V::nb_elements()).collect_vec(); + V::from_elements::(&elements) + } + _ => panic!("proofs io is not enabled"), + } + } + + pub fn proof_read_all(&mut self) -> Vec { + match self { + PublicOutput::Proofs(output) => output.clone(), + _ => panic!("proofs io is not enabled"), + } + } + /// Reads a value from the public circuit output using byte-based serialization. pub fn evm_read(&mut self) -> V::ValueType { match self {