View on GitHub

The title of your site

LnShield Arduino Library

top> Mainnet Lightning Network

Lightning Shield supports Bitcoin testnet and mainnet.
If you want to use mainnet Lightning Network, change to mainnet and restart.


Change to mainnet

img

open channel from LNBIG

NOTE: use something Linux console.

1. change blockchain to mainnet and wait for automatic reboot

menu: 1st Layer > Change Blockchain Network
change blockchain

2. Mainnet starts

change blockchain

3. check my node_id

menu: Channel > Show Connect Info

4. connect to LNBIG and call API

  1. select “LND / C-Lightning / BTCPay / Eclair” and NEXT.
    change blockchain

  2. push COPY button on “Commands for LND” change blockchain

  3. save the text in lnbig.txt on your Linux console

5.execute the command below in order to get connection string

cat lnbig.txt | sed -e 's/^lncli connect \(.*$\)/\1/g' | sed -e 's/^\(.*9735\).*/\1/g'
ex.
   028a8e53d70bc0eb7b5660943582f10b7fd6c727a78ad819ba8d45d6a638432c49@lnd-33.LNBIG.com:9735

6. connect using connection string

menu: Connect/Close > Connect [NODE_ID@IPADDR:PORT]

7. If the connection is OK, execute the command below to get call the LNBIG API string.

cat lnbig.txt | sed -e 's/.*| \(.*$\)/\1/g' | sed -e "s/^\(.*private=0'\).*/\1/g"
ex.
   curl -G --data-urlencode remoteid@- 'https://lnbig.com/api/v1/oc?k1=040aa501-3273-442c-b966-13488f85e727&private=0'

8. execute command from Linux console

echo -n MY_NODEID | LNBIG_API_STRING
ex.
   echo -n 03019960f1fe3efb6dd3663606cc196e41ad31fb5535e1264a24d1a1986e7a9059 | curl -G --data-urlencode remoteid@- 'https://lnbig.com/api/v1/oc?k1=040aa501-3273-442c-b966-13488f85e727&private=0'

9. check LNBIG website

bash script for LNBIG

If you connect Raspberry Pi via SSH, copy Commands for LND strings to lnbig.txt and execute the script below.

#!/bin/sh

CONN_STR=`cat lnbig.txt | sed -e 's/^lncli connect \(.*$\)/\1/g' | sed -e 's/^\(.*9735\).*/\1/g'`
echo $CONN_STR
/home/pi/Prog/ptarmigan/install/ptarmcli --connaddr $CONN_STR


NODEID=`/home/pi/Prog/ptarmigan/install/ptarmcli -l1 | jq -r '.result.node_id'`
API=`cat lnbig.txt | sed -e 's/.*\(https.*$\)/\1/g' | sed -e "s/^\(.*\)&private.*/\1/g"`
echo -n $NODEID | curl -G --data-urlencode remoteid@- "$API&private=0"