Example
Refactor example to use the new parser semantics.
@@ -8,12 +8,9 @@ use dep::std;
//
fn main(message : [10]u8, pub_key_x : Witness, pub_key_y : Witness, signature : [64]u8) {
- const zero = 0;
-
// Is there ever a situation where someone would want
// to ensure that a signature was invalid?
- std::schnorr::verify_signature(signature, message,pub_key_x,pub_key_y);
+ priv x = std::schnorr::verify_signature(signature, message,pub_key_x,pub_key_y);
- // Type is extracted from the last statement
- constrain message[0] == zero;
+ constrain x == 1;
}
\ No newline at end of file
