use std::{fmt::Display, hash::Hash};
use parity_scale_codec::Codec;
pub trait PublicKey:
Send + Sync + Eq + Clone + AsRef<[u8]> + Display + Hash + Codec + 'static
{
type Signature: Send + Sync + Clone + Codec;
fn verify(&self, message: &[u8], signature: &Self::Signature) -> bool;
}
pub trait SecretKey: Clone + Send + Sync + 'static {
type Signature: Send + Sync + Clone + Codec;
type PublicKey: PublicKey<Signature = Self::Signature>;
fn sign(&self, message: &[u8]) -> Self::Signature;
fn public_key(&self) -> Self::PublicKey;
}