PathAddressResolver

Trait PathAddressResolver 

Source
pub trait PathAddressResolver {
    // Required methods
    fn resolve_transport_address<'life0, 'life1, 'async_trait>(
        &'life0 self,
        address: &'life1 Address,
    ) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, PathError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn resolve_chain_address<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 OffchainPublicKey,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Address>, PathError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_channel<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        src: &'life1 Address,
        dst: &'life2 Address,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, PathError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
}
Expand description

Allows resolution of OffchainPublicKey for a given Address or vice versa and retrieval of ChannelEntry based on the parties.

Required Methods§

Source

fn resolve_transport_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, PathError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Resolve OffchainPublicKey from the given Address

Source

fn resolve_chain_address<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 OffchainPublicKey, ) -> Pin<Box<dyn Future<Output = Result<Option<Address>, PathError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Resolve Address from the given OffchainPublicKey

Source

fn get_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Address, dst: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, PathError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Resolve ChannelEntry based on the given src and dst addresses.

Implementations on Foreign Types§

Source§

impl<'c, R> PathAddressResolver for ChainPathResolver<'c, R>

Source§

fn resolve_transport_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 Address, ) -> Pin<Box<dyn Future<Output = Result<Option<OffchainPublicKey>, PathError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, ChainPathResolver<'c, R>: 'async_trait,

Source§

fn resolve_chain_address<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 OffchainPublicKey, ) -> Pin<Box<dyn Future<Output = Result<Option<Address>, PathError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, ChainPathResolver<'c, R>: 'async_trait,

Source§

fn get_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, src: &'life1 Address, dst: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<Option<ChannelEntry>, PathError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, ChainPathResolver<'c, R>: 'async_trait,

Implementors§