From 2d29116fc9d53d7201a4fe4223eded9501bf3fa9 Mon Sep 17 00:00:00 2001 From: Witter Date: Sun, 3 Nov 2024 23:50:20 +0800 Subject: [PATCH] feat: add sign_schnorr_no_aux_rand for Keypair --- src/key.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/key.rs b/src/key.rs index aefe030fa..eae9af7f8 100644 --- a/src/key.rs +++ b/src/key.rs @@ -1014,6 +1014,14 @@ impl Keypair { SECP256K1.sign_schnorr(msg, self) } + /// Constructs a schnorr signature without aux rand for `msg` using the global + /// [`SECP256K1`] context. + #[inline] + #[cfg(all(feature = "global-context", feature = "std"))] + pub fn sign_schnorr_no_aux_rand(&self, msg: &[u8]) -> schnorr::Signature { + SECP256K1.sign_schnorr_no_aux_rand(msg, self) + } + /// Attempts to erase the secret within the underlying array. /// /// Note, however, that the compiler is allowed to freely copy or move the contents