2⃣
Install Nodes

Node Setup

LN-STX Bridge Client requires 2 nodes to function.
  • Bitcoin full node, unpruned and with tx-index enabled.
  • LND lightning node
Note that there are other methods to run Bitcoin and Lightning nodes including containerized versions. As long as the below configuration requirements are met and lnstxbridge-client can access the nodes, any installation method should be fine.
When in doubt, reach out to us on LNSwap Discord #providers channel.

Bitcoin

There are many ways to run a bitcoin node and even other implementations but this bridge uses the default reference implementation.
For security and verification purposes no download links are provided here. Instead it's recommended to visit the official website, preferably github repository and always verify that the software downloaded is the one signed by bitcoin-core maintainers by checking the signatures.
1
// add bitcoin.conf
2
vim ~/.bitcoin/bitcoin.conf
3
testnet=0
4
server=1
5
daemon=1
6
txindex=1
7
zmqpubrawblock=tcp://127.0.0.1:28332
8
zmqpubrawtx=tcp://127.0.0.1:28333
9
rpcbind=127.0.0.1
10
rpcallowip=127.0.0.1/32
11
​
12
// if you are running provider client as a docker container add these
13
zmqpubrawblock=tcp://172.17.0.1:28332
14
zmqpubrawtx=tcp://172.17.0.1:28333
15
zmqpubhashtx=tcp://172.17.0.1:28333
16
zmqpubhashblock=tcp://172.17.0.1:28333
17
rpcbind=172.17.0.1
18
rpcallowip=172.0.0.0/8
19
​
20
// unpack and run bitcoind
21
tar zxvf bitcoin-22.0-x86_64-linux-gnu.tar.gz
22
cd bitcoin-22.0/
23
bitcoind
Copied!

Lightning

LND is one of many lightning implementations. There are plans to swap LND in the future with c-lightning but currently since it provides built-in hold invoice support it is the Lightning Network implementation that is being used in the bridge.
Visit LND github repository releases page and download the latest supported version (as of now, v0.12.0-beta)
1
// add lnd.conf
2
vim ~/.lnd/lnd.conf
3
[Application Options]
4
externalip=xx.xx.xx.xx // public IP of your server
5
listen=localhost:9735
6
alias=<your optional alias>
7
​
8
// if you are running provider client as a docker container add this
9
rpclisten=172.17.0.1:10009
10
​
11
// only if you have installed tor and want to run your lightning node on tor
12
[tor]
13
tor.active=1
14
tor.v3=1
15
​
16
// unpack and run lnd
17
tar zxvf lnd-linux-amd64-v0.12.0-beta.tar.gz
18
cd lnd-linux-amd64-v0.12.0-beta
19
vim startlnd.sh
20
nohup ./lnd --bitcoin.active --bitcoin.mainnet --accept-keysend \
21
--bitcoin.node=bitcoind &
22
chmod +x startlnd.sh
23
./startlnd.sh
Copied!
Remember to track logs and node status throughout the activity.
For instance you need to manually create or import a seed for LND. You can do so with lncli create or lncli unlock commands.