Closed khandar-william closed 2 months ago
The Proof struct implements Arkworks' CanonicalSerialize / CanonicalDeserialize. You should be able to call proof.serialize_compressed(writer)
.
fn serialize_compressed<W: Write>(
&self,
writer: W
) -> Result<(), SerializationError> { ... }
To access this function you'll need to import use ark_serialize::CanonicalSerialize
.
Closing as I believe this solves your issue. Feel free to ping here if not.
Is there a way to get the binary representation of the
Proof
object?Looking at the
host_utils::Proof
methods, it has asave_to_file
method but no method to get just the binary representation of it. I'm thinking of doing something like this in the host codeIf I look at
host_utils.rs
, it seems thatProof
has internal functionserialize_compressed
but it's not exposed publicly.