use std::error::Error;
pub use hopr_types::primitive::prelude::{KeyIdMapping, KeyIdent as HoprKeyIdent};
use hopr_types::{crypto::prelude::OffchainPublicKey, primitive::prelude::Address};
#[auto_impl::auto_impl(&, Box, Arc)]
pub trait ChainKeyOperations {
type Error: Error + Send + Sync + 'static;
type Mapper: KeyIdMapping<HoprKeyIdent, OffchainPublicKey> + Clone + Send + Sync + 'static;
fn chain_key_to_packet_key(&self, chain: &Address) -> Result<Option<OffchainPublicKey>, Self::Error>;
fn packet_key_to_chain_key(&self, packet: &OffchainPublicKey) -> Result<Option<Address>, Self::Error>;
fn key_id_mapper_ref(&self) -> &Self::Mapper;
}