Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
c_bind.cpp
Go to the documentation of this file.
1#include "c_bind.hpp"
2#include "../pedersen_hash/pedersen.hpp"
4#include "pedersen.hpp"
5
6using namespace bb;
7
9 uint32_t const* ctx_index,
10 grumpkin::g1::affine_element::out_buf output)
11{
13 read(inputs_buffer, to_commit);
15 ctx.offset = static_cast<size_t>(ntohl(*ctx_index));
17
18 write(output, pedersen_commitment);
19}
static AffineElement commit_native(const std::vector< Fq > &inputs, GeneratorContext context={})
Given a vector of fields, generate a pedersen commitment using the indexed generators.
Definition pedersen.cpp:18
WASM_EXPORT void pedersen_commit(fr::vec_in_buf inputs_buffer, uint32_t const *ctx_index, grumpkin::g1::affine_element::out_buf output)
Definition c_bind.cpp:8
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
void read(B &it, field2< base_field, Params > &value)
void write(B &buf, field2< base_field, Params > const &value)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
const uint8_t * vec_in_buf
#define WASM_EXPORT