Browse Source

doc/manpages: regenerate manpages using markdown templates

pull/2938/head
darosior 5 years ago
committed by Rusty Russell
parent
commit
d37a2d7c3e
  1. 101
      doc/lightning-autocleaninvoice.7
  2. 94
      doc/lightning-check.7
  3. 211
      doc/lightning-cli.1
  4. 135
      doc/lightning-close.7
  5. 143
      doc/lightning-connect.7
  6. 287
      doc/lightning-decodepay.7
  7. 88
      doc/lightning-delexpiredinvoice.7
  8. 91
      doc/lightning-delinvoice.7
  9. 152
      doc/lightning-disconnect.7
  10. 223
      doc/lightning-fundchannel.7
  11. 93
      doc/lightning-fundchannel_cancel.7
  12. 111
      doc/lightning-fundchannel_complete.7
  13. 112
      doc/lightning-fundchannel_start.7
  14. 661
      doc/lightning-getroute.7
  15. 252
      doc/lightning-invoice.7
  16. 412
      doc/lightning-listchannels.7
  17. 243
      doc/lightning-listforwards.7
  18. 300
      doc/lightning-listfunds.7
  19. 92
      doc/lightning-listinvoices.7
  20. 180
      doc/lightning-listpays.7
  21. 275
      doc/lightning-listpeers.7
  22. 186
      doc/lightning-listsendpays.7
  23. 113
      doc/lightning-newaddr.7
  24. 413
      doc/lightning-pay.7
  25. 110
      doc/lightning-plugin.7
  26. 311
      doc/lightning-sendpay.7
  27. 150
      doc/lightning-setchannelfee.7
  28. 110
      doc/lightning-txdiscard.7
  29. 148
      doc/lightning-txprepare.7
  30. 111
      doc/lightning-txsend.7
  31. 100
      doc/lightning-waitanyinvoice.7
  32. 98
      doc/lightning-waitinvoice.7
  33. 317
      doc/lightning-waitsendpay.7
  34. 177
      doc/lightning-withdraw.7
  35. 929
      doc/lightningd-config.5
  36. 285
      doc/lightningd.8

101
doc/lightning-autocleaninvoice.7

