pub trait Signer<K>:
Send
+ Sync
+ Debug {
// Required methods
fn sign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<BinaryData, ProtocolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn sign_create_witness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<AddressWitness, ProtocolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn can_sign_with(&self, key: &K) -> bool;
}Required Methods§
Sourcefn sign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<BinaryData, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<BinaryData, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
the public key bytes are only used to look up the private key
Sourcefn sign_create_witness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<AddressWitness, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sign_create_witness<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 K,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<AddressWitness, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
the public key bytes are only used to look up the private key
Sourcefn can_sign_with(&self, key: &K) -> bool
fn can_sign_with(&self, key: &K) -> bool
do we have this identity public key in the signer?