Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
api_client_ivc.hpp
Go to the documentation of this file.
1#pragma once
4#include <filesystem>
5#include <stdexcept>
6#include <string>
7#include <vector>
8
9namespace bb {
10
11class ClientIVCAPI : public API {
12
13 public:
14 void prove(const Flags& flags, const std::filesystem::path& input_path, const std::filesystem::path& output_dir);
15
16 bool verify(const Flags& flags,
17 const std::filesystem::path& public_inputs_path,
18 const std::filesystem::path& proof_path,
19 const std::filesystem::path& vk_path) override;
20
21 bool prove_and_verify(const std::filesystem::path& input_path);
22
23 void gates(const Flags& flags, const std::filesystem::path& bytecode_path) override;
24
25 void write_solidity_verifier(const Flags& flags,
26 const std::filesystem::path& output_path,
27 const std::filesystem::path& vk_path) override;
28
29 // Two modes:
30 // - write a vk for a standalone circuit
31 // - write the vk of the hiding circuit which requires the last circuit input (e.g. a private-tail in Aztec) to be
32 // passed. This is used just to parameterize the hiding circuit with the last circuit public inputs amount.
33 void write_vk(const Flags& flags,
34 const std::filesystem::path& bytecode_path,
35 const std::filesystem::path& output_path) override;
36
37 bool check_precomputed_vks(const Flags& flags, const std::filesystem::path& input_path);
38 bool check(const Flags& flags,
39 const std::filesystem::path& bytecode_path,
40 const std::filesystem::path& witness_path) override;
41};
42
43void gate_count_for_ivc(const std::string& bytecode_path, bool include_gates_per_opcode);
44
45void write_arbitrary_valid_client_ivc_proof_and_vk_to_file(const std::filesystem::path& output_dir);
46
47std::vector<uint8_t> decompress(const void* bytes, size_t size);
48
49} // namespace bb
Definition api.hpp:7
void gates(const Flags &flags, const std::filesystem::path &bytecode_path) override
bool check(const Flags &flags, const std::filesystem::path &bytecode_path, const std::filesystem::path &witness_path) override
bool verify(const Flags &flags, const std::filesystem::path &public_inputs_path, const std::filesystem::path &proof_path, const std::filesystem::path &vk_path) override
bool check_precomputed_vks(const Flags &flags, const std::filesystem::path &input_path)
bool prove_and_verify(const std::filesystem::path &input_path)
void write_solidity_verifier(const Flags &flags, const std::filesystem::path &output_path, const std::filesystem::path &vk_path) override
void prove(const Flags &flags, const std::filesystem::path &input_path, const std::filesystem::path &output_dir)
void write_vk(const Flags &flags, const std::filesystem::path &bytecode_path, const std::filesystem::path &output_path) override
Entry point for Barretenberg command-line interface.
std::vector< uint8_t > decompress(const void *bytes, size_t size)
void write_arbitrary_valid_client_ivc_proof_and_vk_to_file(const std::filesystem::path &output_dir)
void gate_count_for_ivc(const std::string &bytecode_path, bool include_gates_per_opcode)