hopr_chain_actions::redeem

Trait TicketRedeemActions

Source
pub trait TicketRedeemActions {
    // Required methods
    fn redeem_all_tickets<'life0, 'async_trait>(
        &'life0 self,
        only_aggregated: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn redeem_tickets_with_counterparty<'life0, 'life1, 'async_trait>(
        &'life0 self,
        counterparty: &'life1 Address,
        only_aggregated: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn redeem_tickets_in_channel<'life0, 'life1, 'async_trait>(
        &'life0 self,
        channel: &'life1 ChannelEntry,
        only_aggregated: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn redeem_tickets<'life0, 'async_trait>(
        &'life0 self,
        selector: TicketSelector,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn redeem_ticket<'life0, 'async_trait>(
        &'life0 self,
        ack: AcknowledgedTicket,
    ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Gathers all the ticket redemption-related on-chain calls.

Required Methods§

Source

fn redeem_all_tickets<'life0, 'async_trait>( &'life0 self, only_aggregated: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Redeems all redeemable tickets in all channels.

Source

fn redeem_tickets_with_counterparty<'life0, 'life1, 'async_trait>( &'life0 self, counterparty: &'life1 Address, only_aggregated: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Redeems all redeemable tickets in the incoming channel from the given counterparty.

Source

fn redeem_tickets_in_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel: &'life1 ChannelEntry, only_aggregated: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Redeems all redeemable tickets in the given channel.

Source

fn redeem_tickets<'life0, 'async_trait>( &'life0 self, selector: TicketSelector, ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingAction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Redeems all tickets based on the given TicketSelector.

Source

fn redeem_ticket<'life0, 'async_trait>( &'life0 self, ack: AcknowledgedTicket, ) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Tries to redeem the given ticket. If the ticket is not redeemable, returns an error. Otherwise, the transaction hash of the on-chain redemption is returned.

Implementors§