Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Lightning Network Workshop Series 1
- 1. Run btcd
- ```bash
- ./btcd --simnet --rpcuser=kek --rpcpass=kek --txindex --connect=YOUR_IP
- ```
- 2. Run lnd
- ```bash
- ./lnd --bitcoin.active --bitcoin.simnet --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek --debuglevel=trace --noencryptwallet
- ```
- 3. Check the block height to make sure your Blockchain is in sync
- ```bash
- ./btcctl --simnet --rpcuser=kek --rpcpass=kek getinfo
- ```
- 4. Make sure lnd is connected, you can check the block height here too
- ```bash
- ./lncli getinfo
- ```
- 5. Create a new address with lnd
- ```bash
- ./lncli newaddress p2wkh
- ```
- Publish your publick key into IRC and ask for free bitcoins from the hubs. The host will send you the bitcoin, then they will mine a few blocks.
- 6. Now check your wallet balance and make sure you receive them
- ```bash
- ./lncli walletbalance
- ```
- 7. Here's start the fun part. Connect to the peer on your left in your group, to connect you need the public key and the address:
- ```bash
- ./lncli connect PUB_KEY@IP
- ```
- You can find your IP running the following command on Linux and OSX `ifconfig` or running on Windows `ipconfig`, then searching for en0 and inet. You can find your lnd public key with `./lncli getinfo`.
- 8. More fun. Open a channel funding some money in the channel, and sending some fund to the other side of the channel
- ```bash
- ./lncli openchannel --block pubkey 50000 50000
- ```
- 9. Make sure the channel is open
- ```bash
- ./lncli listchannels
- ```
- 10. Now you can create an invoice and send to someone in your group, possibly with less than 5000 satoshis
- ```bash
- ./lncli addinvoice AMOUNT_IN_SATOSHIS
- ```
- 11. When you receive an invoice from someone remember always to run decodepayreq to check how much they're asking you
- ```bash
- ./lncli decodepayreq PAYREQ
- ```
- 12. You can also use queryroutes to make sure it exists one or more route to process the payment
- ```bash
- ./lncli queryroutes PUB_KEY AMOUNT_IN_SATOSHIS
- ```
- 13. And voilà, you can finally pay the invoice!
- ```bash
- ./lncli payinvoice PAYREQ
- ```
- 14. ... and check the invoices that have been payed to you
- ```bash
- ./lncli listinvoices
- ```
Add Comment
Please, Sign In to add comment