pub trait NodeLspApi {
// Required methods
async fn get_new_scids(
&self,
req: &GetNewScidsRequest,
) -> Result<Scids, LspApiError>;
async fn get_network_graph(&self) -> Result<Bytes, LspApiError>;
async fn get_prob_scorer(&self) -> Result<Bytes, LspApiError>;
async fn payment_path(&self, event: &Event) -> Result<Empty, LspApiError>;
}Expand description
Defines the api that the LSP exposes to user nodes.
Required Methods§
Sourceasync fn get_new_scids(
&self,
req: &GetNewScidsRequest,
) -> Result<Scids, LspApiError>
async fn get_new_scids( &self, req: &GetNewScidsRequest, ) -> Result<Scids, LspApiError>
GET /node/v1/scids GetNewScidsRequest -> Scids
Sourceasync fn get_network_graph(&self) -> Result<Bytes, LspApiError>
async fn get_network_graph(&self) -> Result<Bytes, LspApiError>
Sourceasync fn get_prob_scorer(&self) -> Result<Bytes, LspApiError>
async fn get_prob_scorer(&self) -> Result<Bytes, LspApiError>
Sourceasync fn payment_path(&self, event: &Event) -> Result<Empty, LspApiError>
async fn payment_path(&self, event: &Event) -> Result<Empty, LspApiError>
POST /node/v2/payment_path Bytes (LDK-serialized Event)
-> Empty
Sends an anonymized successful or failed payment path to the LSP to update Lexe’s shared network graph and improve payment reliability.
Originally introduced in node-v0.6.17 and lsp-v0.6.33. All node-v0.9.5 and older have a subtle bug in how they anonymize payment paths, so we now ignore all payment path feedback from <=node-v0.9.5
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.