Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
c_bind.cpp File Reference
#include "c_bind.hpp"
#include "barretenberg/common/serialize.hpp"
#include "barretenberg/ecc/curves/bn254/bn254.hpp"
#include "global_crs.hpp"
#include <barretenberg/common/streams.hpp>
#include <barretenberg/ecc/curves/bn254/g1.hpp>
#include <barretenberg/ecc/curves/bn254/g2.hpp>
#include <cstddef>
#include <cstdint>
#include <sys/types.h>

Go to the source code of this file.

Functions

WASM_EXPORT void srs_init_srs (uint8_t const *points_buf, uint32_t const *num_points_buf, uint8_t const *g2_point_buf)
 
WASM_EXPORT void srs_init_grumpkin_srs (uint8_t const *points_buf, uint32_t const *num_points)
 

Function Documentation

◆ srs_init_grumpkin_srs()

WASM_EXPORT void srs_init_grumpkin_srs ( uint8_t const *  points_buf,
uint32_t const *  num_points 
)

WARNING: The SRS is not encoded the same way as all the read/write methods encode. Have to use the old school io functions to parse the buffers.

Definition at line 33 of file c_bind.cpp.

◆ srs_init_srs()

WASM_EXPORT void srs_init_srs ( uint8_t const *  points_buf,
uint32_t const *  num_points_buf,
uint8_t const *  g2_point_buf 
)

We are not passed a vector (length prefixed), but the buffer and num points independently. Saves on having the generate the vector awkwardly calling side after downloading crs.

Definition at line 18 of file c_bind.cpp.