pub trait RecoverableSigner<C: RecoverableCurve>: Signer<C> + Send {
// Required method
fn sign_recoverable(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Send;
}Expand description
A Signer that can produce recoverable
signatures.
Required Methods§
Sourcefn sign_recoverable(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Send
fn sign_recoverable( &self, msg: &[u8], ) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Send
Sign a given message and return a signature along with recovery id.
NOTE: implementations MAY require msg to be prehash (i.e. output
of cryptographic hash function) of a fixed length and return
an error otherwise. Check corresponding docs before using.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl RecoverableSigner<Secp256k1> for SigningKey
impl RecoverableSigner<Secp256k1> for SigningKey
Source§async fn sign_recoverable(
&self,
prehash: &[u8],
) -> Result<(<Secp256k1 as Curve>::Signature, <Secp256k1 as RecoverableCurve>::RecoveryId), Self::Error>
async fn sign_recoverable( &self, prehash: &[u8], ) -> Result<(<Secp256k1 as Curve>::Signature, <Secp256k1 as RecoverableCurve>::RecoveryId), Self::Error>
Sign 32-byte prehash (i.e. output of cryptographic hash function) and return a signature along with recovery id.
If given prehash is of different length, an error will be returned.