Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
api_avm.hpp
Go to the documentation of this file.
1#pragma once
2#include <filesystem>
3#include <vector>
4
6
7namespace bb {
8
13 std::vector<bb::fr> proof;
14};
15
20AvmProveResult avm_prove_from_bytes(std::vector<uint8_t> inputs);
21
28bool avm_verify_from_bytes(std::vector<bb::fr> proof, std::vector<uint8_t> public_inputs);
29
34bool avm_check_circuit_from_bytes(std::vector<uint8_t> inputs);
35
36// Global flag indicating AVM support is available
37extern const bool avm_enabled;
38
48void avm_prove(const std::filesystem::path& inputs_path, const std::filesystem::path& output_path);
49
50void avm_check_circuit(const std::filesystem::path& inputs_path);
51
64// NOTE: The proof should NOT include the public inputs.
65bool avm_verify(const std::filesystem::path& proof_path, const std::filesystem::path& public_inputs_path);
66
72// FIXME(fcarreiro): The inputs should not need to be the PROVING inputs.
73void avm_simulate(const std::filesystem::path& inputs_path);
74
83void avm_write_verification_key(const std::filesystem::path& output_path);
84
85} // 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
Result of in-memory AVM proving.
Definition api_avm.hpp:12
std::vector< bb::fr > proof
Definition api_avm.hpp:13