Add get_message to Proof
This commit is contained in:
parent
617c73a3de
commit
f577207e0d
@ -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)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user