Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
api_avm.cpp
Go to the documentation of this file.
1#include "api_avm.hpp"
4#include <stdexcept>
5
6namespace bb {
7
8// AVM is NOT enabled in this build
9const bool avm_enabled = false;
10
11void avm_prove([[maybe_unused]] const std::filesystem::path& inputs_path,
12 [[maybe_unused]] const std::filesystem::path& output_path)
13{
14 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
15}
16
17void avm_check_circuit([[maybe_unused]] const std::filesystem::path& inputs_path)
18{
19 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
20}
21
22bool avm_verify([[maybe_unused]] const std::filesystem::path& proof_path,
23 [[maybe_unused]] const std::filesystem::path& public_inputs_path)
24{
25 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
26}
27
28void avm_simulate([[maybe_unused]] const std::filesystem::path& inputs_path)
29{
30 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
31}
32
33void avm_write_verification_key([[maybe_unused]] const std::filesystem::path& output_path)
34{
35 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
36}
37
38AvmProveResult avm_prove_from_bytes([[maybe_unused]] std::vector<uint8_t> inputs)
39{
40 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
41}
42
43bool avm_verify_from_bytes([[maybe_unused]] std::vector<bb::fr> proof,
44 [[maybe_unused]] std::vector<uint8_t> public_inputs)
45{
46 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
47}
48
49bool avm_check_circuit_from_bytes([[maybe_unused]] std::vector<uint8_t> inputs)
50{
51 throw_or_abort("AVM is not supported in this build. Use the 'bb-avm' binary with full AVM support.");
52}
53
54} // namespace bb
AvmProvingInputs inputs
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
bool avm_check_circuit_from_bytes(std::vector< uint8_t > inputs)
Check the AVM circuit from serialized inputs (msgpack bytes).
Definition api_avm.cpp:121
void avm_simulate(const std::filesystem::path &inputs_path)
Simulates an public transaction.
Definition api_avm.cpp:78
bool avm_verify_from_bytes(std::vector< bb::fr > proof, std::vector< uint8_t > public_inputs)
Verify an AVM proof from serialized data.
Definition api_avm.cpp:109
bool avm_verify(const std::filesystem::path &proof_path, const std::filesystem::path &public_inputs_path)
Verifies an avm proof and writes the result to stdout.
Definition api_avm.cpp:65
void avm_write_verification_key(const std::filesystem::path &output_path)
Writes an avm (incomplete) verification key to a file.
Definition api_avm.cpp:90
AvmProveResult avm_prove_from_bytes(std::vector< uint8_t > inputs)
Prove an AVM transaction from serialized inputs (msgpack bytes). Callers that need to verify the proo...
Definition api_avm.cpp:98
void avm_prove(const std::filesystem::path &inputs_path, const std::filesystem::path &output_path)
Writes an avm proof to a file.
Definition api_avm.cpp:31
void avm_check_circuit(const std::filesystem::path &inputs_path)
Stub - throws runtime error if called.
Definition api_avm.cpp:53
const bool avm_enabled
Definition api_avm.cpp:15
void throw_or_abort(std::string const &err)