feat: implement bls primitives in code gen

This commit is contained in:
microproofs
2023-11-07 14:14:33 -05:00
committed by Lucas
parent d51374aac1
commit 8b89ba3b93
11 changed files with 70 additions and 16 deletions

View File

@@ -38,6 +38,14 @@ impl<T> Term<T> {
Term::Constant(Constant::ByteString(b).into())
}
pub fn bls12_381_g1(b: blst::blst_p1) -> Self {
Term::Constant(Constant::Bls12_381G1Element(b.into()).into())
}
pub fn bls12_381_g2(b: blst::blst_p2) -> Self {
Term::Constant(Constant::Bls12_381G2Element(b.into()).into())
}
pub fn bool(b: bool) -> Self {
Term::Constant(Constant::Bool(b).into())
}