feat(aiken-lang): expose integerToByteString and byteStringToInteger
This commit is contained in:
parent
fc3bc4d9ff
commit
c7dd4d0e48
|
@ -771,6 +771,16 @@ pub fn from_default_function(builtin: DefaultFunction, id_gen: &IdGenerator) ->
|
||||||
DefaultFunction::Bls12_381_FinalVerify => {
|
DefaultFunction::Bls12_381_FinalVerify => {
|
||||||
let tipo = function(vec![miller_loop_result(), miller_loop_result()], bool());
|
let tipo = function(vec![miller_loop_result(), miller_loop_result()], bool());
|
||||||
|
|
||||||
|
(tipo, 2)
|
||||||
|
}
|
||||||
|
DefaultFunction::IntegerToByteString => {
|
||||||
|
let tipo = function(vec![bool(), int(), int()], byte_array());
|
||||||
|
|
||||||
|
(tipo, 3)
|
||||||
|
}
|
||||||
|
DefaultFunction::ByteStringToInteger => {
|
||||||
|
let tipo = function(vec![bool(), byte_array()], int());
|
||||||
|
|
||||||
(tipo, 2)
|
(tipo, 2)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -536,6 +536,8 @@ impl DefaultFunction {
|
||||||
Bls12_381_MillerLoop => "bls12_381_miller_loop",
|
Bls12_381_MillerLoop => "bls12_381_miller_loop",
|
||||||
Bls12_381_MulMlResult => "bls12_381_mul_miller_loop_result",
|
Bls12_381_MulMlResult => "bls12_381_mul_miller_loop_result",
|
||||||
Bls12_381_FinalVerify => "bls12_381_final_verify",
|
Bls12_381_FinalVerify => "bls12_381_final_verify",
|
||||||
|
IntegerToByteString => "integer_to_bytearray",
|
||||||
|
ByteStringToInteger => "bytearray_to_integer",
|
||||||
}
|
}
|
||||||
.to_string()
|
.to_string()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue