All Projects → mably → Lncli Web

mably / Lncli Web

Licence: agpl-3.0
Light-weight web client for the lnd daemon written in NodeJS / Angular.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lncli Web

Eclair Mobile
An Android wallet for the Lightning Network
Stars: ✭ 231 (+27.62%)
Mutual labels:  bitcoin, cryptocurrency, lightning, lightning-network
Lnd
Lightning Network Daemon ⚡️
Stars: ✭ 5,623 (+3006.63%)
Mutual labels:  bitcoin, cryptocurrency, lightning, lightning-network
Zeus
A mobile Bitcoin/Lightning app for lnd, c-lightning, and Eclair node operators ⚡️
Stars: ✭ 175 (-3.31%)
Mutual labels:  bitcoin, cryptocurrency, lightning, lightning-network
Eclair
A scala implementation of the Lightning Network.
Stars: ✭ 892 (+392.82%)
Mutual labels:  bitcoin, cryptocurrency, lightning, lightning-network
Lightning Rfc
Lightning Network Specifications
Stars: ✭ 1,224 (+576.24%)
Mutual labels:  bitcoin, cryptocurrency, lightning, lightning-network
Neutrino
Privacy-Preserving Bitcoin Light Client
Stars: ✭ 564 (+211.6%)
Mutual labels:  bitcoin, cryptocurrency, lightning-network
Raspibolt
Bitcoin & Lightning full node on a Raspberry Pi
Stars: ✭ 842 (+365.19%)
Mutual labels:  bitcoin, cryptocurrency, lightning
Lightninglib
lightninglib is a fork of lnd which aims to be usable as a go library inside any application, including mobile apps.
Stars: ✭ 11 (-93.92%)
Mutual labels:  bitcoin, lightning, lightning-network
Straks
A new decentralised, open source, community driven digital currency, focusing on e-commerce utility
Stars: ✭ 53 (-70.72%)
Mutual labels:  bitcoin, cryptocurrency, lightning-network
Joule Extension
Lightning payments extension for Chrome
Stars: ✭ 303 (+67.4%)
Mutual labels:  bitcoin, lightning, lightning-network
Lightning App
An easy-to-use cross-platform Lightning wallet
Stars: ✭ 872 (+381.77%)
Mutual labels:  bitcoin, cryptocurrency, lightning
Lightning Faucet
A faucet for the Lightning Network!
Stars: ✭ 56 (-69.06%)
Mutual labels:  bitcoin, lightning, lightning-network
Umbrel
A personal Bitcoin and Lightning node designed for everyone
Stars: ✭ 508 (+180.66%)
Mutual labels:  bitcoin, lightning, lightning-network
Electrum
Electrum Bitcoin Wallet
Stars: ✭ 5,353 (+2857.46%)
Mutual labels:  bitcoin, lightning, lightning-network
Lndmanage
Channel management tool for lightning network daemon (LND) operators.
Stars: ✭ 114 (-37.02%)
Mutual labels:  bitcoin, lightning, lightning-network
Blixt Wallet
Bitcoin Lightning Wallet with focus on usability and user experience
Stars: ✭ 40 (-77.9%)
Mutual labels:  bitcoin, lightning, lightning-network
Opencx
An open-source cryptocurrency exchange toolkit for implementing experimental exchange features
Stars: ✭ 86 (-52.49%)
Mutual labels:  bitcoin, cryptocurrency, lightning
Phoenix
Phoenix is a non custodial Bitcoin wallet using Lightning to send/receive payments.
Stars: ✭ 129 (-28.73%)
Mutual labels:  bitcoin, lightning, lightning-network
Polar
One-click Bitcoin Lightning networks for local app development & testing
Stars: ✭ 265 (+46.41%)
Mutual labels:  bitcoin, lightning, lightning-network
Lightning Onion
Onion Routed Micropayments for the Lightning Network
Stars: ✭ 297 (+64.09%)
Mutual labels:  bitcoin, cryptocurrency, lightning-network

Lnd Web Client

Installation

Requirements

Procedure

Fetch sources from the Lnd Web Client git repository:

git clone https://github.com/mably/lncli-web.git

Move into the newly created directory:

cd lncli-web

Fetch the dependencies and build the application by running:

npm install

If not started automatically, run the following command to build the application:

"./node_modules/.bin/gulp" bundles

Execution

Requirements

lncli-web is now fully compatible with macaroons and encrypted wallets.

But if you want to start lnd with wallet encryption and macaroons disabled, just add those two parameters to the command line:

lnd [...] --no-macaroons --noencryptwallet

If you want to use macaroons, you need to copy the lnd admin.macaroon file to the lncli-web root directory (by default). The default path to the admin.macaroon file can be modified in the <lncliweb>/config/defaults.js file.

