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// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#include "c_bind.hpp"
8#include "../pedersen_hash/pedersen.hpp"
10#include "pedersen.hpp"
11
12using namespace bb;
13
15 uint32_t const* ctx_index,
16 grumpkin::g1::affine_element::out_buf output)
17{
19 read(inputs_buffer, to_commit);
21 ctx.offset = static_cast<size_t>(ntohl(*ctx_index));
23
24 write(output, pedersen_commitment);
25}
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:24
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:14
Entry point for Barretenberg command-line interface.
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