pub trait ChannelActions {
// Required methods
fn open_channel<'life0, 'async_trait>(
&'life0 self,
destination: Address,
amount: Balance,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fund_channel<'life0, 'async_trait>(
&'life0 self,
channel_id: Hash,
amount: Balance,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close_channel<'life0, 'async_trait>(
&'life0 self,
counterparty: Address,
direction: ChannelDirection,
redeem_before_close: bool,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Gathers all channel related on-chain actions.
Required Methods§
Sourcefn open_channel<'life0, 'async_trait>(
&'life0 self,
destination: Address,
amount: Balance,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_channel<'life0, 'async_trait>(
&'life0 self,
destination: Address,
amount: Balance,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a channel to the given destination
with the given amount
staked.
Sourcefn fund_channel<'life0, 'async_trait>(
&'life0 self,
channel_id: Hash,
amount: Balance,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fund_channel<'life0, 'async_trait>(
&'life0 self,
channel_id: Hash,
amount: Balance,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Funds the given channel with the given amount
Sourcefn close_channel<'life0, 'async_trait>(
&'life0 self,
counterparty: Address,
direction: ChannelDirection,
redeem_before_close: bool,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_channel<'life0, 'async_trait>(
&'life0 self,
counterparty: Address,
direction: ChannelDirection,
redeem_before_close: bool,
) -> Pin<Box<dyn Future<Output = Result<PendingAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Closes the channel to counterparty in the given direction. Optionally can issue redeeming of all tickets in that channel.