mirror of
https://github.com/guggero/chantools.git
synced 2026-08-13 12:33:34 +02:00
Merge pull request #210 from guggero/command-generator
doc: add static command generator helper page
This commit is contained in:
commit
4d8a75f3ef
55 changed files with 2379 additions and 166 deletions
7
Makefile
7
Makefile
|
|
@ -89,6 +89,11 @@ docker-tools:
|
|||
@$(call print, "Building tools docker image.")
|
||||
docker build -q -t chantools-tools $(TOOLS_DIR)
|
||||
|
||||
command-generator-build:
|
||||
@$(call print, "Building command generator.")
|
||||
cd doc/command-generator; npm install && npm run build
|
||||
mv doc/command-generator/dist/index.html doc/command-generator.html
|
||||
|
||||
fmt: $(GOIMPORTS_BIN)
|
||||
@$(call print, "Fixing imports.")
|
||||
gosimports -w $(GOFILES_NOVENDOR)
|
||||
|
|
@ -99,7 +104,7 @@ lint: docker-tools
|
|||
@$(call print, "Linting source.")
|
||||
$(DOCKER_TOOLS) golangci-lint run -v $(LINT_WORKERS)
|
||||
|
||||
docs: install
|
||||
docs: install command-generator-build
|
||||
@$(call print, "Rendering docs.")
|
||||
chantools doc
|
||||
|
||||
|
|
|
|||
|
|
@ -12,11 +12,12 @@ https://github.com/lightninglabs/chantools/.
|
|||
### Options
|
||||
|
||||
```
|
||||
-h, --help help for chantools
|
||||
--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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
-h, --help help for chantools
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -33,10 +33,11 @@ chantools chanbackup \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -48,10 +48,11 @@ chantools closepoolaccount \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@ chantools compactdb \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -33,10 +33,11 @@ chantools createwallet \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -34,10 +34,11 @@ chantools deletepayments --failedonly \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ chantools derivekey --identity
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -40,10 +40,11 @@ chantools doublespendinputs \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -44,10 +44,11 @@ chantools dropchannelgraph \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ chantools dropgraphzombies \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@ chantools dumpbackup \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -31,10 +31,11 @@ chantools dumpchannels \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -71,10 +71,11 @@ chantools fakechanbackup --from_channel_graph lncli_describegraph.json \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -33,10 +33,11 @@ chantools filterbackup \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -34,10 +34,11 @@ chantools fixoldbackup \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -51,10 +51,11 @@ chantools forceclose \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -57,10 +57,11 @@ chantools genimportscript --format bitcoin-cli \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -34,10 +34,11 @@ chantools migratedb \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ chantools pullanchor \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -42,10 +42,11 @@ chantools recoverloopin \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ chantools removechannel \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -68,10 +68,11 @@ chantools rescueclosed --fromsummary results/summary-xxxxxx.json \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -56,10 +56,11 @@ chantools rescuefunding \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ chantools rescuetweakedkey \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -46,10 +46,11 @@ chantools scbforceclose --multi_file channel.backup
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -30,10 +30,11 @@ chantools showrootkey
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -30,10 +30,11 @@ chantools signmessage --msg=foobar
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ chantools signpsbt --fromrawpsbtfile <file_with_psbt>
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ chantools signrescuefunding \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ chantools summary --fromchanneldb ~/.lnd/data/graph/mainnet/channel.db
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -50,10 +50,11 @@ chantools sweepremoteclosed \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -48,10 +48,11 @@ chantools sweeptimelock \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -70,10 +70,11 @@ chantools sweeptimelockmanual \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ chantools triggerforceclose \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -41,10 +41,11 @@ chantools vanitygen --prefix 022222 --threads 8
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -38,10 +38,11 @@ chantools walletinfo --withrootkey \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@ chantools zombierecovery [flags]
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -36,10 +36,11 @@ chantools zombierecovery findmatches \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -42,10 +42,11 @@ chantools zombierecovery makeoffer \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -38,10 +38,11 @@ chantools zombierecovery preparekeys \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ chantools zombierecovery signoffer \
|
|||
### 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
|
||||
-s, --signet Indicates if the public signet parameters should be used
|
||||
-t, --testnet Indicates if testnet parameters should be used
|
||||
--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
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
|
|
|||
38
doc/command-generator.html
Normal file
38
doc/command-generator.html
Normal file
File diff suppressed because one or more lines are too long
2
doc/command-generator/.gitignore
vendored
Normal file
2
doc/command-generator/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
dist
|
||||
node_modules
|
||||
13
doc/command-generator/index.html
Normal file
13
doc/command-generator/index.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>chantools command generator</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
1353
doc/command-generator/package-lock.json
generated
Normal file
1353
doc/command-generator/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
21
doc/command-generator/package.json
Normal file
21
doc/command-generator/package.json
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "chantools-command-generator",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"bootstrap": "^5.3.8",
|
||||
"vue": "^3.2.37"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"vite": "^7.1.0",
|
||||
"vite-plugin-singlefile": "^2.3.0"
|
||||
}
|
||||
}
|
||||
59
doc/command-generator/src/App.vue
Normal file
59
doc/command-generator/src/App.vue
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<template>
|
||||
<div id="app" class="container mt-5">
|
||||
<h1 class="mb-4">chantools command generator</h1>
|
||||
<GlobalOptions @global-args-changed="updateGlobalArgs" />
|
||||
<CommandSelector
|
||||
v-if="!selectedCommand"
|
||||
@command-selected="handleCommandSelected"
|
||||
/>
|
||||
<CommandGenerator
|
||||
v-else
|
||||
:command="selectedCommand"
|
||||
:global-args="globalArgs"
|
||||
@back="goBack"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CommandSelector from './components/CommandSelector.vue';
|
||||
import CommandGenerator from './components/CommandGenerator.vue';
|
||||
import GlobalOptions from './components/GlobalOptions.vue';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
CommandSelector,
|
||||
CommandGenerator,
|
||||
GlobalOptions,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedCommand: null,
|
||||
globalArgs: {
|
||||
preCommand: {},
|
||||
command: {},
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleCommandSelected(command) {
|
||||
this.selectedCommand = command;
|
||||
},
|
||||
goBack() {
|
||||
this.selectedCommand = null;
|
||||
},
|
||||
updateGlobalArgs(args) {
|
||||
this.globalArgs = args;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
</style>
|
||||
115
doc/command-generator/src/components/CommandGenerator.vue
Normal file
115
doc/command-generator/src/components/CommandGenerator.vue
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<template>
|
||||
<div>
|
||||
<component
|
||||
:is="command.name"
|
||||
@generate-args="onGenerateArgs"
|
||||
:command="command"
|
||||
v-if="command.name"
|
||||
/>
|
||||
<div class="generated-command mt-4">
|
||||
<h3>Generated Command:</h3>
|
||||
<pre
|
||||
class="alert alert-secondary"
|
||||
><code>{{ generatedCommand }}</code></pre>
|
||||
</div>
|
||||
<button @click="goBack" class="btn btn-secondary mt-3">Back</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SweepRemoteClosed from './SweepRemoteClosed.vue';
|
||||
import TriggerForceClose from './TriggerForceClose.vue';
|
||||
|
||||
function commandString(comp) {
|
||||
let commandName = comp.command.name || '';
|
||||
let globalArgs = comp.globalArgs || {};
|
||||
let pageArgs = comp.pageArgs || {};
|
||||
|
||||
if (!globalArgs.preCommand || !globalArgs.command) {
|
||||
return `chantools ${commandName.toLowerCase()}`;
|
||||
}
|
||||
|
||||
let globalArgsString = '';
|
||||
for (const [key, value] of Object.entries(globalArgs.preCommand)) {
|
||||
if (value) {
|
||||
if (typeof value === 'boolean') {
|
||||
globalArgsString += `--${key} `;
|
||||
} else {
|
||||
globalArgsString += `--${key} ${value} `;
|
||||
}
|
||||
}
|
||||
}
|
||||
let commandArgs = '';
|
||||
for (const [key, value] of Object.entries(globalArgs.command)) {
|
||||
if (value) {
|
||||
if (typeof value === 'boolean') {
|
||||
commandArgs += `--${key} `;
|
||||
} else {
|
||||
commandArgs += `--${key} ${value} `;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const [key, value] of Object.entries(pageArgs)) {
|
||||
if (value) {
|
||||
if (typeof value === 'boolean') {
|
||||
commandArgs += `--${key} `;
|
||||
} else {
|
||||
commandArgs += `--${key} ${value} `;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return `chantools ${globalArgsString}${commandName.toLowerCase()} ${commandArgs.trim()}`;
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'CommandGenerator',
|
||||
components: {
|
||||
SweepRemoteClosed,
|
||||
TriggerForceClose,
|
||||
},
|
||||
props: {
|
||||
command: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
globalArgs: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
preCommand: {},
|
||||
command: {},
|
||||
}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
generatedCommand: commandString(this),
|
||||
pageArgs: {},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
this.$emit('back');
|
||||
},
|
||||
onGenerateArgs(args) {
|
||||
this.pageArgs = args;
|
||||
this.generatedCommand = commandString(this);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
command() {
|
||||
this.generatedCommand = commandString(this);
|
||||
},
|
||||
globalArgs() {
|
||||
this.generatedCommand = commandString(this);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.generated-command pre {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
109
doc/command-generator/src/components/CommandSelector.vue
Normal file
109
doc/command-generator/src/components/CommandSelector.vue
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<template>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">Select a command</h2>
|
||||
<p class="lead">
|
||||
Select a command below that you want to generate the correct arguments
|
||||
for. If you don't know what command to run, the default scenario usually
|
||||
is the following for users that have a defunct Lightning Network node
|
||||
and just want to rescue their funds out of all channels:
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
Run <code>SweepRemoteClosed</code> to collect all funds from
|
||||
channels that were already force-closed by the remote party.
|
||||
</li>
|
||||
<li>
|
||||
For any channels that were not yet force-closed, run
|
||||
<code>TriggerForceClose</code> to ask the remote peer to force-close
|
||||
the channel on your behalf.
|
||||
</li>
|
||||
<li>
|
||||
Wait for the force-close transactions to confirm on-chain.
|
||||
</li>
|
||||
<li>
|
||||
Run <code>SweepRemoteClosed</code> again to collect any funds from
|
||||
the channels that were just force-closed and confirmed in the previous
|
||||
step.
|
||||
</li>
|
||||
</ol>
|
||||
<div class="command-list">
|
||||
<div
|
||||
v-for="command in commands"
|
||||
:key="command.name"
|
||||
class="command-item"
|
||||
@click="selectCommand(command)"
|
||||
>
|
||||
<div class="command-name">{{ command.name }}</div>
|
||||
<div class="command-description">{{ command.description }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CommandSelector',
|
||||
emits: ['command-selected'],
|
||||
data() {
|
||||
return {
|
||||
commands: [
|
||||
{
|
||||
name: 'SweepRemoteClosed',
|
||||
description: 'Scan through all the addresses that could have funds ' +
|
||||
'of channels that were force-closed by the remote party. A ' +
|
||||
'public block explorer API is queried for each potential ' +
|
||||
'address and if any balance is found, all funds are swept to ' +
|
||||
'the provided address.',
|
||||
},
|
||||
{
|
||||
name: 'TriggerForceClose',
|
||||
description: 'Attempt to connect to a Lightning Network peer and ' +
|
||||
'ask them to trigger a force close of the specified channel. ' +
|
||||
'Requires the peer to be online, reachable and still have the ' +
|
||||
'channel data.',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectCommand(command) {
|
||||
this.$emit('command-selected', command);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.command-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.command-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.command-item:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.command-name {
|
||||
font-weight: bold;
|
||||
min-width: 200px;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.command-description {
|
||||
flex-grow: 1;
|
||||
}
|
||||
</style>
|
||||
169
doc/command-generator/src/components/GlobalOptions.vue
Normal file
169
doc/command-generator/src/components/GlobalOptions.vue
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
<template>
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">Global Options</h2>
|
||||
<div class="row form-group">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="seed_source" class="form-label">Seed source</label>
|
||||
<select
|
||||
class="form-select"
|
||||
id="seed_source"
|
||||
v-model="args.seedSource"
|
||||
@input="updateGlobalArgs"
|
||||
@keyup="updateGlobalArgs"
|
||||
>
|
||||
<option value="terminal">
|
||||
Enter seed manually in terminal when asked by chantools
|
||||
</option>
|
||||
<option value="cln">Derive from CLN hsm_secret</option>
|
||||
<option value="rootkey">Use extended root key (xpriv)</option>
|
||||
<option value="walletdb">Extract from LND wallet database</option>
|
||||
</select>
|
||||
<div class="form-text">
|
||||
How you want to provide your LN node secret seed phrase to
|
||||
<code>chantools</code> (which is required for almost all commands).
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3" v-if="args.seedSource === 'rootkey'">
|
||||
<label for="rootkey" class="form-label">
|
||||
Extended root key (xpriv)
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="rootkey"
|
||||
v-model="args.rootkey"
|
||||
@input="updateGlobalArgs"
|
||||
@keyup="updateGlobalArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The BIP32 HD extended root private key (xpriv) to use for deriving
|
||||
the multisig keys; must be in standard Base58 format starting with
|
||||
<code>xprv</code>, <code>tprv</code>, <code>yprv</code> or
|
||||
<code>zprv</code>.
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3" v-if="args.seedSource === 'cln'">
|
||||
<label for="hsm_secret" class="form-label">HSM secret</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="hsm_secret"
|
||||
v-model="args.hsm_secret"
|
||||
@input="updateGlobalArgs"
|
||||
@keyup="updateGlobalArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The hex encoded HSM secret to use for deriving the multisig keys for
|
||||
a CLN node; obtain by running <code>xxd -p -c32
|
||||
~/.lightning/bitcoin/hsm_secret</code> on the machine you're running
|
||||
CLN on.
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3" v-if="args.seedSource === 'walletdb'">
|
||||
<label for="walletdb" class="form-label">Wallet database file</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="walletdb"
|
||||
v-model="args.walletdb"
|
||||
@input="updateGlobalArgs"
|
||||
@keyup="updateGlobalArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The full path to the LND wallet database file (wallet.db); typically
|
||||
located at <code>~/.lnd/data/chain/bitcoin/mainnet/wallet.db</code>.
|
||||
Currently only supports <code>bbolt</code>! SQLite databases are not
|
||||
yet supported.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="apiurl" class="form-label">API URL</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="apiurl"
|
||||
v-model="args.apiurl"
|
||||
@input="updateGlobalArgs"
|
||||
@keyup="updateGlobalArgs"
|
||||
placeholder="https://api.node-recovery.com"
|
||||
/>
|
||||
<div class="form-text">
|
||||
URL to use for address lookups (must be <code>esplora</code>
|
||||
compatible). Use your own if available for better privacy.
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3 form-group">
|
||||
<label for="network">Bitcoin network</label>
|
||||
<select
|
||||
class="form-select"
|
||||
id="network"
|
||||
v-model="args.network"
|
||||
@change="updateGlobalArgs"
|
||||
>
|
||||
<option value="mainnet">mainnet</option>
|
||||
<option value="testnet">testnet</option>
|
||||
<option value="regtest">regtest</option>
|
||||
<option value="signet">signet</option>
|
||||
</select>
|
||||
<div class="form-text">
|
||||
What Bitcoin network to use.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const defaultValues = {
|
||||
apiurl: 'https://api.node-recovery.com',
|
||||
seedSource: 'terminal',
|
||||
network: 'mainnet',
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'GlobalOptions',
|
||||
emits: ['global-args-changed'],
|
||||
data() {
|
||||
return {
|
||||
args: {
|
||||
apiurl: defaultValues.apiurl,
|
||||
seedSource: defaultValues.seedSource,
|
||||
hsm_secret: '',
|
||||
rootkey: '',
|
||||
walletdb: '',
|
||||
network: defaultValues.network,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updateGlobalArgs() {
|
||||
let args = {
|
||||
preCommand: {},
|
||||
command: {},
|
||||
};
|
||||
for (const [key, value] of Object.entries(this.args)) {
|
||||
// The dropdown is converted into single booleans.
|
||||
if (key === 'network' && value !== defaultValues.network) {
|
||||
args.preCommand[value] = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// The seed source is a "virtual" argument that translates into other
|
||||
// args.
|
||||
if (key === 'seedSource' && value !== defaultValues.seedSource) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (value && value !== defaultValues[key]) {
|
||||
args.command[key] = value;
|
||||
}
|
||||
}
|
||||
this.$emit('global-args-changed', args);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
160
doc/command-generator/src/components/SweepRemoteClosed.vue
Normal file
160
doc/command-generator/src/components/SweepRemoteClosed.vue
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
<template>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">SweepRemoteClosed command</h2>
|
||||
<p class="lead">
|
||||
{{command.description}}
|
||||
</p>
|
||||
<form @submit.prevent="generateArgs" @change="generateArgs">
|
||||
<div class="mb-3">
|
||||
<label for="sweepaddr" class="form-label">Sweep address</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="sweepaddr"
|
||||
v-model="args.sweepaddr"
|
||||
:class="{ 'is-invalid': !args.sweepaddr }"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The address to send any recovered funds to; specify 'fromseed' to
|
||||
derive a new address from the seed automatically.
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="feerate" class="form-label">Fee rate (sat/vByte)</label>
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
id="feerate"
|
||||
v-model="args.feerate"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The fee rate to use for the sweep transaction in sat/vByte.
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="publish"
|
||||
v-model="args.publish"
|
||||
@change="generateArgs"
|
||||
/>
|
||||
<label class="form-check-label" for="publish">
|
||||
Publish transaction automatically
|
||||
</label>
|
||||
<div class="form-text">
|
||||
If the created sweep transaction should be published automatically
|
||||
to the chain API instead of just printing the TX.
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="recoverywindow" class="form-label">Recovery window</label>
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
id="recoverywindow"
|
||||
v-model="args.recoverywindow"
|
||||
@change="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The number of keys to scan per derivation path. Adjust to match the
|
||||
approximate number of channels the node had during its lifetime.
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-secondary" type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#advancedOptions">
|
||||
Show advanced options
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse" id="advancedOptions">
|
||||
<div class="mb-3">
|
||||
<label for="known_outputs" class="form-label">Known outputs</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="known_outputs"
|
||||
v-model="args.known_outputs"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
A comma separated list of known output addresses to use for matching
|
||||
against, instead of querying the API; can also be a file name to a
|
||||
file that contains the known outputs, one per line.
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="peers" class="form-label">Peer public keys</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="peers"
|
||||
v-model="args.peers"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
comma separated list of hex encoded public keys of the remote peers
|
||||
to recover funds from, only required when using --hsm_secret to
|
||||
derive the keys; can also be a file name to a file that contains the
|
||||
public keys, one per line
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const defaultValues = {
|
||||
feerate: 30,
|
||||
recoverywindow: 200,
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'SweepRemoteClosed',
|
||||
emits: ['generate-args'],
|
||||
props: {
|
||||
command: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
args: {
|
||||
feerate: defaultValues.feerate,
|
||||
known_outputs: '',
|
||||
peers: '',
|
||||
publish: defaultValues.publish,
|
||||
recoverywindow: defaultValues.recoverywindow,
|
||||
sweepaddr: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
generateArgs() {
|
||||
let args = {};
|
||||
for (const [key, value] of Object.entries(this.args)) {
|
||||
// We skip default values to make the commands shorter.
|
||||
if (defaultValues[key] && value === defaultValues[key]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (value !== '') {
|
||||
args[key] = value;
|
||||
}
|
||||
}
|
||||
this.$emit('generate-args', args);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
114
doc/command-generator/src/components/TriggerForceClose.vue
Normal file
114
doc/command-generator/src/components/TriggerForceClose.vue
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<template>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title">TriggerForceClose</h2>
|
||||
<p class="lead">
|
||||
{{command.description}}
|
||||
</p>
|
||||
<form @submit.prevent="generateArgs" @change="generateArgs">
|
||||
<div class="mb-3">
|
||||
<label for="channel_point" class="form-label">
|
||||
Channel Point
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="channel_point"
|
||||
v-model="args.channel_point"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The funding transaction outpoint of the channel to trigger the force
|
||||
close of (<txid>:<txindex>).
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="peer" class="form-label">Peer URI</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="peer"
|
||||
v-model="args.peer"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
The remote peer's full address (<pubkey>@<host>[:<port>]).
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="torproxy" class="form-label">Tor proxy address</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="torproxy"
|
||||
v-model="args.torproxy"
|
||||
@change="generateArgs"
|
||||
@keyup="generateArgs"
|
||||
/>
|
||||
<div class="form-text">
|
||||
SOCKS5 proxy to use for Tor connections (to .onion addresses).
|
||||
Usually this is <code>localhost:9050</code> if a Tor daemon is
|
||||
running on the same machine as <code>chantools</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-secondary" type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#advancedOptions">
|
||||
Show advanced options
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse" id="advancedOptions">
|
||||
<div class="mb-3 form-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="all_public_channels"
|
||||
v-model="args.all_public_channels"
|
||||
@change="generateArgs"
|
||||
/>
|
||||
<label class="form-check-label" for="all_public_channels">
|
||||
Attempt to close all public channels
|
||||
</label>
|
||||
<div class="form-text">
|
||||
Query all public channels from the Amboss API and attempt to
|
||||
trigger a force close for each of them.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'TriggerForceClose',
|
||||
emits: ['generate-args'],
|
||||
props: {
|
||||
command: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
args: {
|
||||
all_public_channels: false,
|
||||
channel_point: '',
|
||||
peer: '',
|
||||
torproxy: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
generateArgs() {
|
||||
this.$emit('generate-args', this.args);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
6
doc/command-generator/src/main.js
Normal file
6
doc/command-generator/src/main.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import 'bootstrap/dist/css/bootstrap.css'
|
||||
import 'bootstrap/dist/js/bootstrap.bundle.js'
|
||||
|
||||
createApp(App).mount('#app')
|
||||
8
doc/command-generator/vite.config.js
Normal file
8
doc/command-generator/vite.config.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import {defineConfig} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import {viteSingleFile} from 'vite-plugin-singlefile'
|
||||
|
||||
// See https://vitejs.dev/config/ for more details.
|
||||
export default defineConfig({
|
||||
plugins: [vue(), viteSingleFile()],
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue