pub trait ChainKeyOperations {
type Error: Error + Send + Sync + 'static;
type Mapper: KeyIdMapper<HoprSphinxSuite, HoprSphinxHeaderSpec> + Clone + Send + Sync + 'static;
// Required methods
fn chain_key_to_packet_key<'life0, 'life1, 'async_trait>(
&'life0 self,
chain: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn packet_key_to_chain_key<'life0, 'life1, 'async_trait>(
&'life0 self,
packet: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn key_id_mapper_ref(&self) -> &Self::Mapper;
}
Expand description
Operations for offchain keys.
This typically translates to optimized (and cached) versions of [ChainReadChannelOperations
].
Required Associated Types§
type Error: Error + Send + Sync + 'static
type Mapper: KeyIdMapper<HoprSphinxSuite, HoprSphinxHeaderSpec> + Clone + Send + Sync + 'static
Required Methods§
Sourcefn chain_key_to_packet_key<'life0, 'life1, 'async_trait>(
&'life0 self,
chain: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn chain_key_to_packet_key<'life0, 'life1, 'async_trait>(
&'life0 self,
chain: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Translates Address
into OffchainPublicKey
.
Sourcefn packet_key_to_chain_key<'life0, 'life1, 'async_trait>(
&'life0 self,
packet: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn packet_key_to_chain_key<'life0, 'life1, 'async_trait>(
&'life0 self,
packet: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<Option<Address>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Translates OffchainPublicKey
into Address
.
Sourcefn key_id_mapper_ref(&self) -> &Self::Mapper
fn key_id_mapper_ref(&self) -> &Self::Mapper
Returns mapper for offchain key IDs as a reference.