feat: enable elliptic curve verification builtins

This commit is contained in:
rvcas 2023-02-04 16:24:00 -05:00 committed by Lucas
parent 7bffb994fc
commit 175cd777d8
1 changed files with 12 additions and 3 deletions

View File

@ -391,6 +391,18 @@ pub fn from_default_function(
Some((tipo, 3)) Some((tipo, 3))
} }
DefaultFunction::VerifyEcdsaSecp256k1Signature => {
let tipo = function(vec![byte_array(), byte_array(), byte_array()], bool());
Some((tipo, 3))
}
DefaultFunction::VerifySchnorrSecp256k1Signature => {
let tipo = function(vec![byte_array(), byte_array(), byte_array()], bool());
Some((tipo, 3))
}
DefaultFunction::AppendString => { DefaultFunction::AppendString => {
let tipo = function(vec![string(), string()], string()); let tipo = function(vec![string(), string()], string());
@ -499,9 +511,6 @@ pub fn from_default_function(
Some((tipo, 1)) Some((tipo, 1))
} }
// Disabled until the next hard-fork
DefaultFunction::VerifyEcdsaSecp256k1Signature => None,
DefaultFunction::VerifySchnorrSecp256k1Signature => None,
// Anything below has a direct syntax equivalent in Aiken, so // Anything below has a direct syntax equivalent in Aiken, so
// there's no need to support builtin for those. // there's no need to support builtin for those.
DefaultFunction::ChooseData => None, DefaultFunction::ChooseData => None,