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";
39 if (bn254_crs_factory !=
nullptr) {
48 if (bn254_crs_factory !=
nullptr) {
57 if (grumpkin_crs_factory !=
nullptr) {
65 if (grumpkin_crs_factory !=
nullptr) {
68 grumpkin_crs_factory =
74 if (!bn254_crs_factory) {
75 throw_or_abort(
"You need to initialize the global CRS with a call to init_crs_factory(...)!");
77 return bn254_crs_factory;
82 if (!grumpkin_crs_factory) {
83 throw_or_abort(
"You need to initialize the global CRS with a call to init_grumpkin_crs_factory(...)!");
85 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)