Interledger.js ledger plugin for the Bitcoin/Litecoin Lightning Networks
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
scripts
src
test
.gitignore
README.md
package-lock.json
package.json

README.md

ilp-plugin-lightning

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.

Installation

npm install --save ilp-plugin-lightning

Usage

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.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community --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 https://interfaucet.ilpdemo.org/?... - 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.