@ -1,55 +1,48 @@
'\" t .TH "LIGHTNING-AUTOCLEANINVOICE" "7" "" "" "lightning-autocleaninvoice"
.\" Title: lightning-autocleaninvoice .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/16/2018 lightning-autocleaninvoice - Set up auto-delete of expired invoice
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-AUTOCLEAN" "7" "04/16/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-autocleaninvoice \- Set up auto\-delete of expired invoice
.SH "SYNOPSIS"
.sp
\fBautocleaninvoice\fR [\fIcycle_seconds\fR] [\fIexpired_by\fR] \fBautocleaninvoice\fR [\fIcycle_seconds\fR] [\fIexpired_by\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBautocleaninvoice\fR RPC command sets up automatic cleaning of expired invoices\&.
.sp The \fBautocleaninvoice\fR RPC command sets up automatic cleaning of
Autoclean will be done every \fIcycle_seconds\fR seconds\&. Setting \fIcycle_seconds\fR to 0 disables autoclean\&. If not specified, this defaults to 3600 (one hour)\&. expired invoices\.
.sp
Every autoclean cycle, expired invoices, which have already been expired for at least \fIexpired_by\fR seconds, will be deleted\&. If \fIexpired_by\fR is not specified, this defaults to 86400 (one day)\&.
.sp Autoclean will be done every \fIcycle_seconds\fR seconds\. Setting
On startup of the daemon, no autoclean is set up\&. \fIcycle_seconds\fR to 0 disables autoclean\. If not specified, this
.SH "RETURN VALUE" defaults to 3600 (one hour)\.
.sp
On success, an empty object is returned\&.
.SH "AUTHOR" Every autoclean cycle, expired invoices, which have already been expired
.sp for at least \fIexpired_by\fR seconds, will be deleted\. If \fIexpired_by\fR is
ZmnSCPxj <ZmnSCPxj@protonmail\&.com> is mainly responsible\&. not specified, this defaults to 86400 (one day)\.
.SH "SEE ALSO"
.sp
lightning\-delexpiredinvoice(7), lightning\-delinvoice(7) On startup of the daemon, no autoclean is set up\.
.SH "RESOURCES"
.sp .SH RETURN VALUE
Main web site: https://github\&.com/ElementsProject/lightning
On success, an empty object is returned\.
.SH AUTHOR
ZmnSCPxj \fBNone\fR (\fI<ZmnSCPxj@protonmail.com\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-delexpiredinvoice\fR(7), \fBlightning-delinvoice\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-07 14:23:17 CEST

94
doc/lightning-check.7

@ -1,52 +1,44 @@
'\" t .TH "LIGHTNING-CHECK" "7" "" "" "lightning-check"
.\" Title: lightning-check .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/07/2018 lightning-check - Command for verifying parameters
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-CHECK" "7" "12/07/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-check \- Command for verifying parameters\&.
.SH "SYNOPSIS"
.sp
\fBcheck\fR \fIcommand_to_check\fR [\fIparameters\fR] \fBcheck\fR \fIcommand_to_check\fR [\fIparameters\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBcheck\fR command verifies another command\(cqs parameters without running it\&.
.sp The \fBcheck\fR RPC command verifies another command’s parameters without
The \fIcommand_to_check\fR is the name of the relevant command\&. running it\.
.sp
\fIparameters\fR is the command\(cqs parameters\&.
.sp The \fIcommand_to_check\fR is the name of the relevant command\.
This does not guarantee successful execution of the command in all cases\&. For example, a call to \fBgetroute\fR may still fail to find a route even if checking the parameters succeeds\&.
.SH "RETURN VALUE"
.sp \fIparameters\fR is the command’s parameters\.
On success, the \fIcommand_to_check\fR is returned\&. On failure, the relevant RPC error is returned\&.
.SH "AUTHOR"
.sp This does not guarantee successful execution of the command in all
Mark Beckwith <wythe@intrig\&.com> and Rusty Russell <rusty@rustcorp\&.com\&.au> are mainly responsible\&. cases\. For example, a call to \fBlightning-getroute\fR(7) may still fail to
.SH "RESOURCES" find a route even if checking the parameters succeeds\.
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RETURN VALUE
On success, the \fIcommand_to_check\fR is returned\. On failure, the
relevant RPC error is returned\.
.SH AUTHOR
Mark Beckwith \fBNone\fR (\fI<wythe@intrig.com\fR)> and Rusty Russell
\fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> are mainly responsible\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-30 17:12:10 CEST

211
doc/lightning-cli.1

@ -1,117 +1,100 @@
'\" t .TH "LIGHTNING-CLI" "1" "" "" "lightning-cli"
.\" Title: lightning-cli .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/02/2019 lightning-cli - Control lightning daemon
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fBlightning-cli\fR [\fIOPTIONS\fR] \fIcommand\fR
.TH "LIGHTNING\-CLI" "1" "04/02/2019" "\ \&" "\ \&"
.\" ----------------------------------------------------------------- .SH DESCRIPTION
.\" * Define some portability stuff
.\" ----------------------------------------------------------------- \fBlightning-cli\fR sends commands to the lightning daemon\.
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673 .SH OPTIONS
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \fB--lightning-dir\fR=\fIDIR\fR
.ie \n(.g .ds Aq \(aq Set the directory for the lightning daemon we’re talking to; defaults to
.el .ds Aq ' \fI$HOME/\.lightning\fR\.
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" ----------------------------------------------------------------- \fB--rpc-file\fR=\fIFILE\fR
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-cli \- Control lightning daemon
.SH "SYNOPSIS"
.sp
\fBlightning\-cli\fR [\fIOPTIONS\fR] \fIcommand\fR\&...
.SH "DESCRIPTION"
.sp
\fBlightning\-cli\fR sends commands to the lightning daemon\&.
.SH "OPTIONS"
.PP
\fB\-\-lightning\-dir\fR=\fIDIR\fR
.RS 4
Set the directory for the lightning daemon we\(cqre talking to; defaults to
\fI$HOME/\&.lightning\fR\&.
.RE
.PP
\fB\-\-rpc\-file\fR=\fIFILE\fR
.RS 4
Named pipe to use to talk to lightning daemon: default is Named pipe to use to talk to lightning daemon: default is
\fIlightning\-rpc\fR \fIlightning-rpc\fR in the lightning directory\.
in the lightning directory\&.
.RE
.PP \fB--keywords\fR/\fB-k\fR
\fB\-\-keywords\fR/\fB\-k\fR Use format \fIkey\fR=\fIvalue\fR for parameters in any order
.RS 4
Use format
\fIkey\fR=\fIvalue\fR \fB--order\fR/\fB-o\fR
for parameters in any order
.RE
.PP
\fB\-\-order\fR/\fB\-o\fR
.RS 4
Follow strictly the order of parameters for the command Follow strictly the order of parameters for the command
.RE
.PP
\fB\-\-json\fR/\fB\-J\fR \fB--json\fR/\fB-J\fR
.RS 4 Return result in JSON format (default unless \fIhelp\fR command)
Return result in JSON format (default unless
\fIhelp\fR
command) \fB--raw\fR/\fB-R\fR
.RE
.PP
\fB\-\-raw\fR/\fB\-R\fR
.RS 4
Return raw JSON directly as lightningd replies Return raw JSON directly as lightningd replies
.RE
.PP
\fB\-\-human\-readable\fR/\fB\-H\fR \fB--human-readable\fR/\fB-H\fR
.RS 4 Return result in human-readable output (default for \fIhelp\fR command)
Return result in human\-readable output (default for
\fIhelp\fR
command) \fB--help\fR/\fB-h\fR
.RE Print summary of options to standard output and exit\.
.PP
\fB\-\-help\fR/\fB\-h\fR
.RS 4 \fB--version\fR/\fB-V\fR
Print summary of options to standard output and exit\&. Print version number to standard output and exit\.
.RE
.PP .SH COMMANDS
\fB\-\-version\fR/\fB\-V\fR
.RS 4 \fIlightning-cli\fR simply uses the JSON RPC interface to talk to
Print version number to standard output and exit\&. \fIlightningd\fR, and prints the results\. Thus the commands available depend
.RE entirely on the lightning daemon itself\.
.SH "COMMANDS"
.sp .SH ARGUMENTS
\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
.sp command name, based on either \fB-o\fR or \fB-k\fR option\. Arguments may be
Arguments may be provided positionally or using \fIkey\fR=\fIvalue\fR after the command name, based on either \fB\-o\fR or \fB\-k\fR option\&. 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, or \fInull\fR\&. Other arguments are treated as strings\&. integer numbers (composed entirely of digits), floating-point numbers
.sp (has a radix point but otherwise composed of digits), \fItrue\fR, \fIfalse\fR,
Some commands have optional arguments\&. You may use \fInull\fR to skip optional arguments to provide later arguments\&. or \fInull\fR\. Other arguments are treated as strings\.
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&List commands\fR Some commands have optional arguments\. You may use \fInull\fR to skip
.sp optional arguments to provide later arguments\.
lightning\-cli help
.SH "BUGS" .SH EXAMPLES
.sp
This manpage documents how it should work, not how it does work\&. The pretty printing of results isn\(cqt pretty\&. Example 1\. List commands
.SH "AUTHOR"
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly to blame\&. lightning-cli help
.SH "RESOURCES"
.sp .SH BUGS
Main web site: https://github\&.com/ElementsProject/lightning
.SH "COPYING" This manpage documents how it should work, not how it does work\. The
.sp pretty printing of results isn’t pretty\.
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\&.
.SH AUTHOR
Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly to blame\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.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\.
.HL
Last updated 2019-04-30 17:39:53 CEST

135
doc/lightning-close.7

@ -1,62 +1,75 @@
'\" t .TH "LIGHTNING-CLOSE" "7" "" "" "lightning-close"
.\" Title: lightning-close .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/08/2019 lightning-close - Command for closing channels with direct peers
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-CLOSE" "7" "08/08/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-close \- Command for closing channels with direct peers
.SH "SYNOPSIS"
.sp
\fBclose\fR \fIid\fR [\fIunilateraltimeout\fR] \fBclose\fR \fIid\fR [\fIunilateraltimeout\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBclose\fR RPC command attempts to close the channel cooperatively with the peer, or unilaterally after \fIunilateraltimeout\fR\&.
.sp The \fBclose\fR RPC command attempts to close the channel cooperatively
If the given \fIid\fR is a peer ID (66 hex digits as a string), then it applies to the active channel of the direct peer corresponding to the given peer ID\&. If the given \fIid\fR is a channel ID (64 hex digits as a string, or the short channel ID \fIblockheight:txindex:outindex\fR form), then it applies to that channel\&. with the peer, or unilaterally after \fIunilateraltimeout\fR\.
.sp
If \fIunilateraltimeout\fR is not zero, the \fBclose\fR command will unilaterally close the channel when that number of seconds is reached\&. If \fIunilateraltimeout\fR is zero, then the \fBclose\fR command will wait indefinitely until the peer is online and can negotiate a mutual close\&. The default is 2 days (172800 seconds)\&.
.sp If the given \fIid\fR is a peer ID (66 hex digits as a string), then it
The peer needs to be live and connected in order to negotiate a mutual close\&. The default of unilaterally closing after 48 hours is usually a reasonable indication that you can no longer contact the peer\&. applies to the active channel of the direct peer corresponding to the
.SH "NOTES" given peer ID\. If the given \fIid\fR is a channel ID (64 hex digits as a
.sp string, or the short channel ID \fIblockheight:txindex:outindex\fR form),
Prior to 0\&.7\&.2, \fBclose\fR took two parameters: \fIforce\fR and \fItimeout\fR\&. \fItimeout\fR was the number of seconds before \fIforce\fR took effect (default, 30), and \fIforce\fR determined whether the result was a unilateral close or an RPC error (default)\&. Even after the timeout, the channel would be closed if the peer reconnected\&. then it applies to that channel\.
.SH "RETURN VALUE"
.sp
On success, an object with fields \fItx\fR and \fItxid\fR containing the closing transaction are returned\&. It will also have a field \fItype\fR which is either the JSON string \fImutual\fR or the JSON string \fIunilateral\fR\&. A \fImutual\fR close means that we could negotiate a close with the peer, while a \fIunilateral\fR close means that the \fIforce\fR flag was set and we had to close the channel without waiting for the counterparty\&. If \fIunilateraltimeout\fR is not zero, the \fBclose\fR command will
.sp unilaterally close the channel when that number of seconds is reached\.
A unilateral close may still occur at any time if the peer did not behave correctly during the close negotiation\&. If \fIunilateraltimeout\fR is zero, then the \fBclose\fR command will wait
.sp indefinitely until the peer is online and can negotiate a mutual close\.
Unilateral closes will return your funds after a delay\&. The delay will vary based on the peer \fIto_self_delay\fR setting, not your own setting\&. The default is 2 days (172800 seconds)\.
.SH "AUTHOR"
.sp
ZmnSCPxj <ZmnSCPxj@protonmail\&.com> is mainly responsible\&. The peer needs to be live and connected in order to negotiate a mutual
.SH "SEE ALSO" close\. The default of unilaterally closing after 48 hours is usually a
.sp reasonable indication that you can no longer contact the peer\.
lightning\-disconnect(7), lightning\-fundchannel(7)
.SH "RESOURCES" .SH NOTES
.sp
Main web site: https://github\&.com/ElementsProject/lightning Prior to 0\.7\.2, \fBclose\fR took two parameters: \fIforce\fR and \fItimeout\fR\.
\fItimeout\fR was the number of seconds before \fIforce\fR took effect (default,
30), and \fIforce\fR determined whether the result was a unilateral close or
an RPC error (default)\. Even after the timeout, the channel would be
closed if the peer reconnected\.
.SH RETURN VALUE
On success, an object with fields \fItx\fR and \fItxid\fR containing the closing
transaction are returned\. It will also have a field \fItype\fR which is
either the JSON string \fImutual\fR or the JSON string \fIunilateral\fR\. A
\fImutual\fR close means that we could negotiate a close with the peer,
while a \fIunilateral\fR close means that the \fIforce\fR flag was set and we
had to close the channel without waiting for the counterparty\.
A unilateral close may still occur at any time if the peer did not
behave correctly during the close negotiation\.
Unilateral closes will return your funds after a delay\. The delay will
vary based on the peer \fIto_self_delay\fR setting, not your own setting\.
.SH AUTHOR
ZmnSCPxj \fBNone\fR (\fI<ZmnSCPxj@protonmail.com\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-disconnect\fR(7), \fBlightning-fundchannel\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-08-09 11:12:04 CEST

143
doc/lightning-connect.7

@ -1,76 +1,73 @@
'\" t .TH "LIGHTNING-CONNECT" "7" "" "" "lightning-connect"
.\" Title: lightning-connect .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/30/2019 lightning-connect - Command for connecting to another lightning node\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-CONNECT" "7" "07/30/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-connect \- Command for connecting to another lightning node\&.
.SH "SYNOPSIS"
.sp
\fBconnect\fR \fIid\fR [\fIhost\fR \fIport\fR] \fBconnect\fR \fIid\fR [\fIhost\fR \fIport\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBconnect\fR RPC command establishes a new connection with another node in the Lightning Network\&.
.sp The \fBconnect\fR RPC command establishes a new connection with another
\fIid\fR represents the target node\(cqs public key\&. As a convenience, \fIid\fR may be of the form \fIid@host\fR or \fIid@host:port\fR\&. In this case, the \fIhost\fR and \fIport\fR parameters must be omitted\&. node in the Lightning Network\.
.sp
\fIhost\fR is the peer\(cqs hostname or IP address\&.
.sp \fIid\fR represents the target node’s public key\. As a convenience, \fIid\fR may
If not specified, the \fIport\fR defaults to 9735\&. be of the form \fIid@host\fR or \fIid@host:port\fR\. In this case, the \fIhost\fR and
.sp \fIport\fR parameters must be omitted\.
If \fIhost\fR is not specified, the connection will be attempted to an IP belonging to \fIid\fR obtained through gossip with other already connected peers\&.
.sp
If \fIhost\fR begins with a \fI/\fR it is interpreted as a local path, and the connection will be made to that local socket (see \fBbind\-addr\fR in lightningd\-config(5))\&. \fIhost\fR is the peer’s hostname or IP address\.
.sp
Connecting to a node is just the first step in opening a channel with another node\&. Once the peer is connected a channel can be opened with lightning\-fundchannel(7)\&.
.SH "RETURN VALUE" If not specified, the \fIport\fR defaults to 9735\.
.sp
On success the peer \fIid\fR is returned\&.
.sp If \fIhost\fR is not specified, the connection will be attempted to an IP
belonging to \fIid\fR obtained through gossip with other already connected
peers\.
If \fIhost\fR begins with a \fI/\fR it is interpreted as a local path, and the
connection will be made to that local socket (see \fBbind-addr\fR in
\fBlightningd-config\fR(5))\.
Connecting to a node is just the first step in opening a channel with
another node\. Once the peer is connected a channel can be opened with
\fBlightning-fundchannel\fR(7)\.
.SH RETURN VALUE
On success the peer \fIid\fR is returned\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\. This may occur if the host is not
.\} valid or there are problems communicating with the peer\. \fBconnect\fR
.el \{\ will make up to 10 attempts to connect to the peer before giving up\.
.sp -1
.IP \(bu 2.3
.\}
\-1\&. Catchall nonspecific error\&. This may occur if the host is not valid or there are problems communicating with the peer\&.
\fBconnect\fR
will make up to 10 attempts to connect to the peer before giving up\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. Felix <fixone@gmail\&.com> is the original author of this manpage\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH "SEE ALSO" Felix \fBNone\fR (\fI<fixone@gmail.com\fR)> is the original author of this manpage\.
.sp
lightning\-fundchannel(7), lightning\-listpeers(7), lightning\-listchannels(7), lightning\-disconnect(7) .SH SEE ALSO
.SH "RESOURCES"
.sp \fBlightning-fundchannel\fR(7), \fBlightning-listpeers\fR(7),
Main web site: https://github\&.com/ElementsProject/lightning \fBlightning-listchannels\fR(7), \fBlightning-disconnect\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-08-01 14:59:36 CEST

287
doc/lightning-decodepay.7

@ -1,210 +1,85 @@
'\" t .TH "LIGHTNING-DECODEPAY" "7" "" "" "lightning-decodepay"
.\" Title: lightning-decodepay .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 02/18/2019 lightning-decodepay - Command for decoding a bolt11 string (low-level)
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-DECODEPAY" "7" "02/18/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-decodepay \- Command for decoding a bolt11 string (low\-level)
.SH "SYNOPSIS"
.sp
\fBdecodepay\fR \fIbolt11\fR [\fIdescription\fR] \fBdecodepay\fR \fIbolt11\fR [\fIdescription\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBdecodepay\fR RPC command checks and parses a \fIbolt11\fR string as specified by the BOLT 11 specification\&.
.SH "RETURN VALUE" The \fBdecodepay\fR RPC command checks and parses a \fIbolt11\fR string as
.sp specified by the BOLT 11 specification\.
On success, an object is returned with the following fields, as specified by BOLT11:
.sp .SH RETURN VALUE
.RS 4
.ie n \{\ On success, an object is returned with the following fields, as
\h'-04'\(bu\h'+03'\c specified by BOLT11:
.\}
.el \{\ .RS
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fIcurrency\fR: the BIP173 name for the currency\.
.\} .IP \[bu]
\fIcurrency\fR: the BIP173 name for the currency\&. \fItimestamp\fR: the UNIX-style timestamp of the invoice\.
.IP \[bu]
\fIexpiry\fR: the number of seconds this is valid after \fItimestamp\fR\.
.IP \[bu]
\fIpayee\fR: the public key of the recipient\.
.IP \[bu]
\fIpayment_hash\fR: the payment hash of the request\.
.IP \[bu]
\fIsignature\fR: the DER-encoded signature\.
.IP \[bu]
\fIdescription\fR: the description of the purpose of the purchase (see
below)
.RE .RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fItimestamp\fR: the UNIX\-style timestamp of the invoice\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIexpiry\fR: the number of seconds this is valid after
\fItimestamp\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIpayee\fR: the public key of the recipient\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIpayment_hash\fR: the payment hash of the request\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIsignature\fR: the DER\-encoded signature\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIdescription\fR: the description of the purpose of the purchase (see below)
.RE
.sp
The following fields are optional: The following fields are optional:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fImsatoshi\fR: the number of millisatoshi requested (if any)\.
.\} .IP \[bu]
.el \{\ \fIamount_msat\fR: the same as above, with \fImsat\fR appended (if any)\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fIfallbacks\fR: array of fallback address object containing a \fIhex\fR
.\} string, and both \fItype\fR and \fIaddr\fR if it is recognized as one of
\fImsatoshi\fR: the number of millisatoshi requested (if any)\&. \fIP2PKH\fR, \fIP2SH\fR, \fIP2WPKH\fR, or \fIP2WSH\fR\.
.RE .IP \[bu]
.sp \fIroutes\fR: an array of routes\. Each route is an arrays of objects,
.RS 4 each containing \fIpubkey\fR, \fIshort_channel_id\fR, \fIfee_base_msat\fR,
.ie n \{\ \fIfee_proportional_millionths\fR and \fIcltv_expiry_delta\fR\.
\h'-04'\(bu\h'+03'\c .IP \[bu]
.\} \fIextra\fR: an array of objects representing unknown fields, each with
.el \{\ one-character \fItag\fR and a \fIdata\fR bech32 string\.
.sp -1
.IP \(bu 2.3
.\}
\fIamount_msat\fR: the same as above, with
\fImsat\fR
appended (if any)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfallbacks\fR: array of fallback address object containing a
\fIhex\fR
string, and both
\fItype\fR
and
\fIaddr\fR
if it is recognized as one of
\fIP2PKH\fR,
\fIP2SH\fR,
\fIP2WPKH\fR, or
\fIP2WSH\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIroutes\fR: an array of routes\&. Each route is an arrays of objects, each containing
\fIpubkey\fR,
\fIshort_channel_id\fR,
\fIfee_base_msat\fR,
\fIfee_proportional_millionths\fR
and
\fIcltv_expiry_delta\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIextra\fR: an array of objects representing unknown fields, each with one\-character
\fItag\fR
and a
\fIdata\fR
bech32 string\&.
.RE .RE
.sp
Technically, the \fIdescription\fR field is optional if a \fIdescription_hash\fR field is given, but in this case \fBdecodepay\fR will only succeed if the optional \fIdescription\fR field is passed and matches the \fIdescription_hash\fR\&. In practice, these are currently unused\&. Technically, the \fIdescription\fR field is optional if a
.SH "AUTHOR" \fIdescription_hash\fR field is given, but in this case \fBdecodepay\fR will
.sp only succeed if the optional \fIdescription\fR field is passed and matches
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. the \fIdescription_hash\fR\. In practice, these are currently unused\.
.SH "SEE ALSO"
.sp .SH AUTHOR
lightning\-pay(7), lightning\-getroute(7), lightning\-sendpay(7)\&.
.sp Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
BOLT #11\&.
.SH "RESOURCES" .SH SEE ALSO
.sp
Main web site: https://github\&.com/ElementsProject/lightning \fBlightning-pay\fR(7), \fBlightning-getroute\fR(7), \fBlightning-sendpay\fR(7)\.
\fBBOLT
#11\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md\fR)\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-30 17:12:10 CEST

88
doc/lightning-delexpiredinvoice.7

@ -1,51 +1,39 @@
'\" t .TH "LIGHTNING-DELEXPIREDINVOICE" "7" "" "" "lightning-delexpiredinvoice"
.\" Title: lightning-delexpiredinvoice .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/26/2018 lightning-delexpiredinvoice - Command for removing expired invoices\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-DELEXPIRE" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-delexpiredinvoice \- Command for removing expired invoices\&.
.SH "SYNOPSIS"
.sp
\fBdelexpiredinvoice\fR [\fImaxexpirytime\fR] \fBdelexpiredinvoice\fR [\fImaxexpirytime\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBdelexpiredinvoice\fR RPC command removes all invoices that have expired on or before the given \fImaxexpirytime\fR\&.
.sp The \fBdelexpiredinvoice\fR RPC command removes all invoices that have
If \fImaxexpirytime\fR is not specified then all expired invoices are deleted\&. expired on or before the given \fImaxexpirytime\fR\.
.SH "RETURN VALUE"
.sp
On success, an empty object is returned\&. If \fImaxexpirytime\fR is not specified then all expired invoices are
.SH "AUTHOR" deleted\.
.sp
ZmnSCPxj <ZmnSCPxj@protonmail\&.com> is mainly responsible\&. .SH RETURN VALUE
.SH "SEE ALSO"
.sp On success, an empty object is returned\.
lightning\-delinvoice(7), lightning\-autocleaninvoice(7)
.SH "RESOURCES" .SH AUTHOR
.sp
Main web site: https://github\&.com/ElementsProject/lightning ZmnSCPxj \fBNone\fR (\fI<ZmnSCPxj@protonmail.com\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-delinvoice\fR(7), \fBlightning-autocleaninvoice\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-07 14:23:17 CEST

91
doc/lightning-delinvoice.7

@ -1,51 +1,42 @@
'\" t .TH "LIGHTNING-DELINVOICE" "7" "" "" "lightning-delinvoice"
.\" Title: lightning-delinvoice .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/26/2018 lightning-delinvoice - Command for removing an invoice\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-DELINVOIC" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-delinvoice \- Command for removing an invoice\&.
.SH "SYNOPSIS"
.sp
\fBdelinvoice\fR \fIlabel\fR \fIstatus\fR \fBdelinvoice\fR \fIlabel\fR \fIstatus\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBdelinvoice\fR RPC command removes an invoice with \fIstatus\fR as given in \fBlistinvoices\fR\&.
.sp The \fBdelinvoice\fR RPC command removes an invoice with \fIstatus\fR as given
The caller should be particularly aware of the error case caused by the \fIstatus\fR changing just before this command is invoked! in \fBlistinvoices\fR\.
.SH "RETURN VALUE"
.sp
On success, an invoice description will be returned as per lightning\-listinvoice(7)\&. The caller should be particularly aware of the error case caused by the
.SH "AUTHOR" \fIstatus\fR changing just before this command is invoked!
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. .SH RETURN VALUE
.SH "SEE ALSO"
.sp On success, an invoice description will be returned as per
lightning\-listinvoice(7), lightning\-waitinvoice(7), lightning\-invoice(7), lightning\-delexpiredinvoice(7), lightning\-autocleaninvoice(7) \fBlightning-listinvoice\fR(7)\.
.SH "RESOURCES"
.sp .SH AUTHOR
Main web site: https://github\&.com/ElementsProject/lightning
Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listinvoice\fR(7), \fBlightning-waitinvoice\fR(7),
\fBlightning-invoice\fR(7), \fBlightning-delexpiredinvoice\fR(7),
\fBlightning-autocleaninvoice\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-07 14:23:17 CEST

152
doc/lightning-disconnect.7

@ -1,96 +1,86 @@
'\" t .TH "LIGHTNING-DISCONNECT" "7" "" "" "lightning-disconnect"
.\" Title: lightning-disconnect .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/03/2019 lightning-disconnect - Command for disconnecting from another lightning
.\" Manual: \ \& node\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-DISCONNEC" "7" "04/03/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-disconnect \- Command for disconnecting from another lightning node\&.
.SH "SYNOPSIS"
.sp
\fBdisconnect\fR \fIid\fR [\fIforce\fR] \fBdisconnect\fR \fIid\fR [\fIforce\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The disconnect RPC command closes an existing connection to a peer, identified by \fIid\fR, in the Lightning Network, as long as it doesn\(cqt have an active channel\&. If \fIforce\fR is set then it will disconnect even with an active channel\&.
.sp The disconnect RPC command closes an existing connection to a peer,
The \fIid\fR can be discovered in the output of the listpeers command, which returns a set of peers: identified by \fIid\fR, in the Lightning Network, as long as it doesn’t have
.sp an active channel\. If \fIforce\fR is set then it will disconnect even with
.if n \{\ an active channel\.
.RS 4
.\}
The \fIid\fR can be discovered in the output of the listpeers command, which
returns a set of peers:
.nf .nf
.RS
{ {
"peers": [ "peers": [
{ {
"id": "0563aea81\&.\&.\&.", "id": "0563aea81...",
"connected": true, "connected": true,
\&.\&.\&. ...
} }
] ]
} }
.fi
.if n \{\
.RE .RE
.\}
.sp .fi
Passing the \fIid\fR attribute of a peer to \fIdisconnect\fR will terminate the connection\&.
.SH "RETURN VALUE" Passing the \fIid\fR attribute of a peer to \fIdisconnect\fR will terminate the
.sp connection\.
On success, an empty object is returned\&.
.SH "ERRORS" .SH RETURN VALUE
.sp
On success, an empty object is returned\.
.SH ERRORS
If \fIid\fR is invalid, an error message will be returned: If \fIid\fR is invalid, an error message will be returned:
.sp
.if n \{\
.RS 4
.\}
.nf .nf
{ "code" : \-1, "message" : "Peer not connected" } .RS
.fi { "code" : -1, "message" : "Peer not connected" }
.if n \{\
.RE .RE
.\}
.sp
If the peer has an active channel and \fIforce\fR is not set, an error message will be returned:
.sp
.if n \{\
.RS 4
.\}
.nf
{ "code" : \-1, "message" : "Peer is in state CHANNELD_NORMAL" }
.fi .fi
.if n \{\
If the peer has an active channel and \fIforce\fR is not set, an error
message will be returned:
.nf
.RS
{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
.RE .RE
.\}
.SH "AUTHOR" .fi
.sp .SH AUTHOR
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.
.SH "SEE ALSO" Michael Hawkins \fBNone\fR (\fI<michael.hawkins@protonmail.com\fR)>\.
.sp
lightning\-connect(1), lightning\-listpeers(1) .SH SEE ALSO
.SH "RESOURCES"
.sp \fBlightning-connect\fR(1), \fBlightning-listpeers\fR(1)
Main web site: https://github\&.com/ElementsProject/lightning
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-30 17:34:18 CEST

223
doc/lightning-fundchannel.7

@ -1,130 +1,97 @@
'\" t .TH "LIGHTNING-FUNDCHANNEL" "7" "" "" "lightning-fundchannel"
.\" Title: lightning-fundchannel .SH NAME
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/07/2019 lightning-fundchannel - Command for establishing a lightning channel\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fBfundchannel\fR \fIid\fR \fIsatoshi\fR [\fIfeerate\fR \fIannounce\fR] [\fIminconf\fR]
.TH "LIGHTNING\-FUNDCHANN" "7" "08/07/2019" "\ \&" "\ \&" [\fIutxos\fR]
.\" -----------------------------------------------------------------
.\" * Define some portability stuff .SH DESCRIPTION
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The \fBfundchannel\fR RPC command opens a payment channel with a peer by
.\" http://bugs.debian.org/507673 committing a funding transaction to the blockchain as defined in BOLT
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html #2\. \fBfundchannel\fR by itself does not attempt to open a connection\. A
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ connection must first be established using \fBconnect\fR\. Once the
.ie \n(.g .ds Aq \(aq transaction is confirmed, normal channel operations may begin\. Readiness
.el .ds Aq ' is indicated by \fBlistpeers\fR reporting a \fIstate\fR of CHANNELD_NORMAL
.\" ----------------------------------------------------------------- for the channel\.
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation \fIid\fR is the peer id obtained from \fBconnect\fR\.
.nh
.\" disable justification (adjust text to left margin only)
.ad l \fIsatoshi\fR is the amount in satoshis taken from the internal wallet to
.\" ----------------------------------------------------------------- fund the channel\. The string \fIall\fR can be used to specify all available
.\" * MAIN CONTENT STARTS HERE * funds (or 16777215 satoshi if more is available)\. Otherwise, it is in
.\" ----------------------------------------------------------------- satoshi precision; it can be a whole number, a whole number ending in
.SH "NAME" \fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8
lightning-fundchannel \- Command for establishing a lightning channel\&. decimal places ending in \fIbtc\fR\. The value cannot be less than the dust
.SH "SYNOPSIS" limit, currently set to 546, nor more than 16777215 satoshi\.
.sp
\fBfundchannel\fR \fIid\fR \fIsatoshi\fR [\fIfeerate\fR \fIannounce\fR] [\fIminconf\fR] [\fIutxos\fR]
.SH "DESCRIPTION" \fIfeerate\fR is an optional feerate used for the opening transaction and as
.sp initial feerate for commitment and HTLC transactions\. It can be one of
The \fBfundchannel\fR RPC command opens a payment channel with a peer by committing a funding transaction to the blockchain as defined in BOLT #2\&. \fBfundchannel\fR by itself does not attempt to open a connection\&. A connection must first be established using \fBconnect\fR\&. Once the transaction is confirmed, normal channel operations may begin\&. Readiness is indicated by \fBlistpeers\fR reporting a \fIstate\fR of CHANNELD_NORMAL for the channel\&. the strings \fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or
.sp so) or \fIslow\fR (next 100 blocks or so) to use lightningd’s internal
\fIid\fR is the peer id obtained from \fBconnect\fR\&. estimates: \fInormal\fR is the default\.
.sp
\fIsatoshi\fR is the amount in satoshis taken from the internal wallet to fund the channel\&. The string \fIall\fR can be used to specify all available funds (or 16777215 satoshi if more is available)\&. Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in \fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8 decimal places ending in \fIbtc\fR\&. The value cannot be less than the dust limit, currently set to 546, nor more than 16777215 satoshi\&.
.sp \fIannounce\fR is an optional flag that triggers whether to announce this
\fIfeerate\fR is an optional feerate used for the opening transaction and as initial feerate for commitment and HTLC transactions\&. It can be one of the strings \fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR (next 100 blocks or so) to use lightningd\(cqs internal estimates: \fInormal\fR is the default\&. channel or not\. Defaults to \fBtrue\fR\. An unannounced channel is considered
.sp private\.
\fIannounce\fR is an optional flag that triggers whether to announce this channel or not\&. Defaults to true\&. An unannounced channel is considered private\&.
.sp
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means the number is interpreted as satoshi\-per\-kilosipa (weight), and \fIperkb\fR means it is interpreted bitcoind\-style as satoshi\-per\-kilobyte\&. Omitting the suffix is equivalent to \fIperkb\fR\&. Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
.sp the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
\fIminconf\fR specifies the minimum number of confirmations that used outputs should have\&. Default is 1\&. means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
.sp the suffix is equivalent to \fIperkb\fR\.
\fIutxos\fR specifies the utxos to be used to fund the channel, as an array of "txid:vout"\&.
.SH "RETURN VALUE"
.sp \fIminconf\fR specifies the minimum number of confirmations that used
On success, the \fItx\fR and \fItxid\fR of the transaction is returned, as well as the \fIchannel_id\fR of the newly created channel\&. On failure, an error is reported and the channel is not funded\&. outputs should have\. Default is 1\.
.sp
\fIutxos\fR specifies the utxos to be used to fund the channel, as an array
of "txid:vout"\.
.SH RETURN VALUE
On success, the \fItx\fR and \fItxid\fR of the transaction is returned, as well
as the \fIchannel_id\fR of the newly created channel\. On failure, an error
is reported and the channel is not funded\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 300: The maximum allowed funding amount is exceeded\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 301: There are not enough funds in the internal wallet (including fees) to create the transaction\.
.\} .IP \[bu]
\-1\&. Catchall nonspecific error\&. 302: The output amount is too small, and would be considered dust\.
.IP \[bu]
303: Broadcasting of the funding transaction failed, the internal call to bitcoin-cli returned with an error\.
.RE .RE
.sp
.RS 4 Failure may also occur if \fBlightningd\fR and the peer cannot agree on
.ie n \{\ channel parameters (funding limits, channel reserves, fees, etc\.)\.
\h'-04'\(bu\h'+03'\c
.\} .SH SEE ALSO
.el \{\
.sp -1 \fBlightning-connect\fR(7), lightning-listfunds(), \fBlightning-listpeers\fR(7)
.IP \(bu 2.3
.\} .SH RESOURCES
300\&. The maximum allowed funding amount is exceeded\&.
.RE Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.sp
.RS 4 .HL
.ie n \{\
\h'-04'\(bu\h'+03'\c Last updated 2019-06-12 11:16:20 CEST
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
301\&. There are not enough funds in the internal wallet (including fees) to create the transaction\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
302\&. The output amount is too small, and would be considered dust\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
303\&. Broadcasting of the funding transaction failed, the internal call to bitcoin\-cli returned with an error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
304\&. We\(cqre still syncing with the bitcoin network\&. Retry later\&.
.RE
.sp
Failure may also occur if \fBlightningd\fR and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc\&.)\&.
.SH "SEE ALSO"
.sp
lightning\-connect(7), lightning\-listfunds(), lightning\-listpeers(7)
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

93
doc/lightning-fundchannel_cancel.7

@ -1,53 +1,44 @@
'\" t .TH "LIGHTNING-FUNDCHANNEL_CANCEL" "7" "" "" "lightning-fundchannel_cancel"
.\" Title: lightning-fundchannel_cancel .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-fundchannel_cancel - Command for completing channel
.\" Manual: \ \& establishment
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-FUNDCHANN" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-fundchannel_cancel \- Command for completing channel establishment
.SH "SYNOPSIS"
.sp
\fBfundchannel_cancel\fR \fIid\fR \fBfundchannel_cancel\fR \fIid\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
fundchannel_cancel is a lower level RPC command\&. It allows a user to cancel an initiated channel establishment with a connected peer\&.
.sp \fBfundchannel_cancel\fR is a lower level RPC command\. It allows a user to
cancel an initiated channel establishment with a connected peer\.
\fIid\fR is the node id of the remote peer with which to cancel the \fIid\fR is the node id of the remote peer with which to cancel the
.SH "RETURN VALUE"
.sp .SH RETURN VALUE
On success, returns confirmation that the channel establishment has been canceled\&.
.sp On success, returns confirmation that the channel establishment has been
On failure, returns an error\&. canceled\.
.SH "AUTHOR"
.sp
Lisa Neigut <niftynei@gmail\&.com> is mainly responsible\&. On failure, returns an error\.
.SH "SEE ALSO"
.sp .SH AUTHOR
lightning\-connect(7), lightning\-fundchannel(7), lightning\-fundchannel_start(7), lightning\-fundchannel_complete(7)
.SH "RESOURCES" Lisa Neigut \fBNone\fR (\fI<niftynei@gmail.com\fR)> is mainly responsible\.
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-06-12 11:16:20 CEST

111
doc/lightning-fundchannel_complete.7

@ -1,59 +1,56 @@
'\" t .TH "LIGHTNING-FUNDCHANNEL_COMPLETE" "7" "" "" "lightning-fundchannel_complete"
.\" Title: lightning-fundchannel_complete .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-fundchannel_complete - Command for completing channel
.\" Manual: \ \& establishment
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-FUNDCHANN" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-fundchannel_complete \- Command for completing channel establishment
.SH "SYNOPSIS"
.sp
\fBfundchannel_complete\fR \fIid\fR \fItxid\fR \fItxout\fR \fBfundchannel_complete\fR \fIid\fR \fItxid\fR \fItxout\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
fundchannel_complete is a lower level RPC command\&. It allows a user to complete an initiated channel establishment with a connected peer
.sp \fBfundchannel_complete\fR is a lower level RPC command\. It allows a user to
complete an initiated channel establishment with a connected peer
\fIid\fR is the node id of the remote peer \fIid\fR is the node id of the remote peer
.sp
\fItxid\fR is the hex string of the funding transaction id\&.
.sp \fItxid\fR is the hex string of the funding transaction id\.
\fItxout\fR is the integer outpoint of the funding output for this channel\&.
.sp
Note that the funding transaction should not be broadcast until after channel establishment has been successfully completed, as the commitment transactions for this channel are not secured until this command succesfully completes\&. \fItxout\fR is the integer outpoint of the funding output for this channel\.
.SH "RETURN VALUE"
.sp
On success, returns a confirmation that \fIcommitments_secured\fR and the derived \fIchannel_id\fR\&. Note that the funding transaction should not be broadcast until after
.sp channel establishment has been successfully completed, as the commitment
On failure, returns an error\&. transactions for this channel are not secured until this command
.SH "AUTHOR" succesfully completes\.
.sp
Lisa Neigut <niftynei@gmail\&.com> is mainly responsible\&. .SH RETURN VALUE
.SH "SEE ALSO"
.sp On success, returns a confirmation that \fIcommitments_secured\fR and the
lightning\-connect(7), lightning\-fundchannel(7), lightning\-fundchannel_start(7), lightning\-fundchannel_cancel(7) derived \fIchannel_id\fR\.
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning On failure, returns an error\.
.SH AUTHOR
Lisa Neigut \fBNone\fR (\fI<niftynei@gmail.com\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcancel\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-06-12 11:16:20 CEST

112
doc/lightning-fundchannel_start.7

@ -1,59 +1,55 @@
'\" t .TH "LIGHTNING-FUNDCHANNEL_START" "7" "" "" "lightning-fundchannel_start"
.\" Title: lightning-fundchannel_start .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-fundchannel_start - Command for initiating channel
.\" Manual: \ \& establishment for a lightning channel
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-FUNDCHANN" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-fundchannel_start \- Command for initiating channel establishment for a lightning channel
.SH "SYNOPSIS"
.sp
\fBfundchannel_start\fR \fIid\fR \fIsatoshi\fR [\fIfeerate\fR \fIannounce\fR] \fBfundchannel_start\fR \fIid\fR \fIsatoshi\fR [\fIfeerate\fR \fIannounce\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
fundchannel_start is a lower level RPC command\&. It allows a user to initiate channel establishment with a connected peer\&.
.sp \fBfundchannel_start\fR is a lower level RPC command\. It allows a user to
\fIid\fR is the node id of the remote peer\&. initiate channel establishment with a connected peer\.
.sp
\fIsatoshi\fR is the satoshi value that the channel will be funded at\&. This value MUST be accurate, otherwise the negotiated commitment transactions will not encompass the correct channel value\&.
.sp \fIid\fR is the node id of the remote peer\.
\fIfeerate\fR is an optional field\&. Sets the feerate for subsequent commitment transactions\&.
.sp
\fIannounce\fR whether or not to annouce this channel\&. \fIsatoshi\fR is the satoshi value that the channel will be funded at\. This
.SH "RETURN VALUE" value MUST be accurate, otherwise the negotiated commitment transactions
.sp will not encompass the correct channel value\.
On success, returns the \fIfunding_address\fR for the channel\&.
.sp
On failure, returns an error\&. \fIfeerate\fR is an optional field\. Sets the feerate for subsequent
.SH "AUTHOR" commitment transactions\.
.sp
Lisa Neigut <niftynei@gmail\&.com> is mainly responsible\&.
.SH "SEE ALSO" \fIannounce\fR whether or not to annouce this channel\.
.sp
lightning\-connect(7), lightning\-fundchannel(7), lightning\-fundchannel_complete(7), lightning\-fundchannel_cancel(7) .SH RETURN VALUE
.SH "RESOURCES"
.sp On success, returns the \fIfunding_address\fR for the channel\.
Main web site: https://github\&.com/ElementsProject/lightning
On failure, returns an error\.
.SH AUTHOR
Lisa Neigut \fBNone\fR (\fI<niftynei@gmail.com\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7),
lightning-fundchannel_\fBcomplete\fR(7), lightning-fundchannel_\fBcancel\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-06-12 11:16:20 CEST

661
doc/lightning-getroute.7

@ -1,532 +1,141 @@
'\" t .TH "LIGHTNING-GETROUTE" "7" "" "" "lightning-getroute"
.\" Title: lightning-getroute .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 03/01/2019 lightning-getroute - Command for routing a payment (low-level)\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fBgetroute\fR \fIid\fR \fImsatoshi\fR \fIriskfactor\fR [\fIcltv\fR] [\fIfromid\fR]
.TH "LIGHTNING\-GETROUTE" "7" "03/01/2019" "\ \&" "\ \&" [\fIfuzzpercent\fR] [\fIexclude\fR] [\fImaxhops\fR]
.\" -----------------------------------------------------------------
.\" * Define some portability stuff .SH DESCRIPTION
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The \fBgetroute\fR RPC command attempts to find the best route for the
.\" http://bugs.debian.org/507673 payment of \fImsatoshi\fR to lightning node \fIid\fR, such that the payment will
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html arrive at \fIid\fR with \fIcltv\fR-blocks to spare (default 9)\.
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq ' \fImsatoshi\fR is in millisatoshi precision; it can be a whole number, or a
.\" ----------------------------------------------------------------- whole number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal
.\" * set default formatting places ending in \fIsat\fR, or a number with 1 to 11 decimal places ending
.\" ----------------------------------------------------------------- in \fIbtc\fR\.
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only) There are two considerations for how good a route is: how low the fees
.ad l are, and how long your payment will get stuck in a delayed output if a
.\" ----------------------------------------------------------------- node goes down during the process\. The \fIriskfactor\fR floating-point field
.\" * MAIN CONTENT STARTS HERE * controls this tradeoff; it is the annual cost of your funds being stuck
.\" ----------------------------------------------------------------- (as a percentage)\.
.SH "NAME"
lightning-getroute \- Command for routing a payment (low\-level)\&.
.SH "SYNOPSIS" For example, if you thought the convenience of keeping your funds liquid
.sp (not stuck) was worth 20% per annum interest, \fIriskfactor\fR would be 20\.
\fBgetroute\fR \fIid\fR \fImsatoshi\fR \fIriskfactor\fR [\fIcltv\fR] [\fIfromid\fR] [\fIfuzzpercent\fR] [\fIexclude\fR] [\fImaxhops\fR]
.SH "DESCRIPTION"
.sp If you didn’t care about risk, \fIriskfactor\fR would be zero\.
The \fBgetroute\fR RPC command attempts to find the best route for the payment of \fImsatoshi\fR to lightning node \fIid\fR, such that the payment will arrive at \fIid\fR with \fIcltv\fR\-blocks to spare (default 9)\&.
.sp
\fImsatoshi\fR is in millisatoshi precision; it can be a whole number, or a whole number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\&. \fIfromid\fR is the node to start the route from: default is this node\.
.sp
There are two considerations for how good a route is: how low the fees are, and how long your payment will get stuck in a delayed output if a node goes down during the process\&. The \fIriskfactor\fR floating\-point field controls this tradeoff; it is the annual cost of your funds being stuck (as a percentage)\&.
.sp The \fIfuzzpercent\fR is a positive floating-point number, representing a
For example, if you thought the convenience of keeping your funds liquid (not stuck) was worth 20% per annum interest, \fIriskfactor\fR would be 20\&. percentage of the actual fee\. The \fIfuzzpercent\fR is used to distort
.sp computed fees along each channel, to provide some randomization to the
If you didn\(cqt care about risk, \fIriskfactor\fR would be zero\&. route generated\. 0\.0 means the exact fee of that channel is used, while
.sp 100\.0 means the fee used might be from 0 to twice the actual fee\. The
\fIfromid\fR is the node to start the route from: default is this node\&. default is 5\.0, or up to 5% fee distortion\.
.sp
The \fIfuzzpercent\fR is a positive floating\-point number, representing a percentage of the actual fee\&. The \fIfuzzpercent\fR is used to distort computed fees along each channel, to provide some randomization to the route generated\&. 0\&.0 means the exact fee of that channel is used, while 100\&.0 means the fee used might be from 0 to twice the actual fee\&. The default is 5\&.0, or up to 5% fee distortion\&.
.sp \fIexclude\fR is a JSON array of short-channel-id/direction (e\.g\. [
\fIexclude\fR is a JSON array of short\-channel\-id/direction (e\&.g\&. [ "564334x877x1/0", "564195x1292x0/1" ]) which should be excluded from consideration for routing\&. The default is not to exclude any channels\&. "564334x877x1/0", "564195x1292x0/1" ]) which should be excluded from
.sp consideration for routing\. The default is not to exclude any channels\.
\fImaxhops\fR is the maximum number of channels to return; default is 20\&.
.SH "RISKFACTOR EFFECT ON ROUTING"
.sp \fImaxhops\fR is the maximum number of channels to return; default is 20\.
The risk factor is treated as if it were an additional fee on the route, for the purposes of comparing routes\&.
.sp .SH RISKFACTOR EFFECT ON ROUTING
The risk factor is treated as if it were an additional fee on the route,
for the purposes of comparing routes\.
The formula used is the following approximation: The formula used is the following approximation:
.sp
.if n \{\
.RS 4
.\}
.nf .nf
risk\-fee = amount x blocks\-timeout x per\-block\-cost .RS
.fi risk-fee = amount x blocks-timeout x per-block-cost
.if n \{\
.RE .RE
.\}
.sp .fi
We are given a \fIriskfactor\fR expressed as a percentage\&. There are 52596 blocks per year, thus \fIper\-block\-cost\fR is \fIriskfactor\fR divided by 5,259,600\&.
.sp We are given a \fIriskfactor\fR expressed as a percentage\. There are 52596
blocks per year, thus \fIper-block-cost\fR is \fIriskfactor\fR divided by
5,259,600\.
The final result is: The final result is:
.sp
.if n \{\
.RS 4
.\}
.nf .nf
risk\-fee = amount x blocks\-timeout x riskfactor / 5259600 .RS
.fi risk-fee = amount x blocks-timeout x riskfactor / 5259600
.if n \{\
.RE .RE
.\}
.sp .fi
Here are the risk fees in millisatoshis, using various parameters\&. I assume a channel charges the default of 1000 millisatoshis plus 1 part\-per\-million\&. Common to_self_delay values on the network at 14 and 144 blocks\&.
.TS Here are the risk fees in millisatoshis, using various parameters\. I
allbox tab(:); assume a channel charges the default of 1000 millisatoshis plus 1
ltB ltB ltB ltB ltB. part-per-million\. Common to_self_delay values on the network at 14 and
T{ 144 blocks\.
Amount (msat)
T}:T{
Riskfactor .SH RECOMMENDED RISKFACTOR VALUES
T}:T{
Delay The default \fIfuzz\fR factor is 5%, so as you can see from the table above,
T}:T{ that tends to overwhelm the effect of \fIriskfactor\fR less than about 5\.
Risk Fee
T}:T{
Route fee 1 is a conservative value for a stable lightning network with very few
T} failures\.
.T&
lt lt lt lt lt
lt lt lt lt lt 1000 is an aggressive value for trying to minimize timeouts at all
lt lt lt lt lt costs\.
lt lt lt lt lt
lt lt lt lt lt
lt lt lt lt lt The default for \fBlightning-pay\fR(7) is 10, which starts to become a major
lt lt lt lt lt factor for larger amounts, and is basically ignored for tiny ones\.
lt lt lt lt lt
lt lt lt lt lt .SH RETURN VALUE
lt lt lt lt lt
lt lt lt lt lt On success, a "route" array is returned\. Each array element contains
lt lt lt lt lt \fIid\fR (the node being routed through), \fImsatoshi\fR (the millisatoshis
lt lt lt lt lt sent), \fIamount_msat\fR (the same, with \fImsat\fR appended), and \fIdelay\fR (the
lt lt lt lt lt number of blocks to timeout at this node)\.
lt lt lt lt lt
lt lt lt lt lt
lt lt lt lt lt The final \fIid\fR will be the destination \fIid\fR given in the input\. The
lt lt lt lt lt difference between the first \fImsatoshi\fR minus the \fImsatoshi\fR given in
lt lt lt lt lt the input is the fee\. The first \fIdelay\fR is the very worst case timeout
lt lt lt lt lt for the payment failure, in blocks\.
lt lt lt lt lt
lt lt lt lt lt .SH AUTHOR
lt lt lt lt lt
lt lt lt lt lt. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
T{
.sp .SH SEE ALSO
10,000
T}:T{ \fBlightning-pay\fR(7), \fBlightning-sendpay\fR(7)\.
.sp
1 .SH RESOURCES
T}:T{
.sp Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
14
T}:T{ .HL
.sp
0 Last updated 2019-08-01 14:59:36 CEST
T}:T{
.sp
1001
T}
T{
.sp
10,000
T}:T{
.sp
10
T}:T{
.sp
14
T}:T{
.sp
0
T}:T{
.sp
1001
T}
T{
.sp
10,000
T}:T{
.sp
100
T}:T{
.sp
14
T}:T{
.sp
2
T}:T{
.sp
1001
T}
T{
.sp
10,000
T}:T{
.sp
1000
T}:T{
.sp
14
T}:T{
.sp
26
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
1
T}:T{
.sp
14
T}:T{
.sp
2
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
10
T}:T{
.sp
14
T}:T{
.sp
26
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
100
T}:T{
.sp
14
T}:T{
.sp
266
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
1000
T}:T{
.sp
14
T}:T{
.sp
2661
T}:T{
.sp
1001
T}
T{
.sp
100,000,000
T}:T{
.sp
1
T}:T{
.sp
14
T}:T{
.sp
266
T}:T{
.sp
1100
T}
T{
.sp
100,000,000
T}:T{
.sp
10
T}:T{
.sp
14
T}:T{
.sp
2661
T}:T{
.sp
1100
T}
T{
.sp
100,000,000
T}:T{
.sp
100
T}:T{
.sp
14
T}:T{
.sp
26617
T}:T{
.sp
1100
T}
T{
.sp
100,000,000
T}:T{
.sp
1000
T}:T{
.sp
14
T}:T{
.sp
266179
T}:T{
.sp
1100
T}
T{
.sp
10,000
T}:T{
.sp
1
T}:T{
.sp
144
T}:T{
.sp
0
T}:T{
.sp
1001
T}
T{
.sp
10,000
T}:T{
.sp
10
T}:T{
.sp
144
T}:T{
.sp
2
T}:T{
.sp
1001
T}
T{
.sp
10,000
T}:T{
.sp
100
T}:T{
.sp
144
T}:T{
.sp
27
T}:T{
.sp
1001
T}
T{
.sp
10,000
T}:T{
.sp
1000
T}:T{
.sp
144
T}:T{
.sp
273
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
1
T}:T{
.sp
144
T}:T{
.sp
27
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
10
T}:T{
.sp
144
T}:T{
.sp
273
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
100
T}:T{
.sp
144
T}:T{
.sp
2737
T}:T{
.sp
1001
T}
T{
.sp
1,000,000
T}:T{
.sp
1000
T}:T{
.sp
144
T}:T{
.sp
27378
T}:T{
.sp
1001
T}
T{
.sp
100,000,000
T}:T{
.sp
1
T}:T{
.sp
144
T}:T{
.sp
2737
T}:T{
.sp
1100
T}
T{
.sp
100,000,000
T}:T{
.sp
10
T}:T{
.sp
144
T}:T{
.sp
27378
T}:T{
.sp
1100
T}
T{
.sp
100,000,000
T}:T{
.sp
100
T}:T{
.sp
144
T}:T{
.sp
273785
T}:T{
.sp
1100
T}
T{
.sp
100,000,000
T}:T{
.sp
1000
T}:T{
.sp
144
T}:T{
.sp
2737850
T}:T{
.sp
1100
T}
.TE
.sp 1
.SH "RECOMMENDED RISKFACTOR VALUES"
.sp
The default \fIfuzz\fR factor is 5%, so as you can see from the table above, that tends to overwhelm the effect of \fIriskfactor\fR less than about 5\&.
.sp
1 is a conservative value for a stable lightning network with very few failures\&.
.sp
1000 is an aggressive value for trying to minimize timeouts at all costs\&.
.sp
The default for lightning\-pay(7) is 10, which starts to become a major factor for larger amounts, and is basically ignored for tiny ones\&.
.SH "RETURN VALUE"
.sp
On success, a "route" array is returned\&. Each array element contains \fIid\fR (the node being routed through), \fImsatoshi\fR (the millisatoshis sent), \fIamount_msat\fR (the same, with \fImsat\fR appended), and \fIdelay\fR (the number of blocks to timeout at this node)\&.
.sp
The final \fIid\fR will be the destination \fIid\fR given in the input\&. The difference between the first \fImsatoshi\fR minus the \fImsatoshi\fR given in the input is the fee\&. The first \fIdelay\fR is the very worst case timeout for the payment failure, in blocks\&.
.SH "AUTHOR"
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&.
.SH "SEE ALSO"
.sp
lightning\-pay(7), lightning\-sendpay(7)\&.
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

252
doc/lightning-invoice.7

@ -1,132 +1,128 @@
'\" t .TH "LIGHTNING-INVOICE" "7" "" "" "lightning-invoice"
.\" Title: lightning-invoice .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/31/2019 lightning-invoice - Command for accepting payments\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fBinvoice\fR \fImsatoshi\fR \fIlabel\fR \fIdescription\fR [\fIexpiry\fR]
.TH "LIGHTNING\-INVOICE" "7" "07/31/2019" "\ \&" "\ \&" [\fIfallbacks\fR] [\fIpreimage\fR] [\fIexposeprivatechannels\fR]
.\" -----------------------------------------------------------------
.\" * Define some portability stuff .SH DESCRIPTION
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The \fBinvoice\fR RPC command creates the expectation of a payment of a
.\" http://bugs.debian.org/507673 given amount of milli-satoshi: it returns a unique token which another
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html lightning daemon can use to pay this invoice\. This token includes a
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \fIroute hint\fR description of an incoming channel with capacity to pay the
.ie \n(.g .ds Aq \(aq invoice, if any exists\.
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting The \fImsatoshi\fR parameter can be the string "any", which creates an
.\" ----------------------------------------------------------------- invoice that can be paid with any amount\. Otherwise it is in
.\" disable hyphenation millisatoshi precision; it can be a whole number, or a whole number
.nh ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending
.\" disable justification (adjust text to left margin only) in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\.
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE * The \fIlabel\fR must be a unique string or number (which is treated as a
.\" ----------------------------------------------------------------- string, so "01" is different from "1"); it is never revealed to other
.SH "NAME" nodes on the lightning network, but it can be used to query the status
lightning-invoice \- Command for accepting payments\&. of this invoice\.
.SH "SYNOPSIS"
.sp
\fBinvoice\fR \fImsatoshi\fR \fIlabel\fR \fIdescription\fR [\fIexpiry\fR] [\fIfallbacks\fR] [\fIpreimage\fR] [\fIexposeprivatechannels\fR] The \fIdescription\fR is a short description of purpose of payment, e\.g\. \fI1
.SH "DESCRIPTION" cup of coffee\fR\. This value is encoded into the BOLT11 invoice and is
.sp viewable by any node you send this invoice to\. It must be UTF-8, and
The \fBinvoice\fR RPC command creates the expectation of a payment of a given amount of milli\-satoshi: it returns a unique token which another lightning daemon can use to pay this invoice\&. This token includes a \fIroute hint\fR description of an incoming channel with capacity to pay the invoice, if any exists\&. cannot use \fI\u\fR JSON escape codes\.
.sp
The \fImsatoshi\fR parameter can be the string "any", which creates an invoice that can be paid with any amount\&. Otherwise it is in millisatoshi precision; it can be a whole number, or a whole number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\&.
.sp The \fIexpiry\fR is optionally the time the invoice is valid for; without a
The \fIlabel\fR must be a unique string or number (which is treated as a string, so "01" is different from "1"); it is never revealed to other nodes on the lightning network, but it can be used to query the status of this invoice\&. suffix it is interpreted as seconds, otherwise suffixes \fIs\fR, \fIm\fR, \fIh\fR,
.sp \fId\fR, \fIw\fR indicate seconds, minutes, hours, days and weeks respectively\.
The \fIdescription\fR is a short description of purpose of payment, e\&.g\&. \fI1 cup of coffee\fR\&. This value is encoded into the BOLT11 invoice and is viewable by any node you send this invoice to\&. It must be UTF\-8, and cannot use \fI\eu\fR JSON escape codes\&. If no value is provided the default of 604800 (1w) is used\.
.sp
The \fIexpiry\fR is optionally the time the invoice is valid for; without a suffix it is interpreted as seconds, otherwise suffixes \fIs\fR, \fIm\fR, \fIh\fR, \fId\fR, \fIw\fR indicate seconds, minutes, hours, days and weeks respectively\&. If no value is provided the default of 604800 (1w) is used\&.
.sp The \fIfallbacks\fR array is one or more fallback addresses to include in
The \fIfallbacks\fR array is one or more fallback addresses to include in the invoice (in order from most\-preferred to least): note that these arrays are not currently tracked to fulfill the invoice\&. the invoice (in order from most-preferred to least): note that these
.sp arrays are not currently tracked to fulfill the invoice\.
The \fIpreimage\fR is a 64\-digit hex string to be used as payment preimage for the created invoice\&. By default, if unspecified, lightningd will generate a secure pseudorandom preimage seeded from an appropriate entropy source on your system\&. \fBIMPORTANT\fR: if you specify the \fIpreimage\fR, you are responsible, to ensure appropriate care for generating using a secure pseudorandom generator seeded with sufficient entropy, and keeping the preimage secret\&. This parameter is an advanced feature intended for use with cutting\-edge cryptographic protocols and should not be used unless explicitly needed\&.
.sp
If specified, \fIexposeprivatechannels\fR overrides the default route hint logic, which will use unpublished channels only if there are no published channels\&. If \fItrue\fR unpublished channels are always considered as a route hint candidate; if \fIfalse\fR, never\&. The \fIpreimage\fR is a 64-digit hex string to be used as payment preimage
.sp for the created invoice\. By default, if unspecified, lightningd will
The route hint is selected from the set of incoming channels of which: peer\(cqs balance minus their reserves is at least \fImsatoshi\fR, state is normal, the peer is connected and not a dead end (i\&.e\&. has at least one other public channel)\&. The selection uses some randomness to prevent probing, but favors channels that become more balanced after the payment\&. generate a secure pseudorandom preimage seeded from an appropriate
.SH "RETURN VALUE" entropy source on your system\. \fBIMPORTANT\fR: if you specify the
.sp \fIpreimage\fR, you are responsible, to ensure appropriate care for
On success, a hash is returned as \fIpayment_hash\fR to be given to the payer, and the \fIexpiry_time\fR as a UNIX timestamp\&. It also returns a BOLT11 invoice as \fIbolt11\fR to be given to the payer\&. generating using a secure pseudorandom generator seeded with sufficient
.sp entropy, and keeping the preimage secret\. This parameter is an advanced
On failure, an error is returned and no invoice is created\&. If the lightning process fails before responding, the caller should use lightning\-listinvoice(7) to query whether this invoice was created or not\&. feature intended for use with cutting-edge cryptographic protocols and
.sp should not be used unless explicitly needed\.
If specified, \fIexposeprivatechannels\fR overrides the default route hint
logic, which will use unpublished channels only if there are no
published channels\. If \fItrue\fR unpublished channels are always considered
as a route hint candidate; if \fIfalse\fR, never\.
The route hint is selected from the set of incoming channels of which:
peer’s balance minus their reserves is at least \fImsatoshi\fR, state is
normal, the peer is connected and not a dead end (i\.e\. has at least one
other public channel)\. The selection uses some randomness to prevent
probing, but favors channels that become more balanced after the
payment\.
.SH RETURN VALUE
On success, a hash is returned as \fIpayment_hash\fR to be given to the
payer, and the \fIexpiry_time\fR as a UNIX timestamp\. It also returns a
BOLT11 invoice as \fIbolt11\fR to be given to the payer\.
On failure, an error is returned and no invoice is created\. If the
lightning process fails before responding, the caller should use
\fBlightning-listinvoice\fR(7) to query whether this invoice was created or
not\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 900: An invoice with the given \fIlabel\fR already exists\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 901: An invoice with the given \fIpreimage\fR already exists\.
.\}
\-1\&. Catchall nonspecific error\&.
.RE .RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
900\&. An invoice with the given
\fIlabel\fR
already exists\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
901\&. An invoice with the given
\fIpreimage\fR
already exists\&.
.RE
.sp
One of the following warnings may occur (on success): One of the following warnings may occur (on success):
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIwarning_offline\fR if no channel with a currently connected peer has
.\} the incoming capacity to pay this invoice
.el \{\ .IP \[bu]
.sp -1 \fIwarning_capacity\fR if there is no channel that has both sufficient
.IP \(bu 2.3 incoming capacity and has a peer that is publicly connected (i\.e\.
.\} not a dead end)
\fIwarning_offline\fR
if no channel with a currently connected peer has the incoming capacity to pay this invoice
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIwarning_capacity\fR
if there is no channel that has both sufficient incoming capacity and a peer that is publicly connected (i\&.e\&. not a dead end)
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-listinvoice(7), lightning\-delinvoice(7), lightning\-getroute(7), lightning\-sendpay(7)\&.
.SH "RESOURCES" \fBlightning-listinvoice\fR(7), \fBlightning-delinvoice\fR(7),
.sp \fBlightning-getroute\fR(7), \fBlightning-sendpay\fR(7)\.
Main web site: https://github\&.com/ElementsProject/lightning
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-08-02 18:18:10 CEST

412
doc/lightning-listchannels.7

@ -1,284 +1,142 @@
'\" t .TH "LIGHTNING-LISTCHANNELS" "7" "" "" "lightning-listchannels"
.\" Title: lightning-listchannels .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 05/31/2019 lightning-listchannels - Command to query active lightning channels in
.\" Manual: \ \& the entire network\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-LISTCHANN" "7" "05/31/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listchannels \- Command to query active lightning channels in the entire network\&.
.SH "SYNOPSIS"
.sp
\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR] \fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistchannels\fR RPC command returns data on channels that are known to the node\&. Because channels may be bidirectional, up to 2 objects will be returned for each channel (one for each direction)\&.
.sp The \fBlistchannels\fR RPC command returns data on channels that are known
If \fIshort_channel_id\fR is supplied, then only known channels with a matching \fIshort_channel_id\fR are returned\&. to the node\. Because channels may be bidirectional, up to 2 objects will
.sp be returned for each channel (one for each direction)\.
If \fIsource\fR is supplied, then only channels leading from that node id are returned\&.
.sp
If neither is supplied, data on all lightning channels known to this node, are returned\&. These can be local channels or public channels broadcast on the gossip network\&. If \fIshort_channel_id\fR is supplied, then only known channels with a
.SH "RETURN VALUE" matching \fIshort_channel_id\fR are returned\.
.sp
On success, an object with a "channels" key is returned containing a list of 0 or more objects\&.
.sp If \fIsource\fR is supplied, then only channels leading from that node id
are returned\.
If neither is supplied, data on all lightning channels known to this
node, are returned\. These can be local channels or public channels
broadcast on the gossip network\.
.SH RETURN VALUE
On success, an object with a "channels" key is returned containing a
list of 0 or more objects\.
Each object in the list contains the following data: Each object in the list contains the following data:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIsource\fR : The node providing entry to the channel, specifying the
.\} fees charged for using the channel in that direction\.
.el \{\ .IP \[bu]
.sp -1 \fIdestination\fR : The node providing the exit point for the channel\.
.IP \(bu 2.3 .IP \[bu]
.\} \fIshort_channel_id\fR : The channel identifier\.
\fIsource\fR .IP \[bu]
: The node providing entry to the channel, specifying the fees charged for using the channel in that direction\&. \fIpublic\fR : Boolean value, is publicly available\. Non-local channels
.RE will only ever have this value set to true\. Local channels are
.sp side-loaded by this node, rather than obtained through the gossip
.RS 4 network, and so may have this value set to false\.
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIsatoshis\fR : Funds available in the channel\.
.\} .IP \[bu]
.el \{\ \fIamount_sat\fR : Same as above, but ending in \fIsat\fR\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fImessage_flags\fR : Bitfield showing the presence of optional fields
.\} in the \fIchannel_update\fR message (BOLT #7)\.
\fIdestination\fR .IP \[bu]
: The node providing the exit point for the channel\&. \fIchannel_flags\fR : Bitfields indicating the direction of the channel
.RE and signaling various options concerning the channel\. (BOLT #7)\.
.sp .IP \[bu]
.RS 4 \fIactive\fR : Boolean value, is available for routing\. This is linked
.ie n \{\ to the channel flags data, where if the second bit is set, signals a
\h'-04'\(bu\h'+03'\c channels temporary unavailability (due to loss of connectivity) OR
.\} permanent unavailability where the channel has been closed but not
.el \{\ settlement on-chain\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fIlast_update\fR : Unix timestamp (seconds) showing when the last
.\} channel_update message was received\.
\fIshort_channel_id\fR .IP \[bu]
: The channel identifier\&. \fIbase_fee_millisatoshi\fR : The base fee (in millisatoshi) charged
.RE for the HTLC (BOLT #2)\.
.sp .IP \[bu]
.RS 4 \fIfee_per_millionth\fR : The amount (in millionths of a satoshi)
.ie n \{\ charged per transferred satoshi (BOLT #2)\.
\h'-04'\(bu\h'+03'\c .IP \[bu]
.\} \fIdelay\fR : The number of blocks delay required to wait for on-chain
.el \{\ settlement when unilaterally closing the channel (BOLT #2)\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fIhtlc_minimum_msat\fR : The minimum payment which can be send
.\} through this channel\.
\fIpublic\fR .IP \[bu]
: Boolean value, is publicly available\&. Non\-local channels will only ever have this value set to true\&. Local channels are side\-loaded by this node, rather than obtained through the gossip network, and so may have this value set to false\&. \fIhtlc_maximum_msat\fR : The maximum payment which can be send
.RE through this channel\.
.sp
.RS 4 .RE
.ie n \{\
\h'-04'\(bu\h'+03'\c If \fIshort_channel_id\fR or \fIsource\fR is supplied and no matching channels
.\} are found, a "channels" object with an empty list is returned\.
.el \{\
.sp -1 .SH ERRORS
.IP \(bu 2.3
.\} If \fIshort_channel_id\fR is not a valid short_channel_id, an error
\fIsatoshis\fR message will be returned:
: Funds available in the channel\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIamount_sat\fR
: Same as above, but ending in
\fIsat\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fImessage_flags\fR
: Bitfield showing the presence of optional fields in the
\fIchannel_update\fR
message (BOLT #7)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannel_flags\fR
: Bitfields indicating the direction of the channel and signaling various options concerning the channel\&. (BOLT #7)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIactive\fR
: Boolean value, is available for routing\&. This is linked to the channel flags data, where if the second bit is set, signals a channels temporary unavailability (due to loss of connectivity) OR permanent unavailability where the channel has been closed but not settlement on\-chain\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIlast_update\fR
: Unix timestamp (seconds) showing when the last channel_update message was received\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIbase_fee_millisatoshi\fR
: The base fee (in millisatoshi) charged for the HTLC (BOLT #2)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfee_per_millionth\fR
: The amount (in millionths of a satoshi) charged per transferred satoshi (BOLT #2)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIdelay\fR
: The number of blocks delay required to wait for on\-chain settlement when unilaterally closing the channel (BOLT #2)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIhtlc_minimum_msat\fR
: The minimum payment which can be send through this channel\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIhtlc_maximum_msat\fR
: The maximum payment which can be send through this channel\&.
.RE
.sp
If \fIshort_channel_id\fR or \fIsource\fR is supplied and no matching channels are found, a "channels" object with an empty list is returned\&.
.SH "ERRORS"
.sp
If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will be returned:
.sp
.if n \{\
.RS 4
.\}
.nf .nf
{ "code" : \-32602, .RS
"message" : "\*(Aqshort_channel_id\*(Aq should be a short channel id, not \*(Aq\&.\&.\&.\*(Aq" } { "code" : -32602,
.fi "message" : "'short_channel_id' should be a short channel id, not '...'" }
.if n \{\
.RE .RE
.\}
.sp .fi
Similarly if \fIsource\fR is not a valid pubkey\&.
.SH "AUTHOR" Similarly if \fIsource\fR is not a valid pubkey\.
.sp
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&. .SH AUTHOR
.SH "SEE ALSO"
.sp Michael Hawkins \fBNone\fR (\fI<michael.hawkins@protonmail.com\fR)>\.
lightning\-fundchannel(7), lightning\-listnodes(7)
.SH "RESOURCES" .SH SEE ALSO
.sp
Main web site: https://github\&.com/ElementsProject/lightning \fBlightning-fundchannel\fR(7), \fBlightning-listnodes\fR(7)
.sp
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
Lightning RFC site Lightning RFC site
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
BOLT #2: BOLT #2:
https://github\&.com/lightningnetwork/lightning\-rfc/blob/master/02\-peer\-protocol\&.md \fBNone\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md\fR)
.RE
.sp
.RS 4 .IP \[bu]
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
BOLT #7: BOLT #7:
https://github\&.com/lightningnetwork/lightning\-rfc/blob/master/07\-routing\-gossip\&.md \fBNone\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR)
.RE
.RE
.HL
Last updated 2019-06-12 11:16:20 CEST

243
doc/lightning-listforwards.7

@ -1,176 +1,81 @@
'\" t .TH "LIGHTNING-LISTFORWARDS" "7" "" "" "lightning-listforwards"
.\" Title: lightning-listforwards .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/15/2019 lightning-listforwards - Command showing all htlcs and their
.\" Manual: \ \& information\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-LISTFORWA" "7" "08/15/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listforwards \- Command showing all htlcs and their information\&.
.SH "SYNOPSIS"
.sp
\fBlistforwards\fR \fBlistforwards\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistforwards\fR RPC command displays all htlcs that have been attempted to be forwarded by the c\-lightning node\&.
.SH "RETURN VALUE" The \fBlistforwards\fR RPC command displays all htlcs that have been
.sp attempted to be forwarded by the c-lightning node\.
On success one array will be returned: \fIforwards\fR with htlcs that have been processed
.sp .SH RETURN VALUE
On success one array will be returned: \fIforwards\fR with htlcs that have
been processed
Each entry in \fIforwards\fR will include: Each entry in \fIforwards\fR will include:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIin_channel\fR: the short_channel_id of the channel that recieved the incoming htlc\.
.\} .IP \[bu]
.el \{\ \fIin_msatoshi\fR, \fIin_msat\fR - amount of msatoshis that are forwarded to this node\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fIstatus\fR: status can be either \fIoffered\fR if the routing process is still ongoing,
.\} \fIsettled\fR if the routing process is completed or \fIfailed\fR if the routing process could not be completed\.
\fIin_channel\fR .IP \[bu]
\- the short_channel_id of the channel that recieved the incoming htlc\&. \fIreceived_time\fR: timestamp when incoming htlc was received\.
.RE .RE
.sp
.RS 4 The following additional fields are usually present, but will not be for some
.ie n \{\ variants of status \fIlocal_failed\fR (if it failed before we determined these):
\h'-04'\(bu\h'+03'\c
.\} .RS
.el \{\ .IP \[bu]
.sp -1 \fIout_channel\fR: the short_channel_id of to which the outgoing htlc is supposed to be forwarded\.
.IP \(bu 2.3 .IP \[bu]
.\} \fIfee\fR, \fIfee_msat\fR: fee offered for forwarding the htlc in msatoshi\.
\fIin_msatoshi\fR, .IP \[bu]
\fIin_msat\fR \fIout_msatoshi\fR, \fIout_msat\fR - amount of msatoshis to be forwarded\.
\- amount of msatoshis that are forwarded to this node\&.
.RE .RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIstatus\fR
\- status can be either
\fIoffered\fR
if the routing process is still ongoing,
\fIsettled\fR
if the routing process is completed,
\fIfailed\fR
if the routing process could not be completed, or
\fIlocal_failed\fR
if the node failed the forward itself\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIreceived_time\fR
\- timestamp when incoming htlc was received\&.
.RE
.sp
The following additional fields are usually present, but will not be for some variants of status \fIlocal_failed\fR (if it failed before we determined these):
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfee\fR,
\fIfee_msat\fR
\- fee offered for forwarding the htlc in msatoshi\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIout_channel\fR
\- the short_channel_id of to which the outgoing htlc is supposed to be forwarded\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIout_msatoshi\fR,
\fIout_msat\fR
\- amount of msatoshis to be forwarded\&.
.RE
.sp
The following fields may be offered, but for old forgotten HTLCs they will be omitted: The following fields may be offered, but for old forgotten HTLCs they will be omitted:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIpayment_hash\fR - the payment_hash belonging to the HTLC\.
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIpayment_hash\fR
\- the payment_hash belonging to the HTLC\&.
.RE .RE
.sp
If the status is not \fIoffered\fR, the following additional fields are present: If the status is not 'offered', the following additional fields are present:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIresolved_time\fR - timestamp when htlc was resolved (settled or failed)\.
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIresolved_time\fR
\- timestamp when htlc was resolved (settled or failed)\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Rene Pickhardt <r\&.pickhardt@gmail\&.com> is mainly responsible\&. Rene Pickhardt \fBNone\fR (\fI<r.pickhardt@gmail.com\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-getinfo(7)
.SH "RESOURCES" \fBlightning-getinfo\fR(7)
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-07-23 00:53:16 CEST

300
doc/lightning-listfunds.7

@ -1,229 +1,87 @@
'\" t .TH "LIGHTNING-LISTFUNDS" "7" "" "" "lightning-listfunds"
.\" Title: lightning-listfunds .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/25/2019 lightning-listfunds - Command showing all funds currently managed by the
.\" Manual: \ \& c-lightning node\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-LISTFUNDS" "7" "07/25/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listfunds \- Command showing all funds currently managed by the c\-lightning node\&.
.SH "SYNOPSIS"
.sp
\fBlistfunds\fR \fBlistfunds\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistfunds\fR RPC command displays all funds available, either in unspent outputs (UTXOs) in the internal wallet or funds locked in currently open channels\&.
.SH "RETURN VALUE" The \fBlistfunds\fR RPC command displays all funds available, either in
.sp unspent outputs (UTXOs) in the internal wallet or funds locked in
On success two arrays will be returned: \fIoutputs\fR with funds currently locked onchain in UTXOs and \fIchannels\fR with funds readily spendable in channels\&. currently open channels\.
.sp
.SH RETURN VALUE
On success two arrays will be returned: \fIoutputs\fR with funds currently
locked onchain in UTXOs and \fIchannels\fR with funds readily spendable in
channels\.
Each entry in \fIoutputs\fR will include: Each entry in \fIoutputs\fR will include:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fItxid\fR \fItxid\fR
.RE .IP \[bu]
.sp \fIoutput\fR (the index of the output in the transaction)
.RS 4 .IP \[bu]
.ie n \{\ \fIvalue\fR (the output value in satoshis)
\h'-04'\(bu\h'+03'\c .IP \[bu]
.\} \fIamount_msat\fR (the same as \fIvalue\fR, but in millisatoshi with \fImsat\fR
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIoutput\fR
(the index of the output in the transaction)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIvalue\fR
(the output value in satoshis)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIamount_msat\fR
(the same as
\fIvalue\fR, but in millisatoshi with
\fImsat\fR
appended) appended)
.RE .IP \[bu]
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIaddress\fR \fIaddress\fR
.IP \[bu]
\fIstatus\fR (whether \fIunconfirmed\fR, \fIconfirmed\fR, or \fIspent\fR)
.RE .RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIstatus\fR
(whether
\fIunconfirmed\fR,
\fIconfirmed\fR, or
\fIspent\fR)
.RE
.sp
Each entry in \fIchannels\fR will include: Each entry in \fIchannels\fR will include:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIpeer_id\fR - the peer with which the channel is opened\.
.\} .IP \[bu]
.el \{\ \fIshort_channel_id\fR - as per BOLT 7 (representing the block,
.sp -1 transaction number and output index of the channel funding
.IP \(bu 2.3 transaction)\.
.\} .IP \[bu]
\fIpeer_id\fR \fIchannel_sat\fR - available satoshis on our node’s end of the channel
\- the peer with which the channel is opened\&. (values rounded down to satoshis as internal storage is in
.RE millisatoshi)\.
.sp .IP \[bu]
.RS 4 \fIour_amount_msat\fR - same as above, but in millisatoshis with
.ie n \{\ \fImsat\fR appended\.
\h'-04'\(bu\h'+03'\c .IP \[bu]
.\} \fIchannel_total_sat\fR - total channel value in satoshi
.el \{\ .IP \[bu]
.sp -1 \fIamount_msat\fR - same as above, but in millisatoshis with \fImsat\fR
.IP \(bu 2.3 appended\.
.\} .IP \[bu]
\fIshort_channel_id\fR \fIfunding_txid\fR - funding transaction id\.
\- as per BOLT 7 (representing the block, transaction number and output index of the channel funding transaction)\&. .IP \[bu]
.RE \fIfunding_output\fR - the index of the output in the funding
.sp transaction\.
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannel_sat\fR
\- available satoshis on our node\(cqs end of the channel (values rounded down to satoshis as internal storage is in millisatoshi)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIour_amount_msat\fR
\- same as above, but in millisatoshis with
\fImsat\fR
appended\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannel_total_sat\fR
\- total channel value in satoshi
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIamount_msat\fR
\- same as above, but in millisatoshis with
\fImsat\fR
appended\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfunding_txid\fR
\- funding transaction id\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfunding_output\fR
\- the index of the output in the funding transaction\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Felix <fixone@gmail\&.com> is mainly responsible\&. Felix \fBNone\fR (\fI<fixone@gmail.com\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-newaddr(7), lightning\-fundchannel(7), lightning\-withdraw(7)
.SH "RESOURCES" \fBlightning-newaddr\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7)
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-07-28 16:25:20 CEST

92
doc/lightning-listinvoices.7

@ -1,49 +1,45 @@
'\" t .TH "LIGHTNING-LISTINVOICES" "7" "" "" "lightning-listinvoices"
.\" Title: lightning-listinvoices .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 02/18/2019 lightning-listinvoices - Command for querying invoice status
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-LISTINVOI" "7" "02/18/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listinvoices \- Command for querying invoice status
.SH "SYNOPSIS"
.sp
\fBlistinvoices\fR [\fIlabel\fR] \fBlistinvoices\fR [\fIlabel\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistinvoices\fR RPC command gets the status of a specific invoice, if it exists, or the status of all invoices if given no argument\&.
.SH "RETURN VALUE" The \fBlistinvoices\fR RPC command gets the status of a specific invoice,
.sp if it exists, or the status of all invoices if given no argument\.
On success, an array \fIinvoices\fR of objects is returned\&. Each object contains \fIlabel\fR, \fIpayment_hash\fR, \fIstatus\fR (one of \fIunpaid\fR, \fIpaid\fR or \fIexpired\fR), and \fIexpiry_time\fR (a UNIX timestamp)\&. If the \fImsatoshi\fR argument to lightning\-invoice(7) was not "any", there will be an \fImsatoshi\fR field as a number, and \fIamount_msat\fR as the same number ending in \fImsat\fR\&. If the invoice \fIstatus\fR is \fIpaid\fR, there will be a \fIpay_index\fR field and an \fImsatoshi_received\fR field (which may be slightly greater than \fImsatoshi\fR as some overpaying is permitted to allow clients to obscure payment paths); there will also be an \fIamount_received_msat\fR field with the same number as \fImsatoshi_received\fR but ending in \fImsat\fR\&.
.SH "AUTHOR" .SH RETURN VALUE
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. On success, an array \fIinvoices\fR of objects is returned\. Each object
.SH "SEE ALSO" contains \fIlabel\fR, \fIpayment_hash\fR, \fIstatus\fR (one of \fIunpaid\fR, \fIpaid\fR or
.sp \fIexpired\fR), and \fIexpiry_time\fR (a UNIX timestamp)\. If the \fImsatoshi\fR
lightning\-waitinvoice(7), lightning\-delinvoice(7), lightning\-invoice(7)\&. argument to \fBlightning-invoice\fR(7) was not "any", there will be an
.SH "RESOURCES" \fImsatoshi\fR field as a number, and \fIamount_msat\fR as the same number
.sp ending in \fImsat\fR\. If the invoice \fIstatus\fR is \fIpaid\fR, there will be a
Main web site: https://github\&.com/ElementsProject/lightning \fIpay_index\fR field and an \fImsatoshi_received\fR field (which may be
slightly greater than \fImsatoshi\fR as some overpaying is permitted to
allow clients to obscure payment paths); there will also be an
\fIamount_received_msat\fR field with the same number as
\fImsatoshi_received\fR but ending in \fImsat\fR\.
.SH AUTHOR
Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-waitinvoice\fR(7), \fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-30 17:12:10 CEST

180
doc/lightning-listpays.7

@ -1,108 +1,74 @@
'\" t .TH "LIGHTNING-LISTPAYS" "7" "" "" "lightning-listpays"
.\" Title: lightning-listpays .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 02/23/2019 lightning-listpays - Command for querying payment status
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-LISTPAYS" "7" "02/23/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listpays \- Command for querying payment status
.SH "SYNOPSIS"
.sp
\fBlistpays\fR [bolt11] \fBlistpays\fR [bolt11]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistpay\fR RPC command gets the status of all \fIpay\fR commands, or a single one if \fIbolt11\fR is specified\&.
.SH "RETURN VALUE" The \fBlistpay\fR RPC command gets the status of all \fIpay\fR commands, or a
.sp single one if \fIbolt11\fR is specified\.
On success, an array of objects is returned\&. Each object contains:
.PP .SH RETURN VALUE
\fIbolt11\fR
.RS 4 On success, an array of objects is returned\. Each object contains:
the
\fIbolt11\fR
argument given to \fIbolt11\fR
\fIpay\fR the \fIbolt11\fR argument given to \fIpay\fR (see below for exceptions)\.
(see below for exceptions)\&.
.RE
.PP \fIstatus\fR
\fIstatus\fR one of \fIcomplete\fR, \fIfailed\fR or \fIpending\fR\.
.RS 4
one of
\fIcomplete\fR, \fIpayment_preimage\fR
\fIfailed\fR (if \fIstatus\fR is \fIcomplete\fR) proves payment was received\.
or
\fIpending\fR\&.
.RE \fIlabel\fR
.PP optional \fIlabel\fR, if provided to \fIpay\fR\.
\fIpayment_preimage\fR
.RS 4
(if \fIamount_sent_msat\fR
\fIstatus\fR total amount sent, in "NNNmsat" format\.
is
\fIcomplete\fR) proves payment was received\&.
.RE For old payments (pre-0\.7) we didn’t save the \fIbolt11\fR string, so in its
.PP place are three other fields:
\fIlabel\fR
.RS 4
optional \fIpayment_hash\fR
\fIlabel\fR, if provided to the hash of the \fIpayment_preimage\fR which will prove payment\.
\fIpay\fR\&.
.RE
.PP \fIdestination\fR
\fIamount_sent_msat\fR the final destination of the payment\.
.RS 4
total amount sent, in "NNNmsat" format\&.
.RE \fIamount_msat\fR
.sp the amount the destination received, in "NNNmsat" format\.
For old payments (pre\-0\&.7) we didn\(cqt save the \fIbolt11\fR string, so in its place are three other fields:
.PP
\fIpayment_hash\fR These three can all be extracted from \fIbolt11\fR, hence are obsolete\.
.RS 4
the hash of the .SH AUTHOR
\fIpayment_preimage\fR
which will prove payment\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.RE
.PP .SH SEE ALSO
\fIdestination\fR
.RS 4 \fBlightning-pay\fR(7), \fBlightning-paystatus\fR(7), \fBlightning-listsendpays\fR(7)\.
the final destination of the payment\&.
.RE .SH RESOURCES
.PP
\fIamount_msat\fR Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.RS 4
the amount the destination received, in "NNNmsat" format\&. .HL
.RE
.sp Last updated 2019-04-30 17:12:10 CEST
These three can all be extracted from \fIbolt11\fR, hence are obsolete\&.
.SH "AUTHOR"
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&.
.SH "SEE ALSO"
.sp
lightning\-pay(7), lightning\-paystatus(7), lightning\-listpayments(7)\&.
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

275
doc/lightning-listpeers.7

@ -1,177 +1,116 @@
'\" t .TH "LIGHTNING-LISTPEERS" "7" "" "" "lightning-listpeers"
.\" Title: lightning-listpeers .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 01/08/2019 lightning-listpeers - Command for returning data on connected lightning
.\" Manual: \ \& nodes\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-LISTPEERS" "7" "01/08/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listpeers \- Command for returning data on connected lightning nodes\&.
.SH "SYNOPSIS"
.sp
\fBlistpeers\fR [\fIid\fR] [\fIlevel\fR] \fBlistpeers\fR [\fIid\fR] [\fIlevel\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistpeers\fR RPC command returns data on nodes that are connected or are not connected but have open channels with this node\&.
.sp The \fBlistpeers\fR RPC command returns data on nodes that are connected
Once a connection to another lightning node has been established, using the \fBconnect\fR command, data on the node can be returned using \fBlistpeers\fR and the \fIid\fR that was used with the \fBconnect\fR command\&. or are not connected but have open channels with this node\.
.sp
If no \fIid\fR is supplied, then data on all lightning nodes that are connected, or not connected but have open channels with this node, are returned\&.
.sp Once a connection to another lightning node has been established, using
Supplying \fIid\fR will filter the results to only return data on a node with a matching \fIid\fR, if one exists\&. the \fBconnect\fR command, data on the node can be returned using
.sp \fBlistpeers\fR and the \fIid\fR that was used with the \fBconnect\fR command\.
Supplying \fIlevel\fR will show log entries related to that peer at the given log level\&. Valid log levels are "io", "debug", "info", and "unusual"\&.
.sp
If a channel is open with a node and the connection has been lost, then the node will still appear in the output of the command and the value of the \fIconnected\fR attribute of the node will be "false"\&. If no \fIid\fR is supplied, then data on all lightning nodes that are
.sp connected, or not connected but have open channels with this node, are
The channel will remain open for a set blocktime, after which if the connection has not been re\-established, the channel will close and the node will no longer appear in the command output\&. returned\.
.SH "RETURN VALUE"
.sp
On success, an object with a "peers" key is returned containing a list of 0 or more objects\&. Supplying \fIid\fR will filter the results to only return data on a node
.sp with a matching \fIid\fR, if one exists\.
Supplying \fIlevel\fR will show log entries related to that peer at the
given log level\. Valid log levels are "io", "debug", "info", and
"unusual"\.
If a channel is open with a node and the connection has been lost, then
the node will still appear in the output of the command and the value of
the \fIconnected\fR attribute of the node will be "false"\.
The channel will remain open for a set blocktime, after which if the
connection has not been re-established, the channel will close and the
node will no longer appear in the command output\.
.SH RETURN VALUE
On success, an object with a "peers" key is returned containing a list
of 0 or more objects\.
Each object in the list contains the following data: Each object in the list contains the following data:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIid\fR : The unique id of the peer
.\} .IP \[bu]
.el \{\ \fIconnected\fR : A boolean value showing the connection status
.sp -1 .IP \[bu]
.IP \(bu 2.3 \fInetaddr\fR : A list of network addresses the node is listening on
.\} .IP \[bu]
\fIid\fR \fIglobalfeatures\fR : Bit flags showing supported global features (BOLT #9)
: The unique id of the peer .IP \[bu]
\fIlocalfeatures\fR : Bit flags showing supported local features (BOLT #9)
.IP \[bu]
\fIchannels\fR : An list of channel id’s open on the peer
.IP \[bu]
\fIlog\fR : Only present if \fIlevel\fR is set\. List logs related to the
peer at the specified \fIlevel\fR
.RE .RE
.sp
.RS 4 If \fIid\fR is supplied and no matching nodes are found, a "peers" object
.ie n \{\ with an empty list is returned\.
\h'-04'\(bu\h'+03'\c
.\} .SH ERRORS
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIconnected\fR
: A boolean value showing the connection status
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fInetaddr\fR
: A list of network addresses the node is listening on
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIglobalfeatures\fR
: Bit flags showing supported global features (BOLT #9)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIlocalfeatures\fR
: Bit flags showing supported local features (BOLT #9)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannels\fR
: An list of channel id\(cqs open on the peer
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIlog\fR
: Only present if
\fIlevel\fR
is set\&. List logs related to the peer at the specified
\fIlevel\fR
.RE
.sp
If \fIid\fR is supplied and no matching nodes are found, a "peers" object with an empty list is returned\&.
.SH "ERRORS"
.sp
If \fIid\fR is not a valid public key, an error message will be returned: If \fIid\fR is not a valid public key, an error message will be returned:
.sp
.if n \{\
.RS 4
.\}
.nf .nf
{ "code" : \-32602, "message" : "\*(Aqid\*(Aq should be a pubkey, not \*(Aq\&.\&.\&.\*(Aq" } .RS
.fi { "code" : -32602, "message" : "'id' should be a pubkey, not '...'" }
.if n \{\
.RE .RE
.\}
.sp .fi
If \fIlevel\fR is not a valid log level, an error message will be returned: If \fIlevel\fR is not a valid log level, an error message will be returned:
.sp
.if n \{\
.RS 4
.\}
.nf .nf
{ "code" : \-32602, "message" "\*(Aqlevel\*(Aq should be \*(Aqio\*(Aq, \*(Aqdebug\*(Aq, \*(Aqinfo\*(Aq, or \*(Aqunusual\*(Aq, not \*(Aq\&.\&.\&.\*(Aq" } .RS
.fi { "code" : -32602, "message" "'level' should be 'io', 'debug', 'info', or 'unusual', not '...'" }
.if n \{\
.RE .RE
.\}
.SH "AUTHOR" .fi
.sp .SH AUTHOR
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.
.SH "SEE ALSO" Michael Hawkins \fBNone\fR (\fI<michael.hawkins@protonmail.com\fR)>\.
.sp
lightning\-connect(7) .SH SEE ALSO
.SH "RESOURCES"
.sp \fBlightning-connect\fR(7)
Main web site: https://github\&.com/ElementsProject/lightning Lightning RFC site (BOLT #9): https://github\&.com/lightningnetwork/lightning\-rfc/blob/master/09\-features\&.md
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR) Lightning
RFC site (BOLT #9):
\fBNone\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md\fR)
.HL
Last updated 2019-04-30 17:12:10 CEST

186
doc/lightning-listsendpays.7

@ -1,111 +1,79 @@
'\" t .TH "LIGHTNING-LISTSENDPAYS" "7" "" "" "lightning-listsendpays"
.\" Title: lightning-listsendpays .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 02/23/2019 lightning-listsendpays - Low-level command for querying sendpay status
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-LISTSENDP" "7" "02/23/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-listsendpays \- Low\-level command for querying sendpay status
.SH "SYNOPSIS"
.sp
\fBlistsendpays\fR [\fIbolt11\fR] [\fIpayment_hash\fR] \fBlistsendpays\fR [\fIbolt11\fR] [\fIpayment_hash\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBlistsendpays\fR RPC command gets the status of all \fIsendpay\fR commands (which is also used by the \fIpay\fR command), or with \fIbolt11\fR or \fIpayment_hash\fR limits results to that specific payment\&. You cannot specify both\&.
.sp The \fBlistsendpays\fR RPC command gets the status of all \fIsendpay\fR
Note that in future there may be more than one concurrent \fIsendpay\fR command per \fIpay\fR, so this command should be used with caution\&. commands (which is also used by the \fIpay\fR command), or with \fIbolt11\fR or
.SH "RETURN VALUE" \fIpayment_hash\fR limits results to that specific payment\. You cannot
.sp specify both\.
On success, an array of objects is returned\&. Each object contains:
.PP
\fIid\fR Note that in future there may be more than one concurrent \fIsendpay\fR
.RS 4 command per \fIpay\fR, so this command should be used with caution\.
.SH RETURN VALUE
On success, an array of objects is returned\. Each object contains:
\fIid\fR
unique internal value assigned at creation unique internal value assigned at creation
.RE
.PP
\fIpayment_hash\fR \fIpayment_hash\fR
.RS 4 the hash of the \fIpayment_preimage\fR which will prove payment\.
the hash of the
\fIpayment_preimage\fR
which will prove payment\&. \fIdestination\fR
.RE the final destination of the payment\.
.PP
\fIdestination\fR
.RS 4 \fIamount_msat\fR
the final destination of the payment\&. the amount the destination received, in "NNNmsat" format\.
.RE
.PP
\fIamount_msat\fR \fIcreated_at\fR
.RS 4 the UNIX timestamp showing when this payment was initiated\.
the amount the destination received, in "NNNmsat" format\&.
.RE
.PP \fIstatus\fR
\fIcreated_at\fR one of \fIcomplete\fR, \fIfailed\fR or \fIpending\fR\.
.RS 4
the UNIX timestamp showing when this payment was initiated\&.
.RE \fIpayment_preimage\fR
.PP (if \fIstatus\fR is \fIcomplete\fR) proves payment was received\.
\fIstatus\fR
.RS 4
one of \fIlabel\fR
\fIcomplete\fR, optional \fIlabel\fR, if provided to \fIsendpay\fR\.
\fIfailed\fR
or
\fIpending\fR\&. \fIbolt11\fR
.RE the \fIbolt11\fR argument given to \fIpay\fR (may be missing for pre-0\.7
.PP payments)\.
\fIpayment_preimage\fR
.RS 4 .SH AUTHOR
(if
\fIstatus\fR Christian Decker \fBNone\fR (\fI<decker.christian@gmail.com\fR)> is mainly
is responsible\.
\fIcomplete\fR) proves payment was received\&.
.RE .SH SEE ALSO
.PP
\fIlabel\fR \fBlightning-listpays\fR(7), \fBlightning-sendpay\fR(7), \fBlightning-listinvoice\fR(7)\.
.RS 4
optional .SH RESOURCES
\fIlabel\fR, if provided to
\fIsendpay\fR\&. Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.RE
.PP .HL
\fIbolt11\fR
.RS 4 Last updated 2019-04-30 17:12:10 CEST
the
\fIbolt11\fR
argument given to
\fIpay\fR
(may be missing for pre\-0\&.7 payments)\&.
.RE
.SH "AUTHOR"
.sp
Christian Decker <decker\&.christian@gmail\&.com> is mainly responsible\&.
.SH "SEE ALSO"
.sp
lightning\-listpays(7), lightning\-sendpay(7), lightning\-listinvoice(7)\&.
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

113
doc/lightning-newaddr.7

@ -1,58 +1,57 @@
'\" t .TH "LIGHTNING-NEWADDR" "7" "" "" "lightning-newaddr"
.\" Title: lightning-newaddr .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 02/23/2019 lightning-newaddr - Command for generating a new address to be used by
.\" Manual: \ \& c-lightning\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-NEWADDR" "7" "02/23/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-newaddr \- Command for generating a new address to be used by c\-lightning\&.
.SH "SYNOPSIS"
.sp
\fBnewaddr\fR [ \fIaddresstype\fR ] \fBnewaddr\fR [ \fIaddresstype\fR ]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBnewaddr\fR RPC command generates a new address which can subsequently be used to fund channels managed by the c\-lightning node\&.
.sp The \fBnewaddr\fR RPC command generates a new address which can
The funding transaction needs to be confirmed before funds can be used\&. subsequently be used to fund channels managed by the c-lightning node\.
.sp
\fIaddresstype\fR specifies the type of address wanted; i\&.e\&. \fIp2sh\-segwit\fR (e\&.g\&. 2MxaozoqWwiUcuD9KKgUSrLFDafLqimT9Ta on bitcoin testnet or 3MZxzq3jBSKNQ2e7dzneo9hy4FvNzmMmt3 on bitcoin mainnet) or \fIbech32 \*(Aq (e\&.g\&. tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg on bitcoin testnet or bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej on bitcoin mainnet)\&. The special value \*(Aqall\fR generates both address types for the same underlying key\&.
.sp The funding transaction needs to be confirmed before funds can be used\.
If not specified the address generated is bech32\&.
.SH "RETURN VALUE"
.sp \fIaddresstype\fR specifies the type of address wanted; i\.e\. \fIp2sh-segwit\fR
On success, a \fIbech32\fR address and/or a \fIp2sh\-segwit\fR address will be returned\&. (e\.g\. 2MxaozoqWwiUcuD9KKgUSrLFDafLqimT9Ta on bitcoin testnet or
.SH "ERRORS" 3MZxzq3jBSKNQ2e7dzneo9hy4FvNzmMmt3 on bitcoin mainnet) or \fIbech32 '
.sp (e\.g\. tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg on bitcoin testnet or
If an unrecognized address type is requested an error message will be returned\&. bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej on
.SH "AUTHOR" bitcoin mainnet)\. The special value 'all\fR generates both address types
.sp for the same underlying key\.
Felix <fixone@gmail\&.com> is mainly responsible\&.
.SH "SEE ALSO"
.sp If not specified the address generated is bech32\.
lightning\-listfunds(7), lightning\-fundchannel(7), lightning\-withdraw(7)
.SH "RESOURCES" .SH RETURN VALUE
.sp
Main web site: https://github\&.com/ElementsProject/lightning On success, a \fIbech32\fR address and/or a \fIp2sh-segwit\fR address will be
returned\.
.SH ERRORS
If an unrecognized address type is requested an error message will be
returned\.
.SH AUTHOR
Felix \fBNone\fR (\fI<fixone@gmail.com\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-30 17:34:18 CEST

413
doc/lightning-pay.7

@ -1,258 +1,163 @@
'\" t .TH "LIGHTNING-PAY" "7" "" "" "lightning-pay"
.\" Title: lightning-pay .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 05/23/2019 lightning-pay - Command for sending a payment to a BOLT11 invoice
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fBpay\fR \fIbolt11\fR [\fImsatoshi\fR] [\fIlabel\fR] [\fIriskfactor\fR]
.TH "LIGHTNING\-PAY" "7" "05/23/2019" "\ \&" "\ \&" [\fImaxfeepercent\fR] [\fIretry_for\fR] [\fImaxdelay\fR] [\fIexemptfee\fR]
.\" -----------------------------------------------------------------
.\" * Define some portability stuff .SH DESCRIPTION
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The \fBpay\fR RPC command attempts to find a route to the given
.\" http://bugs.debian.org/507673 destination, and send the funds it asks for\. If the \fIbolt11\fR does not
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html contain an amount, \fImsatoshi\fR is required, otherwise if it is specified
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ it must be \fInull\fR\. \fImsatoshi\fR is in millisatoshi precision; it can be a
.ie \n(.g .ds Aq \(aq whole number, or a whole number with suffix \fImsat\fR or \fIsat\fR, or a three
.el .ds Aq ' decimal point number with suffix \fIsat\fR, or an 1 to 11 decimal point
.\" ----------------------------------------------------------------- number suffixed by \fIbtc\fR\.
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation The \fIlabel\fR field is used to attach a label to payments, and is returned
.nh in \fBlightning-listpays\fR(7) and \fBlightning-listsendpays\fR(7)\. The \fIriskfactor\fR
.\" disable justification (adjust text to left margin only) is described in detail in \fBlightning-getroute\fR(7), and defaults to 10\. The
.ad l \fImaxfeepercent\fR limits the money paid in fees, and defaults to 0\.5\. The
.\" ----------------------------------------------------------------- \fBmaxfeepercent' is a percentage of the amount that is to be paid. The `exemptfee\fR
.\" * MAIN CONTENT STARTS HERE * option can be used for tiny payments which would be dominated by the fee
.\" ----------------------------------------------------------------- leveraged by forwarding nodes\. Setting \fBexemptfee\fR allows the
.SH "NAME" \fBmaxfeepercent\fR check to be skipped on fees that are smaller than
lightning-pay \- Command for sending a payment to a BOLT11 invoice \fBexemptfee\fR (default: 5000 millisatoshi)\.
.SH "SYNOPSIS"
.sp
\fBpay\fR \fIbolt11\fR [\fImsatoshi\fR] [\fIlabel\fR] [\fIriskfactor\fR] [\fImaxfeepercent\fR] [\fIretry_for\fR] [\fImaxdelay\fR] [\fIexemptfee\fR] The response will occur when the payment fails or succeeds\. Once a
.SH "DESCRIPTION" payment has succeeded, calls to \fBpay\fR with the same \fIbolt11\fR will
.sp succeed immediately\.
The \fBpay\fR RPC command attempts to find a route to the given destination, and send the funds it asks for\&. If the \fIbolt11\fR does not contain an amount, \fImsatoshi\fR is required, otherwise if it is specified it must be \fInull\fR\&. \fImsatoshi\fR is in millisatoshi precision; it can be a whole number, or a whole number with suffix \fImsat\fR or \fIsat\fR, or a three decimal point number with suffix \fIsat\fR, or an 1 to 11 decimal point number suffixed by \fIbtc\fR\&.
.sp
The \fIlabel\fR field is used to attach a label to payments, and is returned in lightning\-listpays(7) and lightning\-listsendpays(7)\&. The \fIriskfactor\fR is described in detail in lightning\-getroute(7), and defaults to 10\&. The \fImaxfeepercent\fR limits the money paid in fees, and defaults to 0\&.5\&. The maxfeepercent\*(Aq is a percentage of the amount that is to be paid\&. The `exemptfee option can be used for tiny payments which would be dominated by the fee leveraged by forwarding nodes\&. Setting exemptfee allows the maxfeepercent check to be skipped on fees that are smaller than exemptfee (default: 5000 millisatoshi)\&. Until \fIretry_for\fR seconds passes (default: 60), the command will keep
.sp finding routes and retrying the payment\. However, a payment may be
The response will occur when the payment fails or succeeds\&. Once a payment has succeeded, calls to \fBpay\fR with the same \fIbolt11\fR will succeed immediately\&. delayed for up to \fBmaxdelay\fR blocks by another node; clients should be
.sp prepared for this worst case\.
Until \fIretry_for\fR seconds passes (default: 60), the command will keep finding routes and retrying the payment\&. However, a payment may be delayed for up to maxdelay blocks by another node; clients should be prepared for this worst case\&.
.sp
When using \fIlightning\-cli\fR, you may skip optional parameters by using \fInull\fR\&. Alternatively, use \fB\-k\fR option to provide parameters by name\&. When using \fIlightning-cli\fR, you may skip optional parameters by using
.SH "RANDOMIZATION" \fInull\fR\. Alternatively, use \fB-k\fR option to provide parameters by name\.
.sp
To protect user privacy, the payment algorithm performs some randomization\&. .SH RANDOMIZATION
.sp
.RS 4 To protect user privacy, the payment algorithm performs some
.ie n \{\ randomization\.
\h'-04' 1.\h'+01'\c
.\}
.el \{\ 1: Route Randomization
.sp -1
.IP " 1." 4.2
.\} 2: Shadow Route
Route Randomization
.RE
.sp Route randomization means the payment algorithm does not always use the
.RS 4 lowest-fee or shortest route\. This prevents some highly-connected node
.ie n \{\ from learning all of the user payments by reducing their fees below the
\h'-04' 2.\h'+01'\c network average\.
.\}
.el \{\
.sp -1 Shadow route means the payment algorithm will virtually extend the time
.IP " 2." 4.2 delays along the route, making it appear to intermediate nodes that the
.\} route is longer than it actually is\. This prevents intermediate nodes
Shadow Route from reliably guessing their distance from the payee\.
.RE
.sp
Route randomization means the payment algorithm does not always use the lowest\-fee or shortest route\&. This prevents some highly\-connected node from learning all of the user payments by reducing their fees below the network average\&. Route randomization will never exceed \fImaxfeepercent\fR of the payment\.
.sp Route randomization and shadow routing will not take routes that would
Shadow route means the payment algorithm will virtually extend the time delays along the route, making it appear to intermediate nodes that the route is longer than it actually is\&. This prevents intermediate nodes from reliably guessing their distance from the payee\&. exceed \fImaxdelay\fR\.
.sp
Route randomization will never exceed \fImaxfeepercent\fR of the payment\&. Route randomization and shadow routing will not take routes that would exceed \fImaxdelay\fR\&. .SH RETURN VALUE
.SH "RETURN VALUE"
.sp On success, this returns the \fIpayment_preimage\fR which hashes to the
On success, this returns the \fIpayment_preimage\fR which hashes to the \fIpayment_hash\fR to prove that the payment was successful\&. It will also return, a \fIgetroute_tries\fR and a \fIsendpay_tries\fR statistics for the number of times it internally called \fBgetroute\fR and \fBsendpay\fR\&. \fIpayment_hash\fR to prove that the payment was successful\. It will also
.sp return, a \fIgetroute_tries\fR and a \fIsendpay_tries\fR statistics for the
You can monitor the progress and retries of a payment using the lightning\-paystatus(7) command\&. number of times it internally called \fBgetroute\fR and \fBsendpay\fR\.
.sp
You can monitor the progress and retries of a payment using the
\fBlightning-paystatus\fR(7) command\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 201: Already paid with this \fIhash\fR using different amount or
.sp -1 destination\.
.IP \(bu 2.3 .IP \[bu]
.\} 203: Permanent failure at destination\. The \fIdata\fR field of the error
\-1\&. Catchall nonspecific error\&. will be routing failure object\.
.RE .IP \[bu]
.sp 205: Unable to find a route\.
.RS 4 .IP \[bu]
.ie n \{\ 206: Route too expensive\. Either the fee or the needed total
\h'-04'\(bu\h'+03'\c locktime for the route exceeds your \fImaxfeepercent\fR or \fImaxdelay\fR
.\} settings, respectively\. The \fIdata\fR field of the error will indicate
.el \{\ the actual \fIfee\fR as well as the \fIfeepercent\fR percentage that the fee
.sp -1 has of the destination payment amount\. It will also indicate the
.IP \(bu 2.3 actual \fIdelay\fR along the route\.
.\} .IP \[bu]
201\&. Already paid with this 207: Invoice expired\. Payment took too long before expiration, or
\fIhash\fR already expired at the time you initiated payment\. The \fIdata\fR field
using different amount or destination\&. of the error indicates \fInow\fR (the current time) and \fIexpiry\fR (the
.RE invoice expiration) as UNIX epoch time in seconds\.
.sp .IP \[bu]
.RS 4 210: Payment timed out without a payment in progress\.
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
203\&. Permanent failure at destination\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
205\&. Unable to find a route\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
206\&. Route too expensive\&. Either the fee or the needed total locktime for the route exceeds your
\fImaxfeepercent\fR
or
\fImaxdelay\fR
settings, respectively\&. The
\fIdata\fR
field of the error will indicate the actual
\fIfee\fR
as well as the
\fIfeepercent\fR
percentage that the fee has of the destination payment amount\&. It will also indicate the actual
\fIdelay\fR
along the route\&.
.RE .RE
.sp
.RS 4 Error codes 202 and 204 will only get reported at \fBsendpay\fR; in
.ie n \{\ \fBpay\fR we will keep retrying if we would have gotten those errors\.
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
207\&. Invoice expired\&. Payment took too long before expiration, or already expired at the time you initiated payment\&. The
\fIdata\fR
field of the error indicates
\fInow\fR
(the current time) and
\fIexpiry\fR
(the invoice expiration) as UNIX epoch time in seconds\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
210\&. Payment timed out without a payment in progress\&.
.RE
.sp
Error codes 202 and 204 will only get reported at \fBsendpay\fR; in \fBpay\fR we will keep retrying if we would have gotten those errors\&.
.sp
A routing failure object has the fields below: A routing failure object has the fields below:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIerring_index\fR: The index of the node along the route that reported
.\} the error\. 0 for the local node, 1 for the first hop, and so on\.
.el \{\ .IP \[bu]
.sp -1 \fIerring_node\fR: The hex string of the pubkey id of the node that
.IP \(bu 2.3 reported the error\.
.\} .IP \[bu]
\fIerring_index\fR\&. The index of the node along the route that reported the error\&. 0 for the local node, 1 for the first hop, and so on\&. \fIerring_channel\fR: The short channel ID of the channel that has the
.RE error, or \fI0:0:0\fR if the destination node raised the error\.
.sp .IP \[bu]
.RS 4 \fIfailcode\fR: The failure code, as per BOLT #4\.
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIchannel_update\fR\. The hex string of the \fIchannel_update\fR message
.\} received from the remote node\. Only present if error is from the
.el \{\ remote node and the \fIfailcode\fR has the UPDATE bit set, as per BOLT #4\.
.sp -1
.IP \(bu 2.3
.\}
\fIerring_node\fR\&. The hex string of the pubkey id of the node that reported the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_channel\fR\&. The short channel ID of the channel that has the error, or
\fI0:0:0\fR
if the destination node raised the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfailcode\fR\&. The failure code, as per BOLT #4\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannel_update\fR\&. The hex string of the
\fIchannel_update\fR
message received from the remote node\&. Only present if error is from the remote node and the
\fIfailcode\fR
has the UPDATE bit set, as per BOLT #4\&.
.RE .RE
.sp
The \fIdata\fR field of errors will include statistics \fIgetroute_tries\fR and \fIsendpay_tries\fR\&. It will also contain a \fIfailures\fR field with detailed data about routing errors\&. The \fIdata\fR field of errors will include statistics \fIgetroute_tries\fR and
.SH "AUTHOR" \fIsendpay_tries\fR\. It will also contain a \fIfailures\fR field with detailed
.sp data about routing errors\.
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&.
.SH "SEE ALSO" .SH AUTHOR
.sp
lightning\-listpays(7), lightning\-decodepay(7), lightning\-listinvoice(7), lightning\-delinvoice(7), lightning\-getroute(7), lightning\-invoice(7)\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH "RESOURCES"
.sp .SH SEE ALSO
Main web site: https://github\&.com/ElementsProject/lightning
\fBlightning-listpays\fR(7), \fBlightning-decodepay\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-getroute\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-08-01 14:59:36 CEST

110
doc/lightning-plugin.7

@ -1,56 +1,56 @@
'\" t .TH "LIGHTNING-PLUGIN" "7" "" "" "lightning-plugin"
.\" Title: lightning-plugin .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 07/23/2019 lightning-plugin - Manage plugins with RPC
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-PLUGIN" "7" "07/23/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-plugin \- Manage plugins with RPC
.SH "SYNOPSIS"
.sp
\fBplugin\fR command [parameter] [second_parameter] \fBplugin\fR command [parameter] [second_parameter]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBplugin\fR RPC command allows to manage plugins without having to restart lightningd\&. It takes 1 to 3 parameters: a command (start/stop/startdir/rescan/list) which describes the action to take and optionally one or two parameters which describes the plugin on which the action has to be taken\&.
.sp The \fBplugin\fR RPC command allows to manage plugins without having to
The \fIstart\fR command takes a path as parameter and will load the plugin available from this path\&. restart lightningd\. It takes 1 to 3 parameters: a command
.sp (start/stop/startdir/rescan/list) which describes the action to take and
The \fIstop\fR command takes a plugin name as parameter and will kill and unload the specified plugin\&. optionally one or two parameters which describes the plugin on which the
.sp action has to be taken\.
The \fIstartdir\fR command takes a directory path as parameter and will load all plugins this directory contains\&.
.sp
The \fIrescan\fR command starts all not\-already\-loaded plugins from the default plugins directory (by default \fI~/\&.lightning/plugins\fR)\&. The \fIstart\fR command takes a path as parameter and will load the plugin
.sp available from this path\.
The \fIlist\fR command will return all the active plugins\&.
.SH "RETURN VALUE"
.sp The \fIstop\fR command takes a plugin name as parameter and will kill and
On success, this returns an array \fIplugins\fR of objects, one by plugin\&. Each object contains the name of the plugin (\fIname\fR field) and its status (\fIactive\fR boolean field)\&. Since plugins are configured asynchronously, a freshly started plugin may not appear immediately\&. unload the specified plugin\.
.SH "AUTHOR"
.sp
Antoine Poinsot <darosior@protonmail\&.com> is mainly responsible\&. The \fIstartdir\fR command takes a directory path as parameter and will load
.SH "RESOURCES" all plugins this directory contains\.
.sp
Main web site: https://github\&.com/ElementsProject/lightning
The \fIrescan\fR command starts all not-already-loaded plugins from the
default plugins directory (by default \fI~/\.lightning/plugins\fR)\.
The \fIlist\fR command will return all the active plugins\.
.SH RETURN VALUE
On success, this returns an array \fIplugins\fR of objects, one by plugin\.
Each object contains the name of the plugin (\fIname\fR field) and its
status (\fIactive\fR boolean field)\. Since plugins are configured
asynchronously, a freshly started plugin may not appear immediately\.
.SH AUTHOR
Antoine Poinsot \fBNone\fR (\fI<darosior@protonmail.com\fR)> is mainly responsible\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-07-29 12:57:57 CEST

311
doc/lightning-sendpay.7

@ -1,191 +1,128 @@
'\" t .TH "LIGHTNING-SENDPAY" "7" "" "" "lightning-sendpay"
.\" Title: lightning-sendpay .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 02/23/2019 lightning-sendpay - Low-level command for sending a payment via a route\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fBsendpay\fR \fIroute\fR \fIpayment_hash\fR [\fIlabel\fR] [\fImsatoshi\fR]
.TH "LIGHTNING\-SENDPAY" "7" "02/23/2019" "\ \&" "\ \&" [\fIbolt11\fR]
.\" -----------------------------------------------------------------
.\" * Define some portability stuff .SH DESCRIPTION
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The \fBsendpay\fR RPC command attempts to send funds associated with the
.\" http://bugs.debian.org/507673 given \fIpayment_hash\fR, along a route to the final destination in the
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html route\.
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq ' Generally, a client would call \fBlightning-getroute\fR(7) to resolve a route,
.\" ----------------------------------------------------------------- then use \fBsendpay\fR to send it\. If it fails, it would call
.\" * set default formatting \fBlightning-getroute\fR(7) again to retry\.
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh The response will occur when the payment is on its way to the
.\" disable justification (adjust text to left margin only) destination\. The \fBsendpay\fR RPC command does not wait for definite
.ad l success or definite failure of the payment\. Instead, use the
.\" ----------------------------------------------------------------- \fBwaitsendpay\fR RPC command to poll or wait for definite success or
.\" * MAIN CONTENT STARTS HERE * definite failure\.
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-sendpay \- Low\-level command for sending a payment via a route\&. The \fIlabel\fR and \fIbolt11\fR parameters, if provided, will be returned in
.SH "SYNOPSIS" \fIwaitsendpay\fR and \fIlistsendpays\fR results\.
.sp
\fBsendpay\fR \fIroute\fR \fIpayment_hash\fR [\fIlabel\fR] [\fImsatoshi\fR] [\fIbolt11\fR]
.SH "DESCRIPTION" The \fImsatoshi\fR amount, if provided, is the amount that will be recorded
.sp as the target payment value\. If not specified, it will be the final
The \fBsendpay\fR RPC command attempts to send funds associated with the given \fIpayment_hash\fR, along a route to the final destination in the route\&. amount to the destination\. If specified, then the final amount at the
.sp destination must be from the specified \fImsatoshi\fR to twice the specified
Generally, a client would call lightning\-getroute(7) to resolve a route, then use \fBsendpay\fR to send it\&. If it fails, it would call lightning\-getroute(7) again to retry\&. \fImsatoshi\fR, inclusive\. This is intended to obscure payments by
.sp overpaying slightly at the destination; the actual target payment is
The response will occur when the payment is on its way to the destination\&. The \fBsendpay\fR RPC command does not wait for definite success or definite failure of the payment\&. Instead, use the \fBwaitsendpay\fR RPC command to poll or wait for definite success or definite failure\&. what should be specified as the \fImsatoshi\fR argument\. \fImsatoshi\fR is in
.sp millisatoshi precision; it can be a whole number, or a whole number
The \fIlabel\fR and \fIbolt11\fR parameters, if provided, will be returned in \fIwaitsendpay\fR and \fIlistsendpays\fR results\&. ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending
.sp in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\.
The \fImsatoshi\fR amount, if provided, is the amount that will be recorded as the target payment value\&. If not specified, it will be the final amount to the destination\&. If specified, then the final amount at the destination must be from the specified \fImsatoshi\fR to twice the specified \fImsatoshi\fR, inclusive\&. This is intended to obscure payments by overpaying slightly at the destination; the actual target payment is what should be specified as the \fImsatoshi\fR argument\&. \fImsatoshi\fR is in millisatoshi precision; it can be a whole number, or a whole number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\&.
.sp
Once a payment has succeeded, calls to \fBsendpay\fR with the same \fIpayment_hash\fR but a different \fImsatoshi\fR or destination will fail; this prevents accidental multiple payments\&. Calls to \fBsendpay\fR with the same \fIpayment_hash\fR, \fImsatoshi\fR, and destination as a previous successful payment (even if a different route) will return immediately with success\&. Once a payment has succeeded, calls to \fBsendpay\fR with the same
.SH "RETURN VALUE" \fIpayment_hash\fR but a different \fImsatoshi\fR or destination will fail;
.sp this prevents accidental multiple payments\. Calls to \fBsendpay\fR with
On success, an object similar to the output of \fBlistsendpays\fR will be returned\&. This object will have a \fIstatus\fR field that is typically the string \fI"pending"\fR, but may be \fI"complete"\fR if the payment was already performed successfully\&. the same \fIpayment_hash\fR, \fImsatoshi\fR, and destination as a previous
.sp successful payment (even if a different route) will return immediately
On error, if the error occurred from a node other than the final destination, the route table will be updated so that lightning\-getroute(7) should return an alternate route (if any)\&. An error from the final destination implies the payment should not be retried\&. with success\.
.sp
.SH RETURN VALUE
On success, an object similar to the output of \fBlistsendpays\fR will be
returned\. This object will have a \fIstatus\fR field that is typically the
string \fI"pending"\fR, but may be \fI"complete"\fR if the payment was already
performed successfully\.
On error, if the error occurred from a node other than the final
destination, the route table will be updated so that
\fBlightning-getroute\fR(7) should return an alternate route (if any)\. An
error from the final destination implies the payment should not be
retried\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 201: Already paid with this \fIhash\fR using different amount or
.sp -1 destination\.
.IP \(bu 2.3 .IP \[bu]
.\} 202: Unparseable onion reply\. The \fIdata\fR field of the error will
\-1\&. Catchall nonspecific error\&. have an \fIonionreply\fR field, a hex string representation of the raw
onion reply\.
.IP \[bu]
203: Permanent failure at destination\. The \fIdata\fR field of the error
will be routing failure object\.
.IP \[bu]
204: Failure along route; retry a different route\. The \fIdata\fR field
of the error will be routing failure object\.
.RE .RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
201\&. Already paid with this
\fIhash\fR
using different amount or destination\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
202\&. Unparseable onion reply\&. The
\fIdata\fR
field of the error will have an
\fIonionreply\fR
field, a hex string representation of the raw onion reply\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
203\&. Permanent failure at destination\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
204\&. Failure along route; retry a different route\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
A routing failure object has the fields below: A routing failure object has the fields below:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIerring_index\fR\. The index of the node along the route that reported
.\} the error\. 0 for the local node, 1 for the first hop, and so on\.
.el \{\ .IP \[bu]
.sp -1 \fIerring_node\fR\. The hex string of the pubkey id of the node that
.IP \(bu 2.3 reported the error\.
.\} .IP \[bu]
\fIerring_index\fR\&. The index of the node along the route that reported the error\&. 0 for the local node, 1 for the first hop, and so on\&. \fIerring_channel\fR\. The short channel ID of the channel that has the
.RE error, or \fI0:0:0\fR if the destination node raised the error\.
.sp .IP \[bu]
.RS 4 \fIfailcode\fR\. The failure code, as per BOLT #4\.
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIchannel_update\fR\. The hex string of the \fIchannel_update\fR message
.\} received from the remote node\. Only present if error is from the
.el \{\ remote node and the \fIfailcode\fR has the UPDATE bit set, as per BOLT
.sp -1 #4\.
.IP \(bu 2.3
.\}
\fIerring_node\fR\&. The hex string of the pubkey id of the node that reported the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_channel\fR\&. The short channel ID of the channel that has the error, or
\fI0:0:0\fR
if the destination node raised the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfailcode\fR\&. The failure code, as per BOLT #4\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannel_update\fR\&. The hex string of the
\fIchannel_update\fR
message received from the remote node\&. Only present if error is from the remote node and the
\fIfailcode\fR
has the UPDATE bit set, as per BOLT #4\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-listinvoice(7), lightning\-delinvoice(7), lightning\-getroute(7), lightning\-invoice(7), lightning\-pay(7), lightning\-waitsendpay(7)\&.
.SH "RESOURCES" \fBlightning-listinvoice\fR(7), \fBlightning-delinvoice\fR(7),
.sp \fBlightning-getroute\fR(7), \fBlightning-invoice\fR(7), \fBlightning-pay\fR(7),
Main web site: https://github\&.com/ElementsProject/lightning \fBlightning-waitsendpay\fR(7)\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-08-01 14:59:36 CEST

150
doc/lightning-setchannelfee.7

@ -1,80 +1,76 @@
'\" t .TH "LIGHTNING-SETCHANNELFEE" "7" "" "" "lightning-setchannelfee"
.\" Title: lightning-setchannelfee .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 03/18/2019 lightning-setchannelfee - Command for setting specific routing fees on a
.\" Manual: \ \& lightning channel\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-SETCHANNE" "7" "03/18/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-setchannelfee \- Command for setting specific routing fees on a lightning channel\&.
.SH "SYNOPSIS"
.sp
\fBsetchannelfee\fR \fIid\fR [\fIbase\fR] [\fIppm\fR] \fBsetchannelfee\fR \fIid\fR [\fIbase\fR] [\fIppm\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBsetchannelfee\fR RPC command sets channel specific routing fees as defined in BOLT #7\&. The channel has to be in normal or awaiting state\&. This can be checked by \fBlistpeers\fR reporting a \fIstate\fR of CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN for the channel\&.
.sp The \fBsetchannelfee\fR RPC command sets channel specific routing fees as
\fIid\fR is required and should contain a scid (short channel ID), channel id or peerid (pubkey) of the channel to be modified\&. If \fIid\fR is set to "all", the fees for all channels are updated that are in state CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN\&. defined in BOLT #7\. The channel has to be in normal or awaiting state\.
.sp This can be checked by \fBlistpeers\fR reporting a \fIstate\fR of
\fIbase\fR is an optional value in millisatoshi that is added as base fee to any routed payment\&. If the parameter is left out, the global config value fee\-base will be used again\&. It can be a whole number, or a whole number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\&. CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN for the channel\.
.sp
\fIppm\fR is an optional value that is added proportionally per\-millionths to any routed payment volume in satoshi\&. For example, if ppm is 1,000 and 1,000,000 satoshi is being routed trhough the channel, an proportional fee of 1,000 satoshi is added, resulting in a 0\&.1% fee\&. If the parameter is left out, the global config value will be used again\&.
.SH "RETURN VALUE" \fIid\fR is required and should contain a scid (short channel ID), channel
.sp id or peerid (pubkey) of the channel to be modified\. If \fIid\fR is set to
On success, an object with the new values \fIbase\fR and \fIppm\fR along with an array \fIchannels\fR which contains objects with fields \fIpeer_id\fR, \fIchannel_id\fR and \fIshort_channel_id\fR\&. "all", the fees for all channels are updated that are in state
.SH "ERRORS" CHANNELD_NORMAL or CHANNELD_AWAITING_LOCKIN\.
.sp
\fIbase\fR is an optional value in millisatoshi that is added as base fee to
any routed payment\. If the parameter is left out, the global config
value fee-base will be used again\. It can be a whole number, or a whole
number ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places
ending in \fIsat\fR, or a number with 1 to 11 decimal places ending in
\fIbtc\fR\.
\fIppm\fR is an optional value that is added proportionally per-millionths
to any routed payment volume in satoshi\. For example, if ppm is 1,000
and 1,000,000 satoshi is being routed trhough the channel, an
proportional fee of 1,000 satoshi is added, resulting in a 0\.1% fee\. If
the parameter is left out, the global config value will be used again\.
.SH RETURN VALUE
On success, an object with the new values \fIbase\fR and \fIppm\fR along with an
array \fIchannels\fR which contains objects with fields \fIpeer_id\fR,
\fIchannel_id\fR and \fIshort_channel_id\fR\.
.SH ERRORS
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Channel is in incorrect state, i\.e\. Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ -32602: JSONRPC2_INVALID_PARAMS, i\.e\. Given id is not a channel ID
.sp -1 or short channel ID\.
.IP \(bu 2.3
.\}
\-1\&. Channel is in incorrect state, i\&.e\&. Catchall nonspecific error\&.
.RE .RE
.sp .SH AUTHOR
.RS 4
.ie n \{\ Michael Schmoock \fBNone\fR (\fI<michael@schmoock.net\fR)> is the author of this
\h'-04'\(bu\h'+03'\c feature\. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly
.\} responsible for the c-lightning project\.
.el \{\
.sp -1 .SH SEE ALSO
.IP \(bu 2.3
.\} \fBlightningd-config\fR(5), \fBlightning-fundchannel\fR(7),
\-32602\&. JSONRPC2_INVALID_PARAMS, i\&.e\&. Given id is not a channel ID or short channel ID\&. \fBlightning-listchannels\fR(7), \fBlightning-listpeers\fR(7)
.RE
.SH "AUTHOR" .SH RESOURCES
.sp
Michael Schmoock <michael@schmoock\&.net> is the author of this feature\&. Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible for the c\-lightning project\&. Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.SH "SEE ALSO"
.sp .HL
lightningd\-config(5), lightning\-fundchannel(7), lightning\-listchannels(7), lightning\-listpeers(7)
.SH "RESOURCES" Last updated 2019-04-30 17:34:18 CEST
.sp
Main web site: https://github\&.com/ElementsProject/lightning

110
doc/lightning-txdiscard.7

@ -1,65 +1,51 @@
'\" t .TH "LIGHTNING-TXDISCARD" "7" "" "" "lightning-txdiscard"
.\" Title: lightning-txdiscard .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-txdiscard - Abandon a transaction from txprepare, release
.\" Manual: \ \& inputs
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-TXDISCARD" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-txdiscard \- Abandon a transaction from txprepare, release inputs
.SH "SYNOPSIS"
.sp
\fBtxdiscard\fR \fItxid\fR \fBtxdiscard\fR \fItxid\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBtxdiscard\fR RPC command releases inputs which were reserved for use of the \fItxid\fR from lightning\-txprepare(7)\&.
.SH "RETURN VALUE" The \fBtxdiscard\fR RPC command releases inputs which were reserved for
.sp use of the \fItxid\fR from \fBlightning-txprepare\fR(7)\.
On success, an object with attributes \fIunsigned_tx\fR and \fItxid\fR will be returned, exactly as from lightning\-txprepare(7)\&.
.sp .SH RETURN VALUE
If there is no matching \fItxid\fR, an error is reported\&. Note that this may happen due to incorrect usage (such as \fBtxdiscard\fR or \fBtxsend\fR already being called for \fItxid\fR) or due to lightningd restarting, which implicitly calls \fBtxdiscard\fR on all outputs\&.
.sp On success, an object with attributes \fIunsigned_tx\fR and \fItxid\fR will be
returned, exactly as from \fBlightning-txprepare\fR(7)\.
If there is no matching \fItxid\fR, an error is reported\. Note that this may
happen due to incorrect usage (such as \fBtxdiscard\fR or \fBtxsend\fR
already being called for \fItxid\fR) or due to lightningd restarting, which
implicitly calls \fBtxdiscard\fR on all outputs\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: An unknown \fItxid\fR\.
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-1\&. An unknown
\fItxid\fR\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-txprepare(7), lightning\-txsend(7)
.SH "RESOURCES" \fBlightning-txprepare\fR(7), \fBlightning-txsend\fR(7)
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-06-08 16:03:59 CEST

148
doc/lightning-txprepare.7

@ -1,90 +1,64 @@
'\" t .TH "LIGHTNING-TXPREPARE" "7" "" "" "lightning-txprepare"
.\" Title: lightning-txprepare .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-txprepare - Command to prepare to withdraw funds from the
.\" Manual: \ \& internal wallet\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-TXPREPARE" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-txprepare \- Command to prepare to withdraw funds from the internal wallet\&.
.SH "SYNOPSIS"
.sp
\fBtxprepare\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR] \fBtxprepare\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBtxprepare\fR RPC command creates an unsigned transaction which spends funds from c\-lightning\(cqs internal wallet to the address specified in \fIdestination\fR\&.
.sp The \fBtxprepare\fR RPC command creates an unsigned transaction which
Effectively, it is the first part of a \fBwithdraw\fR command, and uses the same parameters\&. The second part is provided by \fBtxsend\fR\&. spends funds from c-lightning’s internal wallet to the address specified
.SH "RETURN VALUE" in \fIdestination\fR\.
.sp
On success, an object with attributes \fIunsigned_tx\fR and \fItxid\fR will be returned\&. You need to hand \fItxid\fR to \fBtxsend\fR or \fBtxdiscard\fR, as the inputs of this transaction are reserved until then, or until the daemon restarts\&.
.sp Effectively, it is the first part of a \fBwithdraw\fR command, and uses
\fIunsigned_tx\fR represents the raw bitcoin transaction (not yet signed) and \fItxid\fR represent the bitcoin transaction id\&. the same parameters\. The second part is provided by \fBtxsend\fR\.
.sp
On failure, an error is reported and the transaction is not created\&. .SH RETURN VALUE
.sp
On success, an object with attributes \fIunsigned_tx\fR and \fItxid\fR will be
returned\. You need to hand \fItxid\fR to \fBtxsend\fR or \fBtxdiscard\fR, as the
inputs of this transaction are reserved until then, or until the daemon
restarts\.
\fIunsigned_tx\fR represents the raw bitcoin transaction (not yet signed)
and \fItxid\fR represent the bitcoin transaction id\.
On failure, an error is reported and the transaction is not created\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 301: There are not enough funds in the internal wallet (including
.sp -1 fees) to create the transaction\.
.IP \(bu 2.3 .IP \[bu]
.\} 302: The dust limit is not met\.
\-1\&. Catchall nonspecific error\&.
.RE .RE
.sp .SH AUTHOR
.RS 4
.ie n \{\ Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
\h'-04'\(bu\h'+03'\c
.\} .SH SEE ALSO
.el \{\
.sp -1 \fBlightning-withdraw\fR(7), \fBlightning-txsend\fR(7), \fBlightning-txdiscard\fR(7)
.IP \(bu 2.3
.\} .SH RESOURCES
301\&. There are not enough funds in the internal wallet (including fees) to create the transaction\&.
.RE Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.sp
.RS 4 .HL
.ie n \{\
\h'-04'\(bu\h'+03'\c Last updated 2019-06-08 16:03:59 CEST
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
302\&. The dust limit is not met\&.
.RE
.SH "AUTHOR"
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&.
.SH "SEE ALSO"
.sp
lightning\-withdraw(7), lightning\-txsend(7), lightning\-txdiscard(7)
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

111
doc/lightning-txsend.7

@ -1,66 +1,51 @@
'\" t .TH "LIGHTNING-TXSEND" "7" "" "" "lightning-txsend"
.\" Title: lightning-txsend .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-txsend - Command to sign and send transaction from txprepare
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-TXSEND" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-txsend \- Command to sign and send transaction from txprepare
.SH "SYNOPSIS"
.sp
\fBtxsend\fR \fItxid\fR \fBtxsend\fR \fItxid\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBtxsend\fR RPC command signs and broadcasts a transaction created by \fBtxprepare\fR\&.
.SH "RETURN VALUE" The \fBtxsend\fR RPC command signs and broadcasts a transaction created by
.sp \fBtxprepare\fR\.
On success, an object with attributes \fItx\fR and \fItxid\fR will be returned\&.
.sp .SH RETURN VALUE
\fItx\fR represents the fully signed raw bitcoin transaction, and \fItxid\fR is the same as the \fItxid\fR argument\&.
.sp On success, an object with attributes \fItx\fR and \fItxid\fR will be returned\.
On failure, an error is reported (from bitcoind), and the inputs from the transaction are unreserved\&.
.sp
\fItx\fR represents the fully signed raw bitcoin transaction, and \fItxid\fR is
the same as the \fItxid\fR argument\.
On failure, an error is reported (from bitcoind), and the inputs from
the transaction are unreserved\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-1\&. Catchall nonspecific error\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-txprepare(7), lightning\-txdiscard(7)
.SH "RESOURCES" \fBlightning-txprepare\fR(7), \fBlightning-txdiscard\fR(7)
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-06-08 16:03:59 CEST

100
doc/lightning-waitanyinvoice.7

@ -1,53 +1,49 @@
'\" t .TH "LIGHTNING-WAITANYINVOICE" "7" "" "" "lightning-waitanyinvoice"
.\" Title: lightning-waitanyinvoice .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 04/26/2018 lightning-waitanyinvoice - Command for waiting for payments\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-WAITANYIN" "7" "04/26/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-waitanyinvoice \- Command for waiting for payments\&.
.SH "SYNOPSIS"
.sp
\fBwaitanyinvoice\fR [\fIlastpay_index\fR] \fBwaitanyinvoice\fR [\fIlastpay_index\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBwaitanyinvoice\fR RPC command waits until an invoice is paid, then returns a single entry as per \fBlistinvoice\fR\&. It will not return for any invoices paid prior to or including the \fIlastpay_index\fR\&.
.sp The \fBwaitanyinvoice\fR RPC command waits until an invoice is paid, then
This is usually called iteratively: once with no arguments, then repeatedly with the returned \fIpay_index\fR entry\&. This ensures that no paid invoice is missed\&. returns a single entry as per \fBlistinvoice\fR\. It will not return for
.sp any invoices paid prior to or including the \fIlastpay_index\fR\.
The \fIpay_index\fR is a monotonically\-increasing number assigned to an invoice when it gets paid\&. The first valid \fIpay_index\fR is 1; specifying \fIlastpay_index\fR of 0 equivalent to not specifying a \fIlastpay_index\fR\&. Negative \fIlastpay_index\fR is invalid\&.
.SH "RETURN VALUE"
.sp This is usually called iteratively: once with no arguments, then
On success, an invoice description will be returned as per lightning\-listinvoice(7): \fIcomplete\fR will always be \fItrue\fR\&. repeatedly with the returned \fIpay_index\fR entry\. This ensures that no
.SH "AUTHOR" paid invoice is missed\.
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&.
.SH "SEE ALSO" The \fIpay_index\fR is a monotonically-increasing number assigned to an
.sp invoice when it gets paid\. The first valid \fIpay_index\fR is 1; specifying
lightning\-waitinvoice(7), lightning\-listinvoice(7), lightning\-delinvoice(7), lightning\-invoice(7)\&. \fIlastpay_index\fR of 0 equivalent to not specifying a \fIlastpay_index\fR\.
.SH "RESOURCES" Negative \fIlastpay_index\fR is invalid\.
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RETURN VALUE
On success, an invoice description will be returned as per
\fBlightning-listinvoice\fR(7): \fIcomplete\fR will always be \fItrue\fR\.
.SH AUTHOR
Rusty Russell \fBNone\fR (\fI<rusty@rustcorp.com.au\fR)> is mainly responsible\.
.SH SEE ALSO
\fBlightning-waitinvoice\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)\.
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-07 14:23:17 CEST

98
doc/lightning-waitinvoice.7

@ -1,53 +1,47 @@
'\" t .TH "LIGHTNING-WAITINVOICE" "7" "" "" "lightning-waitinvoice"
.\" Title: lightning-waitinvoice .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 09/07/2018 lightning-waitinvoice - Command for waiting for specific payment\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-WAITINVOI" "7" "09/07/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-waitinvoice \- Command for waiting for specific payment\&.
.SH "SYNOPSIS"
.sp
\fBwaitinvoice\fR \fIlabel\fR \fBwaitinvoice\fR \fIlabel\fR
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid, then returns that single entry as per \fBlistinvoice\fR\&.
.SH "RETURN VALUE" The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid,
.sp then returns that single entry as per \fBlistinvoice\fR\.
On success, an invoice description will be returned as per lightning\-listinvoice(7)\&. The \fIstatus\fR field will be \fIpaid\fR\&.
.sp .SH RETURN VALUE
If the invoice is deleted while unpaid, or the invoice does not exist, this command will return with an error with code \-1\&.
.sp On success, an invoice description will be returned as per
If the invoice expires before being paid, or is already expired, this command will return with an error with code \-2, with the data being the invoice data as per \fBlistinvoice\fR\&. \fBlightning-listinvoice\fR(7)\. The \fIstatus\fR field will be \fIpaid\fR\.
.SH "AUTHOR"
.sp
Christian Decker <decker\&.christian@gmail\&.com> is mainly responsible\&. If the invoice is deleted while unpaid, or the invoice does not exist,
.SH "SEE ALSO" this command will return with an error with code -1\.
.sp
lightning\-waitanyinvoice(7), lightning\-listinvoice(7), lightning\-delinvoice(7), lightning\-invoice(7)
.SH "RESOURCES" If the invoice expires before being paid, or is already expired, this
.sp command will return with an error with code -2, with the data being the
Main web site: https://github\&.com/ElementsProject/lightning invoice data as per \fBlistinvoice\fR\.
.SH AUTHOR
Christian Decker \fBNone\fR (\fI<decker.christian@gmail.com\fR)> is mainly
responsible\.
.SH SEE ALSO
\fBlightning-waitanyinvoice\fR(7), \fBlightning-listinvoice\fR(7),
\fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)
.SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-04-07 14:23:17 CEST

317
doc/lightning-waitsendpay.7

@ -1,216 +1,111 @@
'\" t .TH "LIGHTNING-WAITSENDPAY" "7" "" "" "lightning-waitsendpay"
.\" Title: lightning-waitsendpay .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 05/19/2019 lightning-waitsendpay - Command for sending a payment via a route\.
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\"
.TH "LIGHTNING\-WAITSENDP" "7" "05/19/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-waitsendpay \- Command for sending a payment via a route\&.
.SH "SYNOPSIS"
.sp
\fBwaitsendpay\fR \fIpayment_hash\fR [\fItimeout\fR] \fBwaitsendpay\fR \fIpayment_hash\fR [\fItimeout\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBwaitsendpay\fR RPC command polls or waits for the status of an outgoing payment that was initiated by a previous \fBsendpay\fR invocation\&.
.sp The \fBwaitsendpay\fR RPC command polls or waits for the status of an
Optionally the client may provide a \fItimeout\fR, an integer in seconds, for this RPC command to return\&. If the \fItimeout\fR is provided and the given amount of time passes without the payment definitely succeeding or definitely failing, this command returns with a 200 error code (payment still in progress)\&. If \fItimeout\fR is not provided this call will wait indefinitely\&. outgoing payment that was initiated by a previous \fBsendpay\fR
.sp invocation\.
Indicating a \fItimeout\fR of 0 effectively makes this call a pollable query of the status of the payment\&.
.sp
If the payment completed with success, this command returns with success\&. Otherwise, if the payment completed with failure, this command returns an error\&. Optionally the client may provide a \fItimeout\fR, an integer in seconds,
.SH "RETURN VALUE" for this RPC command to return\. If the \fItimeout\fR is provided and the
.sp given amount of time passes without the payment definitely succeeding or
On success, an object similar to the output of \fBlistsendpays\fR will be returned\&. This object will have a \fIstatus\fR field that is the string \fI"complete"\fR\&. definitely failing, this command returns with a 200 error code (payment
.sp still in progress)\. If \fItimeout\fR is not provided this call will wait
On error, and even if the error occurred from a node other than the final destination, the route table will no longer be updated. Use the \fIexclude\fR parameter of the \fIgetroute\fR command to ignore the failing route\&. indefinitely\.
.sp
Indicating a \fItimeout\fR of 0 effectively makes this call a pollable query
of the status of the payment\.
If the payment completed with success, this command returns with
success\. Otherwise, if the payment completed with failure, this command
returns an error\.
.SH RETURN VALUE
On success, an object similar to the output of \fBlistsendpays\fR will be
returned\. This object will have a \fIstatus\fR field that is the string
\fI"complete"\fR\.
On error, and even if the error occurred from a node other than the
final destination, the route table will no longer be updated\. Use the
\fIexclude\fR parameter of the \fBgetroute\fR command to ignore the failing
route\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 200: Timed out before the payment could complete\.
.sp -1 .IP \[bu]
.IP \(bu 2.3 202: Unparseable onion reply\. The \fIdata\fR field of the error will
.\} have an \fIonionreply\fR field, a hex string representation of the raw
\-1\&. Catchall nonspecific error\&. onion reply\.
.IP \[bu]
203: Permanent failure at destination\. The \fIdata\fR field of the error
will be routing failure object\.
.IP \[bu]
204: Failure along route; retry a different route\. The \fIdata\fR field
of the error will be routing failure object\.
.IP \[bu]
208: A payment for \fIpayment_hash\fR was never made and there is
nothing to wait for\.
.IP \[bu]
209: The payment already failed, but the reason for failure was not
stored\. This should only occur when querying failed payments on very
old databases\.
.RE .RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
200\&. Timed out before the payment could complete\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
202\&. Unparseable onion reply\&. The
\fIdata\fR
field of the error will have an
\fIonionreply\fR
field, a hex string representation of the raw onion reply\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
203\&. Permanent failure at destination\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
204\&. Failure along route; retry a different route\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
208\&. A payment for
\fIpayment_hash\fR
was never made and there is nothing to wait for\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
209\&. The payment already failed, but the reason for failure was not stored\&. This should only occur when querying failed payments on very old databases\&.
.RE
.sp
A routing failure object has the fields below: A routing failure object has the fields below:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c \fIerring_index\fR: The index of the node along the route that reported
.\} the error\. 0 for the local node, 1 for the first hop, and so on\.
.el \{\ .IP \[bu]
.sp -1 \fIerring_node\fR: The hex string of the pubkey id of the node that
.IP \(bu 2.3 reported the error\.
.\} .IP \[bu]
\fIerring_index\fR\&. The index of the node along the route that reported the error\&. 0 for the local node, 1 for the first hop, and so on\&. \fIerring_channel\fR: The short channel ID of the channel that has the
.RE error (or the final channel if the destination raised the error)\.
.sp .IP \[bu]
.RS 4 \fIerring_direction\fR: The direction of traversing the
.ie n \{\ \fIerring_channel\fR:
\h'-04'\(bu\h'+03'\c .IP \[bu]
.\} \fIfailcode\fR: The failure code, as per BOLT #4\.
.el \{\ .IP \[bu]
.sp -1 \fIfailcodename\fR: The human-readable name corresponding to \fIfailcode\fR,
.IP \(bu 2.3 if known\.
.\}
\fIerring_node\fR\&. The hex string of the pubkey id of the node that reported the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_channel\fR\&. The short channel ID of the channel that has the error (or the final channel if the destination raised the error)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_direction\fR\&. The direction of traversing the
\fIerring_channel\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfailcode\fR\&. The failure code, as per BOLT #4\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfailcodename\fR\&. The human\-readable name corresponding to
\fIfailcode\fR, if known\&.
.RE .RE
.SH "AUTHOR" .SH AUTHOR
.sp
ZmnSCPxj <ZmnSCPxj@protonmail\&.com> is mainly responsible\&. ZmnSCPxj \fBNone\fR (\fI<ZmnSCPxj@protonmail.com\fR)> is mainly responsible\.
.SH "SEE ALSO"
.sp .SH SEE ALSO
lightning\-sendpay(7), lightning\-pay(7)\&.
.SH "RESOURCES" \fBlightning-sendpay\fR(7), \fBlightning-pay\fR(7)\.
.sp
Main web site: https://github\&.com/ElementsProject/lightning .SH RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.HL
Last updated 2019-05-22 16:46:09 CEST

177
doc/lightning-withdraw.7

@ -1,98 +1,85 @@
'\" t .TH "LIGHTNING-WITHDRAW" "7" "" "" "lightning-withdraw"
.\" Title: lightning-withdraw .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/05/2019 lightning-withdraw - Command for withdrawing funds from the internal
.\" Manual: \ \& wallet\.
.\" Source: \ \&
.\" Language: English .SH SYNOPSIS
.\"
.TH "LIGHTNING\-WITHDRAW" "7" "06/05/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lightning-withdraw \- Command for withdrawing funds from the internal wallet\&.
.SH "SYNOPSIS"
.sp
\fBwithdraw\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR] \fBwithdraw\fR \fIdestination\fR \fIsatoshi\fR [\fIfeerate\fR] [\fIminconf\fR]
.SH "DESCRIPTION"
.sp .SH DESCRIPTION
The \fBwithdraw\fR RPC command sends funds from c\-lightning\(cqs internal wallet to the address specified in \fIdestination\fR\&.
.sp The \fBwithdraw\fR RPC command sends funds from c-lightning’s internal
The address can be of any Bitcoin accepted type, including bech32\&. wallet to the address specified in \fIdestination\fR\.
.sp
\fIsatoshi\fR is the amount to be withdrawn from the internal wallet (expressed, as name suggests, in satoshi)\&. The string \fIall\fR can be used to specify withdrawal of all available funds\&. Otherwise, it is in satoshi precision; it can be a whole number, a whole number ending in \fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8 decimal places ending in \fIbtc\fR\&.
.sp The address can be of any Bitcoin accepted type, including bech32\.
\fIfeerate\fR is an optional feerate to use\&. It can be one of the strings \fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR (next 100 blocks or so) to use lightningd\(cqs internal estimates: \fInormal\fR is the default\&.
.sp
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means the number is interpreted as satoshi\-per\-kilosipa (weight), and \fIperkb\fR means it is interpreted bitcoind\-style as satoshi\-per\-kilobyte\&. Omitting the suffix is equivalent to \fIperkb\fR\&. \fIsatoshi\fR is the amount to be withdrawn from the internal wallet
.sp (expressed, as name suggests, in satoshi)\. The string \fIall\fR can be used
\fIminconf\fR specifies the minimum number of confirmations that used outputs should have\&. Default is 1\&. to specify withdrawal of all available funds\. Otherwise, it is in
.SH "RETURN VALUE" satoshi precision; it can be a whole number, a whole number ending in
.sp \fIsat\fR, a whole number ending in \fI000msat\fR, or a number with 1 to 8
On success, an object with attributes \fItx\fR and \fItxid\fR will be returned\&. decimal places ending in \fIbtc\fR\.
.sp
\fItx\fR represents the raw bitcoin, fully signed, transaction and \fItxid\fR represent the bitcoin transaction id\&.
.sp \fIfeerate\fR is an optional feerate to use\. It can be one of the strings
On failure, an error is reported and the withdrawal transaction is not created\&. \fIurgent\fR (aim for next block), \fInormal\fR (next 4 blocks or so) or \fIslow\fR
.sp (next 100 blocks or so) to use lightningd’s internal estimates: \fInormal\fR
is the default\.
Otherwise, \fIfeerate\fR is a number, with an optional suffix: \fIperkw\fR means
the number is interpreted as satoshi-per-kilosipa (weight), and \fIperkb\fR
means it is interpreted bitcoind-style as satoshi-per-kilobyte\. Omitting
the suffix is equivalent to \fIperkb\fR\.
\fIminconf\fR specifies the minimum number of confirmations that used
outputs should have\. Default is 1\.
.SH RETURN VALUE
On success, an object with attributes \fItx\fR and \fItxid\fR will be returned\.
\fItx\fR represents the raw bitcoin, fully signed, transaction and \fItxid\fR
represent the bitcoin transaction id\.
On failure, an error is reported and the withdrawal transaction is not
created\.
The following error codes may occur: The following error codes may occur:
.sp
.RS 4 .RS
.ie n \{\ .IP \[bu]
\h'-04'\(bu\h'+03'\c -1: Catchall nonspecific error\.
.\} .IP \[bu]
.el \{\ 301: There are not enough funds in the internal wallet (including
.sp -1 fees) to create the transaction\.
.IP \(bu 2.3 .IP \[bu]
.\} 302: The dust limit is not met\.
\-1\&. Catchall nonspecific error\&.
.RE .RE
.sp .SH AUTHOR
.RS 4
.ie n \{\ Felix \fBNone\fR (\fI<fixone@gmail.com\fR)> is mainly responsible\.
\h'-04'\(bu\h'+03'\c
.\} .SH SEE ALSO
.el \{\
.sp -1 \fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-newaddr\fR(7),
.IP \(bu 2.3 \fBlightning-txprepare\fR(7)\.
.\}
301\&. There are not enough funds in the internal wallet (including fees) to create the transaction\&. .SH RESOURCES
.RE
.sp Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
.RS 4
.ie n \{\ .HL
\h'-04'\(bu\h'+03'\c
.\} Last updated 2019-06-08 16:03:59 CEST
.el \{\
.sp -1
.IP \(bu 2.3
.\}
302\&. The dust limit is not met\&.
.RE
.SH "AUTHOR"
.sp
Felix <fixone@gmail\&.com> is mainly responsible\&.
.SH "SEE ALSO"
.sp
lightning\-listfunds(7), lightning\-fundchannel(7), lightning\-newaddr(7), lightning\-txprepare(7)\&.
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

929
doc/lightningd-config.5

@ -1,519 +1,442 @@
'\" t .TH "LIGHTNINGD-CONFIG" "5" "" "" "lightningd-config"
.\" Title: lightningd-config .SH NAME
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 08/09/2019 lightningd-config - Lightning daemon configuration file
.\" Manual: \ \&
.\" Source: \ \& .SH SYNOPSIS
.\" Language: English
.\" \fB~/\.lightning/config\fR
.TH "LIGHTNINGD\-CONFIG" "5" "08/09/2019" "\ \&" "\ \&"
.\" ----------------------------------------------------------------- .SH DESCRIPTION
.\" * Define some portability stuff
.\" ----------------------------------------------------------------- When \fBlightningd\fR(8) starts up, it reads a configuration file\. By default
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ that is \fIconfig\fR in the \fB\.lightning\fR subdirectory of the home
.\" http://bugs.debian.org/507673 directory (if it exists), but that can be changed by the
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html \fI--lightning-dir\fR or \fI--conf\fR options on the \fBlightningd\fR(8) command line\.
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq ' Configuration file options are processed first, then command line
.\" ----------------------------------------------------------------- options: later options override earlier ones except \fIaddr\fR options which
.\" * set default formatting accumulate\.
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh All these options are mirrored as commandline arguments to
.\" disable justification (adjust text to left margin only) \fBlightningd\fR(8), so \fI--foo\fR becomes simply \fIfoo\fR in the configuration
.ad l file, and \fI--foo=bar\fR becomes \fIfoo=bar\fR in the configuration file\.
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" ----------------------------------------------------------------- Blank lines and lines beginning with \fI#\fR are ignored\.
.SH "NAME"
lightningd-config \- Lightning daemon configuration file .SH DEBUGGING
.SH "SYNOPSIS"
.sp \fI--help\fR will show you the defaults for many options; they vary with
\fB~/\&.lightning/config\fR network settings so you can specify \fI--network\fR before \fI--help\fR to see
.SH "DESCRIPTION" the defaults for that network\.
.sp
When lightningd(8) starts up, it reads a configuration file\&. By default that is \fIconfig\fR in the \fB\&.lightning\fR subdirectory of the home directory (if it exists), but that can be changed by the \fI\-\-lightning\-dir\fR or \fI\-\-conf\fR options on the lightningd(8) command line\&.
.sp The \fBlightning-listconfigs\fR(7) command will output a valid configuration
Configuration file options are processed first, then command line options: later options override earlier ones except \fIaddr\fR options which accumulate\&. file using the current settings\.
.sp
All these options are mirrored as commandline arguments to lightningd(8), so \fI\-\-foo\fR becomes simply \fIfoo\fR in the configuration file, and \fI\-\-foo=bar\fR becomes \fIfoo=bar\fR in the configuration file\&. .SH OPTIONS
.sp .SH General options
Blank lines and lines beginning with \fI#\fR are ignored\&.
.SH "DEBUGGING" \fBallow-deprecated-apis\fR=\fIBOOL\fR
.sp Enable deprecated options, JSONRPC commands, fields, etc\. It defaults to
\fI\-\-help\fR will show you the defaults for many options; they vary with network settings so you can specify \fI\-\-network\fR before \fI\-\-help\fR to see the defaults for that network\&. \fItrue\fR, but you should set it to \fIfalse\fR when testing to ensure that an
.sp upgrade won’t break your configuration\.
The lightning\-listconfigs(7) command will output a valid configuration file using the current settings\&.
.SH "OPTIONS"
.SS "General options" \fBhelp\fR
.PP Print help and exit\. Not very useful inside a configuration file, but
\fBallow\-deprecated\-apis\fR=\fIBOOL\fR fun to put in other’s config files while their computer is unattended\.
.RS 4
Enable deprecated options, JSONRPC commands, fields, etc\&. It defaults to
\fItrue\fR, but you should set it to \fBversion\fR
\fIfalse\fR Print version and exit\. Also useless inside a configuration file, but
when testing to ensure that an upgrade won\(cqt break your configuration\&. putting this in someone’s config file may convince them to read this man
.RE page\.
.PP
\fBhelp\fR
.RS 4
Print help and exit\&. Not very useful inside a configuration file, but fun to put in other\(cqs config files while their computer is unattended\&.
.RE
.PP
\fBversion\fR
.RS 4
Print version and exit\&. Also useless inside a configuration file, but putting this in someone\(cqs config file may convince them to read this man page\&.
.RE
.sp
Bitcoin control options: Bitcoin control options:
.PP
\fBnetwork\fR=\fINETWORK\fR
.RS 4 \fBnetwork\fR=\fINETWORK\fR
Select the network parameters (\fIbitcoin\fR, Select the network parameters (\fIbitcoin\fR, \fItestnet\fR, or \fIregtest\fR)\.
\fItestnet\fR, or
\fIregtest\fR)\&.
.RE \fBtestnet\fR
.PP Alias for \fInetwork=testnet\fR\.
\fBtestnet\fR
.RS 4
Alias for \fBsignet\fR
\fInetwork=testnet\fR\&. Alias for \fInetwork=signet\fR\.
.RE
.PP
\fBsignet\fR \fBmainnet\fR
.RS 4 Alias for \fInetwork=bitcoin\fR\.
Alias for
\fInetwork=signet\fR\&.
.RE \fBbitcoin-cli\fR=\fIPATH\fR
.PP The name of \fIbitcoin-cli\fR executable to run\.
\fBmainnet\fR
.RS 4
Alias for \fBbitcoin-datadir\fR=\fIDIR\fR
\fInetwork=bitcoin\fR\&. \fI-datadir\fR argument to supply to \fBbitcoin-cli\fR(1)\.
.RE
.PP
\fBbitcoin\-cli\fR=\fIPATH\fR \fBbitcoin-rpcuser\fR=\fIUSER\fR
.RS 4 The RPC username for talking to \fBbitcoind\fR(1)\.
The name of
\fIbitcoin\-cli\fR
executable to run\&. \fBbitcoin-rpcpassword\fR=\fIPASSWORD\fR
.RE The RPC password for talking to \fBbitcoind\fR(1)\.
.PP
\fBbitcoin\-datadir\fR=\fIDIR\fR
.RS 4 \fBbitcoin-rpcconnect\fR=\fIHOST\fR
\fI\-datadir\fR The \fBbitcoind\fR(1) RPC host to connect to\.
argument to supply to bitcoin\-cli(1)\&.
.RE
.PP \fBbitcoin-rpcport\fR=\fIPORT\fR
\fBbitcoin\-rpcuser\fR=\fIUSER\fR The \fBbitcoind\fR(1) RPC port to connect to\.
.RS 4
The RPC username for talking to bitcoind(1)\&.
.RE \fBbitcoin-retry-timeout\fR=\fISECONDS\fR
.PP Number of seconds to keep trying a \fBbitcoin-cli\fR(1) command\. If the
\fBbitcoin\-rpcpassword\fR=\fIPASSWORD\fR command keeps failing after this time, exit with a fatal error\.
.RS 4
The RPC password for talking to bitcoind(1)\&.
.RE \fBrescan\fR=\fIBLOCKS\fR
.PP Number of blocks to rescan from the current head, or absolute
\fBbitcoin\-rpcconnect\fR=\fIHOST\fR blockheight if negative\. This is only needed if something goes badly
.RS 4 wrong\.
The bitcoind(1) RPC host to connect to\&.
.RE .SH Lightning daemon options
.PP
\fBbitcoin\-rpcport\fR=\fIPORT\fR \fBlightning-dir\fR=\fIDIR\fR
.RS 4 Sets the working directory\. All files (except \fI--conf\fR and
The bitcoind(1) RPC port to connect to\&. \fI--lightning-dir\fR on the command line) are relative to this\.
.RE
.PP
\fBbitcoin\-retry\-timeout\fR=\fISECONDS\fR \fBpid-file\fR=\fIPATH\fR
.RS 4 Specify pid file to write to\.
Number of seconds to keep trying a bitcoin\-cli(1) command\&. If the command keeps failing after this time, exit with a fatal error\&.
.RE
.PP \fBlog-level\fR=\fILEVEL\fR
\fBrescan\fR=\fIBLOCKS\fR What log level to print out: options are io, debug, info, unusual,
.RS 4 broken\.
Number of blocks to rescan from the current head, or absolute blockheight if negative\&. This is only needed if something goes badly wrong\&.
.RE
.SS "Lightning daemon options" \fBlog-prefix\fR=\fIPREFIX\fR
.PP Prefix for log lines: this can be customized if you want to merge logs
\fBlightning\-dir\fR=\fIDIR\fR with multiple daemons\.
.RS 4
Sets the working directory\&. All files (except
\fI\-\-conf\fR \fBlog-file\fR=\fIPATH\fR
and Log to this file instead of stdout\. Sending \fBlightningd\fR(8) SIGHUP will
\fI\-\-lightning\-dir\fR cause it to reopen this file (useful for log rotation)\.
on the command line) are relative to this\&.
.RE
.PP \fBrpc-file\fR=\fIPATH\fR
\fBpid\-file\fR=\fIPATH\fR Set JSON-RPC socket (or /dev/tty), such as for \fBlightning-cli\fR(1)\.
.RS 4
Specify pid file to write to\&.
.RE \fBdaemon\fR
.PP Run in the background, suppress stdout and stderr\.
\fBlog\-level\fR=\fILEVEL\fR
.RS 4
What log level to print out: options are io, debug, info, unusual, broken\&. \fBconf\fR=\fIPATH\fR
.RE Sets configuration file (default: \fBlightning-dir\fR/\fIconfig\fR )\. If this
.PP is a relative path, it is relative to the starting directory, not
\fBlog\-prefix\fR=\fIPREFIX\fR \fBlightning-dir\fR (unlike other paths)\. \fIPATH\fR must exist and be
.RS 4 readable (we allow missing files in the default case)\. Using this inside
Prefix for log lines: this can be customized if you want to merge logs with multiple daemons\&. a configuration file is meaningless\.
.RE
.PP .SH Lightning node customization options
\fBlog\-file\fR=\fIPATH\fR
.RS 4 \fBalias\fR=\fIRRGGBB\fR
Log to this file instead of stdout\&. Sending lightningd(8) SIGHUP will cause it to reopen this file (useful for log rotation)\&. Your favorite color as a hex code\.
.RE
.PP
\fBrpc\-file\fR=\fIPATH\fR Up to 32 UTF-8 characters to tag your node\. Completely silly, since
.RS 4 anyone can call their node anything they want\. The default is an
Set JSON\-RPC socket (or /dev/tty), such as for lightning\-cli(1)\&. NSA-style codename derived from your public key, but "Peter Todd" and
.RE "VAULTERO" are good options, too\.
.PP
\fBdaemon\fR
.RS 4 \fBfee-base\fR=\fIMILLISATOSHI\fR
Run in the background, suppress stdout and stderr\&. Default: 1000\. The base fee to charge for every payment which passes
.RE through\. Note that millisatoshis are a very, very small unit! Changing
.PP this value will only affect new channels and not existing ones\. If you
\fBconf\fR=\fIPATH\fR want to change fees for existing channels, use the RPC call
.RS 4 \fBlightning-setchannelfee\fR(7)\.
Sets configuration file (default:
\fBlightning\-dir\fR/\fIconfig\fR
)\&. If this is a relative path, it is relative to the starting directory, not \fBfee-per-satoshi\fR=\fIMILLIONTHS\fR
\fBlightning\-dir\fR Default: 10 (0\.001%)\. This is the proportional fee to charge for every
(unlike other paths)\&. payment which passes through\. As percentages are too coarse, it’s in
\fIPATH\fR millionths, so 10000 is 1%, 1000 is 0\.1%\. Changing this value will only
must exist and be readable (we allow missing files in the default case)\&. Using this inside a configuration file is meaningless\&. affect new channels and not existing ones\. If you want to change fees
.RE for existing channels, use the RPC call \fBlightning-setchannelfee\fR(7)\.
.SS "Lightning node customization options"
.PP
\fBrgb\fR=\fIRRGGBB\fR \fBmin-capacity-sat\fR=\fISATOSHI\fR
.RS 4 Default: 10000\. This value defines the minimal effective channel
Your favorite color as a hex code\&. capacity in satoshi to accept for channel opening requests\. If a peer
.RE tries to open a channel smaller than this, the opening will be rejected\.
.PP
\fBalias\fR=\fINAME\fR
.RS 4 \fBignore-fee-limits\fR=\fIBOOL\fR
Up to 32 UTF\-8 characters to tag your node\&. Completely silly, since anyone can call their node anything they want\&. The default is an NSA\-style codename derived from your public key, but "Peter Todd" and "VAULTERO" are good options, too\&. Allow nodes which establish channels to us to set any fee they want\.
.RE This may result in a channel which cannot be closed, should fees
.PP increase, but make channels far more reliable since we never close it
\fBfee\-base\fR=\fIMILLISATOSHI\fR due to unreasonable fees\.
.RS 4
Default: 1000\&. The base fee to charge for every payment which passes through\&. Note that millisatoshis are a very, very small unit! Changing this value will only affect new channels and not existing ones\&. If you want to change fees for existing channels, use the RPC call lightning\-setchannelfee(7)\&.
.RE \fBcommit-time\fR='MILLISECONDS
.PP How long to wait before sending commitment messages to the peer: in
\fBfee\-per\-satoshi\fR=\fIMILLIONTHS\fR theory increasing this would reduce load, but your node would have to be
.RS 4 extremely busy node for you to even notice\.
Default: 10 (0\&.001%)\&. This is the proportional fee to charge for every payment which passes through\&. As percentages are too coarse, it\(cqs in millionths, so 10000 is 1%, 1000 is 0\&.1%\&. Changing this value will only affect new channels and not existing ones\&. If you want to change fees for existing channels, use the RPC call lightning\-setchannelfee(7)\&.
.RE .SH Lightning channel and HTLC options
.PP
\fBmin\-capacity\-sat\fR=\fISATOSHI\fR \fBwatchtime-blocks\fR=\fIBLOCKS\fR
.RS 4 How long we need to spot an outdated close attempt: on opening a channel
Default: 10000\&. This value defines the minimal effective channel capacity in satoshi to accept for channel opening requests\&. If a peer tries to open a channel smaller than this, the opening will be rejected\&. we tell our peer that this is how long they’ll have to wait if they
.RE perform a unilateral close\.
.PP
\fBignore\-fee\-limits\fR=\fIBOOL\fR
.RS 4 \fBmax-locktime-blocks\fR=\fIBLOCKS\fR
Allow nodes which establish channels to us to set any fee they want\&. This may result in a channel which cannot be closed, should fees increase, but make channels far more reliable since we never close it due to unreasonable fees\&. The longest our funds can be delayed (ie\. the longest
.RE \fBwatchtime-blocks\fR our peer can ask for, and also the longest HTLC
.PP timeout we will accept)\. If our peer asks for longer, we’ll refuse to
\fBcommit\-time\fR=\*(AqMILLISECONDS create a channel, and if an HTLC asks for longer, we’ll refuse it\.
.RS 4
How long to wait before sending commitment messages to the peer: in theory increasing this would reduce load, but your node would have to be extremely busy node for you to even notice\&.
.RE \fBfunding-confirms\fR=\fIBLOCKS\fR
.SS "Lightning channel and HTLC options" Confirmations required for the funding transaction when the other side
.PP opens a channel before the channel is usable\.
\fBwatchtime\-blocks\fR=\fIBLOCKS\fR
.RS 4
How long we need to spot an outdated close attempt: on opening a channel we tell our peer that this is how long they\(cqll have to wait if they perform a unilateral close\&. \fBcommit-fee\fR=\fIPERCENT\fR
.RE The percentage of \fIestimatesmartfee 2\fR to use for the bitcoin
.PP transaction which funds a channel: can be greater than 100\.
\fBmax\-locktime\-blocks\fR=\fIBLOCKS\fR
.RS 4
The longest our funds can be delayed (ie\&. the longest \fBcommit-fee-min\fR=\fIPERCENT\fR
\fBwatchtime\-blocks\fR \fBcommit-fee-max\fR=\fIPERCENT\fR
our peer can ask for, and also the longest HTLC timeout we will accept)\&. If our peer asks for longer, we\(cqll refuse to create a channel, and if an HTLC asks for longer, we\(cqll refuse it\&. Limits on what onchain fee range we’ll allow when a node opens a channel
.RE with us, as a percentage of \fIestimatesmartfee 2\fR\. If they’re outside
.PP this range, we abort their opening attempt\. Note that \fBcommit-fee-max\fR
\fBfunding\-confirms\fR=\fIBLOCKS\fR can (should!) be greater than 100\.
.RS 4
Confirmations required for the funding transaction when the other side opens a channel before the channel is usable\&.
.RE \fBmax-concurrent-htlcs\fR=\fIINTEGER\fR
.PP Number of HTLCs one channel can handle concurrently in each direction\.
\fBcommit\-fee\fR=\fIPERCENT\fR Should be between 1 and 483 (default 30)\.
.RS 4
The percentage of
\fIestimatesmartfee 2\fR \fBcltv-delta\fR=\fIBLOCKS\fR
to use for the bitcoin transaction which funds a channel: can be greater than 100\&. The number of blocks between incoming payments and outgoing payments:
.RE this needs to be enough to make sure that if we have to, we can close
.PP the outgoing payment before the incoming, or redeem the incoming once
\fBcommit\-fee\-min\fR=\fIPERCENT\fR, \fBcommit\-fee\-max\fR=\fIPERCENT\fR the outgoing is redeemed\.
.RS 4
Limits on what onchain fee range we\(cqll allow when a node opens a channel with us, as a percentage of
\fIestimatesmartfee 2\fR\&. If they\(cqre outside this range, we abort their opening attempt\&. Note that \fBcltv-final\fR=\fIBLOCKS\fR
\fBcommit\-fee\-max\fR The number of blocks to allow for payments we receive: if we have to, we
can (should!) be greater than 100\&. might need to redeem this on-chain, so this is the number of blocks we
.RE have to do that\.
.PP
\fBmax\-concurrent\-htlcs\fR=\fIINTEGER\fR
.RS 4
Number of HTLCs one channel can handle concurrently in each direction\&. Should be between 1 and 483 (default 30)\&.
.RE
.PP
\fBcltv\-delta\fR=\fIBLOCKS\fR
.RS 4
The number of blocks between incoming payments and outgoing payments: this needs to be enough to make sure that if we have to, we can close the outgoing payment before the incoming, or redeem the incoming once the outgoing is redeemed\&.
.RE
.PP
\fBcltv\-final\fR=\fIBLOCKS\fR
.RS 4
The number of blocks to allow for payments we receive: if we have to, we might need to redeem this on\-chain, so this is the number of blocks we have to do that\&.
.RE
.sp
Invoice control options: Invoice control options:
.PP
\fBautocleaninvoice\-cycle\fR=\fISECONDS\fR
.RS 4 \fBautocleaninvoice-cycle\fR=\fISECONDS\fR
Perform cleanup of expired invoices every Perform cleanup of expired invoices every \fISECONDS\fR seconds, or disable
\fISECONDS\fR if 0\. Usually unpaid expired invoices are uninteresting, and just take
seconds, or disable if 0\&. Usually unpaid expired invoices are uninteresting, and just take up space in the database\&. up space in the database\.
.RE
.PP
\fBautocleaninvoice\-expired\-by\fR=\fISECONDS\fR \fBautocleaninvoice-expired-by\fR=\fISECONDS\fR
.RS 4 Control how long invoices must have been expired before they are cleaned
Control how long invoices must have been expired before they are cleaned (if (if \fIautocleaninvoice-cycle\fR is non-zero)\.
\fIautocleaninvoice\-cycle\fR
is non\-zero)\&. .SH Networking options
.RE
.SS "Networking options" Note that for simple setups, the implicit \fIautolisten\fR option does the
.sp right thing: it will try to bind to port 9735 on IPv4 and IPv6, and will
Note that for simple setups, the implicit \fIautolisten\fR option does the right thing: it will try to bind to port 9735 on IPv4 and IPv6, and will announce it to peers if it seems like a public address\&. announce it to peers if it seems like a public address\.
.sp
You can instead use \fIaddr\fR to override this (eg\&. to change the port), or precisely control where to bind and what to announce with the \fIbind\-addr\fR and \fIannounce\-addr\fR options\&. These will \fBdisable\fR the \fIautolisten\fR logic, so you must specifiy exactly what you want!
.PP You can instead use \fIaddr\fR to override this (eg\. to change the port), or
\fBaddr\fR=\fI[IPADDRESS[:PORT]]|autotor:TORIPADDRESS[:TORPORT]\fR precisely control where to bind and what to announce with the
.RS 4 \fIbind-addr\fR and \fIannounce-addr\fR options\. These will \fBdisable\fR the
Set an IP address (v4 or v6) or automatic Tor address to listen on and (maybe) announce as our node address\&. \fIautolisten\fR logic, so you must specifiy exactly what you want!
.sp
.if n \{\
.RS 4 \fBaddr\fR=\fI[IPADDRESS[:PORT]]|autotor:TORIPADDRESS[:TORPORT]\fR
.\} Set an IP address (v4 or v6) or automatic Tor address to listen on and
(maybe) announce as our node address\.
.nf .nf
An empty \*(AqIPADDRESS\*(Aq is a special value meaning bind to IPv4 and/or .RS
IPv6 on all interfaces, \*(Aq0\&.0\&.0\&.0\*(Aq means bind to all IPv4 An empty 'IPADDRESS' is a special value meaning bind to IPv4 and/or
interfaces, \*(Aq::\*(Aq means \*(Aqbind to all IPv6 interfaces\*(Aq\&. If \*(AqPORT\*(Aq is IPv6 on all interfaces, '0.0.0.0' means bind to all IPv4
not specified, 9735 is used\&. If we can determine a public IP interfaces, '::' means 'bind to all IPv6 interfaces'. If 'PORT' is
not specified, 9735 is used. If we can determine a public IP
address from the resulting binding, and no other addresses of the address from the resulting binding, and no other addresses of the
same type are already announced, the address is announced\&. same type are already announced, the address is announced.
.fi
.if n \{\ If the argument begins with 'autotor:' then it is followed by the
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
If the argument begins with \*(Aqautotor:\*(Aq then it is followed by the
IPv4 or IPv6 address of the Tor control port (default port 9051), IPv4 or IPv6 address of the Tor control port (default port 9051),
and this will be used to configure a Tor hidden service for port and this will be used to configure a Tor hidden service for port
9735\&. The Tor hidden service will be configured to point to the 9735. The Tor hidden service will be configured to point to the
first IPv4 or IPv6 address we bind to\&. first IPv4 or IPv6 address we bind to.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
This option can be used multiple times to add more addresses, and This option can be used multiple times to add more addresses, and
its use disables autolisten\&. If necessary, and \*(Aqalways\-use\-proxy\*(Aq its use disables autolisten. If necessary, and 'always-use-proxy'
is not specified, a DNS lookup may be done to resolve \*(AqIPADDRESS\*(Aq is not specified, a DNS lookup may be done to resolve 'IPADDRESS'
or \*(AqTORIPADDRESS\*(Aq\&. or 'TORIPADDRESS'.
.fi
.if n \{\
.RE
.\}
.RE .RE
.PP
\fBbind\-addr\fR=\fI[IPADDRESS[:PORT]]|SOCKETPATH\fR
.RS 4
Set an IP address or UNIX domain socket to listen to, but do not announce\&. A UNIX domain socket is distinguished from an IP address by beginning with a
\fI/\fR\&.
.sp
.if n \{\
.RS 4
.\}
.nf
An empty \*(AqIPADDRESS\*(Aq is a special value meaning bind to IPv4 and/or
IPv6 on all interfaces, \*(Aq0\&.0\&.0\&.0\*(Aq means bind to all IPv4
interfaces, \*(Aq::\*(Aq means \*(Aqbind to all IPv6 interfaces\*(Aq\&. \*(AqPORT\*(Aq is
not specified, 9735 is used\&.
.fi .fi
.if n \{\
.RE \fBbind-addr\fR=\fI[IPADDRESS[:PORT]]|SOCKETPATH\fR
.\} Set an IP address or UNIX domain socket to listen to, but do not
.sp announce\. A UNIX domain socket is distinguished from an IP address by
.if n \{\ beginning with a \fI/\fR\.
.RS 4
.\}
.nf .nf
.RS
An empty 'IPADDRESS' is a special value meaning bind to IPv4 and/or
IPv6 on all interfaces, '0.0.0.0' means bind to all IPv4
interfaces, '::' means 'bind to all IPv6 interfaces'. 'PORT' is
not specified, 9735 is used.
This option can be used multiple times to add more addresses, and This option can be used multiple times to add more addresses, and
its use disables autolisten\&. If necessary, and \*(Aqalways\-use\-proxy\*(Aq its use disables autolisten. If necessary, and 'always-use-proxy'
is not specified, a DNS lookup may be done to resolve \*(AqIPADDRESS\*(Aq\&. is not specified, a DNS lookup may be done to resolve 'IPADDRESS'.
.fi
.if n \{\
.RE
.\}
.RE .RE
.PP
\fBannounce\-addr\fR=\fIIPADDRESS[:PORT]|TORADDRESS\&.onion[:PORT]\fR
.RS 4
Set an IP (v4 or v6) address or Tor address to announce; a Tor address is distinguished by ending in
\fI\&.onion\fR\&.
\fIPORT\fR
defaults to 9735\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Empty or wildcard IPv4 and IPv6 addresses don\*(Aqt make sense here\&.
Also, unlike the \*(Aqaddr\*(Aq option, there is no checking that your
announced addresses are public (e\&.g\&. not localhost)\&.
.fi .fi
.if n \{\
.RE \fBannounce-addr\fR=\fIIPADDRESS[:PORT]|TORADDRESS\.onion[:PORT]\fR
.\} Set an IP (v4 or v6) address or Tor address to announce; a Tor address
.sp is distinguished by ending in \fI\.onion\fR\. \fIPORT\fR defaults to 9735\.
.if n \{\
.RS 4
.\}
.nf .nf
.RS
Empty or wildcard IPv4 and IPv6 addresses don't make sense here.
Also, unlike the 'addr' option, there is no checking that your
announced addresses are public (e.g. not localhost).
This option can be used multiple times to add more addresses, and This option can be used multiple times to add more addresses, and
its use disables autolisten\&. The spec says you can\*(Aqt announce its use disables autolisten. The spec says you can't announce
more that one address of the same type (eg\&. two IPv4 or two IPv6 more that one address of the same type (eg. two IPv4 or two IPv6
addresses) so `lightningd` will refuse if you specify more than one\&. addresses) so `lightningd` will refuse if you specify more than one.
.fi
.if n \{\ If necessary, and 'always-use-proxy' is not specified, a DNS
.RE lookup may be done to resolve 'IPADDRESS'.
.\}
.sp
.if n \{\ .RE
.RS 4
.\}
.nf
If necessary, and \*(Aqalways\-use\-proxy\*(Aq is not specified, a DNS
lookup may be done to resolve \*(AqIPADDRESS\*(Aq\&.
.fi .fi
.if n \{\
.RE \fBoffline\fR
.\} Do not bind to any ports, and do not try to reconnect to any peers\. This
.RE can be useful for maintenance and forensics, so is usually specified on
.PP the command line\. Overrides all \fIaddr\fR and \fIbind-addr\fR options\.
\fBoffline\fR
.RS 4
Do not bind to any ports, and do not try to reconnect to any peers\&. This can be useful for maintenance and forensics, so is usually specified on the command line\&. Overrides all \fBautolisten\fR=\fIBOOL\fR
\fIaddr\fR By default, we bind (and maybe announce) on IPv4 and IPv6 interfaces if
and no \fIaddr\fR, \fIbind-addr\fR or \fIannounce-addr\fR options are specified\. Setting
\fIbind\-addr\fR this to \fIfalse\fR disables that\.
options\&.
.RE
.PP \fBproxy\fR=\fIIPADDRESS[:PORT]\fR
\fBautolisten\fR=\fIBOOL\fR Set a socks proxy to use to connect to Tor nodes (or for all connections
.RS 4 if \fBalways-use-proxy\fR is set)\.
By default, we bind (and maybe announce) on IPv4 and IPv6 interfaces if no
\fIaddr\fR,
\fIbind\-addr\fR \fBalways-use-proxy\fR=\fIBOOL\fR
or Always use the \fBproxy\fR, even to connect to normal IP addresses (you
\fIannounce\-addr\fR can still connect to Unix domain sockets manually)\. This also disables
options are specified\&. Setting this to all DNS lookups, to avoid leaking information\.
\fIfalse\fR
disables that\&.
.RE \fBdisable-dns\fR
.PP Disable the DNS bootstrapping mechanism to find a node by its node ID\.
\fBproxy\fR=\fIIPADDRESS[:PORT]\fR
.RS 4
Set a socks proxy to use to connect to Tor nodes (or for all connections if \fBtor-service-password\fR=\fIPASSWORD\fR
\fBalways\-use\-proxy\fR Set a Tor control password, which may be needed for \fIautotor:\fR to
is set)\&. authenticate to the Tor control port\.
.RE
.PP .SH Lightning Plugins
\fBalways\-use\-proxy\fR=\fIBOOL\fR
.RS 4 \fBlightningd\fR(8) supports plugins, which offer additional configuration
Always use the options and JSON-RPC methods, depending on the plugin\. Some are supplied
\fBproxy\fR, even to connect to normal IP addresses (you can still connect to Unix domain sockets manually)\&. This also disables all DNS lookups, to avoid leaking information\&. by default (usually located in \fBlibexec/c-lightning/plugins/\fR)\. If a
.RE \fBplugins\fR directory exists under \fIlightning-dir\fR that is searched for
.PP plugins along with any immediate subdirectories)\. You can specify
\fBdisable\-dns\fR additional paths too:
.RS 4
Disable the DNS bootstrapping mechanism to find a node by its node ID\&.
.RE \fBplugin\fR=\fIPATH\fR
.PP Specify a plugin to run as part of c-lightning\. This can be specified
\fBtor\-service\-password\fR=\fIPASSWORD\fR multiple times to add multiple plugins\.
.RS 4
Set a Tor control password, which may be needed for
\fIautotor:\fR \fBplugin-dir\fR=\fIDIRECTORY\fR
to authenticate to the Tor control port\&. Specify a directory to look for plugins; all executable files not
.RE containing punctuation (other than \fI\.\fR, \fI-\fR or \fI_) in 'DIRECTORY\fR are
.SS "Lightning Plugins" loaded\. \fIDIRECTORY\fR must exist; this can be specified multiple times to
.sp add multiple directories\.
lightningd(8) supports plugins, which offer additional configuration options and JSON\-RPC methods, depending on the plugin\&. Some are supplied by default (usually located in \fBlibexec/c\-lightning/plugins/\fR)\&. If a \fBplugins\fR directory exists under \fIlightning\-dir\fR that is searched for plugins along with any immediate subdirectories)\&. You can specify additional paths too:
.PP
\fBplugin\fR=\fIPATH\fR \fBclear-plugins\fR
.RS 4 This option clears all \fIplugin\fR and \fIplugin-dir\fR options preceeding it,
Specify a plugin to run as part of c\-lightning\&. This can be specified multiple times to add multiple plugins\&. including the default built-in plugin directory\. You can still add
.RE \fIplugin-dir\fR and \fIplugin\fR options following this and they will have the
.PP normal effect\.
\fBplugin\-dir\fR=\fIDIRECTORY\fR
.RS 4
Specify a directory to look for plugins; all executable files not containing punctuation (other than \fBdisable-plugin\fR=\fIPLUGIN\fR
\fI\&.\fR, If \fIPLUGIN\fR contains a /, plugins with the same path as \fIPLUGIN\fR are
\fI\-\fR disabled\. Otherwise, any plugin with that base name is disabled,
or whatever directory it is in\.
\fI_) in \*(AqDIRECTORY\fR
are loaded\&. .SH BUGS
\fIDIRECTORY\fR
must exist; this can be specified multiple times to add multiple directories\&. You should report bugs on our github issues page, and maybe submit a fix
.RE to gain our eternal gratitude!
.PP
\fBclear\-plugins\fR .SH AUTHOR
.RS 4
This option clears all Rusty Russell &lt;\fBNone\fR (\fIrusty@rustcorp.com.au\fR)&gt; wrote this man page, and
\fIplugin\fR much of the configuration language, but many others did the hard work of
and actually implementing these options\.
\fIplugin\-dir\fR
options preceeding it, including the default built\-in plugin directory\&. You can still add .SH SEE ALSO
\fIplugin\-dir\fR
and \fBlightning-listconfigs\fR(7) \fBlightning-setchannelfee\fR(7) \fBlightningd\fR(8)
\fIplugin\fR
options following this and they will have the normal effect\&. .SH RESOURCES
.RE
.PP Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
\fBdisable\-plugin\fR=\fIPLUGIN\fR
.RS 4 .SH COPYING
If
\fIPLUGIN\fR Note: the modules in the ccan/ directory have their own licenses, but
contains a /, plugins with the same path as the rest of the code is covered by the BSD-style MIT license\.
\fIPLUGIN\fR
are disabled\&. Otherwise, any plugin with that base name is disabled, whatever directory it is in\&.
.RE Last updated 2019-08-09 11:12:04 CEST
.SH "BUGS"
.sp
You should report bugs on our github issues page, and maybe submit a fix to gain our eternal gratitude!
.SH "AUTHOR"
.sp
Rusty Russell <rusty@rustcorp\&.com\&.au> wrote this man page, and much of the configuration language, but many others did the hard work of actually implementing these options\&.
.SH "SEE ALSO"
.sp
lightning\-listconfigs(7) lightning\-setchannelfee(7) lightningd(8)
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning
.SH "COPYING"
.sp
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\&.

285
doc/lightningd.8

@ -0,0 +1,285 @@
.TH "LIGHTNINGD" "8" "" "" "lightningd"
.SH NAME
lightningd - Daemon for running a Lightning Network node
SYNOPSIS
lightningd [--conf=&lt;config-file&gt;] [\fIOPTIONS\fR]…
DESCRIPTION
\fBlightningd\fR starts the C-Lightning daemon, which implements a
standards-compliant Lightning Network node\.
CONFIGURATION OPTIONS
\fB--conf\fR=\fIFILE\fR
Specify configuration file\. If not an absolute path, will be relative
from the lightning-dir location\. Defaults to \fIconfig\fR\.
\fB--lightning-dir\fR=\fIDIR\fR
Set the directory for the C-Lightning daemon\. Defaults to
\fI$HOME/\.lightning\fR\.
MORE OPTIONS
Command line options are mirrored as configuration options in the
configuration file, so \fIfoo\fR in the configuration file simply becomes
\fI--foo\fR on the command line, and \fIfoo=bar\fR becomes \fI--foo=bar\fR\.
See \fBlightningd-config\fR(5) for a comprehensive list of all available
options\.
LOGGING AND COMMANDING C-LIGHTNING
.nf
.RS
By default, C-Lightning will log to the standard output.
To log to a specific file, use '--log-file=PATH'.
Sending SIGHUP will cause C-Lightning to reopen this file,
for example to do log rotation.
C-Lightning will set up a Unix domain socket for receiving
commands.
By default this will be the file 'lightning-rpc' in your
specified 'lightning-dir'.
You can use lightning-cli(1) to send commands to C-Lightning
once 'lightningd' has started; you need to match the
'--lightning-dir' and '--rpc-file' options between them.
Commands for C-Lightning are described in various manpages
in section 7, with the common prefix 'lightning-'.
QUICK START
.RE
.fi
First, decide on and create a directory for \fIlightning-dir\fR, or just use
the default \fI$HOME/\.lightning\fR\. Then create a \fIconfig\fR file in this
directory containing your configuration\.
Your other main preparation would be to set up a mainnet Bitcoin
fullnode, i\.e\. run a \fBbitcoind\fR(1) instance\. The rest of this quick start
guide will assume you are reckless and want to spend real funds on
Lightning\. Indicate \fInetwork=bitcoin\fR in your \fIconfig\fR file explicitly\.
C-Lightning needs to communicate with the Bitcoin Core RPC\. You can set
this up using \fIbitcoin-datadir\fR, \fIbitcoin-rpcconnect\fR,
\fIbitcoin-rpcport\fR, \fIbitcoin-rpcuser\fR, and \fIbitcoin-rpcpassword\fR options
in your \fIconfig\fR file\.
Finally, just to keep yourself sane, decide on a log file name and
indicate it using \fIlog-file=lightningd\.log\fR in your \fIconfig\fR file\. You
might be interested in viewing it periodically as you follow along on
this guide\.
Once the \fBbitcoind\fR instance is running, start \fBlightningd\fR(8):
.nf
.RS
$ lightningd --lightning-dir=$HOME/.lightning --daemon
.RE
.fi
This starts \fBlightningd\fR in the background due to the \fI--daemon\fR
option\.
Check if things are working:
.nf
.RS
$ lightning-cli --lightning-dir=%HOME/.lightning help
$ lightning-cli --lightning-dir=%HOME/.lightning getinfo
.RE
.fi
The \fBgetinfo\fR command in particular will return a \fIblockheight\fR field,
which indicates the block height to which \fBlightningd\fR has been
synchronized to (this is separate from the block height that your
\fBbitcoind\fR has been synchronized to, and will always lag behind
\fBbitcoind\fR)\. You will have to wait until the \fIblockheight\fR has reached
the actual blockheight of the Bitcoin network\.
Before you can get funds offchain, you need to have some funds onchain
owned by \fBlightningd\fR (which has a separate wallet from the
\fBbitcoind\fR it connects to)\. Get an address for \fBlightningd\fR via
\fBlightning-newaddr\fR(7) command as below (\fI--lightning-dir\fR option has been
elided, specify it if you selected your own \fIlightning-dir\fR):
.nf
.RS
$ lightning-cli newaddr
.RE
.fi
This will provide a native SegWit bech32 address\. In case all your money
is in services that do not support native SegWit and have to use
P2SH-wrapped addresses, instead use:
.nf
.RS
$ lightning-cli newaddr p2sh-segwit
.RE
.fi
Transfer a small amount of onchain funds to the given address\. Check the
status of all your funds (onchain and on-Lightning) via
\fBlightning-listfunds\fR(7):
.nf
.RS
$ lightning-cli listfunds
.RE
.fi
Now you need to look for an arbitrary Lightning node to connect to,
which you can do by using \fBdig\fR(1) and querying \fIlseed\.bitcoinstats\.com\fR:
.nf
.RS
$ dig lseed.bitcoinstats.com A
.RE
.fi
This will give 25 IPv4 addresses, you can select any one of those\. You
will also need to learn the corresponding public key, which you can
determine by searching the IP addrss on \fBNone\fR (\fIhttps://1ml.com/\fR) \. The public
key is a long hex string, like so:
\fI024772ee4fa461febcef09d5869e1238f932861f57be7a6633048514e3f56644a1\fR\.
(this example public key is not used as of this writing)
After determining a public key, use \fBlightning-connect\fR(7) to connect to
that public key:
.nf
.RS
$ lightning-cli connect $PUBLICKEY
.RE
.fi
Then open a channel to that node using \fBlightning-fundchannel\fR(7):
.nf
.RS
$ lightning-cli fundchannel $PUBLICKEY $SATOSHI
.RE
.fi
This will require that the funding transaction be confirmed before you
can send funds over Lightning\. To track this, use \fBlightning-listpeers\fR(7)
and look at the \fIstate\fR of the channel:
.nf
.RS
$ lightning-cli listpeers $PUBLICKEY
.RE
.fi
The channel will initially start with a \fIstate\fR of
\fICHANNELD_AWAITING_LOCKIN\fR\. You need to wait for the channel \fIstate\fR
to become \fICHANNELD_NORMAL\fR, meaning the funding transaction has been
confirmed deeply\.
Once the channel \fIstate\fR is \fICHANNELD_NORMAL\fR, you can start paying
merchants over Lightning\. Acquire a Lightning invoice from your favorite
merchant, and use \fBlightning-pay\fR(7) to pay it:
.nf
.RS
$ lightning-cli pay $INVOICE
.RE
.fi
BUGS
You should report bugs on our github issues page, and maybe submit a fix
to gain our eternal gratitude!
AUTHOR
ZmnSCPxj &lt;\fBNone\fR (\fIZmnSCPxj@protonmail.com\fR)&gt; wrote the initial version of
this man page, but many others did the hard work of actually
implementing a standards-compliant Lightning Network node
implementation\.
SEE ALSO
\fBlightning-listconfigs\fR(7), \fBlightning-config\fR(5), \fBlightning-cli\fR(1),
\fBlightning-newaddr\fR(7), \fBlightning-listfunds\fR(7), \fBlightning-connect\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-listpeers\fR(7), \fBlightning-pay\fR(7)
RESOURCES
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
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\.
Last updated 2019-08-09 11:11:48 CEST
Loading…
Cancel
Save