Generate lnd certificates compatible with NodeJS gRPC

Beware that lnd autogenerated certificates are not compatible with current NodeJS gRPC module implementation.

Lnd uses the P-521 curve for its certificates but NodeJS gRPC module is only compatible with certificates using the P-256 curve (link).

You need to generate your own lnd certificates using the following commands (thanks to Alex Akselrod for helping me on this):

# Enter the Lnd home directory, located by default at ~/.lnd on Linux or
# /Users/[username]/Library/Application Support/Lnd/ on Mac OSX
# $APPDATA/Local/Lnd on Windows. Also change '/CN=localhost/O=lnd' to '//CN=localhost\O=lnd' if you are using Git Bash.
cd ~/.lnd
openssl ecparam -genkey -name prime256v1 -out tls.key
openssl req -new -sha256 -key tls.key -out csr.csr -subj '/CN=localhost/O=lnd'
openssl req -x509 -sha256 -days 36500 -key tls.key -in csr.csr -out tls.cert
rm csr.csr

Copy generated certificate file into lncli-web directory

cp tls.cert [lncli-web_directory]/lnd.cert

Start the Webserver

node server

Available command-line arguments:

node server --help

  Usage: server [options]

  Options:

    -h, --help                    output usage information
    -V, --version                 output the version number
    -s, --serverport [port]       web server listening port (defaults to 8280)
    -h, --serverhost [host]       web server listening host (defaults to localhost)
    -l, --lndhost [host:port]     RPC lnd host (defaults to localhost:10009)
    -t, --usetls [path]           path to a directory containing key.pem and cert.pem files
    -u, --user [login]            basic authentication login
    -p, --pwd [password]          basic authentication password
    -r, --limituser [login]       basic authentication login for readonly account
    -w, --limitpwd [password]     basic authentication password for readonly account
    -d, --disable-macaroon        set this flag if you do not want to use macaroon files for auth
    -f, --logfile [file path]     path to file where to store the application logs
    -e, --loglevel [level]        level of logs to display (debug, info, warn, error)
    -n, --lndlogfile <file path>  path to lnd log file to send to browser
    -k, --le-email [email]        lets encrypt required contact email

Open your browser at the following address: http://localhost:8280

If you want to access lncli-web using a domain, add the --serverhost flag like so:

node server --serverhost <yourdomain>

Open your browser at the following addres: http://yourdomain:8280

Enjoy!

Docker

Build the container

(from inside the lncli-web folder)

docker build . -t lncli-web

Run in a Docker container

Mount your .lnd directory to the container:

docker run -v /path/to/.lnd/:/config lncli-web

The container will generate certs if necessary.

Any commandline option (see below) can be overridden by setting an appropriate environment variable.

Example: set SET_LNDHOST for --lndhost, or set SET_LE_EMAIL for --le-email

Running in a Docker container connecting to a remote LND instance

Copy the admin.macaroon, tls.key and tls.cert to your machine, for example in /tmp/config.

Then, use docker run accordingly:

docker run -it -e SET_LNDHOST=[IP of lightning host]:10009 -v /tmp/config:/config --net=host lncli-web

Then just browse to http://127.0.0.1:8280. Note: this still requires you to re-generate your certificates as per above.

Screenshots

Check here for the mandatory screenshots: http://imgur.com/a/LgWcs

Enabling https for remote access

You need to have a key.pem (private key) file and a cert.pem (certificate) file available in your path (check the --usetls command-line option).

On Linux you can create the above files using a self-signed certificate by executing the following command:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 36500

You might need to run this extra command to remove the password protection:

openssl rsa -in key.pem -out newkey.pem && mv newkey.pem key.pem

And the you need to add the --usetls command-line option to point to the directory containing your two pem files.

Example command starting a password protected Lnd Web Client with readonly account enabled, running on port 443, and using https with corresponding pem files located in the app directory:

node server -s 443 --usetls . --user manager --pwd 33H966wG --limituser lnd --limitpwd rocks

Hoping that helps.

Network graph

The lightning network graph rendering functionality requires to have graphviz installed on the server.

Contributing to the project

As of September 27th, all new code that is created or refactored should abide by the Airbnb JS Style guide. You can use automated tooling to maintain the style guide using eslint. For simplicity, I have outlined a suggested workflow:

Suggested Workflow

  1. write your code changes. For example, you are fixing a bug in app/lightning.js
  2. once you are finished your patch, run eslint app/lightning.js. This will show you the errors in the source code
  3. optionally, you can also run eslint --fix app/lightning.js to let eslint fix errors that it can fix without human intervention
  4. fix the remainig style issues. You are only required to change and commit style for the code you changed (although the more, the merrier!)
  5. commit your clean code
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].