From 9fb3d85a547c7c0acf4d1997c5c7aeb7bb234447 Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Tue, 13 Oct 2020 09:48:45 -1000 Subject: [PATCH] edits --- 18_2_Knowing_Your_lightning_Setup.md | 50 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/18_2_Knowing_Your_lightning_Setup.md b/18_2_Knowing_Your_lightning_Setup.md index 731d628..9f1c202 100644 --- a/18_2_Knowing_Your_lightning_Setup.md +++ b/18_2_Knowing_Your_lightning_Setup.md @@ -2,32 +2,33 @@ > :information_source: **NOTE:** This is a draft in progress, so that I can get some feedback from early reviewers. It is not yet ready for learning. -Before you start playing with Lightning Network, you may always want to come to a better understanding of your setup. +Before you begin accessing the Lightning Network, you should come to a better understanding of your setup. -## Know Your c-lightning Directory +## Knowing Your c-lightning Directory -To start with, you should understand where everything is kept: the `~/.lightning` directory. - -The main directory just contains as many networks as configured, in this case we have testnet directory. +Everything is kept in the `~/.lightning` directory. +The main directory just contains directories for whichever networks are configured, in this case testnet: ``` -c$ ls ~/.lightning +$ ls ~/.lightning testnet ``` -In your ~/.lightning/testnet directory, you'll find that contains all of the guts: +The `~/.lightning/testnet directory` will then contains all of the guts of your setup: ``` -c$ ls ~/.lightning/testnet3 +$ ls ~/.lightning/testnet3 config gossip_store hsm_secret lightningd.sqlite3 lightningd.sqlite3-journal lightning-rpc ``` > :link: **TESTNET vs MAINNET:** If you're using mainnet, then _everything_ will instead be placed in the main `~/.lightning/bitcoin` directory. These various setups _do_ elegantly stack, so if you are using mainnet, testnet, and regtest, you'll find that `~/.lightning/bitcoin` contains your config file and your mainnet data, the `~/.lightning/testnet` directory contains your testnet data, and the `~/.lightning/regtest` directory contains your regtest data. -## Know Your lightning-cli Commands +## Knowing Your lightning-cli Commands -Most of your early work will be done with the `lightning-cli` command, which offers an easy interface to `lightningd`. +Most of your early work will be done with the `lightning-cli` command, which offers an easy interface to `lightningd`, just like `bitcoin-cli` does. + +You've already seen that the `help` command will gives you a list of other commands: ``` -c$ lightning-cli help +$ lightning-cli help lightning-cli: WARNING: default network changing in 2020: please set network=testnet in config! === bitcoin === @@ -227,29 +228,28 @@ dev-rescan-outputs run `lightning-cli help ` for more information on a specific command ``` -## Optional: Know your lightning lnfo +## Knowing your Lightning Info -A variety of lightning-cli commands can give you additional information on your lightning node. The most general ones are: +A variety of `lightning-cli` commands can give you additional information on your lightning node. The most general ones are: ``` -c$ lightning-cli listconfigs -c$ lightning-cli listfunds -c$ lightning-cli listtransactions -c$ lightning-cli listinvoices -c$ lightning-cli listnodes +$ lightning-cli listconfigs +$ lightning-cli listfunds +$ lightning-cli listtransactions +$ lightning-cli listinvoices +$ lightning-cli listnodes ``` -* listconfigs: The listconfigs RPC command to list all configuration options with members reflecting the corresponding lightningd-config. -* listfunds: The listfunds RPC command displays all funds available, either in unspent outputs (UTXOs) in the internal wallet or funds locked in currently open channels. -* listtransactions: The listtransactions command returns transactions tracked in the wallet. This includes deposits, withdrawals and transactions related to channels. -* listinvoices: The listinvoices RPC command gets the status of a specific invoice, if it exists, or the status of all invoices if given no argument. -* listnodes: The listnodes command returns nodes the node has learned about via gossip messages, or a single one if the node id was specified. - +* listconfigs: The `listconfigs` RPC command lists all configuration options. +* listfunds: The `listfunds` RPC command displays all funds available, either in unspent outputs (UTXOs) in the internal wallet or funds locked in currently open channels. +* listtransactions: The `listtransactions` RPC command returns transactions tracked in the wallet. This includes deposits, withdrawals and transactions related to channels. +* listinvoices: The `listinvoices` RPC command retrievers the status of a specific invoice, if it exists, or the status of all invoices if given no argument. +* listnodes: The `listnodes` RPC command returns nodes that your server has learned about via gossip messages, or a single one if the node id was specified. For example `lightning-cli listconfigs` gives you a variety of information on your setup: ``` c$ lightning-cli --network=testnet listconfigs { "# version": "v0.8.2-398-g869fa08", - "lightning-dir": "/home/user/.lightning", + "lightning-dir": "/home/standup/.lightning", "network": "testnet", "allow-deprecated-apis": true, "rpc-file": "lightning-rpc",