2019-08-10 02:12:44 +02:00
|
|
|
|
.TH "LIGHTNING-CLI" "1" "" "" "lightning-cli"
|
|
|
|
|
.SH NAME
|
|
|
|
|
lightning-cli - Control lightning daemon
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
|
|
|
|
|
\fBlightning-cli\fR [\fIOPTIONS\fR] \fIcommand\fR…
|
|
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
|
|
|
|
|
\fBlightning-cli\fR sends commands to the lightning daemon\.
|
|
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
|
|
|
|
|
\fB--lightning-dir\fR=\fIDIR\fR
|
|
|
|
|
Set the directory for the lightning daemon we’re talking to; defaults to
|
|
|
|
|
\fI$HOME/\.lightning\fR\.
|
|
|
|
|
|
|
|
|
|
|
2019-11-23 02:45:53 +01:00
|
|
|
|
\fB--conf\fR=\fIPATH\fR
|
|
|
|
|
Sets configuration file (default: \fBlightning-dir\fR/\fIconfig\fR )\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--network\fR=\fInetwork\fR
|
|
|
|
|
\fB--mainnet\fR
|
|
|
|
|
\fB--testnet\fR
|
|
|
|
|
\fB--signet\fR
|
|
|
|
|
Sets network explicitly\.
|
|
|
|
|
|
|
|
|
|
|
2019-08-10 02:12:44 +02:00
|
|
|
|
\fB--rpc-file\fR=\fIFILE\fR
|
2017-12-28 14:40:01 +01:00
|
|
|
|
Named pipe to use to talk to lightning daemon: default is
|
2019-08-10 02:12:44 +02:00
|
|
|
|
\fIlightning-rpc\fR in the lightning directory\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--keywords\fR/\fB-k\fR
|
|
|
|
|
Use format \fIkey\fR=\fIvalue\fR for parameters in any order
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--order\fR/\fB-o\fR
|
2018-02-12 00:25:43 +01:00
|
|
|
|
Follow strictly the order of parameters for the command
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--json\fR/\fB-J\fR
|
2020-05-11 03:11:51 +02:00
|
|
|
|
Return result in JSON format (default unless \fIhelp\fR command,
|
|
|
|
|
or result contains a \fBformat-hint\fR field)\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--raw\fR/\fB-R\fR
|
2020-05-11 03:11:51 +02:00
|
|
|
|
Return raw JSON directly as lightningd replies; this can be faster for
|
|
|
|
|
large requests\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--human-readable\fR/\fB-H\fR
|
2020-05-11 03:11:51 +02:00
|
|
|
|
Return result in human-readable output\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--flat\fR/\fB-F\fR
|
|
|
|
|
Return JSON result in flattened one-per-line output, e\.g\. \fB{ "help":
|
|
|
|
|
[ { "command": "check" } ] }\fR would become \fBhelp[0].command=check\fR\.
|
|
|
|
|
This is useful for simple scripts which want to find a specific output
|
|
|
|
|
field without parsing JSON\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
2020-10-12 07:33:50 +02:00
|
|
|
|
\fB--notifications\fR/\fB-N\fR=\fILEVEL\fR
|
|
|
|
|
If \fILEVEL\fR is 'none', then never print out notifications\. Otherwise,
|
|
|
|
|
print out notifications of \fILEVEL\fR or above (one of \fBio\fR, \fBdebug\fR,
|
|
|
|
|
\fBinfo\fR (the default), \fBunusual\fR or \fBbroken\fR: they are prefixed with \fB#\fR\.
|
|
|
|
|
|
|
|
|
|
|
2019-08-10 02:12:44 +02:00
|
|
|
|
\fB--help\fR/\fB-h\fR
|
2020-05-11 03:11:51 +02:00
|
|
|
|
Pretty-print summary of options to standard output and exit\. The format can
|
|
|
|
|
be changed using -F, -R, -J, -H etc\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fB--version\fR/\fB-V\fR
|
|
|
|
|
Print version number to standard output and exit\.
|
|
|
|
|
|
2020-05-11 03:11:51 +02:00
|
|
|
|
|
|
|
|
|
\fBallow-deprecated-apis\fR=\fIBOOL\fR
|
|
|
|
|
Enable deprecated options\. It defaults to \fItrue\fR, but you should set
|
|
|
|
|
it to \fIfalse\fR when testing to ensure that an upgrade won’t break your
|
|
|
|
|
configuration\.
|
|
|
|
|
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.SH COMMANDS
|
|
|
|
|
|
|
|
|
|
\fIlightning-cli\fR simply uses the JSON RPC interface to talk to
|
|
|
|
|
\fIlightningd\fR, and prints the results\. Thus the commands available depend
|
|
|
|
|
entirely on the lightning daemon itself\.
|
|
|
|
|
|
|
|
|
|
.SH ARGUMENTS
|
|
|
|
|
|
|
|
|
|
Arguments may be provided positionally or using \fIkey\fR=\fIvalue\fR after the
|
2021-02-09 15:34:24 +01:00
|
|
|
|
command name, based on either \fB-o\fR or \fB-k\fR option\. When using \fB-k\fR
|
|
|
|
|
consider prefixing all arguments of the command with their respective keyword,
|
|
|
|
|
this is to avoid having lightningd intrepret the position of an arguement\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Arguments may be integer numbers (composed entirely of digits), floating-point
|
|
|
|
|
numbers (has a radix point but otherwise composed of digits), \fItrue\fR, \fIfalse\fR,
|
2019-08-10 02:12:44 +02:00
|
|
|
|
or \fInull\fR\. Other arguments are treated as strings\.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some commands have optional arguments\. You may use \fInull\fR to skip
|
2021-02-09 15:34:24 +01:00
|
|
|
|
optional arguments to provide later arguments, although this is not encouraged\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH EXAMPLES
|
2021-02-09 15:34:24 +01:00
|
|
|
|
.RS
|
|
|
|
|
.IP 1\.
|
|
|
|
|
List commands
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
2021-02-09 15:34:24 +01:00
|
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
lightning-cli help
|
|
|
|
|
|
2021-02-09 15:34:24 +01:00
|
|
|
|
.RS
|
|
|
|
|
.IP 1\.
|
|
|
|
|
Fund a 10k sat channel using uncomfirmed outputs
|
|
|
|
|
|
|
|
|
|
.RE
|
|
|
|
|
|
|
|
|
|
lightning-cli --keywords fundchannel id=028f\.\.\.ae7d amount=10000sat minconf=0
|
|
|
|
|
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.SH BUGS
|
|
|
|
|
|
|
|
|
|
This manpage documents how it should work, not how it does work\. The
|
|
|
|
|
pretty printing of results isn’t pretty\.
|
|
|
|
|
|
|
|
|
|
.SH AUTHOR
|
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
|
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly to blame\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH COPYING
|
|
|
|
|
|
|
|
|
|
Note: the modules in the ccan/ directory have their own licenses, but
|
|
|
|
|
the rest of the code is covered by the BSD-style MIT license\.
|
|
|
|
|
|
2021-02-09 15:34:24 +01:00
|
|
|
|
\" SHA256STAMP:95f9c48c35817ea601ba35006c8400c52da372ffbe725ff1fa6feec9ced3229f
|