Appearance
Building a Node with LDK
Learn how to build a basic LDK node from scratch
Note
For an integrated example of an LDK node in Rust, see the Sample Node
The following tutorials will show you how to build the simplest lightning node using LDK, that fufills the following tasks:
- Connecting to Peers
- Opening Channels
- Sending Payments
- Receiving Payments
- Closing Channels
Foundational Components
Let's start by looking at the core components we'll need to make this node work for the tasks we outlined above.
- A
ChannelManager, to open and close channels. - A networking stack (https://docs.rs/lightning-net-tokio/*/lightning_net_tokio/index.html), for establishing TCP/IP connections to other nodes on the lightning network.
- Payments & routing, ability to create and pay invoices.
To make the above work we also need to setup a series of supporting modules, including:
- A
FeeEstimator - A
Logger - A Transaction
Broadcaster - A
NetworkGraph - A
Persister - An
EventHandler - A Transaction
Filter - A
ChainMonitor - A
KeysManager - A
Scorer