pub trait LightningNode: Send {
// Required methods
fn get_info(&self) -> &NodeInfo;
fn get_network<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Network, LightningError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_payment<'life0, 'async_trait>(
&'life0 mut self,
dest: PublicKey,
amount_msat: u64,
) -> Pin<Box<dyn Future<Output = Result<PaymentHash, LightningError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn track_payment<'life0, 'life1, 'async_trait>(
&'life0 mut self,
hash: &'life1 PaymentHash,
shutdown: Listener,
) -> Pin<Box<dyn Future<Output = Result<PaymentResult, LightningError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_node_info<'life0, 'life1, 'async_trait>(
&'life0 mut self,
node_id: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = Result<NodeInfo, LightningError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_channels<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>, LightningError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
LightningNode represents the functionality that is required to execute events on a lightning node.
Required Methods§
Sourcefn get_network<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Network, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_network<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Network, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the network this node is running at
Sourcefn send_payment<'life0, 'async_trait>(
&'life0 mut self,
dest: PublicKey,
amount_msat: u64,
) -> Pin<Box<dyn Future<Output = Result<PaymentHash, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_payment<'life0, 'async_trait>(
&'life0 mut self,
dest: PublicKey,
amount_msat: u64,
) -> Pin<Box<dyn Future<Output = Result<PaymentHash, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Keysend payment worth amount_msat
from a source node to the destination node.
Sourcefn track_payment<'life0, 'life1, 'async_trait>(
&'life0 mut self,
hash: &'life1 PaymentHash,
shutdown: Listener,
) -> Pin<Box<dyn Future<Output = Result<PaymentResult, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn track_payment<'life0, 'life1, 'async_trait>(
&'life0 mut self,
hash: &'life1 PaymentHash,
shutdown: Listener,
) -> Pin<Box<dyn Future<Output = Result<PaymentResult, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Track a payment with the specified hash.
Sourcefn get_node_info<'life0, 'life1, 'async_trait>(
&'life0 mut self,
node_id: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = Result<NodeInfo, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_node_info<'life0, 'life1, 'async_trait>(
&'life0 mut self,
node_id: &'life1 PublicKey,
) -> Pin<Box<dyn Future<Output = Result<NodeInfo, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets information on a specific node
Sourcefn list_channels<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_channels<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u64>, LightningError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all channels, at present only returns a vector of channel capacities in msat because no further information is required.