pub trait BlockSigner {
type Error: Error + Send + Sync + 'static;
// Required methods
fn sign(
&self,
header: &BlockHeader,
) -> impl Future<Output = Result<Signature, Self::Error>> + Send;
fn public_key(&self) -> PublicKey;
}Expand description
Trait which abstracts the signing of block headers with ECDSA signatures.
Production-level implementations will involve some sort of secure remote backend. The trait also allows for testing with local and ephemeral signers.
Required Associated Types§
Required Methods§
fn sign( &self, header: &BlockHeader, ) -> impl Future<Output = Result<Signature, Self::Error>> + Send
fn public_key(&self) -> PublicKey
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.