Interledger.js ledger plugin for the Bitcoin/Litecoin Lightning Networks
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Interledger.js Ledger Plugin for the Lightning Network

This plugin enables Interledger payments through the Bitcoin and Litecoin Lightning Networks.

See the ILP Lightning Demo or the example script to watch this plugin in action.


npm install --save ilp-plugin-lightning


This plugin can be used with the ilp client module or the ilp-connector. See the Ledger Plugin Interface for documentation on available methods.

  • Connect to the lightning testnet:
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin
lnd --bitcoin.testnet --debuglevel=debug --bitcoin.node=neutrino --datadir=./data --no-macaroons

Check your settings in ~/Library/Application\ Support/Lnd/lnd.conf, you can also set options like --bitcoin.testnet there instead of on the command line.

lncli --no-macaroons create
lncli --no-macaroons getinfo
lncli --no-macaroons newaddress np2wkh
lncli --no-macaroons walletbalance witness-only=true
  • Run DEBUG=* node test.js

  • You will see a line saying Now go to - open that URL in your browser. You should see a picture of gummy bears coming out of a faucet (not a picture of a sad faucet).

How It Works

This plugin can be used by two Interledger nodes (sender to connector, connector to connector, and connector to receiver) to send payments through an instance of the Lightning Network. It uses the Bilateral Transfer Protocol, implemented by the payment channel framework, to send Interledger payment and quote details that cannot currently be communicated through lnd itself. Because of the need for an additional messaging layer, this plugin implementation only works bilaterally at present.