Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ Example (make sure you always use the latest version!):

```shell
$ cd /tmp
$ wget -O chantools.tar.gz https://github.com/lightninglabs/chantools/releases/download/v0.14.1/chantools-linux-amd64-v0.14.1.tar.gz
$ wget -O chantools.tar.gz https://github.com/lightninglabs/chantools/releases/download/v0.14.2/chantools-linux-amd64-v0.14.2.tar.gz
$ tar -zxvf chantools.tar.gz
$ sudo mv chantools-*/chantools /usr/local/bin/
```

### Compile from source

If there isn't a pre-built binary for your operating system or architecture
available or you want to build `chantools` from source for another reason, you
need to make sure you have `go 1.23.6` (or later) and `make` installed and can
available, or you want to build `chantools` from source for another reason, you
need to make sure you have `go 1.24.0` (or later) and `make` installed and can
then run the following commands:

```shell
Expand Down
10 changes: 9 additions & 1 deletion cmd/chantools/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
// version is the current version of the tool. It is set during build.
// NOTE: When changing this, please also update the version in the
// download link shown in the README.
version = "0.14.1"
version = "0.14.2"
na = "n/a"

// lndVersion is the current version of lnd that we support. This is
Expand All @@ -49,6 +49,7 @@ const (

var (
Testnet bool
Testnet4 bool
Regtest bool
Signet bool
NoLogFile bool
Expand All @@ -72,6 +73,9 @@ https://github.com/lightninglabs/chantools/.`,
case Testnet:
chainParams = &chaincfg.TestNet3Params

case Testnet4:
chainParams = &chaincfg.TestNet4Params

case Regtest:
chainParams = &chaincfg.RegressionNetParams

