Awesome Open Source
Awesome Open Source

Node Lightning logo

Node-Lightning (formerly LNTools)

Node.js CI codecov

About the Project

Node-Lightning is an implementation of the Bitcoin Lightning Network in the Node.js runtime. The goal of this project is to implement the BOLT specifications to enable testing, research, and education. This project is not intended to replace or compete with the major implementations, though our hope is that the implementation will be fully functional.

This library contains the core packages and several examples. There is currently no runtime for this project.

The architecture philosophies for packages is:

  1. Minimize external dependencies - the Node.js ecosystem is rife with excess dependency usage. This project attempts to minimize the usage of external depedencies as much as possible (there are very few external modules in use at this point).
  2. Reduce complexity using semi-formalized state machines - the Lightning Network is a complex beast. It is very difficult to reason about code that has high cyclomatic complexity. To reduce cognitive load, allow for isolated testing, and enable composibility and extensibility, code is frequently broken into state machines and combined with concepts from state charts. This library is not using metaprogramming techniques, though we are using many of the concepts. This enables the last point.
  3. Engineer for modular composibility - The goal is to enable composibility of various state machines which enables swapping out implementations or direct extensibility of complex processes.

The goal of this project is ambitious and there is a still a long road ahead. Refer to issues and the wiki for more information on how this project is structured and how you can contribute.

Structure and Modules

Node-Lightning is structured as a monorepo with individual packages existing inside of packages.

Examples of usage can be found inside examples

BOLT Status

Current status of Lightning RFC specification implementation:

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Typescript (246,626
Bitcoin (11,424
Invoice (2,821
Lightning (2,571
State Machine (2,116
Bolt (1,291
Onion (970
Lightning Network (409
Noise Protocol (12
Bolt11 (9