/lnb

lightningnetwork/lnd compatible tool for channel balances

Primary LanguageGoMIT LicenseMIT

lnb

lightningnetwork/lnd compatible tool for channels balances

Usage

./lnb

 lnb
NAME:
   lnb - lighting channel balancer for lnd

USAGE:
   lnb [global options] command [command options] [arguments...]

COMMANDS:
   get, g   balance, status
   list, l  channels, contracts
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
  -- <the same as lncli>

List of channels' balances

# From the LND home directory
lnb list channels

# From another directory, e.g. clonned repository
./lnb --lnddir /home/bitcoin/.lnd/ list channels

list channels

List of forwarded contracts (HTLCs)

# From the LND home directory
lnb list contracts

# From another directory
./lnb --lnddir /home/bitcoin/.lnd/ list contracts

list contracts

Install

First you need Go compiler

git clone git@github.com:begetan/lnb.git
go build
./lnb get status

Status should return the same information as lncli getinfo

About

This tool is aimed for better analysis of lightning network nodes runs on LND daemon. You may use the code as an example of grpc LND client for your application

This is a very early stage. Some updates could be implemented futher

  • To make a self-payment loop for re-balancing of channels
  • Bash auto-completion
  • CSV export for external analysys
  • CSV export for an external analytic
  • You may know