17 if (crs_path !=
nullptr) {
18 return std::filesystem::path(crs_path);
22 std::filesystem::path base = home !=
nullptr ? std::filesystem::path(home) :
"./";
23 return base /
".bb-crs";
28 if (bn254_crs_factory !=
nullptr) {
42 if (bn254_crs_factory !=
nullptr) {
51 if (bn254_crs_factory !=
nullptr) {
60 if (grumpkin_crs_factory !=
nullptr) {
68 if (grumpkin_crs_factory !=
nullptr) {
71 grumpkin_crs_factory =
77 if (!bn254_crs_factory) {
78 throw_or_abort(
"You need to initialize the global CRS with a call to init_crs_factory(...)!");
80 return bn254_crs_factory;
85 if (!grumpkin_crs_factory) {
86 throw_or_abort(
"You need to initialize the global CRS with a call to init_grumpkin_crs_factory(...)!");
88 return grumpkin_crs_factory;
void init_grumpkin_net_crs_factory(const std::filesystem::path &path)
std::shared_ptr< factories::CrsFactory< curve::BN254 > > get_bn254_crs_factory()
void init_grumpkin_file_crs_factory(const std::filesystem::path &path)
std::filesystem::path bb_crs_path()
std::shared_ptr< factories::CrsFactory< curve::BN254 > > get_crs_factory()
std::shared_ptr< factories::CrsFactory< curve::Grumpkin > > get_grumpkin_crs_factory()
void init_grumpkin_mem_crs_factory(std::vector< curve::Grumpkin::AffineElement > const &points)
void init_bn254_net_crs_factory(const std::filesystem::path &path)
void init_bn254_file_crs_factory(const std::filesystem::path &path)
void init_bn254_mem_crs_factory(std::vector< g1::affine_element > const &points, g2::affine_element const &g2_point)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
void throw_or_abort(std::string const &err)