Add get_message to Proof

This commit is contained in:
Sosthene 2024-10-04 09:26:19 +02:00
parent 3ebf4f7899
commit 1d9a994543

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)?;