Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
Go to the documentation of this file.
5 #ifndef __ZETH_MPC_CLI_COMMON_HPP__
6 #define __ZETH_MPC_CLI_COMMON_HPP__
12 #include <boost/program_options.hpp>
25 template<
typename ReadableT>
28 std::ifstream in(file_name, std::ios_base::binary | std::ios_base::in);
30 std::ios_base::eofbit | std::ios_base::badbit | std::ios_base::failbit);
31 return ReadableT::read(in);
37 template<
typename ReadableT>
41 std::ifstream inf(file_name, std::ios_base::binary | std::ios_base::in);
44 std::ios_base::eofbit | std::ios_base::badbit | std::ios_base::failbit);
45 ReadableT v = ReadableT::read(in);
60 const std::map<std::string, mpc_subcommand *> &
commands,
65 #endif // __ZETH_MPC_CLI_COMMON_HPP__
mpc_subcommand * mpc_dummy_phase2_cmd
mpc_subcommand * mpc_phase2_contribute_cmd
ReadableT read_from_file(const std::string &file_name)
size_t[MPC_HASH_ARRAY_LENGTH] mpc_hash_t
mpc_subcommand * mpc_phase2_verify_transcript_cmd
mpc_subcommand * mpc_phase2_verify_contribution_cmd
void get_hash(typename HashT::OutBuffer out_hash)
int mpc_main(const std::map< std::string, mpc_subcommand * > &commands, const ProtoboardInitFn &pb_init, int argc, char **argv)
Main entry point into the mpc command for a given circuit.
Wrap some istream, hashing all data as it is read.
mpc_subcommand * mpc_phase2_begin_cmd
mpc_subcommand * mpc_linear_combination_cmd
mpc_subcommand * mpc_create_keypair_cmd
ReadableT read_from_file_and_hash(const std::string &file_name, libzeth::mpc_hash_t out_hash)
std::function< void(libsnark::protoboard< Field > &)> ProtoboardInitFn