Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
r1cs_serialization.hpp
Go to the documentation of this file.
1 // Copyright (c) 2015-2022 Clearmatics Technologies Ltd
2 //
3 // SPDX-License-Identifier: LGPL-3.0+
4 
5 #ifndef __ZETH_SERIALIZATION_R1CS_SERIALIZATION_HPP__
6 #define __ZETH_SERIALIZATION_R1CS_SERIALIZATION_HPP__
7 
10 
11 #include <ostream>
12 
13 namespace libzeth
14 {
15 
16 template<typename FieldT>
17 std::ostream &primary_inputs_write_json(
18  const std::vector<FieldT> &public_inputs, std::ostream &out_s);
19 
20 template<typename FieldT>
21 std::istream &primary_inputs_read_json(
22  std::vector<FieldT> &public_inputs, std::istream &in_s);
23 
24 template<typename ppT>
25 std::string accumulation_vector_to_json(
26  const libsnark::accumulation_vector<libff::G1<ppT>> &acc_vector);
27 
34 template<typename ppT>
35 libsnark::accumulation_vector<libff::G1<ppT>> accumulation_vector_from_json(
36  const std::string &acc_vector_str);
37 
38 template<typename FieldT>
39 std::ostream &r1cs_write_json(
40  const libsnark::r1cs_constraint_system<FieldT> &r1cs, std::ostream &out_s);
41 
42 template<typename FieldT>
43 void r1cs_read_bytes(
44  libsnark::r1cs_constraint_system<FieldT> &r1cs, std::istream &in_s);
45 
46 template<typename FieldT>
47 void r1cs_write_bytes(
48  const libsnark::r1cs_constraint_system<FieldT> &r1cs, std::ostream &out_s);
49 
50 } // namespace libzeth
51 
53 
54 #endif // __ZETH_SERIALIZATION_R1CS_SERIALIZATION_HPP__
libzeth::accumulation_vector_to_json
std::string accumulation_vector_to_json(const libsnark::accumulation_vector< libff::G1< ppT >> &acc_vector)
r1cs_serialization.tcc
libzeth::r1cs_write_bytes
void r1cs_write_bytes(const libsnark::r1cs_constraint_system< FieldT > &r1cs, std::ostream &out_s)
include_libff.hpp
libzeth
Definition: binary_operation.hpp:15
libzeth::r1cs_write_json
std::ostream & r1cs_write_json(const libsnark::r1cs_constraint_system< FieldT > &r1cs, std::ostream &out_s)
libzeth::primary_inputs_write_json
std::ostream & primary_inputs_write_json(const std::vector< FieldT > &public_inputs, std::ostream &out_s)
libzeth::r1cs_read_bytes
void r1cs_read_bytes(libsnark::r1cs_constraint_system< FieldT > &r1cs, std::istream &in_s)
libzeth::accumulation_vector_from_json
libsnark::accumulation_vector< libff::G1< ppT > > accumulation_vector_from_json(const std::string &acc_vector_str)
libzeth::primary_inputs_read_json
std::istream & primary_inputs_read_json(std::vector< FieldT > &public_inputs, std::istream &in_s)
include_libsnark.hpp