pub trait ChainWriteChannelOperations {
type Error: Error + Send + Sync + 'static;
// Required methods
fn open_channel<'a, 'async_trait>(
&'a self,
dst: &'a Address,
amount: HoprBalance,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<(ChannelId, ChainReceipt), Self::Error>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn fund_channel<'a, 'async_trait>(
&'a self,
channel_id: &'a ChannelId,
amount: HoprBalance,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<ChainReceipt, Self::Error>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn close_channel<'a, 'async_trait>(
&'a self,
channel_id: &'a ChannelId,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<(ChannelStatus, ChainReceipt), Self::Error>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
}
Expand description
On-chain write operations regarding channels.
Required Associated Types§
Required Methods§
Sourcefn open_channel<'a, 'async_trait>(
&'a self,
dst: &'a Address,
amount: HoprBalance,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<(ChannelId, ChainReceipt), Self::Error>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn open_channel<'a, 'async_trait>(
&'a self,
dst: &'a Address,
amount: HoprBalance,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<(ChannelId, ChainReceipt), Self::Error>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Opens a channel with dst
and amount
.
Sourcefn fund_channel<'a, 'async_trait>(
&'a self,
channel_id: &'a ChannelId,
amount: HoprBalance,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<ChainReceipt, Self::Error>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn fund_channel<'a, 'async_trait>(
&'a self,
channel_id: &'a ChannelId,
amount: HoprBalance,
) -> Pin<Box<dyn Future<Output = Result<BoxFuture<'a, Result<ChainReceipt, Self::Error>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Funds an existing channel.