use alloc::string::String;
use core::any::Any;
use core::fmt::Debug;
use crate::key::PublicKey;
use crate::util::BoxedFuture;
pub trait Nip44: Any + Debug + Send + Sync {
type Error: core::error::Error;
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;
fn nip44_encrypt_async<'a>(
&'a self,
public_key: &'a PublicKey,
content: &'a str,
) -> BoxedFuture<'a, Result<String, Self::Error>>;
fn nip44_decrypt_async<'a>(
&'a self,
public_key: &'a PublicKey,
payload: &'a str,
) -> BoxedFuture<'a, Result<String, Self::Error>>;
}