# 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 (opens new window)

The following tutorials will show you how to build the simplest lightning node using LDK, that fufills the following tasks:

  1. Connecting to Peers
  2. Opening Channels
  3. Sending Payments
  4. Receiving Payments
  5. 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.

  1. A ChannelManager (opens new window), to open and close channels.
  2. 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.
  3. Payments & routing, ability to create and pay invoices.

To make the above work we also need to setup a series of supporting modules, including:

  1. A FeeEstimator (opens new window)
  2. A Logger (opens new window)
  3. A Transaction Broadcaster (opens new window)
  4. A NetworkGraph (opens new window)
  5. A Persister (opens new window)
  6. An EventHandler (opens new window)
  7. A Transaction Filter (opens new window)
  8. A ChainMonitor (opens new window)
  9. A KeysManager (opens new window)
  10. A Scorer (opens new window)
Last Updated: 11/18/2024, 6:18:24 PM