|
8 | 8 | // licenses.
|
9 | 9 | #![crate_name = "lightning_liquidity"]
|
10 | 10 |
|
11 |
| -//! # `lightning-liquidity` |
12 |
| -//! Types and primitives to integrate a spec-compliant LSP with an LDK-based node. |
| 11 | +//! The goal of this crate is to provide types and primitives to integrate a spec-compliant LSP with an LDK-based node. To this end, this crate provides client-side as well as service-side logic to implement the [LSP specifications]. |
| 12 | +//! |
| 13 | +//! Currently the following specifications are supported: |
| 14 | +//! - [LSPS0] defines the transport protocol with the LSP over which the other protocols communicate. |
| 15 | +//! - [LSPS1] allows to order Lightning channels from an LSP. This is useful when the client needs |
| 16 | +//! inbound Lightning liquidity for which they are willing and able to pay in bitcoin. |
| 17 | +//! - [LSPS2] allows to generate a special invoice for which, when paid, an LSP will open a "just-in-time". |
| 18 | +//! This is useful for the initial on-boarding of clients as the channel opening fees are deducted |
| 19 | +//! from the incoming payment, i.e., no funds are required client-side to initiate this flow. |
| 20 | +//! |
| 21 | +//! To get started, you'll want to setup a [`LiquidityManager`] and configure it to be the |
| 22 | +//! [`CustomMessageHandler`] of your LDK node. You can then for example call |
| 23 | +//! [`LiquidityManager::lsps1_client_handler`] / [`LiquidityManager::lsps2_client_handler`], or |
| 24 | +//! [`LiquidityManager::lsps2_service_handler`], to access the respective client-side or |
| 25 | +//! service-side handlers. |
| 26 | +//! |
| 27 | +//! [`LiquidityManager`] uses an evening system to notify the user about important updates to the |
| 28 | +//! protocol flow. To this end, you will need to handle events emitted via one of the event |
| 29 | +//! handling methods provided by [`LiquidityManager`], e.g., [`LiquidityManager::wait_next_event`]. |
| 30 | +//! |
| 31 | +//! [LSP specifications]: https://github.com/BitcoinAndLightningLayerSpecs/lsp |
| 32 | +//! [LSPS0]: https://github.com/BitcoinAndLightningLayerSpecs/lsp/tree/main/LSPS0 |
| 33 | +//! [LSPS1]: https://github.com/BitcoinAndLightningLayerSpecs/lsp/tree/main/LSPS1 |
| 34 | +//! [LSPS2]: https://github.com/BitcoinAndLightningLayerSpecs/lsp/tree/main/LSPS2 |
| 35 | +//! [`CustomMessageHandler`]: lightning::ln::peer_handler::CustomMessageHandler |
13 | 36 | #![deny(missing_docs)]
|
14 | 37 | #![deny(rustdoc::broken_intra_doc_links)]
|
15 | 38 | #![deny(rustdoc::private_intra_doc_links)]
|
|
0 commit comments