Skip to main content

NodeLspApi

Trait NodeLspApi 

Source
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§

Source

async fn get_new_scids( &self, req: &GetNewScidsRequest, ) -> Result<Scids, LspApiError>

GET /node/v1/scids GetNewScidsRequest -> Scids

Source

async fn get_network_graph(&self) -> Result<Bytes, LspApiError>

GET /node/v1/network_graph Empty -> Bytes (LDK-serialized graph)

Introduced in node-v0.6.8 and lsp-v0.6.29.

Source

async fn get_prob_scorer(&self) -> Result<Bytes, LspApiError>

GET /node/v1/prob_scorer Empty -> Bytes (LDK-serialized probabilistic scorer)

Introduced in node-v0.6.17 and lsp-v0.6.33.

Source

async fn payment_path(&self, event: &Event) -> Result<Empty, LspApiError>

POST /node/v1/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.

Introduced in node-v0.6.17 and lsp-v0.6.33.

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.

Implementors§