mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
scripted-diff: replace ⛰ emoji with $ [skip ci]
-BEGIN VERIFY SCRIPT- sed -i 's/⛰/$/g' $(git grep -l '⛰') -END VERIFY SCRIPT-
This commit is contained in:
parent
e7f4b183ae
commit
0b1e881d18
@ -14,7 +14,7 @@ scrypt with modern parameters (n=32768, r=8, p=1). A set of benchmarks has
|
||||
been added, on my laptop I get about 100ms per attempt):
|
||||
|
||||
```shell
|
||||
⛰ go test -run=XXX -bench=.
|
||||
$ go test -run=XXX -bench=.
|
||||
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
|
@ -24,5 +24,5 @@ between network enabled programs.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/brontide
|
||||
$ go get -u github.com/lightningnetwork/lnd/brontide
|
||||
```
|
||||
|
@ -26,5 +26,5 @@ implementation of the `ChainNotifier` interface depends on `btcd`.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/chainntnfs
|
||||
$ go get -u github.com/lightningnetwork/lnd/chainntnfs
|
||||
```
|
||||
|
@ -20,5 +20,5 @@ node and channel announcements, outgoing payments, and invoices
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/channeldb
|
||||
$ go get -u github.com/lightningnetwork/lnd/channeldb
|
||||
```
|
||||
|
@ -61,44 +61,44 @@ Start `btcd`, and then create an address for `Alice` that we'll directly mine
|
||||
bitcoin into.
|
||||
```shell
|
||||
# Init bitcoin network env variable:
|
||||
⛰ export NETWORK="simnet"
|
||||
$ export NETWORK="simnet"
|
||||
|
||||
# Create persistent volumes for alice and bob.
|
||||
⛰ docker volume create simnet_lnd_alice
|
||||
⛰ docker volume create simnet_lnd_bob
|
||||
$ docker volume create simnet_lnd_alice
|
||||
$ docker volume create simnet_lnd_bob
|
||||
|
||||
# Run the "Alice" container and log into it:
|
||||
⛰ docker-compose run -d --name alice --volume simnet_lnd_alice:/root/.lnd lnd
|
||||
⛰ docker exec -i -t alice bash
|
||||
$ docker-compose run -d --name alice --volume simnet_lnd_alice:/root/.lnd lnd
|
||||
$ docker exec -i -t alice bash
|
||||
|
||||
# Generate a new backward compatible nested p2sh address for Alice:
|
||||
alice ⛰ lncli --network=simnet newaddress np2wkh
|
||||
alice $ lncli --network=simnet newaddress np2wkh
|
||||
|
||||
# Recreate "btcd" node and set Alice's address as mining address:
|
||||
⛰ MINING_ADDRESS=<alice_address> docker-compose up -d btcd
|
||||
$ MINING_ADDRESS=<alice_address> docker-compose up -d btcd
|
||||
|
||||
# Generate 400 blocks (we need at least "100 >=" blocks because of coinbase
|
||||
# block maturity and "300 ~=" in order to activate segwit):
|
||||
⛰ docker exec -it btcd /start-btcctl.sh generate 400
|
||||
$ docker exec -it btcd /start-btcctl.sh generate 400
|
||||
|
||||
# Check that segwit is active:
|
||||
⛰ docker exec -it btcd /start-btcctl.sh getblockchaininfo | grep -A 1 segwit
|
||||
$ docker exec -it btcd /start-btcctl.sh getblockchaininfo | grep -A 1 segwit
|
||||
```
|
||||
|
||||
Check `Alice` balance:
|
||||
```shell
|
||||
alice ⛰ lncli --network=simnet walletbalance
|
||||
alice $ lncli --network=simnet walletbalance
|
||||
```
|
||||
|
||||
Connect `Bob` node to `Alice` node.
|
||||
|
||||
```shell
|
||||
# Run "Bob" node and log into it:
|
||||
⛰ docker-compose run -d --name bob --volume simnet_lnd_bob:/root/.lnd lnd
|
||||
⛰ docker exec -i -t bob bash
|
||||
$ docker-compose run -d --name bob --volume simnet_lnd_bob:/root/.lnd lnd
|
||||
$ docker exec -i -t bob bash
|
||||
|
||||
# Get the identity pubkey of "Bob" node:
|
||||
bob ⛰ lncli --network=simnet getinfo
|
||||
bob $ lncli --network=simnet getinfo
|
||||
{
|
||||
----->"identity_pubkey": "0343bc80b914aebf8e50eb0b8e445fc79b9e6e8e5e018fa8c5f85c7d429c117b38",
|
||||
"alias": "",
|
||||
@ -116,13 +116,13 @@ bob ⛰ lncli --network=simnet getinfo
|
||||
}
|
||||
|
||||
# Get the IP address of "Bob" node:
|
||||
⛰ docker inspect bob | grep IPAddress
|
||||
$ docker inspect bob | grep IPAddress
|
||||
|
||||
# Connect "Alice" to the "Bob" node:
|
||||
alice ⛰ lncli --network=simnet connect <bob_pubkey>@<bob_host>
|
||||
alice $ lncli --network=simnet connect <bob_pubkey>@<bob_host>
|
||||
|
||||
# Check list of peers on "Alice" side:
|
||||
alice ⛰ lncli --network=simnet listpeers
|
||||
alice $ lncli --network=simnet listpeers
|
||||
{
|
||||
"peers": [
|
||||
{
|
||||
@ -139,7 +139,7 @@ alice ⛰ lncli --network=simnet listpeers
|
||||
}
|
||||
|
||||
# Check list of peers on "Bob" side:
|
||||
bob ⛰ lncli --network=simnet listpeers
|
||||
bob $ lncli --network=simnet listpeers
|
||||
{
|
||||
"peers": [
|
||||
{
|
||||
@ -159,13 +159,13 @@ bob ⛰ lncli --network=simnet listpeers
|
||||
Create the `Alice<->Bob` channel.
|
||||
```shell
|
||||
# Open the channel with "Bob":
|
||||
alice ⛰ lncli --network=simnet openchannel --node_key=<bob_identity_pubkey> --local_amt=1000000
|
||||
alice $ lncli --network=simnet openchannel --node_key=<bob_identity_pubkey> --local_amt=1000000
|
||||
|
||||
# Include funding transaction in block thereby opening the channel:
|
||||
⛰ docker exec -it btcd /start-btcctl.sh generate 3
|
||||
$ docker exec -it btcd /start-btcctl.sh generate 3
|
||||
|
||||
# Check that channel with "Bob" was opened:
|
||||
alice ⛰ lncli --network=simnet listchannels
|
||||
alice $ lncli --network=simnet listchannels
|
||||
{
|
||||
"channels": [
|
||||
{
|
||||
@ -194,20 +194,20 @@ alice ⛰ lncli --network=simnet listchannels
|
||||
Send the payment from `Alice` to `Bob`.
|
||||
```shell
|
||||
# Add invoice on "Bob" side:
|
||||
bob ⛰ lncli --network=simnet addinvoice --amt=10000
|
||||
bob $ lncli --network=simnet addinvoice --amt=10000
|
||||
{
|
||||
"r_hash": "<your_random_rhash_here>",
|
||||
"pay_req": "<encoded_invoice>",
|
||||
}
|
||||
|
||||
# Send payment from "Alice" to "Bob":
|
||||
alice ⛰ lncli --network=simnet sendpayment --pay_req=<encoded_invoice>
|
||||
alice $ lncli --network=simnet sendpayment --pay_req=<encoded_invoice>
|
||||
|
||||
# Check "Alice"'s channel balance
|
||||
alice ⛰ lncli --network=simnet channelbalance
|
||||
alice $ lncli --network=simnet channelbalance
|
||||
|
||||
# Check "Bob"'s channel balance
|
||||
bob ⛰ lncli --network=simnet channelbalance
|
||||
bob $ lncli --network=simnet channelbalance
|
||||
```
|
||||
|
||||
Now we have open channel in which we sent only one payment, let's imagine
|
||||
@ -216,7 +216,7 @@ it!
|
||||
```shell
|
||||
# List the "Alice" channel and retrieve "channel_point" which represents
|
||||
# the opened channel:
|
||||
alice ⛰ lncli --network=simnet listchannels
|
||||
alice $ lncli --network=simnet listchannels
|
||||
{
|
||||
"channels": [
|
||||
{
|
||||
@ -243,17 +243,17 @@ alice ⛰ lncli --network=simnet listchannels
|
||||
|
||||
# Channel point consists of two numbers separated by a colon. The first one
|
||||
# is "funding_txid" and the second one is "output_index":
|
||||
alice ⛰ lncli --network=simnet closechannel --funding_txid=<funding_txid> --output_index=<output_index>
|
||||
alice $ lncli --network=simnet closechannel --funding_txid=<funding_txid> --output_index=<output_index>
|
||||
|
||||
# Include close transaction in a block thereby closing the channel:
|
||||
⛰ docker exec -it btcd /start-btcctl.sh generate 3
|
||||
$ docker exec -it btcd /start-btcctl.sh generate 3
|
||||
|
||||
# Check "Alice" on-chain balance was credited by her settled amount in the channel:
|
||||
alice ⛰ lncli --network=simnet walletbalance
|
||||
alice $ lncli --network=simnet walletbalance
|
||||
|
||||
# Check "Bob" on-chain balance was credited with the funds he received in the
|
||||
# channel:
|
||||
bob ⛰ lncli --network=simnet walletbalance
|
||||
bob $ lncli --network=simnet walletbalance
|
||||
{
|
||||
"total_balance": "10000",
|
||||
"confirmed_balance": "10000",
|
||||
@ -298,7 +298,7 @@ First of all you need to run `btcd` node in `testnet` and wait for it to be
|
||||
synced with test network (`May the Force and Patience be with you`).
|
||||
```shell
|
||||
# Init bitcoin network env variable:
|
||||
⛰ NETWORK="testnet" docker-compose up
|
||||
$ NETWORK="testnet" docker-compose up
|
||||
```
|
||||
|
||||
After `btcd` synced, connect `Alice` to the `Faucet` node.
|
||||
@ -307,10 +307,10 @@ The `Faucet` node address can be found at the [Faucet Lightning Community webpag
|
||||
|
||||
```shell
|
||||
# Run "Alice" container and log into it:
|
||||
⛰ docker-compose run -d --name alice lnd_btc; docker exec -i -t "alice" bash
|
||||
$ docker-compose run -d --name alice lnd_btc; docker exec -i -t "alice" bash
|
||||
|
||||
# Connect "Alice" to the "Faucet" node:
|
||||
alice ⛰ lncli --network=testnet connect <faucet_identity_address>@<faucet_host>
|
||||
alice $ lncli --network=testnet connect <faucet_identity_address>@<faucet_host>
|
||||
```
|
||||
|
||||
After a connection is achieved, the `Faucet` node should create the channel
|
||||
@ -332,5 +332,5 @@ production), outside of `docker-compose`, see the
|
||||
|
||||
* How to see `alice` | `bob` | `btcd` logs?
|
||||
```shell
|
||||
⛰ docker-compose logs <alice|bob|btcd>
|
||||
$ docker-compose logs <alice|bob|btcd>
|
||||
```
|
||||
|
@ -13,7 +13,7 @@ To build a standalone development image from the local source directory, use the
|
||||
following command:
|
||||
|
||||
```shell
|
||||
⛰ docker build --tag=myrepository/lnd-dev -f dev.Dockerfile .
|
||||
$ docker build --tag=myrepository/lnd-dev -f dev.Dockerfile .
|
||||
```
|
||||
|
||||
There is also a `docker-compose` setup available for development or testing that
|
||||
@ -29,7 +29,7 @@ Docker container, adding the appropriate command-line options as parameters.
|
||||
You first need to build the `lnd` docker image:
|
||||
|
||||
```shell
|
||||
⛰ docker build --tag=myrepository/lnd --build-arg checkout=v0.14.1-beta .
|
||||
$ docker build --tag=myrepository/lnd --build-arg checkout=v0.14.1-beta .
|
||||
```
|
||||
|
||||
It is recommended that you checkout the latest released tag.
|
||||
@ -37,7 +37,7 @@ It is recommended that you checkout the latest released tag.
|
||||
You can continue by creating and running the container:
|
||||
|
||||
```shell
|
||||
⛰ docker run myrepository/lnd [command-line options]
|
||||
$ docker run myrepository/lnd [command-line options]
|
||||
```
|
||||
|
||||
## Production (official images)
|
||||
@ -49,8 +49,8 @@ images of `lnd` available in the
|
||||
You can just pull those images by specifying a release tag:
|
||||
|
||||
```shell
|
||||
⛰ docker pull lightninglabs/lnd:v0.14.1-beta
|
||||
⛰ docker run lightninglabs/lnd [command-line options]
|
||||
$ docker pull lightninglabs/lnd:v0.14.1-beta
|
||||
$ docker run lightninglabs/lnd [command-line options]
|
||||
```
|
||||
|
||||
Note that **`daily-*` tags are unstable and not for production use**.
|
||||
@ -64,10 +64,10 @@ script in the image that can be called (before starting the container for
|
||||
example):
|
||||
|
||||
```shell
|
||||
⛰ docker run --rm --entrypoint="" lightninglabs/lnd:v0.14.1-beta /verify-install.sh v0.14.1-beta
|
||||
⛰ OK=$?
|
||||
⛰ if [ "$OK" -ne "0" ]; then echo "Verification failed!"; exit 1; done
|
||||
⛰ docker run lightninglabs/lnd:v0.14.1-beta [command-line options]
|
||||
$ docker run --rm --entrypoint="" lightninglabs/lnd:v0.14.1-beta /verify-install.sh v0.14.1-beta
|
||||
$ OK=$?
|
||||
$ if [ "$OK" -ne "0" ]; then echo "Verification failed!"; exit 1; done
|
||||
$ docker run lightninglabs/lnd:v0.14.1-beta [command-line options]
|
||||
```
|
||||
|
||||
## Volumes
|
||||
@ -78,7 +78,7 @@ persist through container restarts.
|
||||
You can also optionally manually specify a local folder to be used as a volume:
|
||||
|
||||
```shell
|
||||
⛰ docker create --name=mylndcontainer -v /media/lnd-docker/:/root/.lnd myrepository/lnd [command-line options]
|
||||
$ docker create --name=mylndcontainer -v /media/lnd-docker/:/root/.lnd myrepository/lnd [command-line options]
|
||||
```
|
||||
|
||||
## Example
|
||||
@ -86,19 +86,19 @@ You can also optionally manually specify a local folder to be used as a volume:
|
||||
Here is an example testnet `lnd` that uses Neutrino:
|
||||
|
||||
```shell
|
||||
⛰ docker run --name lnd-testnet myrepository/lnd --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community
|
||||
$ docker run --name lnd-testnet myrepository/lnd --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community
|
||||
```
|
||||
|
||||
Create a wallet (and write down the seed):
|
||||
|
||||
```shell
|
||||
⛰ docker exec -it lnd-testnet lncli create
|
||||
$ docker exec -it lnd-testnet lncli create
|
||||
```
|
||||
|
||||
Confirm `lnd` has begun to synchronize:
|
||||
|
||||
```shell
|
||||
⛰ docker logs lnd-testnet
|
||||
$ docker logs lnd-testnet
|
||||
[snipped]
|
||||
2018-05-01 02:28:01.201 [INF] RPCS: RPC server listening on 127.0.0.1:10009
|
||||
2018-05-01 02:28:01.201 [INF] LTND: Waiting for chain backend to finish sync, start_height=2546
|
||||
@ -115,29 +115,29 @@ to expose RPC ports, use `btcd` or `bitcoind`, or add additional chains.
|
||||
To test the Docker production image locally, run the following from the project root:
|
||||
|
||||
```shell
|
||||
⛰ docker build . -t myrepository/lnd:master
|
||||
$ docker build . -t myrepository/lnd:master
|
||||
```
|
||||
|
||||
To choose a specific [branch](https://github.com/lightningnetwork/lnd/branches) or [tag](https://hub.docker.com/r/lightninglabs/lnd/tags?page=1&ordering=last_updated) instead, use the `checkout` build-arg. For example, to build the latest tagged commit:
|
||||
|
||||
```shell
|
||||
⛰ docker build . --build-arg checkout=v0.14.1-beta -t myrepository/lnd:v0.14.1-beta
|
||||
$ docker build . --build-arg checkout=v0.14.1-beta -t myrepository/lnd:v0.14.1-beta
|
||||
```
|
||||
|
||||
To build the image using the most current tag:
|
||||
|
||||
```shell
|
||||
⛰ docker build . --build-arg checkout=$(git describe --tags `git rev-list --tags --max-count=1`) -t myrepository/lnd:latest-tag
|
||||
$ docker build . --build-arg checkout=$(git describe --tags `git rev-list --tags --max-count=1`) -t myrepository/lnd:latest-tag
|
||||
```
|
||||
|
||||
You can also specify a different repo than the default (`https://github.com/lightningnetwork/lnd`) using the `git_url` build-arg:
|
||||
|
||||
```shell
|
||||
⛰ docker build . --build-arg git_url=https://git.example.com/lnd.git --build-arg checkout=mybranch -t myrepository/lnd:v0.13.0-beta
|
||||
$ docker build . --build-arg git_url=https://git.example.com/lnd.git --build-arg checkout=mybranch -t myrepository/lnd:v0.13.0-beta
|
||||
```
|
||||
|
||||
Once the image has been built and tagged locally, start the container:
|
||||
|
||||
```shell
|
||||
⛰ docker run --name=lnd-testnet -it myrepository/lnd:latest-tag --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community
|
||||
$ docker run --name=lnd-testnet -it myrepository/lnd:latest-tag --bitcoin.active --bitcoin.testnet --bitcoin.node=neutrino --neutrino.connect=faucet.lightning.community
|
||||
```
|
||||
|
@ -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):
|
||||
|
||||
```shell
|
||||
⛰ git clone https://github.com/lightningnetwork/lnd
|
||||
⛰ cd lnd
|
||||
⛰ git checkout v0.x.y-beta
|
||||
⛰ make docker-release tag=v0.x.y-beta
|
||||
$ git clone https://github.com/lightningnetwork/lnd
|
||||
$ cd lnd
|
||||
$ git checkout 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
|
||||
@ -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.
|
||||
|
||||
```shell
|
||||
⛰ export GOPATH=~/go
|
||||
⛰ export PATH=$PATH:$GOPATH/bin
|
||||
$ export GOPATH=~/go
|
||||
$ 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
|
||||
related dependencies run the following commands:
|
||||
```shell
|
||||
⛰ git clone https://github.com/lightningnetwork/lnd
|
||||
⛰ cd lnd
|
||||
⛰ make install
|
||||
$ git clone https://github.com/lightningnetwork/lnd
|
||||
$ cd lnd
|
||||
$ make install
|
||||
```
|
||||
|
||||
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
|
||||
a small modification to the above command:
|
||||
```shell
|
||||
⛰ git clone https://github.com/lightningnetwork/lnd
|
||||
⛰ cd lnd
|
||||
⛰ git checkout v0.x.x
|
||||
⛰ make install
|
||||
$ git clone https://github.com/lightningnetwork/lnd
|
||||
$ cd lnd
|
||||
$ git checkout v0.x.x
|
||||
$ make install
|
||||
```
|
||||
|
||||
**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:
|
||||
|
||||
```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.
|
||||
@ -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
|
||||
used directly:
|
||||
```shell
|
||||
⛰ go install -v ./...
|
||||
$ go install -v ./...
|
||||
```
|
||||
|
||||
**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
|
||||
commands:
|
||||
```shell
|
||||
⛰ cd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
⛰ git pull
|
||||
⛰ make clean && make && make install
|
||||
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
$ git pull
|
||||
$ make clean && make && make install
|
||||
```
|
||||
|
||||
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
|
||||
used directly:
|
||||
```shell
|
||||
⛰ cd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
⛰ git pull
|
||||
⛰ go install -v ./...
|
||||
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
|
||||
$ git pull
|
||||
$ go install -v ./...
|
||||
```
|
||||
|
||||
**Tests**
|
||||
|
||||
To check that `lnd` was installed properly run the following command:
|
||||
```shell
|
||||
⛰ make check
|
||||
$ make check
|
||||
```
|
||||
|
||||
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**:
|
||||
```shell
|
||||
⛰ make btcd
|
||||
$ make btcd
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
```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
|
||||
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`
|
||||
RPC command:
|
||||
```shell
|
||||
⛰ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getinfo
|
||||
$ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getinfo
|
||||
{
|
||||
"version": 120000,
|
||||
"protocolversion": 70002,
|
||||
@ -404,7 +404,7 @@ time.
|
||||
|
||||
You can test your `btcd` node's connectivity using the `getpeerinfo` command:
|
||||
```shell
|
||||
⛰ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more
|
||||
$ btcctl --testnet --rpcuser=REPLACEME --rpcpass=REPLACEME getpeerinfo | more
|
||||
```
|
||||
|
||||
### 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
|
||||
[tutorial](https://dev.lightning.community/tutorial), you may skip this step.
|
||||
```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
|
||||
```
|
||||
|
||||
@ -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
|
||||
in `--bitcoin.simnet` if needed), and also your own `btcd` node if available:
|
||||
```shell
|
||||
⛰ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
|
||||
$ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
|
||||
--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):
|
||||
|
||||
```shell
|
||||
⛰ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
|
||||
$ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug \
|
||||
--bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME \
|
||||
--bitcoind.rpcpass=REPLACEME \
|
||||
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 \
|
||||
@ -522,7 +522,7 @@ below):
|
||||
# Creating a wallet
|
||||
If `lnd` is being run for the first time, create a new wallet with:
|
||||
```shell
|
||||
⛰ lncli create
|
||||
$ lncli create
|
||||
```
|
||||
This will prompt for a wallet password, and optionally a cipher seed
|
||||
passphrase.
|
||||
|
@ -4,9 +4,9 @@ Makefile
|
||||
To build, verify, and install `lnd` from source, use the following
|
||||
commands:
|
||||
```shell
|
||||
⛰ make
|
||||
⛰ make check
|
||||
⛰ make install
|
||||
$ make
|
||||
$ make check
|
||||
$ make install
|
||||
```
|
||||
|
||||
The command `make check` requires `bitcoind` (almost any version should do) to
|
||||
@ -144,7 +144,7 @@ until an error occurs. Useful for hunting flakes.
|
||||
|
||||
Example:
|
||||
```shell
|
||||
⛰ make flakehunter-parallel icase='(data_loss_protection|channel_backup)' backend=neutrino
|
||||
$ make flakehunter-parallel icase='(data_loss_protection|channel_backup)' backend=neutrino
|
||||
```
|
||||
|
||||
`lint`
|
||||
|
@ -350,7 +350,7 @@ Provide the `-S` flag (or `--gpg-sign`) to git commit when you commit
|
||||
your changes, for example
|
||||
|
||||
```shell
|
||||
⛰ git commit -m "Commit message" -S
|
||||
$ git commit -m "Commit message" -S
|
||||
```
|
||||
|
||||
Optionally you can provide a key id after the `-S` option to sign with a
|
||||
@ -369,7 +369,7 @@ To instruct `git` to auto-sign every commit, add the following lines to your
|
||||
You can retroactively sign your previous commit using `--amend`, for example
|
||||
|
||||
```shell
|
||||
⛰ git commit -S --amend
|
||||
$ git commit -S --amend
|
||||
```
|
||||
|
||||
If you need to go further back, you can use the interactive rebase
|
||||
@ -377,7 +377,7 @@ command with 'edit'. Replace `HEAD~3` with the base commit from which
|
||||
you want to start.
|
||||
|
||||
```shell
|
||||
⛰ git rebase -i HEAD~3
|
||||
$ git rebase -i HEAD~3
|
||||
```
|
||||
|
||||
Replace 'pick' by 'edit' for the commit that you want to sign and the
|
||||
@ -385,7 +385,7 @@ rebasing will stop after that commit. Then you can amend the commit as
|
||||
above. Afterwards, do
|
||||
|
||||
```shell
|
||||
⛰ git rebase --continue
|
||||
$ git rebase --continue
|
||||
```
|
||||
|
||||
As this will rewrite history, you cannot do this when your commit is
|
||||
@ -398,7 +398,7 @@ Multiple commits can also be re-signed with `git rebase`. For example, signing
|
||||
the last three commits can be done with:
|
||||
|
||||
```shell
|
||||
⛰ git rebase --exec 'git commit --amend --no-edit -n -S' -i HEAD~3
|
||||
$ git rebase --exec 'git commit --amend --no-edit -n -S' -i HEAD~3
|
||||
```
|
||||
|
||||
### How to check if commits are signed?
|
||||
@ -406,7 +406,7 @@ the last three commits can be done with:
|
||||
Use `git log` with `--show-signature`,
|
||||
|
||||
```shell
|
||||
⛰ git log --show-signature
|
||||
$ git log --show-signature
|
||||
```
|
||||
|
||||
You can also pass the `--show-signature` option to `git show` to check a single
|
||||
@ -421,12 +421,12 @@ without any further work, the `go.mod` and `go.sum` files will need to be
|
||||
updated. Luckily, the `go mod` command has a handy tool to do this
|
||||
automatically so developers don't need to manually edit the `go.mod` file:
|
||||
```shell
|
||||
⛰ go mod edit -replace=IMPORT-PATH-IN-LND@LND-VERSION=DEV-FORK-IMPORT-PATH@DEV-FORK-VERSION
|
||||
$ go mod edit -replace=IMPORT-PATH-IN-LND@LND-VERSION=DEV-FORK-IMPORT-PATH@DEV-FORK-VERSION
|
||||
```
|
||||
|
||||
Here's an example replacing the `lightning-onion` version checked into `lnd` with a version in roasbeef's fork:
|
||||
```shell
|
||||
⛰ go mod edit -replace=github.com/lightningnetwork/lightning-onion@v0.0.0-20180605012408-ac4d9da8f1d6=github.com/roasbeef/lightning-onion@2e5ae87696046298365ab43bcd1cf3a7a1d69695
|
||||
$ go mod edit -replace=github.com/lightningnetwork/lightning-onion@v0.0.0-20180605012408-ac4d9da8f1d6=github.com/roasbeef/lightning-onion@2e5ae87696046298365ab43bcd1cf3a7a1d69695
|
||||
```
|
||||
|
||||
## Use of Log Levels
|
||||
|
@ -46,7 +46,7 @@ CookieAuthentication 1
|
||||
|
||||
With the configuration file created, you'll then want to start the Tor daemon:
|
||||
```shell
|
||||
⛰ tor
|
||||
$ tor
|
||||
Feb 05 17:02:06.501 [notice] Tor 0.3.1.8 (git-ad5027f7dc790624) running on Darwin with Libevent 2.1.8-stable, OpenSSL 1.0.2l, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A.
|
||||
Feb 05 17:02:06.502 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
|
||||
Feb 05 17:02:06.502 [notice] Read configuration file "/usr/local/etc/tor/torrc".
|
||||
@ -69,7 +69,7 @@ This indicates the daemon is fully bootstrapped and ready to proxy connections.
|
||||
At this point, we can now start `lnd` with the relevant arguments:
|
||||
|
||||
```shell
|
||||
⛰ ./lnd -h
|
||||
$ ./lnd -h
|
||||
|
||||
<snip>
|
||||
|
||||
@ -106,17 +106,17 @@ Most of these arguments have defaults, so as long as they apply to you, routing
|
||||
all outbound and inbound connections through Tor can simply be done with either
|
||||
v2 or v3 onion services:
|
||||
```shell
|
||||
⛰ ./lnd --tor.active --tor.v2
|
||||
$ ./lnd --tor.active --tor.v2
|
||||
```
|
||||
```shell
|
||||
⛰ ./lnd --tor.active --tor.v3
|
||||
$ ./lnd --tor.active --tor.v3
|
||||
```
|
||||
See [Listening for Inbound Connections](#listening-for-inbound-connections) for
|
||||
more info about allowing inbound connections via Tor.
|
||||
|
||||
Outbound support only can also be used with:
|
||||
```shell
|
||||
⛰ ./lnd --tor.active
|
||||
$ ./lnd --tor.active
|
||||
```
|
||||
|
||||
This will allow you to make all outgoing connections over Tor. Listening is
|
||||
@ -133,7 +133,7 @@ circuit.
|
||||
Activating stream isolation is very straightforward, we only require the
|
||||
specification of an additional argument:
|
||||
```shell
|
||||
⛰ ./lnd --tor.active --tor.streamisolation
|
||||
$ ./lnd --tor.active --tor.streamisolation
|
||||
```
|
||||
|
||||
## Authentication
|
||||
@ -171,7 +171,7 @@ to add the flag `listen=localhost`.
|
||||
|
||||
For example, v3 onion services can be used with the following flags:
|
||||
```shell
|
||||
⛰ ./lnd --tor.active --tor.v3 --listen=localhost
|
||||
$ ./lnd --tor.active --tor.v3 --listen=localhost
|
||||
```
|
||||
|
||||
This will automatically create a hidden service for your node to use to listen
|
||||
|
@ -16,13 +16,13 @@ You can enable debug logging in `lnd` by passing the `--debuglevel` flag. For
|
||||
example, to increase the log level from `info` to `debug`:
|
||||
|
||||
```shell
|
||||
⛰ lnd --debuglevel=debug
|
||||
$ lnd --debuglevel=debug
|
||||
```
|
||||
|
||||
You may also specify logging per-subsystem, like this:
|
||||
|
||||
```shell
|
||||
⛰ lnd --debuglevel=<subsystem>=<level>,<subsystem2>=<level>,...
|
||||
$ lnd --debuglevel=<subsystem>=<level>,<subsystem2>=<level>,...
|
||||
```
|
||||
|
||||
## Capturing pprof data with `lnd`
|
||||
@ -35,13 +35,13 @@ Go. The profiler has negligible performance overhead during normal operations
|
||||
To enable this ability, start `lnd` with the `--profile` option using a free port.
|
||||
|
||||
```shell
|
||||
⛰ lnd --profile=9736
|
||||
$ lnd --profile=9736
|
||||
```
|
||||
|
||||
Now, with `lnd` running, you can use the pprof endpoint on port 9736 to collect
|
||||
runtime profiling data. You can fetch this data using `curl` like so:
|
||||
|
||||
```shell
|
||||
⛰ curl http://localhost:9736/debug/pprof/goroutine?debug=1
|
||||
$ curl http://localhost:9736/debug/pprof/goroutine?debug=1
|
||||
...
|
||||
```
|
||||
|
@ -15,7 +15,7 @@ on bitcoin mainnet.
|
||||
To create a dev build of LND with etcd support use the following command:
|
||||
|
||||
```shell
|
||||
⛰ make tags="kvdb_etcd"
|
||||
$ make tags="kvdb_etcd"
|
||||
```
|
||||
|
||||
The important tag is the `kvdb_etcd`, without which the binary is built without
|
||||
@ -30,7 +30,7 @@ directory.
|
||||
To start your local etcd instance for testing run:
|
||||
|
||||
```shell
|
||||
⛰ ./etcd \
|
||||
$ ./etcd \
|
||||
--auto-tls \
|
||||
--advertise-client-urls=https://127.0.0.1:2379 \
|
||||
--listen-client-urls=https://0.0.0.0:2379 \
|
||||
@ -50,7 +50,7 @@ through command line flags or in `lnd.conf`.
|
||||
Sample command line:
|
||||
|
||||
```shell
|
||||
⛰ ./lnd-debug \
|
||||
$ ./lnd-debug \
|
||||
--db.backend=etcd \
|
||||
--db.etcd.host=127.0.0.1:2379 \
|
||||
--db.etcd.certfile=/home/user/etcd/bin/default.etcd/fixtures/client/cert.pem \
|
||||
|
@ -7,14 +7,14 @@ This section will cover setup and installation of the fuzzing binaries.
|
||||
|
||||
* The following is a command to build all fuzzing harnesses:
|
||||
```shell
|
||||
⛰ make fuzz-build
|
||||
$ make fuzz-build
|
||||
```
|
||||
|
||||
* This may take a while since this will create zip files associated with each fuzzing target.
|
||||
|
||||
* The following is a command to run all fuzzing harnesses for 30 seconds:
|
||||
```shell
|
||||
⛰ make fuzz-run
|
||||
$ make fuzz-run
|
||||
```
|
||||
|
||||
`go-fuzz` will print out log lines every couple of seconds. Example output:
|
||||
|
@ -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
|
||||
|
||||
```shell
|
||||
⛰ mkdir Grpc
|
||||
⛰ curl -o Grpc/lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
$ mkdir Grpc
|
||||
$ 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`:
|
||||
|
||||
```shell
|
||||
⛰ dotnet add package Grpc.Tools
|
||||
⛰ dotnet add package Google.Protobuf
|
||||
⛰ dotnet add package Grpc.Net.Client
|
||||
$ dotnet add package Grpc.Tools
|
||||
$ dotnet add package Google.Protobuf
|
||||
$ 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)
|
||||
@ -122,12 +122,12 @@ using (var call = client.SubscribeInvoices(request))
|
||||
|
||||
Now, create an invoice for your node at `localhost:10009` and send a payment to it from another node.
|
||||
```shell
|
||||
⛰ lncli addinvoice --amt=100
|
||||
$ lncli addinvoice --amt=100
|
||||
{
|
||||
"r_hash": <R_HASH>,
|
||||
"pay_req": <PAY_REQ>
|
||||
}
|
||||
⛰ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
$ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
```
|
||||
|
||||
Your console should now display the details of the recently satisfied invoice.
|
||||
|
@ -177,7 +177,7 @@ public class Main {
|
||||
#### Running the example
|
||||
Execute the following command in the directory where the **pom.xml** file is located.
|
||||
```shell
|
||||
⛰ mvn compile exec:java -Dexec.mainClass="Main" -Dexec.cleanupDaemonThreads=false
|
||||
$ mvn compile exec:java -Dexec.mainClass="Main" -Dexec.cleanupDaemonThreads=false
|
||||
```
|
||||
##### Sample output
|
||||
```text
|
||||
|
@ -123,7 +123,7 @@ invoice.
|
||||
|
||||
This example has a few dependencies:
|
||||
```shell
|
||||
⛰ npm install --save async lodash bytebuffer
|
||||
$ npm install --save async lodash bytebuffer
|
||||
```
|
||||
|
||||
You can run the following in your shell or put it in a program and run it like
|
||||
|
@ -11,31 +11,31 @@ file in Python before you can use it to communicate with lnd.
|
||||
|
||||
1. Create a virtual environment for your project
|
||||
```shell
|
||||
⛰ virtualenv lnd
|
||||
$ virtualenv lnd
|
||||
```
|
||||
2. Activate the virtual environment
|
||||
```shell
|
||||
⛰ source lnd/bin/activate
|
||||
$ source lnd/bin/activate
|
||||
```
|
||||
3. Install dependencies (googleapis-common-protos is required due to the use of
|
||||
google/api/annotations.proto)
|
||||
```shell
|
||||
lnd ⛰ pip install grpcio grpcio-tools googleapis-common-protos
|
||||
lnd $ pip install grpcio grpcio-tools googleapis-common-protos
|
||||
```
|
||||
4. Clone the google api's repository (required due to the use of
|
||||
google/api/annotations.proto)
|
||||
```shell
|
||||
lnd ⛰ git clone https://github.com/googleapis/googleapis.git
|
||||
lnd $ git clone https://github.com/googleapis/googleapis.git
|
||||
```
|
||||
5. Copy the lnd lightning.proto file (you'll find this at
|
||||
[lnrpc/lightning.proto](https://github.com/lightningnetwork/lnd/blob/master/lnrpc/lightning.proto))
|
||||
or just download it
|
||||
```shell
|
||||
lnd ⛰ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
lnd $ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
```
|
||||
6. Compile the proto file
|
||||
```shell
|
||||
lnd ⛰ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. lightning.proto
|
||||
lnd $ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. lightning.proto
|
||||
```
|
||||
|
||||
After following these steps, two files `lightning_pb2.py` and
|
||||
@ -53,8 +53,8 @@ extra steps (after completing all 6 step described above) to get the
|
||||
`router_pb2.py` and `router_pb2_grpc.py`:
|
||||
|
||||
```shell
|
||||
lnd ⛰ curl -o router.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/routerrpc/router.proto
|
||||
lnd ⛰ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. router.proto
|
||||
lnd $ curl -o router.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/routerrpc/router.proto
|
||||
lnd $ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. router.proto
|
||||
```
|
||||
|
||||
### Imports and Client
|
||||
@ -108,12 +108,12 @@ for invoice in stub.SubscribeInvoices(request):
|
||||
Now, create an invoice for your node at `localhost:10009`and send a payment to
|
||||
it from another node.
|
||||
```shell
|
||||
lnd ⛰ lncli addinvoice --amt=100
|
||||
lnd $ lncli addinvoice --amt=100
|
||||
{
|
||||
"r_hash": <R_HASH>,
|
||||
"pay_req": <PAY_REQ>
|
||||
}
|
||||
lnd ⛰ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
lnd $ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
```
|
||||
|
||||
Your Python console should now display the details of the recently satisfied
|
||||
|
@ -15,26 +15,26 @@ the `lnd` proto file in Ruby before you can use it to communicate with `lnd`.
|
||||
Install gRPC rubygems:
|
||||
|
||||
```shell
|
||||
⛰ gem install grpc
|
||||
⛰ gem install grpc-tools
|
||||
$ gem install grpc
|
||||
$ gem install grpc-tools
|
||||
```
|
||||
|
||||
Clone the Google APIs repository:
|
||||
|
||||
```shell
|
||||
⛰ git clone https://github.com/googleapis/googleapis.git
|
||||
$ git clone https://github.com/googleapis/googleapis.git
|
||||
```
|
||||
|
||||
Fetch the `lightning.proto` file (or copy it from your local source directory):
|
||||
|
||||
```shell
|
||||
⛰ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
$ curl -o lightning.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/lightning.proto
|
||||
```
|
||||
|
||||
Compile the proto file:
|
||||
|
||||
```shell
|
||||
⛰ grpc_tools_ruby_protoc --proto_path googleapis:. --ruby_out=. --grpc_out=. lightning.proto
|
||||
$ grpc_tools_ruby_protoc --proto_path googleapis:. --ruby_out=. --grpc_out=. lightning.proto
|
||||
```
|
||||
|
||||
Two files will be generated in the current directory:
|
||||
@ -101,7 +101,7 @@ end
|
||||
Now, create an invoice on your node:
|
||||
|
||||
```shell
|
||||
⛰ lncli addinvoice --amt=590
|
||||
$ lncli addinvoice --amt=590
|
||||
{
|
||||
"r_hash": <R_HASH>,
|
||||
"pay_req": <PAY_REQ>
|
||||
@ -111,7 +111,7 @@ Now, create an invoice on your node:
|
||||
Next send a payment to it from another node:
|
||||
|
||||
```shell
|
||||
⛰ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
$ lncli sendpayment --pay_req=<PAY_REQ>
|
||||
```
|
||||
|
||||
You should now see the details of the settled invoice appear.
|
||||
|
@ -20,7 +20,7 @@ itself and for the replicated data store.
|
||||
To create a dev build of LND with leader election support use the following command:
|
||||
|
||||
```shell
|
||||
⛰ make tags="kvdb_etcd"
|
||||
$ make tags="kvdb_etcd"
|
||||
```
|
||||
|
||||
## Running a local etcd instance for testing
|
||||
@ -28,7 +28,7 @@ To create a dev build of LND with leader election support use the following comm
|
||||
To start your local etcd instance for testing run:
|
||||
|
||||
```shell
|
||||
⛰ ./etcd \
|
||||
$ ./etcd \
|
||||
--auto-tls \
|
||||
--advertise-client-urls=https://127.0.0.1:2379 \
|
||||
--listen-client-urls=https://0.0.0.0:2379 \
|
||||
@ -47,7 +47,7 @@ through command line flags or in `lnd.conf`.
|
||||
Sample command line:
|
||||
|
||||
```shell
|
||||
⛰ ./lnd-debug \
|
||||
$ ./lnd-debug \
|
||||
--db.backend=etcd \
|
||||
--db.etcd.host=127.0.0.1:2379 \
|
||||
--db.etcd.certfile=/home/user/etcd/bin/default.etcd/fixtures/client/cert.pem \
|
||||
|
@ -147,15 +147,15 @@ Examples:
|
||||
|
||||
* Create a new wallet stateless (first run):
|
||||
```shell
|
||||
⛰ lncli create --stateless_init --save_to=/safe/location/admin.macaroon
|
||||
$ lncli create --stateless_init --save_to=/safe/location/admin.macaroon
|
||||
```
|
||||
* Unlock a wallet that has previously been initialized stateless:
|
||||
```shell
|
||||
⛰ lncli unlock --stateless_init
|
||||
$ lncli unlock --stateless_init
|
||||
```
|
||||
* Use the created macaroon:
|
||||
```shell
|
||||
⛰ lncli --macaroonpath=/safe/location/admin.macaroon getinfo
|
||||
$ lncli --macaroonpath=/safe/location/admin.macaroon getinfo
|
||||
```
|
||||
|
||||
## Using Macaroons with GRPC clients
|
||||
@ -174,7 +174,7 @@ Where `<macaroon>` is the hex encoded binary data from the macaroon file itself.
|
||||
A very simple example using `curl` may look something like this:
|
||||
|
||||
```shell
|
||||
⛰ curl --insecure --header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $HOME/.lnd/data/chain/bitcoin/simnet/admin.macaroon)" https://localhost:8080/v1/getinfo
|
||||
$ curl --insecure --header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $HOME/.lnd/data/chain/bitcoin/simnet/admin.macaroon)" https://localhost:8080/v1/getinfo
|
||||
```
|
||||
|
||||
Have a look at the [Java GRPC example](/docs/grpc/java.md) for programmatic usage details.
|
||||
|
@ -5,7 +5,7 @@ the time of writing this documentation, UPnP and NAT-PMP are supported. NAT
|
||||
traversal can be enabled through `lnd`'s `--nat` flag.
|
||||
|
||||
```shell
|
||||
⛰ lnd ... --nat
|
||||
$ lnd ... --nat
|
||||
```
|
||||
|
||||
On startup, `lnd` will try the different techniques until one is found that's
|
||||
|
@ -11,7 +11,7 @@ already enabled by default. The default release binaries or docker images can
|
||||
be used. To build from source, simply run:
|
||||
|
||||
```shell
|
||||
⛰ make install
|
||||
$ make install
|
||||
```
|
||||
|
||||
## Configuring Postgres for LND
|
||||
|
32
docs/psbt.md
32
docs/psbt.md
@ -30,7 +30,7 @@ Let's start with a very simple example and assume we want to send half a coin
|
||||
to the address `bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re`:
|
||||
|
||||
```shell
|
||||
⛰ lncli wallet psbt fund --outputs='{"bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re":50000000}'
|
||||
$ lncli wallet psbt fund --outputs='{"bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re":50000000}'
|
||||
{
|
||||
"psbt": "cHNidP8BAHECAAAAAeJQY2VLRtutKgQYFUajEKpjFfl0Uyrm6x23OumDpe/4AQAAAAD/////AkxREgEAAAAAFgAUv6pTgbKHN60CZ+RQn5yOuH6c2WiA8PoCAAAAABYAFJDbOFU0E6zFF/M+g/AKDyqI2iUaAAAAAAABAOsCAAAAAAEBbxqXgEf9DlzcqqNM610s5pL1X258ra6+KJ22etb7HAcBAAAAAAAAAAACACT0AAAAAAAiACC7U1W0iJGhQ6o7CexDh5k36V6v3256xpA9/xmB2BybTFZdDQQAAAAAFgAUKp2ThzhswyM2QHlyvmMB6tQB7V0CSDBFAiEA4Md8RIZYqFdUPsgDyomlzMJL9bJ6Ho23JGTihXtEelgCIAeNXRLyt88SOuuWFVn3IodCE4U5D6DojIHesRmikF28ASEDHYFzMEAxfmfq98eSSnZtUwb1w7mAtHG65y8qiRFNnIkAAAAAAQEfVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQEDBAEAAAAAAAA=",
|
||||
"change_output_index": 0,
|
||||
@ -55,7 +55,7 @@ selected, the UTXO information was attached and a change output (at index 0) was
|
||||
created as well:
|
||||
|
||||
```shell
|
||||
⛰ bitcoin-cli decodepsbt cHNidP8BAHECAAAAAeJQY2VLRtutKgQYFUajEKpjFfl0Uyrm6x23OumDpe/4AQAAAAD/////AkxREgEAAAAAFgAUv6pTgbKHN60CZ+RQn5yOuH6c2WiA8PoCAAAAABYAFJDbOFU0E6zFF/M+g/AKDyqI2iUaAAAAAAABAOsCAAAAAAEBbxqXgEf9DlzcqqNM610s5pL1X258ra6+KJ22etb7HAcBAAAAAAAAAAACACT0AAAAAAAiACC7U1W0iJGhQ6o7CexDh5k36V6v3256xpA9/xmB2BybTFZdDQQAAAAAFgAUKp2ThzhswyM2QHlyvmMB6tQB7V0CSDBFAiEA4Md8RIZYqFdUPsgDyomlzMJL9bJ6Ho23JGTihXtEelgCIAeNXRLyt88SOuuWFVn3IodCE4U5D6DojIHesRmikF28ASEDHYFzMEAxfmfq98eSSnZtUwb1w7mAtHG65y8qiRFNnIkAAAAAAQEfVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQEDBAEAAAAAAAA=
|
||||
$ bitcoin-cli decodepsbt cHNidP8BAHECAAAAAeJQY2VLRtutKgQYFUajEKpjFfl0Uyrm6x23OumDpe/4AQAAAAD/////AkxREgEAAAAAFgAUv6pTgbKHN60CZ+RQn5yOuH6c2WiA8PoCAAAAABYAFJDbOFU0E6zFF/M+g/AKDyqI2iUaAAAAAAABAOsCAAAAAAEBbxqXgEf9DlzcqqNM610s5pL1X258ra6+KJ22etb7HAcBAAAAAAAAAAACACT0AAAAAAAiACC7U1W0iJGhQ6o7CexDh5k36V6v3256xpA9/xmB2BybTFZdDQQAAAAAFgAUKp2ThzhswyM2QHlyvmMB6tQB7V0CSDBFAiEA4Md8RIZYqFdUPsgDyomlzMJL9bJ6Ho23JGTihXtEelgCIAeNXRLyt88SOuuWFVn3IodCE4U5D6DojIHesRmikF28ASEDHYFzMEAxfmfq98eSSnZtUwb1w7mAtHG65y8qiRFNnIkAAAAAAQEfVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQEDBAEAAAAAAAA=
|
||||
{
|
||||
"tx": {
|
||||
"txid": "33a316d62ddf74656967754d26ea83a3cb89e03ae44578d965156d4b71b1fce7",
|
||||
@ -136,7 +136,7 @@ The first step is to look at all available UTXOs and choose. To do so, we use
|
||||
the `listunspent` command:
|
||||
|
||||
```shell
|
||||
⛰ lncli listunspent
|
||||
$ lncli listunspent
|
||||
{
|
||||
"utxos": [
|
||||
{
|
||||
@ -163,7 +163,7 @@ the `listunspent` command:
|
||||
Next, we choose these two inputs and create the PSBT:
|
||||
|
||||
```shell
|
||||
⛰ lncli wallet psbt fund --outputs='{"bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re":50000000}' \
|
||||
$ lncli wallet psbt fund --outputs='{"bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re":50000000}' \
|
||||
--inputs='["3597b451ff56bc901eb806e8c644a004e934b4c208679756b4cddc455c768c48:1","f8efa583e93ab71debe62a5374f91563aa10a3461518042aaddb464b656350e2:1"]'
|
||||
{
|
||||
"psbt": "cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBAwQBAAAAAAEA6wIAAAAAAQFvGpeAR/0OXNyqo0zrXSzmkvVfbnytrr4onbZ61vscBwEAAAAAAAAAAAIAJPQAAAAAACIAILtTVbSIkaFDqjsJ7EOHmTfpXq/fbnrGkD3/GYHYHJtMVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQJIMEUCIQDgx3xEhlioV1Q+yAPKiaXMwkv1snoejbckZOKFe0R6WAIgB41dEvK3zxI665YVWfcih0IThTkPoOiMgd6xGaKQXbwBIQMdgXMwQDF+Z+r3x5JKdm1TBvXDuYC0cbrnLyqJEU2ciQAAAAABAR9WXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAQMEAQAAAAAAAA==",
|
||||
@ -187,7 +187,7 @@ Inspecting this PSBT, we notice that the two inputs were chosen and a large
|
||||
change output was added at index 1:
|
||||
|
||||
```shell
|
||||
⛰ bitcoin-cli decodepsbt cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBAwQBAAAAAAEA6wIAAAAAAQFvGpeAR/0OXNyqo0zrXSzmkvVfbnytrr4onbZ61vscBwEAAAAAAAAAAAIAJPQAAAAAACIAILtTVbSIkaFDqjsJ7EOHmTfpXq/fbnrGkD3/GYHYHJtMVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQJIMEUCIQDgx3xEhlioV1Q+yAPKiaXMwkv1snoejbckZOKFe0R6WAIgB41dEvK3zxI665YVWfcih0IThTkPoOiMgd6xGaKQXbwBIQMdgXMwQDF+Z+r3x5JKdm1TBvXDuYC0cbrnLyqJEU2ciQAAAAABAR9WXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAQMEAQAAAAAAAA==
|
||||
$ bitcoin-cli decodepsbt cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBAwQBAAAAAAEA6wIAAAAAAQFvGpeAR/0OXNyqo0zrXSzmkvVfbnytrr4onbZ61vscBwEAAAAAAAAAAAIAJPQAAAAAACIAILtTVbSIkaFDqjsJ7EOHmTfpXq/fbnrGkD3/GYHYHJtMVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQJIMEUCIQDgx3xEhlioV1Q+yAPKiaXMwkv1snoejbckZOKFe0R6WAIgB41dEvK3zxI665YVWfcih0IThTkPoOiMgd6xGaKQXbwBIQMdgXMwQDF+Z+r3x5JKdm1TBvXDuYC0cbrnLyqJEU2ciQAAAAABAR9WXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAQMEAQAAAAAAAA==
|
||||
{
|
||||
"tx": {
|
||||
"txid": "e62356b99c3097eaa1241ff8e39b996917e66b13e4c0ccba3698982d746c3b76",
|
||||
@ -264,7 +264,7 @@ Assuming we now want to sign the transaction that we created in the previous
|
||||
example, we simply pass it to the `finalize` sub command of the wallet:
|
||||
|
||||
```shell
|
||||
⛰ lncli wallet psbt finalize cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBAwQBAAAAAAEA6wIAAAAAAQFvGpeAR/0OXNyqo0zrXSzmkvVfbnytrr4onbZ61vscBwEAAAAAAAAAAAIAJPQAAAAAACIAILtTVbSIkaFDqjsJ7EOHmTfpXq/fbnrGkD3/GYHYHJtMVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQJIMEUCIQDgx3xEhlioV1Q+yAPKiaXMwkv1snoejbckZOKFe0R6WAIgB41dEvK3zxI665YVWfcih0IThTkPoOiMgd6xGaKQXbwBIQMdgXMwQDF+Z+r3x5JKdm1TBvXDuYC0cbrnLyqJEU2ciQAAAAABAR9WXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAQMEAQAAAAAAAA==
|
||||
$ lncli wallet psbt finalize cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBAwQBAAAAAAEA6wIAAAAAAQFvGpeAR/0OXNyqo0zrXSzmkvVfbnytrr4onbZ61vscBwEAAAAAAAAAAAIAJPQAAAAAACIAILtTVbSIkaFDqjsJ7EOHmTfpXq/fbnrGkD3/GYHYHJtMVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQJIMEUCIQDgx3xEhlioV1Q+yAPKiaXMwkv1snoejbckZOKFe0R6WAIgB41dEvK3zxI665YVWfcih0IThTkPoOiMgd6xGaKQXbwBIQMdgXMwQDF+Z+r3x5JKdm1TBvXDuYC0cbrnLyqJEU2ciQAAAAABAR9WXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAQMEAQAAAAAAAA==
|
||||
{
|
||||
"psbt": "cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBCGwCSDBFAiEAuiv52IX5wZlYJqqVGsQPfeQ/kneCNRD34v5yplNpuMYCIECHVUhjHPKSiWSsYEKD4JWGAyUwQHgDytA1whFOyLclASECg7PDfGE/uURta5/R42Vso6QKmVAgYMhjWlXENkE/x+QAAQDrAgAAAAABAW8al4BH/Q5c3KqjTOtdLOaS9V9ufK2uviidtnrW+xwHAQAAAAAAAAAAAgAk9AAAAAAAIgAgu1NVtIiRoUOqOwnsQ4eZN+ler99uesaQPf8Zgdgcm0xWXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAkgwRQIhAODHfESGWKhXVD7IA8qJpczCS/Wyeh6NtyRk4oV7RHpYAiAHjV0S8rfPEjrrlhVZ9yKHQhOFOQ+g6IyB3rEZopBdvAEhAx2BczBAMX5n6vfHkkp2bVMG9cO5gLRxuucvKokRTZyJAAAAAAEBH1ZdDQQAAAAAFgAUKp2ThzhswyM2QHlyvmMB6tQB7V0BCGwCSDBFAiEAqK7FSrqWe2non0kl96yu2+gSXGPYPC7ZjzVZEMMWtpYCIGTzCDHZhJYGPrsnBWU8o0Eyd4nBa+6d037xGFcGUYJLASECORgkj75Xu8+DTh8bqYBIvNx1hSxV7VSJOwY6jam6LY8AAAA=",
|
||||
"final_tx": "02000000000102488c765c45dccdb456976708c2b434e904a044c6e806b81e90bc56ff51b49735010000000000000000e25063654b46dbad2a04181546a310aa6315f974532ae6eb1db73ae983a5eff80100000000000000000280f0fa020000000016001490db38553413acc517f33e83f00a0f2a88da251ad224080700000000160014baf44fe6beea02f8f47a00f1c97f7f147fafba4802483045022100ba2bf9d885f9c1995826aa951ac40f7de43f9277823510f7e2fe72a65369b8c6022040875548631cf2928964ac604283e09586032530407803cad035c2114ec8b72501210283b3c37c613fb9446d6b9fd1e3656ca3a40a99502060c8635a55c436413fc7e402483045022100a8aec54aba967b69e89f4925f7acaedbe8125c63d83c2ed98f355910c316b696022064f30831d98496063ebb2705653ca341327789c16bee9dd37ef118570651824b0121023918248fbe57bbcf834e1f1ba98048bcdc75852c55ed54893b063a8da9ba2d8f00000000"
|
||||
@ -318,7 +318,7 @@ between `lncli` and the user. Below the command you see an example output from
|
||||
a regtest setup. Of course all values will be different.
|
||||
|
||||
```shell
|
||||
⛰ lncli openchannel --node_key 03db1e56e5f76bc4018cf6f03d1bb98a7ae96e3f18535e929034f85e7f1ca2b8ac --local_amt 1234567 --psbt
|
||||
$ lncli openchannel --node_key 03db1e56e5f76bc4018cf6f03d1bb98a7ae96e3f18535e929034f85e7f1ca2b8ac --local_amt 1234567 --psbt
|
||||
Starting PSBT funding flow with pending channel ID fc7853889a04d33b8115bd79ebc99c5eea80d894a0bead40fae5a06bcbdccd3d.
|
||||
PSBT funding initiated with peer 03db1e56e5f76bc4018cf6f03d1bb98a7ae96e3f18535e929034f85e7f1ca2b8ac.
|
||||
Please create a PSBT that sends 0.01234567 BTC (1234567 satoshi) to the funding address bcrt1qh33ghvgjj3ef625nl9jxz6nnrz2z9e65vsdey7w5msrklgr6rc0sv0s08q.
|
||||
@ -346,7 +346,7 @@ something like "bitcoind, give me a PSBT that sends the given amount to the
|
||||
given address, choose any input you see fit":
|
||||
|
||||
```shell
|
||||
⛰ bitcoin-cli walletcreatefundedpsbt [] '[{"bcrt1qh33ghvgjj3ef625nl9jxz6nnrz2z9e65vsdey7w5msrklgr6rc0sv0s08q":0.01234567}]'
|
||||
$ bitcoin-cli walletcreatefundedpsbt [] '[{"bcrt1qh33ghvgjj3ef625nl9jxz6nnrz2z9e65vsdey7w5msrklgr6rc0sv0s08q":0.01234567}]'
|
||||
{
|
||||
"psbt": "cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDiWBZF+3xxc/Y/AAAAAAD+////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+1If0jAQAAABYAFL+6THEGhybJnOkFGSRFbtCcPOG8AAAAAAABAR8wBBAkAQAAABYAFHemJ11XF7CU7WXBIJLD/qZF+6jrAAAA",
|
||||
"fee": 0.00003060,
|
||||
@ -363,7 +363,7 @@ If we want to know what exactly is in this PSBT, we can look at it with the
|
||||
`decodepsbt` command:
|
||||
|
||||
```shell
|
||||
⛰ bitcoin-cli decodepsbt cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDiWBZF+3xxc/Y/AAAAAAD+////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+1If0jAQAAABYAFL+6THEGhybJnOkFGSRFbtCcPOG8AAAAAAABAR8wBBAkAQAAABYAFHemJ11XF7CU7WXBIJLD/qZF+6jrAAAA
|
||||
$ bitcoin-cli decodepsbt cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDiWBZF+3xxc/Y/AAAAAAD+////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+1If0jAQAAABYAFL+6THEGhybJnOkFGSRFbtCcPOG8AAAAAAABAR8wBBAkAQAAABYAFHemJ11XF7CU7WXBIJLD/qZF+6jrAAAA
|
||||
{
|
||||
"tx": {
|
||||
"txid": "374504e4246a93a45b4a2c2bc31d8adc8525aa101c7b9065db6dc01c4bdfce0a",
|
||||
@ -451,7 +451,7 @@ private keys. On the watching only mode, the following command can be used to
|
||||
create the funding PSBT:
|
||||
|
||||
```shell
|
||||
⛰ lncli wallet psbt fund --outputs='{"bcrt1qh33ghvgjj3ef625nl9jxz6nnrz2z9e65vsdey7w5msrklgr6rc0sv0s08q":1234567}'
|
||||
$ lncli wallet psbt fund --outputs='{"bcrt1qh33ghvgjj3ef625nl9jxz6nnrz2z9e65vsdey7w5msrklgr6rc0sv0s08q":1234567}'
|
||||
{
|
||||
"psbt": "cHNidP8BAH0CAAAAAUiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAD/////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+X7OIFAAAAABYAFNigOB6EbCLRi+Evlv4r2yJx63NxAAAAAAABAN4CAAAAAAEBK/SGXIaP4Ff+nx/AvD/soTUWT/pd2LsbMmrXWHEtEugBAAAAAP7///8CyP/PsgAAAAAWABQ16ERcIFzTuVVbVatlqWhDYem5QADh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMCRzBEAiA6roLWC6eHmyQGbznYnrIS4tZS7j5drR0BuIzOMm8BBgIgXjKQpGxwZs2L5Y8W9SQUMlQDLqHKNMSH4vuTkHR7l2gBIQJx/ejYU1tPV9J6RPfN2AbB1KDDyOFOMQbR3p6WVUxKqVcAAAABAR8A4fUFAAAAABYAFNwBHQ1410Mdv3qQycfkRVRyvVjDAQMEAQAAAAAAAA==",
|
||||
"change_output_index": 1,
|
||||
@ -489,7 +489,7 @@ transaction itself. Again, this is only an example and can't reflect all
|
||||
real-world use cases.
|
||||
|
||||
```shell
|
||||
⛰ bitcoin-cli walletprocesspsbt cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDiWBZF+3xxc/Y/AAAAAAD+////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+1If0jAQAAABYAFL+6THEGhybJnOkFGSRFbtCcPOG8AAAAAAABAR8wBBAkAQAAABYAFHemJ11XF7CU7WXBIJLD/qZF+6jrAAAA
|
||||
$ bitcoin-cli walletprocesspsbt cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDiWBZF+3xxc/Y/AAAAAAD+////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+1If0jAQAAABYAFL+6THEGhybJnOkFGSRFbtCcPOG8AAAAAAABAR8wBBAkAQAAABYAFHemJ11XF7CU7WXBIJLD/qZF+6jrAAAA
|
||||
{
|
||||
"psbt": "cHNidP8BAH0CAAAAAbxLLf9+AYfqfF69QAQuETnL6cas7GDiWBZF+3xxc/Y/AAAAAAD+////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+1If0jAQAAABYAFL+6THEGhybJnOkFGSRFbtCcPOG8AAAAAAABAR8wBBAkAQAAABYAFHemJ11XF7CU7WXBIJLD/qZF+6jrAQhrAkcwRAIgHKQbenZYvgADRd9TKGVO36NnaIgW3S12OUg8XGtSrE8CICmeaYoJ/U7Ecm+/GneY8i2hu2QCaQnuomJgzn+JAnrDASEDUBmCLcsybA5qXSRBBdZ0Uk/FQiay9NgOpv4D26yeJpAAAAA=",
|
||||
"complete": true
|
||||
@ -501,7 +501,7 @@ If you are using the two `lnd` node model as described in
|
||||
result with the following command:
|
||||
|
||||
```shell
|
||||
⛰ lncli wallet psbt finalize cHNidP8BAH0CAAAAAUiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAD/////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+X7OIFAAAAABYAFNigOB6EbCLRi+Evlv4r2yJx63NxAAAAAAABAN4CAAAAAAEBK/SGXIaP4Ff+nx/AvD/soTUWT/pd2LsbMmrXWHEtEugBAAAAAP7///8CyP/PsgAAAAAWABQ16ERcIFzTuVVbVatlqWhDYem5QADh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMCRzBEAiA6roLWC6eHmyQGbznYnrIS4tZS7j5drR0BuIzOMm8BBgIgXjKQpGxwZs2L5Y8W9SQUMlQDLqHKNMSH4vuTkHR7l2gBIQJx/ejYU1tPV9J6RPfN2AbB1KDDyOFOMQbR3p6WVUxKqVcAAAABAR8A4fUFAAAAABYAFNwBHQ1410Mdv3qQycfkRVRyvVjDAQMEAQAAAAAAAA==
|
||||
$ lncli wallet psbt finalize cHNidP8BAH0CAAAAAUiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAD/////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+X7OIFAAAAABYAFNigOB6EbCLRi+Evlv4r2yJx63NxAAAAAAABAN4CAAAAAAEBK/SGXIaP4Ff+nx/AvD/soTUWT/pd2LsbMmrXWHEtEugBAAAAAP7///8CyP/PsgAAAAAWABQ16ERcIFzTuVVbVatlqWhDYem5QADh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMCRzBEAiA6roLWC6eHmyQGbznYnrIS4tZS7j5drR0BuIzOMm8BBgIgXjKQpGxwZs2L5Y8W9SQUMlQDLqHKNMSH4vuTkHR7l2gBIQJx/ejYU1tPV9J6RPfN2AbB1KDDyOFOMQbR3p6WVUxKqVcAAAABAR8A4fUFAAAAABYAFNwBHQ1410Mdv3qQycfkRVRyvVjDAQMEAQAAAAAAAA==
|
||||
{
|
||||
"psbt": "cHNidP8BAH0CAAAAAUiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAD/////AofWEgAAAAAAIgAgvGKLsRKUcp0qk/lkYWpzGJQi51RkG5J51NwHb6B6Hh+X7OIFAAAAABYAFNigOB6EbCLRi+Evlv4r2yJx63NxAAAAAAABAN4CAAAAAAEBK/SGXIaP4Ff+nx/AvD/soTUWT/pd2LsbMmrXWHEtEugBAAAAAP7///8CyP/PsgAAAAAWABQ16ERcIFzTuVVbVatlqWhDYem5QADh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMCRzBEAiA6roLWC6eHmyQGbznYnrIS4tZS7j5drR0BuIzOMm8BBgIgXjKQpGxwZs2L5Y8W9SQUMlQDLqHKNMSH4vuTkHR7l2gBIQJx/ejYU1tPV9J6RPfN2AbB1KDDyOFOMQbR3p6WVUxKqVcAAAABAR8A4fUFAAAAABYAFNwBHQ1410Mdv3qQycfkRVRyvVjDAQhrAkcwRAIgU3Ow7cLkKrg8BJe0U0n9qFLPizqEzY0JtjVlpWOEk14CID/4AFNfgwNENN2LoOs0C6uHgt4sk8rNoZG+VMGzOC/HASECg7PDfGE/uURta5/R42Vso6QKmVAgYMhjWlXENkE/x+QAAAA=",
|
||||
"final_tx": "02000000000101488c765c45dccdb456976708c2b434e904a044c6e806b81e90bc56ff51b497350100000000ffffffff0287d6120000000000220020bc628bb11294729d2a93f964616a73189422e754641b9279d4dc076fa07a1e1f97ece20500000000160014d8a0381e846c22d18be12f96fe2bdb2271eb73710247304402205373b0edc2e42ab83c0497b45349fda852cf8b3a84cd8d09b63565a56384935e02203ff800535f83034434dd8ba0eb340bab8782de2c93cacda191be54c1b3382fc701210283b3c37c613fb9446d6b9fd1e3656ca3a40a99502060c8635a55c436413fc7e400000000"
|
||||
@ -544,17 +544,17 @@ a single command. For example:
|
||||
|
||||
Channel 1:
|
||||
```shell
|
||||
⛰ bitcoin-cli walletcreatefundedpsbt [] '[{"tb1qywvazres587w9wyy8uw03q8j9ek6gc9crwx4jvhqcmew4xzsvqcq3jjdja":0.01000000}]'
|
||||
$ bitcoin-cli walletcreatefundedpsbt [] '[{"tb1qywvazres587w9wyy8uw03q8j9ek6gc9crwx4jvhqcmew4xzsvqcq3jjdja":0.01000000}]'
|
||||
```
|
||||
|
||||
Channel 2:
|
||||
```shell
|
||||
⛰ bitcoin-cli walletcreatefundedpsbt [] '[{"tb1q53626fcwwtcdc942zaf4laqnr3vg5gv4g0hakd2h7fw2pmz6428sk3ezcx":0.01000000}]'
|
||||
$ bitcoin-cli walletcreatefundedpsbt [] '[{"tb1q53626fcwwtcdc942zaf4laqnr3vg5gv4g0hakd2h7fw2pmz6428sk3ezcx":0.01000000}]'
|
||||
```
|
||||
|
||||
Combined command to get batch PSBT:
|
||||
```shell
|
||||
⛰ bitcoin-cli walletcreatefundedpsbt [] '[{"tb1q53626fcwwtcdc942zaf4laqnr3vg5gv4g0hakd2h7fw2pmz6428sk3ezcx":0.01000000},{"tb1qywvazres587w9wyy8uw03q8j9ek6gc9crwx4jvhqcmew4xzsvqcq3jjdja":0.01000000}]'
|
||||
$ bitcoin-cli walletcreatefundedpsbt [] '[{"tb1q53626fcwwtcdc942zaf4laqnr3vg5gv4g0hakd2h7fw2pmz6428sk3ezcx":0.01000000},{"tb1qywvazres587w9wyy8uw03q8j9ek6gc9crwx4jvhqcmew4xzsvqcq3jjdja":0.01000000}]'
|
||||
```
|
||||
|
||||
### Safety warning about batch transactions
|
||||
@ -620,7 +620,7 @@ lingering reservations/intents/pending channels are cleaned up.
|
||||
**Example using the CLI**:
|
||||
|
||||
```shell
|
||||
⛰ lncli batchopenchannel --sat_per_vbyte=5 '[{
|
||||
$ lncli batchopenchannel --sat_per_vbyte=5 '[{
|
||||
"node_pubkey": "02c95fd94d2a40e483e8a14be1625ad8a82263b37b6a32162170d8d4c13080bedb",
|
||||
"local_funding_amount": 500000,
|
||||
"private": true,
|
||||
|
@ -95,7 +95,7 @@ silently decrypt to a new (likely empty) wallet.
|
||||
The initial entry point to trigger recovery of on-chain funds in the command
|
||||
line is the `lncli create` command.
|
||||
```shell
|
||||
⛰ lncli create
|
||||
$ lncli create
|
||||
```
|
||||
|
||||
Next, one can enter a _new_ wallet password to encrypt any newly derived keys
|
||||
@ -171,7 +171,7 @@ birthday!) and how many addresses were used, the rescan may take anywhere from
|
||||
a few minutes to a few hours. To track the recovery progress, one can use the
|
||||
command `lncli getrecoveryinfo`. When finished, the following is returned,
|
||||
```shell
|
||||
⛰ lncli getrecoveryinfo
|
||||
$ lncli getrecoveryinfo
|
||||
{
|
||||
"recovery_mode": true,
|
||||
"recovery_finished": true,
|
||||
@ -183,7 +183,7 @@ If the rescan wasn't able to complete fully (`lnd` was shutdown for example),
|
||||
then from `lncli unlock`, it's possible to _restart_ the rescan from where it
|
||||
left off with the `--recovery-window` argument:
|
||||
```shell
|
||||
⛰ lncli unlock --recovery_window=2500
|
||||
$ lncli unlock --recovery_window=2500
|
||||
```
|
||||
|
||||
Note that if this argument is not specified, then the wallet will not
|
||||
@ -197,7 +197,7 @@ there's no existing UTXO or key data in the node's database. However, there're
|
||||
times when an _existing_ node may want to _manually_ rescan the chain. We have
|
||||
a command line flag for that! Just start `lnd` and add the following flag:
|
||||
```shell
|
||||
⛰ lnd --reset-wallet-transactions
|
||||
$ lnd --reset-wallet-transactions
|
||||
```
|
||||
|
||||
The `--reset-wallet-transactions` flag will _reset_ the best synced height of
|
||||
@ -263,13 +263,13 @@ here](https://gist.github.com/alexbosworth/2c5e185aedbdac45a03655b709e255a3).
|
||||
Another way to obtain SCBS for all or a target channel is via the new
|
||||
`exportchanbackup` `lncli` command:
|
||||
```shell
|
||||
⛰ lncli --network=simnet exportchanbackup --chan_point=29be6d259dc71ebdf0a3a0e83b240eda78f9023d8aeaae13c89250c7e59467d5:0
|
||||
$ lncli --network=simnet exportchanbackup --chan_point=29be6d259dc71ebdf0a3a0e83b240eda78f9023d8aeaae13c89250c7e59467d5:0
|
||||
{
|
||||
"chan_point": "29be6d259dc71ebdf0a3a0e83b240eda78f9023d8aeaae13c89250c7e59467d5:0",
|
||||
"chan_backup": "02e7b423c8cf11038354732e9696caff9d5ac9720440f70a50ca2b9fcef5d873c8e64d53bdadfe208a86c96c7f31dc4eb370a02631bb02dce6611c435753a0c1f86c9f5b99006457f0dc7ee4a1c19e0d31a1036941d65717a50136c877d66ec80bb8f3e67cee8d9a5cb3f4081c3817cd830a8d0cf851c1f1e03fee35d790e42d98df5b24e07e6d9d9a46a16352e9b44ad412571c903a532017a5bc1ffe1369c123e1e17e1e4d52cc32329aa205d73d57f846389a6e446f612eeb2dcc346e4590f59a4c533f216ee44f09c1d2298b7d6c"
|
||||
}
|
||||
|
||||
⛰ lncli --network=simnet exportchanbackup --all
|
||||
$ lncli --network=simnet exportchanbackup --all
|
||||
{
|
||||
"chan_points": [
|
||||
"29be6d259dc71ebdf0a3a0e83b240eda78f9023d8aeaae13c89250c7e59467d5:0"
|
||||
@ -277,7 +277,7 @@ Another way to obtain SCBS for all or a target channel is via the new
|
||||
"multi_chan_backup": "fd73e992e5133aa085c8e45548e0189c411c8cfe42e902b0ee2dec528a18fb472c3375447868ffced0d4812125e4361d667b7e6a18b2357643e09bbe7e9110c6b28d74f4f55e7c29e92419b52509e5c367cf2d977b670a2ff7560f5fe24021d246abe30542e6c6e3aa52f903453c3a2389af918249dbdb5f1199aaecf4931c0366592165b10bdd58eaf706d6df02a39d9323a0c65260ffcc84776f2705e4942d89e4dbefa11c693027002c35582d56e295dcf74d27e90873699657337696b32c05c8014911a7ec8eb03bdbe526fe658be8abdf50ab12c4fec9ddeefc489cf817721c8e541d28fbe71e32137b5ea066a9f4e19814deedeb360def90eff2965570aab5fedd0ebfcd783ce3289360953680ac084b2e988c9cbd0912da400861467d7bb5ad4b42a95c2d541653e805cbfc84da401baf096fba43300358421ae1b43fd25f3289c8c73489977592f75bc9f73781f41718a752ab325b70c8eb2011c5d979f6efc7a76e16492566e43d94dbd42698eb06ff8ad4fd3f2baabafded"
|
||||
}
|
||||
|
||||
⛰ lncli --network=simnet exportchanbackup --all --output_file=channel.backup
|
||||
$ lncli --network=simnet exportchanbackup --all --output_file=channel.backup
|
||||
```
|
||||
|
||||
As shown above, a user can either: specify a specific channel to backup, backup
|
||||
@ -297,13 +297,13 @@ schemes, compared to the file system notification based approach.
|
||||
If a node is being created from scratch, then it's possible to pass in an
|
||||
existing SCB using the `lncli create` or `lncli unlock` commands:
|
||||
```shell
|
||||
⛰ lncli create -multi_file=channel.backup
|
||||
$ lncli create -multi_file=channel.backup
|
||||
```
|
||||
|
||||
Alternatively, the `restorechanbackup` command can be used if `lnd` has already
|
||||
been created at the time of SCB restoration:
|
||||
```shell
|
||||
⛰ lncli restorechanbackup -h
|
||||
$ lncli restorechanbackup -h
|
||||
NAME:
|
||||
lncli restorechanbackup - Restore an existing single or multi-channel static channel backup
|
||||
|
||||
|
@ -20,10 +20,10 @@ helper image.
|
||||
To build a release, run the following commands:
|
||||
|
||||
```shell
|
||||
⛰ git clone https://github.com/lightningnetwork/lnd.git
|
||||
⛰ cd lnd
|
||||
⛰ git checkout <TAG> # <TAG> is the name of the next release/tag
|
||||
⛰ make docker-release tag=<TAG>
|
||||
$ git clone https://github.com/lightningnetwork/lnd.git
|
||||
$ cd lnd
|
||||
$ git checkout <TAG> # <TAG> is the name of the next release/tag
|
||||
$ make docker-release tag=<TAG>
|
||||
```
|
||||
|
||||
Where `<TAG>` is the name of the next release of `lnd`.
|
||||
@ -36,10 +36,10 @@ binaries at the moment is by using the Windows Subsystem Linux. One can build
|
||||
the release binaries following these steps:
|
||||
|
||||
```shell
|
||||
⛰ git clone https://github.com/lightningnetwork/lnd.git
|
||||
⛰ cd lnd
|
||||
⛰ git checkout <TAG> # <TAG> is the name of the next release/tag
|
||||
⛰ make release tag=<TAG>
|
||||
$ git clone https://github.com/lightningnetwork/lnd.git
|
||||
$ cd lnd
|
||||
$ git checkout <TAG> # <TAG> is the name of the next release/tag
|
||||
$ make release tag=<TAG>
|
||||
```
|
||||
|
||||
This will then create a directory of the form `lnd-<TAG>` containing archives
|
||||
@ -99,10 +99,10 @@ script in the image that can be called (before starting the container for
|
||||
example):
|
||||
|
||||
```shell
|
||||
⛰ docker run --rm --entrypoint="" lightninglabs/lnd:v0.12.1-beta /verify-install.sh v0.12.1-beta
|
||||
⛰ OK=$?
|
||||
⛰ if [ "$OK" -ne "0" ]; then echo "Verification failed!"; exit 1; done
|
||||
⛰ docker run lightninglabs/lnd [command-line options]
|
||||
$ docker run --rm --entrypoint="" lightninglabs/lnd:v0.12.1-beta /verify-install.sh v0.12.1-beta
|
||||
$ OK=$?
|
||||
$ if [ "$OK" -ne "0" ]; then echo "Verification failed!"; exit 1; done
|
||||
$ docker run lightninglabs/lnd [command-line options]
|
||||
```
|
||||
|
||||
# Signing an Existing Manifest File
|
||||
@ -121,5 +121,5 @@ signature during signing.
|
||||
Assuming `USERNAME` is your current nick as a developer, then the following
|
||||
command will generate a proper signature:
|
||||
```shell
|
||||
⛰ gpg --detach-sig --output manifest-USERNAME-TAG.sig manifest-TAG.txt
|
||||
$ gpg --detach-sig --output manifest-USERNAME-TAG.sig manifest-TAG.txt
|
||||
```
|
||||
|
@ -86,7 +86,7 @@ After successfully starting up "signer", the following command can be run to
|
||||
export the `xpub`s of the wallet:
|
||||
|
||||
```shell
|
||||
signer> ⛰ lncli wallet accounts list > accounts-signer.json
|
||||
signer> $ lncli wallet accounts list > accounts-signer.json
|
||||
```
|
||||
|
||||
That `accounts-signer.json` file has to be copied to the machine on which
|
||||
@ -97,7 +97,7 @@ A custom macaroon can be baked for the watch-only node so it only gets the
|
||||
minimum required permissions on the signer instance:
|
||||
|
||||
```shell
|
||||
signer> ⛰ lncli bakemacaroon --save_to signer.custom.macaroon \
|
||||
signer> $ lncli bakemacaroon --save_to signer.custom.macaroon \
|
||||
message:write signer:generate address:read onchain:write
|
||||
```
|
||||
|
||||
@ -124,7 +124,7 @@ After starting "watch-only", the wallet can be created in watch-only mode by
|
||||
running:
|
||||
|
||||
```shell
|
||||
watch-only> ⛰ lncli createwatchonly accounts-signer.json
|
||||
watch-only> $ lncli createwatchonly accounts-signer.json
|
||||
|
||||
Input wallet password:
|
||||
Confirm password:
|
||||
@ -186,7 +186,7 @@ using the command line. This can be done by using the new `x` option during the
|
||||
interactive `lncli create` command:
|
||||
|
||||
```bash
|
||||
signer> ⛰ lncli create
|
||||
signer> $ lncli create
|
||||
Input wallet password:
|
||||
Confirm password:
|
||||
|
||||
|
@ -21,7 +21,7 @@ through the command line](#unlocking-a-wallet) or (starting with `lnd` version
|
||||
|
||||
If `lnd` is being run for the first time, create a new wallet with:
|
||||
```shell
|
||||
⛰ lncli create
|
||||
$ lncli create
|
||||
```
|
||||
This will prompt for a wallet password, and optionally a cipher seed
|
||||
passphrase.
|
||||
@ -48,7 +48,7 @@ This will be indicated in `lnd`'s log with a message like this:
|
||||
|
||||
Unlocking the password manually is as simple as running the command
|
||||
```shell
|
||||
⛰ lncli unlock
|
||||
$ lncli unlock
|
||||
```
|
||||
and then typing the wallet password.
|
||||
|
||||
@ -71,27 +71,27 @@ though where the secrets are mounted to a file anyway.
|
||||
|
||||
- Start `lnd` without the flag:
|
||||
```shell
|
||||
⛰ lnd --bitcoin.active --bitcoin.xxxx .....
|
||||
$ lnd --bitcoin.active --bitcoin.xxxx .....
|
||||
```
|
||||
- Create the wallet and write down the seed in a safe place:
|
||||
```shell
|
||||
⛰ lncli create
|
||||
$ lncli create
|
||||
```
|
||||
- Stop `lnd` again:
|
||||
```shell
|
||||
⛰ lncli stop
|
||||
$ lncli stop
|
||||
```
|
||||
- Write the password to a file:
|
||||
```shell
|
||||
⛰ echo 'my-$up3r-Secret-Passw0rd' > /some/safe/location/password.txt
|
||||
$ echo 'my-$up3r-Secret-Passw0rd' > /some/safe/location/password.txt
|
||||
```
|
||||
- Make sure the password file can only be read by our user:
|
||||
```shell
|
||||
⛰ chmod 0400 /some/safe/location/password.txt
|
||||
$ chmod 0400 /some/safe/location/password.txt
|
||||
```
|
||||
- Start `lnd` with the auto-unlock flag:
|
||||
```shell
|
||||
⛰ lnd --bitcoin.active --bitcoin.xxxx ..... \
|
||||
$ lnd --bitcoin.active --bitcoin.xxxx ..... \
|
||||
--wallet-unlock-password-file=/some/safe/location/password.txt
|
||||
```
|
||||
|
||||
@ -119,19 +119,19 @@ example here but it should work similarly with other password managers.
|
||||
|
||||
- Start `lnd` without the flag:
|
||||
```shell
|
||||
⛰ lnd --bitcoin.active --bitcoin.xxxx .....
|
||||
$ lnd --bitcoin.active --bitcoin.xxxx .....
|
||||
```
|
||||
- Create the wallet and write down the seed in a safe place:
|
||||
```shell
|
||||
⛰ lncli create
|
||||
$ lncli create
|
||||
```
|
||||
- Stop `lnd` again:
|
||||
```shell
|
||||
⛰ lncli stop
|
||||
$ lncli stop
|
||||
```
|
||||
- Store the password in `pass`:
|
||||
```shell
|
||||
⛰ pass insert lnd/my-wallet-password
|
||||
$ pass insert lnd/my-wallet-password
|
||||
```
|
||||
- Create a startup script for starting `lnd`, for example `run-lnd.sh`:
|
||||
```shell
|
||||
@ -155,7 +155,7 @@ example here but it should work similarly with other password managers.
|
||||
```
|
||||
- Run the startup script instead of running `lnd` directly.
|
||||
```shell
|
||||
⛰ ./run-lnd.sh
|
||||
$ ./run-lnd.sh
|
||||
```
|
||||
|
||||
## Changing the password
|
||||
@ -165,7 +165,7 @@ So after restarting `lnd`, instead of using the `unlock` command, the
|
||||
`changepassword` command can be used:
|
||||
|
||||
```shell
|
||||
⛰ lncli changepassword
|
||||
$ lncli changepassword
|
||||
```
|
||||
|
||||
This will ask for the old/existing password and a new one. If successful, the
|
||||
|
@ -45,7 +45,7 @@ Retrieving information about your tower’s configurations can be done using
|
||||
`lncli tower info`:
|
||||
|
||||
```shell
|
||||
⛰ lncli tower info
|
||||
$ lncli tower info
|
||||
{
|
||||
"pubkey": "03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63",
|
||||
"listeners": [
|
||||
@ -60,7 +60,7 @@ The entire set of watchtower configuration options can be found using
|
||||
`lnd -h`:
|
||||
|
||||
```shell
|
||||
⛰ lnd -h
|
||||
$ lnd -h
|
||||
...
|
||||
watchtower:
|
||||
--watchtower.active If the watchtower should be active or not
|
||||
@ -88,7 +88,7 @@ Additionally, users can specify their tower’s external IP address(es) using
|
||||
(pubkey@host:port) over RPC or `lncli tower info`:
|
||||
|
||||
```shell
|
||||
⛰ lncli tower info
|
||||
$ lncli tower info
|
||||
...
|
||||
"uris": [
|
||||
"03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63@1.2.3.4:9911"
|
||||
@ -99,7 +99,7 @@ The watchtower's URIs can be given to clients in order to connect and use the
|
||||
tower with the following command:
|
||||
|
||||
```shell
|
||||
⛰ lncli wtclient add 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63@1.2.3.4:9911
|
||||
$ lncli wtclient add 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63@1.2.3.4:9911
|
||||
```
|
||||
|
||||
If the watchtower's clients will need remote access, be sure to either:
|
||||
@ -113,13 +113,13 @@ Watchtowers have tor hidden service support and can automatically generate a
|
||||
hidden service on startup with the following flags:
|
||||
|
||||
```shell
|
||||
⛰ lnd --tor.active --tor.v3 --watchtower.active
|
||||
$ lnd --tor.active --tor.v3 --watchtower.active
|
||||
```
|
||||
|
||||
The onion address is then shown in the "uris" field when queried with `lncli tower info`:
|
||||
|
||||
```shell
|
||||
⛰ lncli tower info
|
||||
$ lncli tower info
|
||||
...
|
||||
"uris": [
|
||||
"03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63@bn2kxggzjysvsd5o3uqe4h7655u7v2ydhxzy7ea2fx26duaixlwuguad.onion:9911"
|
||||
@ -150,13 +150,13 @@ In order to set up a watchtower client, you’ll need two things:
|
||||
1. The watchtower client must be enabled with the `--wtclient.active` flag.
|
||||
|
||||
```shell
|
||||
⛰ lnd --wtclient.active
|
||||
$ lnd --wtclient.active
|
||||
```
|
||||
|
||||
2. The watchtower URI of an active watchtower.
|
||||
|
||||
```shell
|
||||
⛰ lncli wtclient add 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63@1.2.3.4:9911
|
||||
$ lncli wtclient add 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63@1.2.3.4:9911
|
||||
```
|
||||
|
||||
Multiple watchtowers can be configured through this method.
|
||||
@ -181,7 +181,7 @@ determine whether it is currently being used for backups through the
|
||||
`active_session_candidate` value.
|
||||
|
||||
```shell
|
||||
⛰ lncli wtclient tower 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63
|
||||
$ lncli wtclient tower 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63
|
||||
{
|
||||
"pubkey": "03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63",
|
||||
"addresses": [
|
||||
@ -197,7 +197,7 @@ To obtain information about the watchtower's sessions, users can use the
|
||||
`--include_sessions` flag.
|
||||
|
||||
```shell
|
||||
⛰ lncli wtclient tower --include_sessions 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63
|
||||
$ lncli wtclient tower --include_sessions 03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63
|
||||
{
|
||||
"pubkey": "03281d603b2c5e19b8893a484eb938d7377179a9ef1a6bca4c0bcbbfc291657b63",
|
||||
"addresses": [
|
||||
@ -220,7 +220,7 @@ The entire set of watchtower client configuration options can be found with
|
||||
`lncli wtclient -h`:
|
||||
|
||||
```shell
|
||||
⛰ lncli wtclient -h
|
||||
$ lncli wtclient -h
|
||||
NAME:
|
||||
lncli wtclient - Interact with the watchtower client.
|
||||
|
||||
|
@ -148,7 +148,7 @@ description):
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/lnrpc
|
||||
$ go get -u github.com/lightningnetwork/lnd/lnrpc
|
||||
```
|
||||
|
||||
## Generate protobuf definitions
|
||||
|
@ -22,5 +22,5 @@ with the interface.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/lnwallet
|
||||
$ go get -u github.com/lightningnetwork/lnd/lnwallet
|
||||
```
|
||||
|
@ -14,5 +14,5 @@ protocol level.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/lnwire
|
||||
$ go get -u github.com/lightningnetwork/lnd/lnwire
|
||||
```
|
||||
|
@ -99,7 +99,7 @@ For example, a macaroon that is only allowed to manage peers with a default root
|
||||
key `0` would be created with the following command:
|
||||
|
||||
```shell
|
||||
⛰ lncli bakemacaroon peers:read peers:write
|
||||
$ lncli bakemacaroon peers:read peers:write
|
||||
```
|
||||
|
||||
For even more fine-grained permission control, it is also possible to specify
|
||||
@ -107,7 +107,7 @@ single RPC method URIs that are allowed to be accessed by a macaroon. This can
|
||||
be achieved by passing `uri:<methodURI>` pairs to `bakemacaroon`, for example:
|
||||
|
||||
```shell
|
||||
⛰ lncli bakemacaroon uri:/lnrpc.Lightning/GetInfo uri:/verrpc.Versioner/GetVersion
|
||||
$ lncli bakemacaroon uri:/lnrpc.Lightning/GetInfo uri:/verrpc.Versioner/GetVersion
|
||||
```
|
||||
|
||||
The macaroon created by this call would only be allowed to call the `GetInfo` and
|
||||
@ -137,13 +137,13 @@ To manage the root keys used by macaroons, there are `listmacaroonids` and
|
||||
Users can view a list of all macaroon root key IDs that are in use using:
|
||||
|
||||
```shell
|
||||
⛰ lncli listmacaroonids
|
||||
$ lncli listmacaroonids
|
||||
```
|
||||
|
||||
And remove a specific macaroon root key ID using command:
|
||||
|
||||
```shell
|
||||
⛰ lncli deletemacaroonid root_key_id
|
||||
$ lncli deletemacaroonid root_key_id
|
||||
```
|
||||
|
||||
Be careful with the `deletemacaroonid` command as when a root key is deleted,
|
||||
|
@ -19,9 +19,9 @@ Then, install [Go mobile](https://github.com/golang/go/wiki/Mobile) and
|
||||
initialize it:
|
||||
|
||||
```shell
|
||||
⛰ go install golang.org/x/mobile/cmd/gomobile@latest
|
||||
⛰ go mod download golang.org/x/mobile
|
||||
⛰ gomobile init
|
||||
$ go install golang.org/x/mobile/cmd/gomobile@latest
|
||||
$ go mod download golang.org/x/mobile
|
||||
$ gomobile init
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```shell
|
||||
⛰ make --version
|
||||
$ make --version
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
```shell
|
||||
⛰ go env -w GO111MODULE="off"
|
||||
⛰ go get github.com/lightningnetwork/lnd
|
||||
⛰ go get golang.org/x/mobile/bind
|
||||
⛰ go env -w GO111MODULE="on"
|
||||
$ go env -w GO111MODULE="off"
|
||||
$ go get github.com/lightningnetwork/lnd
|
||||
$ go get golang.org/x/mobile/bind
|
||||
$ go env -w GO111MODULE="on"
|
||||
```
|
||||
|
||||
Finally, let’s change directory to the newly created lnd folder inside `$GOPATH`:
|
||||
|
||||
```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
|
||||
the latest tagged release of lnd, run
|
||||
|
||||
```shell
|
||||
⛰ git checkout $(git describe --match "v[0-9]*" --abbrev=0)
|
||||
$ git checkout $(git describe --match "v[0-9]*" --abbrev=0)
|
||||
```
|
||||
|
||||
### iOS
|
||||
|
||||
```shell
|
||||
⛰ make ios
|
||||
$ make ios
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
```shell
|
||||
⛰ make android
|
||||
$ make android
|
||||
```
|
||||
|
||||
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 you’d like
|
||||
to move them to the same folder as the framework file, run
|
||||
|
||||
```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
|
||||
|
@ -13,5 +13,5 @@ channel graph state.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/routing
|
||||
$ go get -u github.com/lightningnetwork/lnd/routing
|
||||
```
|
||||
|
@ -17,5 +17,5 @@ onion services, asynchronous messages, etc.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/tor
|
||||
$ go get -u github.com/lightningnetwork/lnd/tor
|
||||
```
|
||||
|
@ -18,5 +18,5 @@ to send.
|
||||
## Installation and Updating
|
||||
|
||||
```shell
|
||||
⛰ go get -u github.com/lightningnetwork/lnd/zpay32
|
||||
$ go get -u github.com/lightningnetwork/lnd/zpay32
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user