(You need nodejs v11 and npm installed)
- Download latest
lnd
,lncli
https://github.com/lightningnetwork/lnd/releases/tag/v0.7.1-beta
wget https://github.com/lightningnetwork/lnd/releases/download/v0.7.1-beta/lnd-darwin-amd64-v0.7.1-beta.tar.gz
tar -xvf lnd-darwin-amd64-v0.7.1-beta.tar.gz
rm -rf lnd-darwin-amd64-v0.7.1-beta.tar.gz
mv lnd-darwin-amd64-v0.7.1-beta bin
- Install js dependencies
npm i
- Setup and run
lnd
in light client mode (TESTNET) in a separate terminal window
bin/lnd --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=btcd-testnet.lightning.computer --neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
Mainnet (neutrino is not supported on v0.7.1 yet, build with experimental
flag from master
)
bin/lnd \
--bitcoin.active \
--bitcoin.mainnet \
--bitcoin.node=neutrino \
--neutrino.connect=btcd-mainnet.lightning.computer \
--neutrino.feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json \
--neutrino.assertfilterheader=230000:1308d5cfc6462f877a5587fd77d7c1ab029d45e58d5175aaf8c264cee9bde760
- Create a new wallet, follow console instructions
bin/lncli --network=testnet create
- Copy credentials and certificate
mkdir data
# On Windows, Linux:
export LND_HOME=~/.lnd
# on Mac:
# export LND_HOME=~/Library/Application\ Support/Lnd
cp $LND_HOME/tls.cert ./data/
cp $LND_HOME/data/chain/bitcoin/testnet/admin.macaroon ./data/
- Copy
rpc.proto
from latest sources
wget https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto
mv rpc.proto ./data/
Comment this line or it won't work
// import "google/api/annotations.proto";
- Wait until
lnd
synces
- Run nodejs script to operate your
lnd
node.
node lnd.js
IN DEVELOPMENT:
- Create invoice
node create-invoice.js
- Send QTUM
node send-qtum.js