use alloc::boxed::Box;
use alloc::string::String;
use core::any::Any;
use core::fmt::Debug;
use core::future::Future;
use core::pin::Pin;
use crate::key::PublicKey;
pub trait Nip44: Any + Debug + Send + Sync {
type Error: core::error::Error + Send + Sync;
fn nip44_encrypt(&self, public_key: &PublicKey, content: &str) -> Result<String, Self::Error>;
fn nip44_decrypt(&self, public_key: &PublicKey, payload: &str) -> Result<String, Self::Error>;
}
pub trait AsyncNip44: Any + Debug + Send + Sync {
type Error: core::error::Error + Send + Sync;
fn nip44_encrypt_async<'a>(
&'a self,
public_key: &'a PublicKey,
content: &'a str,
) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'a>>;
fn nip44_decrypt_async<'a>(
&'a self,
public_key: &'a PublicKey,
payload: &'a str,
) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'a>>;
}