Add get_message to Proof

This commit is contained in:
Sosthene 2024-10-04 09:26:19 +02:00 committed by Nicolas Cantu
parent 617c73a3de
commit f577207e0d

View File

@ -96,6 +96,10 @@ impl Proof {
self.key
}
pub fn get_message(&self) -> [u8; 32] {
self.message.to_byte_array()
}
pub fn verify(&self) -> Result<()> {
let secp = Secp256k1::verification_only();
secp.verify_schnorr(&self.signature, &Message::from_digest(self.message.to_byte_array()), &self.key)?;