Skip to content

Fully functioning NodeJS server that communicates with a local lnd instance through gRPC

Notifications You must be signed in to change notification settings

liebeskind/lnd-grpc-lightning-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LND gRPC Lightning NodeJS

This is a fully functioning NodeJS server that communicates with a local lnd instance through gRPC. You can add commands from the lightning gRPC api.

This server is based on this javascript grpc guide and Stage 1 of the lightning dev tutorial. This assumes you have completed Stage 1 of the dev tutorial. If you have not, do that first.

To Run

Set up Environment

  • Create a .env file
  • Add the following variables:
CERT="/Users/[user]/Library/Application Support/Lnd/tls.cert"
AUTH="/Users/[user]/go/dev/bob/data/chain/bitcoin/simnet/admin.macaroon"

Make sure to change [user] to whatever your directory path is. You can find this by typing pwd into your command line

In the AUTH variable above, this is using 'bob' from Stage 1 of the lightning dev tutorial. We're assuming you're connected to 'bob' at localhost:10002, but you can change that in the auth.js file if not.

Install Node Modules

Type npm install into command line to install node modules.

Run

Run the server by typing npm run start into the command line.

About

Fully functioning NodeJS server that communicates with a local lnd instance through gRPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published