docs: remove $ from multiline commands or frequently copied [skip ci]

This commit is contained in:
habibitcoin 2022-10-28 13:29:10 -04:00
parent 0b1e881d18
commit 04a1160939
No known key found for this signature in database
GPG Key ID: 33E5118634F68600
3 changed files with 49 additions and 49 deletions

View File

@ -69,10 +69,10 @@ To build a specific git tag of `lnd`, simply run the following steps (assuming
`v0.x.y-beta` is the tagged version to build): `v0.x.y-beta` is the tagged version to build):
```shell ```shell
$ git clone https://github.com/lightningnetwork/lnd git clone https://github.com/lightningnetwork/lnd
$ cd lnd cd lnd
$ git checkout v0.x.y-beta git checkout v0.x.y-beta
$ make docker-release tag=v0.x.y-beta make docker-release tag=v0.x.y-beta
``` ```
This will create a directory called `lnd-v0.x.y-beta` that contains the release This will create a directory called `lnd-v0.x.y-beta` that contains the release
@ -167,8 +167,8 @@ represents the path to your workspace. By default, `$GOPATH` is set to
that your shell will be able to detect the binaries you install. that your shell will be able to detect the binaries you install.
```shell ```shell
$ export GOPATH=~/go export GOPATH=~/go
$ export PATH=$PATH:$GOPATH/bin export PATH=$PATH:$GOPATH/bin
``` ```
--- ---
@ -198,9 +198,9 @@ documentation for [building mobile libraries](../mobile) to learn more.
With the preliminary steps completed, to install `lnd`, `lncli`, and all With the preliminary steps completed, to install `lnd`, `lncli`, and all
related dependencies run the following commands: related dependencies run the following commands:
```shell ```shell
$ git clone https://github.com/lightningnetwork/lnd git clone https://github.com/lightningnetwork/lnd
$ cd lnd cd lnd
$ make install make install
``` ```
The command above will install the current _master_ branch of `lnd`. If you The command above will install the current _master_ branch of `lnd`. If you
@ -210,10 +210,10 @@ release](https://github.com/lightningnetwork/lnd/releases). Assuming the name
of the release is `v0.x.x`, then you can compile this release from source with of the release is `v0.x.x`, then you can compile this release from source with
a small modification to the above command: a small modification to the above command:
```shell ```shell
$ git clone https://github.com/lightningnetwork/lnd git clone https://github.com/lightningnetwork/lnd
$ cd lnd cd lnd
$ git checkout v0.x.x git checkout v0.x.x
$ make install make install
``` ```
**NOTE**: Our instructions still use the `$GOPATH` directory from prior **NOTE**: Our instructions still use the `$GOPATH` directory from prior
@ -225,9 +225,9 @@ For Windows WSL users, make will need to be referenced directly via
like so: like so:
```shell ```shell
$ /usr/bin/make && /usr/bin/make install /usr/bin/make && /usr/bin/make install
$ "make" && "make" install "make" && "make" install
``` ```
On FreeBSD, use gmake instead of make. On FreeBSD, use gmake instead of make.
@ -235,7 +235,7 @@ On FreeBSD, use gmake instead of make.
Alternatively, if one doesn't wish to use `make`, then the `go` commands can be Alternatively, if one doesn't wish to use `make`, then the `go` commands can be
used directly: used directly:
```shell ```shell
$ go install -v ./... go install -v ./...
``` ```
**Tags** **Tags**
@ -270,9 +270,9 @@ make install tags="signrpc walletrpc routerrpc invoicesrpc"
To update your version of `lnd` to the latest version run the following To update your version of `lnd` to the latest version run the following
commands: commands:
```shell ```shell
$ cd $GOPATH/src/github.com/lightningnetwork/lnd cd $GOPATH/src/github.com/lightningnetwork/lnd
$ git pull git pull
$ make clean && make && make install make clean && make && make install
``` ```
On FreeBSD, use gmake instead of make. On FreeBSD, use gmake instead of make.
@ -280,16 +280,16 @@ On FreeBSD, use gmake instead of make.
Alternatively, if one doesn't wish to use `make`, then the `go` commands can be Alternatively, if one doesn't wish to use `make`, then the `go` commands can be
used directly: used directly:
```shell ```shell
$ cd $GOPATH/src/github.com/lightningnetwork/lnd cd $GOPATH/src/github.com/lightningnetwork/lnd
$ git pull git pull
$ go install -v ./... go install -v ./...
``` ```
**Tests** **Tests**
To check that `lnd` was installed properly run the following command: To check that `lnd` was installed properly run the following command:
```shell ```shell
$ make check make check
``` ```
This command requires `bitcoind` (almost any version should do) to be available This command requires `bitcoind` (almost any version should do) to be available
@ -360,7 +360,7 @@ To install btcd, run the following commands:
Install **btcd**: Install **btcd**:
```shell ```shell
$ make btcd make btcd
``` ```
Alternatively, you can install [`btcd` directly from its Alternatively, you can install [`btcd` directly from its
@ -371,7 +371,7 @@ repo](https://github.com/btcsuite/btcd).
Running the following command will create `rpc.cert` and default `btcd.conf`. Running the following command will create `rpc.cert` and default `btcd.conf`.
```shell ```shell
$ btcd --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME btcd --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME
``` ```
If you want to use `lnd` on testnet, `btcd` needs to first fully sync the If you want to use `lnd` on testnet, `btcd` needs to first fully sync the
testnet blockchain. Depending on your hardware, this may take up to a few testnet blockchain. Depending on your hardware, this may take up to a few
@ -384,7 +384,7 @@ directly, rather than scanning blocks or BIP 158 filters for relevant items.
While `btcd` is syncing you can check on its progress using btcd's `getinfo` While `btcd` is syncing you can check on its progress using btcd's `getinfo`
RPC command: RPC command:
```shell ```shell
$ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getinfo btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getinfo
{ {
"version": 120000, "version": 120000,
"protocolversion": 70002, "protocolversion": 70002,
@ -404,7 +404,7 @@ time.
You can test your `btcd` node's connectivity using the `getpeerinfo` command: You can test your `btcd` node's connectivity using the `getpeerinfo` command:
```shell ```shell
$ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more
``` ```
### Running lnd using the btcd backend ### Running lnd using the btcd backend
@ -414,7 +414,7 @@ Otherwise, replace `--bitcoin.testnet` with `--bitcoin.simnet`. If you are
installing `lnd` in preparation for the installing `lnd` in preparation for the
[tutorial](https://dev.lightning.community/tutorial), you may skip this step. [tutorial](https://dev.lightning.community/tutorial), you may skip this step.
```shell ```shell
$ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
--btcd.rpcuser=kek --btcd.rpcpass=kek --externalip=X.X.X.X --btcd.rpcuser=kek --btcd.rpcpass=kek --externalip=X.X.X.X
``` ```
@ -430,7 +430,7 @@ mode. A public instance of such a node can be found at
To run lnd in neutrino mode, run `lnd` with the following arguments, (swapping To run lnd in neutrino mode, run `lnd` with the following arguments, (swapping
in `--bitcoin.simnet` if needed), and also your own `btcd` node if available: in `--bitcoin.simnet` if needed), and also your own `btcd` node if available:
```shell ```shell
$ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
--bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community
``` ```
@ -481,7 +481,7 @@ updated with the latest blocks on testnet, run the command below to launch
below): below):
```shell ```shell
$ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
--bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME \ --bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME \
--bitcoind.rpcpass=REPLACEME \ --bitcoind.rpcpass=REPLACEME \
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \ --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \
@ -522,7 +522,7 @@ $ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
# Creating a wallet # Creating a wallet
If `lnd` is being run for the first time, create a new wallet with: If `lnd` is being run for the first time, create a new wallet with:
```shell ```shell
$ lncli create lncli create
``` ```
This will prompt for a wallet password, and optionally a cipher seed This will prompt for a wallet password, and optionally a cipher seed
passphrase. passphrase.

View File

@ -22,16 +22,16 @@ Create a new `.net core` console application called `lndclient` at your root dir
Create a folder `Grpc` in the root of your project and fetch the lnd proto files Create a folder `Grpc` in the root of your project and fetch the lnd proto files
```shell ```shell
$ mkdir Grpc mkdir Grpc
$ curl -o Grpc/lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto curl -o Grpc/lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
``` ```
Install `Grpc.Tools`, `Google.Protobuf`, `Grpc.Net.Client` using NuGet or manually with `dotnet add`: Install `Grpc.Tools`, `Google.Protobuf`, `Grpc.Net.Client` using NuGet or manually with `dotnet add`:
```shell ```shell
$ dotnet add package Grpc.Tools dotnet add package Grpc.Tools
$ dotnet add package Google.Protobuf dotnet add package Google.Protobuf
$ dotnet add package Grpc.Net.Client dotnet add package Grpc.Net.Client
``` ```
Add the `lightning.proto` file to the `.csproj` file in an ItemGroup. (In Visual Studio you can do this by unloading the project, editing the `.csproj` file and then reloading it) Add the `lightning.proto` file to the `.csproj` file in an ItemGroup. (In Visual Studio you can do this by unloading the project, editing the `.csproj` file and then reloading it)

View File

@ -19,9 +19,9 @@ Then, install [Go mobile](https://github.com/golang/go/wiki/Mobile) and
initialize it: initialize it:
```shell ```shell
$ go install golang.org/x/mobile/cmd/gomobile@latest go install golang.org/x/mobile/cmd/gomobile@latest
$ go mod download golang.org/x/mobile go mod download golang.org/x/mobile
$ gomobile init gomobile init
``` ```
### Docker ### Docker
@ -33,7 +33,7 @@ Install and run [Docker](https://www.docker.com/products/docker-desktop).
Check that `make` is available by running the following command without errors: Check that `make` is available by running the following command without errors:
```shell ```shell
$ make --version make --version
``` ```
## Building the libraries ## Building the libraries
@ -46,29 +46,29 @@ To be able to do so, we must turn off module and using the now deprecated
`go get` command before turning modules back on again. `go get` command before turning modules back on again.
```shell ```shell
$ go env -w GO111MODULE="off" go env -w GO111MODULE="off"
$ go get github.com/lightningnetwork/lnd go get github.com/lightningnetwork/lnd
$ go get golang.org/x/mobile/bind go get golang.org/x/mobile/bind
$ go env -w GO111MODULE="on" go env -w GO111MODULE="on"
``` ```
Finally, lets change directory to the newly created lnd folder inside `$GOPATH`: Finally, lets change directory to the newly created lnd folder inside `$GOPATH`:
```shell ```shell
$ cd $GOPATH/src/github.com/lightningnetwork/lnd cd $GOPATH/src/github.com/lightningnetwork/lnd
``` ```
It is not recommended building from the master branch for mainnet. To checkout It is not recommended building from the master branch for mainnet. To checkout
the latest tagged release of lnd, run the latest tagged release of lnd, run
```shell ```shell
$ git checkout $(git describe --match "v[0-9]*" --abbrev=0) git checkout $(git describe --match "v[0-9]*" --abbrev=0)
``` ```
### iOS ### iOS
```shell ```shell
$ make ios make ios
``` ```
The Xcode framework file will be found in `mobile/build/ios/Lndmobile.xcframework`. The Xcode framework file will be found in `mobile/build/ios/Lndmobile.xcframework`.
@ -76,7 +76,7 @@ The Xcode framework file will be found in `mobile/build/ios/Lndmobile.xcframewor
### Android ### Android
```shell ```shell
$ make android make android
``` ```
The AAR library file will be found in `mobile/build/android/Lndmobile.aar`. The AAR library file will be found in `mobile/build/android/Lndmobile.aar`.
@ -132,7 +132,7 @@ Tip: The generated Swift files will be found in various folders. If youd like
to move them to the same folder as the framework file, run to move them to the same folder as the framework file, run
```shell ```shell
$ find . -name "*.swift" -print0 | xargs -0 -I {} mv {} mobile/build/ios find . -name "*.swift" -print0 | xargs -0 -I {} mv {} mobile/build/ios
``` ```
`Lndmobile.xcframework` and all Swift files should now be added to your Xcode `Lndmobile.xcframework` and all Swift files should now be added to your Xcode