use crate::export::Principal;
pub(crate) mod anonymous;
pub(crate) mod basic;
pub(crate) mod secp256k1;
#[cfg(feature = "pem")]
pub(crate) mod error;
pub use anonymous::AnonymousIdentity;
pub use basic::BasicIdentity;
pub use secp256k1::Secp256k1Identity;
#[cfg(feature = "pem")]
pub use error::PemError;
#[derive(Clone, Debug)]
pub struct Signature {
pub public_key: Option<Vec<u8>>,
pub signature: Option<Vec<u8>>,
}
pub trait Identity: Send + Sync {
fn sender(&self) -> Result<Principal, String>;
fn sign(&self, blob: &[u8]) -> Result<Signature, String>;
}
impl_debug_empty!(dyn Identity);