pub trait Signer: Send + Sync {
// Required methods
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn public_key(&self) -> PublicKey;
fn is_available(&self) -> bool;
}
Expand description
A signer that can sign arbitrary data
Required Methods§
Sourcefn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sign data using a key
Sourcefn public_key(&self) -> PublicKey
fn public_key(&self) -> PublicKey
Get the public key of the signer. Panics if the key is not available.
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the signer is available