Trait IncentiveRedeemOperations
pub trait IncentiveRedeemOperations: HasChainApi + HasTicketManagement {
const PENDING_TO_CLOSE_REDEMPTION_TOLERANCE: Duration = _;
// Provided methods
fn redeem_all_tickets<'life0, 'async_trait, B>(
&'life0 self,
min_value: B,
) -> Pin<Box<dyn Future<Output = Result<Vec<RedemptionResult>, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
B: 'async_trait + Into<Balance<WxHOPR>> + Send,
Self: Sync + 'async_trait { ... }
fn redeem_tickets_with_counterparty<'life0, 'async_trait, A, B>(
&'life0 self,
issuer: A,
min_value: B,
) -> Pin<Box<dyn Future<Output = Result<Vec<RedemptionResult>, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
A: 'async_trait + Into<Address> + Send,
B: 'async_trait + Into<Balance<WxHOPR>> + Send,
Self: Sync + 'async_trait { ... }
fn ticket_statistics(
&self,
) -> Result<ChannelStats, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>> { ... }
}Expand description
Ticket redemption and statistics.
Only available on relay nodes — requires both HasChainApi and HasTicketManagement.
Automatically implemented for any type providing both.
Provided Associated Constants§
const PENDING_TO_CLOSE_REDEMPTION_TOLERANCE: Duration = _
const PENDING_TO_CLOSE_REDEMPTION_TOLERANCE: Duration = _
How long before the channel closure grace period elapses should we still try to redeem tickets.
Provided Methods§
fn redeem_all_tickets<'life0, 'async_trait, B>(
&'life0 self,
min_value: B,
) -> Pin<Box<dyn Future<Output = Result<Vec<RedemptionResult>, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>> + Send + 'async_trait>>
fn redeem_all_tickets<'life0, 'async_trait, B>( &'life0 self, min_value: B, ) -> Pin<Box<dyn Future<Output = Result<Vec<RedemptionResult>, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>> + Send + 'async_trait>>
Redeems all redeemable tickets in all incoming channels.
Tickets with a value lower than min_value are neglected and lost forever.
fn redeem_tickets_with_counterparty<'life0, 'async_trait, A, B>(
&'life0 self,
issuer: A,
min_value: B,
) -> Pin<Box<dyn Future<Output = Result<Vec<RedemptionResult>, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>> + Send + 'async_trait>>
fn redeem_tickets_with_counterparty<'life0, 'async_trait, A, B>( &'life0 self, issuer: A, min_value: B, ) -> Pin<Box<dyn Future<Output = Result<Vec<RedemptionResult>, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>> + Send + 'async_trait>>
Redeems all incoming tickets from the given issuer.
Tickets with a value lower than min_value are neglected.
fn ticket_statistics(
&self,
) -> Result<ChannelStats, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>
fn ticket_statistics( &self, ) -> Result<ChannelStats, EitherErr<<Self::ChainApi as HoprChainApi>::ChainError, <Self::TicketManager as TicketManagement>::Error>>
Returns ChannelStats for all incoming channels which have tickets.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T> IncentiveRedeemOperations for T
Blanket: any type with chain and ticket access gets redeem operations.