Interledger.js Ledger Plugin for the Lightning Network
npm install --save ilp-plugin-lightning
- 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.
- Use lncli to create a wallet, see http://dev.lightning.community/tutorial/01-lncli/ for inspiration on how to do this
lncli --no-macaroons create lncli --no-macaroons getinfo lncli --no-macaroons newaddress np2wkh lncli --no-macaroons walletbalance witness-only=true
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.