All Projects → wbobeirne → Lightning App Tutorial

wbobeirne / Lightning App Tutorial

A four part series with code that shows how to build your very own Lightning app!

Programming Languages

typescript
32286 projects

Lightning App Tutorial

This is a step-by-step tutorial project for learning to build Lightning applications. It's broken out into 5 parts, which you can find as separate posts on Medium and branches here on GitHub.

If you'd rather read the code than a post, feel free to dive in directly with the following instructions:

Requirements

If you want an LND node but have trouble setting it up with LND directly, I suggest either following Pierre Rochard's Easiest Lightning Node guide, or downloading the Lightning App from Lightning Labs.

If you'd rather not deal with getting your hands on some Bitcoin or waiting for block times to open channels, you can setup your own simulated Lightning network cluster.

If you just want to fiddle around with this you can use Polar to setup your own local regtest network.

Setup the Project

Copy the environment configuration file with

cp .env.example .env

Edit the following fields in your new .env file with information about your node. You can get some help finding this info using this tool: https://lightningjoule.com/tools/node-info

  • LND_GRPC_URL - The location to connect to your node. If you're running with default settings locally, this should be 127.0.0.1:10009.
  • LND_MACAROON - Your invoice.macaroon file, base64 encoded. Run base64 invoice.macaroon in your macaroon directory to get this.
  • LND_TLS_CERT - Your TLS certificate, also base 64 encoded. Run base64 tls.cert in your data directory to get this.

If you don't know how to get these, this tool will tell you where to find these.

Development

Install dependencies and run the app with

npm install && npm run dev
# OR #
yarn && yarn dev

Building & Deploying

Coming soon.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].