Expand All @@ -95,6 +99,10 @@ func main() {
&Testnet, "testnet", "t", false, "Indicates if testnet "+
"parameters should be used",
)
rootCmd.PersistentFlags().BoolVar(
&Testnet4, "testnet4", false, "Indicates if testnet4 "+
"parameters should be used",
)
rootCmd.PersistentFlags().BoolVarP(
&Regtest, "regtest", "r", false, "Indicates if regtest "+
"parameters should be used",
Expand Down
2 changes: 2 additions & 0 deletions doc/chantools.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ https://github.com/lightninglabs/chantools/.
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO

* [chantools chanbackup](chantools_chanbackup.md) - Create a channel.backup file from a channel database
* [chantools closepoolaccount](chantools_closepoolaccount.md) - Tries to close a Pool account that has expired
* [chantools compactdb](chantools_compactdb.md) - Create a copy of a channel.db file in safe/read-only mode
* [chantools completion](chantools_completion.md) - Generate the autocompletion script for the specified shell
* [chantools createwallet](chantools_createwallet.md) - Create a new lnd compatible wallet.db file from an existing seed or by generating a new one
* [chantools deletepayments](chantools_deletepayments.md) - Remove all (failed) payments from a channel DB
* [chantools derivekey](chantools_derivekey.md) - Derive a key with a specific derivation path
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_chanbackup.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ chantools chanbackup \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_closepoolaccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ chantools closepoolaccount \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_compactdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ chantools compactdb \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
35 changes: 35 additions & 0 deletions doc/chantools_completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## chantools completion

Generate the autocompletion script for the specified shell

### Synopsis

Generate the autocompletion script for chantools for the specified shell.
See each sub-command's help for details on how to use the generated script.


### Options

```
-h, --help help for completion
```

### Options inherited from parent commands

```
--nologfile If set, no log file will be created. This is useful for testing purposes where we don't want to create a log file.
-r, --regtest Indicates if regtest parameters should be used
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO

* [chantools](chantools.md) - Chantools helps recover funds from lightning channels
* [chantools completion bash](chantools_completion_bash.md) - Generate the autocompletion script for bash
* [chantools completion fish](chantools_completion_fish.md) - Generate the autocompletion script for fish
* [chantools completion powershell](chantools_completion_powershell.md) - Generate the autocompletion script for powershell
* [chantools completion zsh](chantools_completion_zsh.md) - Generate the autocompletion script for zsh

54 changes: 54 additions & 0 deletions doc/chantools_completion_bash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## chantools completion bash

Generate the autocompletion script for bash

### Synopsis

Generate the autocompletion script for the bash shell.

This script depends on the 'bash-completion' package.
If it is not installed already, you can install it via your OS's package manager.

To load completions in your current shell session:

source <(chantools completion bash)

To load completions for every new session, execute once:

#### Linux:

chantools completion bash > /etc/bash_completion.d/chantools

#### macOS:

chantools completion bash > $(brew --prefix)/etc/bash_completion.d/chantools

You will need to start a new shell for this setup to take effect.


```
chantools completion bash
```

### Options

```
-h, --help help for bash
--no-descriptions disable completion descriptions
```

### Options inherited from parent commands

```
--nologfile If set, no log file will be created. This is useful for testing purposes where we don't want to create a log file.
-r, --regtest Indicates if regtest parameters should be used
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO

* [chantools completion](chantools_completion.md) - Generate the autocompletion script for the specified shell

45 changes: 45 additions & 0 deletions doc/chantools_completion_fish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## chantools completion fish

Generate the autocompletion script for fish

### Synopsis

Generate the autocompletion script for the fish shell.

To load completions in your current shell session:

chantools completion fish | source

To load completions for every new session, execute once:

chantools completion fish > ~/.config/fish/completions/chantools.fish

You will need to start a new shell for this setup to take effect.


```
chantools completion fish [flags]
```

### Options

```
-h, --help help for fish
--no-descriptions disable completion descriptions
```

### Options inherited from parent commands

```
--nologfile If set, no log file will be created. This is useful for testing purposes where we don't want to create a log file.
-r, --regtest Indicates if regtest parameters should be used
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO

* [chantools completion](chantools_completion.md) - Generate the autocompletion script for the specified shell

42 changes: 42 additions & 0 deletions doc/chantools_completion_powershell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## chantools completion powershell

Generate the autocompletion script for powershell

### Synopsis

Generate the autocompletion script for powershell.

To load completions in your current shell session:

chantools completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command
to your powershell profile.


```
chantools completion powershell [flags]
```

### Options

```
-h, --help help for powershell
--no-descriptions disable completion descriptions
```

### Options inherited from parent commands

```
--nologfile If set, no log file will be created. This is useful for testing purposes where we don't want to create a log file.
-r, --regtest Indicates if regtest parameters should be used
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO

* [chantools completion](chantools_completion.md) - Generate the autocompletion script for the specified shell

56 changes: 56 additions & 0 deletions doc/chantools_completion_zsh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## chantools completion zsh

Generate the autocompletion script for zsh

### Synopsis

Generate the autocompletion script for the zsh shell.

If shell completion is not already enabled in your environment you will need
to enable it. You can execute the following once:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

source <(chantools completion zsh)

To load completions for every new session, execute once:

#### Linux:

chantools completion zsh > "${fpath[1]}/_chantools"

#### macOS:

chantools completion zsh > $(brew --prefix)/share/zsh/site-functions/_chantools

You will need to start a new shell for this setup to take effect.


```
chantools completion zsh [flags]
```

### Options

```
-h, --help help for zsh
--no-descriptions disable completion descriptions
```

### Options inherited from parent commands

```
--nologfile If set, no log file will be created. This is useful for testing purposes where we don't want to create a log file.
-r, --regtest Indicates if regtest parameters should be used
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO

* [chantools completion](chantools_completion.md) - Generate the autocompletion script for the specified shell

1 change: 1 addition & 0 deletions doc/chantools_createwallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ chantools createwallet \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_deletepayments.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ chantools deletepayments --failedonly \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_derivekey.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ chantools derivekey --identity
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_doublespendinputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ chantools doublespendinputs \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_dropchannelgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ chantools dropchannelgraph \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_dropgraphzombies.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ chantools dropgraphzombies \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_dumpbackup.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ chantools dumpbackup \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_dumpchannels.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ chantools dumpchannels \
--resultsdir string Directory where results should be stored (default "./results")
-s, --signet Indicates if the public signet parameters should be used
-t, --testnet Indicates if testnet parameters should be used
--testnet4 Indicates if testnet4 parameters should be used
```

### SEE ALSO
Expand Down
Loading