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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,44 @@ c-lightning Documentation
Coding Style Guideline <STYLE.md>
MAKING-RELEASES.md
CHANGELOG.md

.. toctree::
:maxdepth: 1
:caption: Manpages

doc/lightning-autocleaninvoice.7.md
doc/lightning-check.7.md
doc/lightning-cli.1.md
doc/lightning-close.7.md
doc/lightning-connect.7.md
doc/lightningd-config.5.md
doc/lightning-decodepay.7.md
doc/lightning-delexpiredinvoice.7.md
doc/lightning-delinvoice.7.md
doc/lightning-disconnect.7.md
doc/lightning-fundchannel.7.md
doc/lightning-fundchannel_cancel.7.md
doc/lightning-fundchannel_complete.7.md
doc/lightning-fundchannel_start.7.md
doc/lightning-getroute.7.md
doc/lightning-invoice.7.md
doc/lightning-listchannels.7.md
doc/lightning-listforwards.7.md
doc/lightning-listfunds.7.md
doc/lightning-listinvoices.7.md
doc/lightning-listpays.7.md
doc/lightning-listpeers.7.md
doc/lightning-listsendpays.7.md
doc/lightning-newaddr.7.md
doc/lightning-pay.7.md
doc/lightning-plugin.7.md
doc/lightning-sendpay.7.md
doc/lightning-setchannelfee.7.md
doc/lightning-txdiscard.7.md
doc/lightning-txprepare.7.md
doc/lightning-txsend.7.md
doc/lightning-waitanyinvoice.7.md
doc/lightning-waitinvoice.7.md
doc/lightning-waitsendpay.7.md
doc/lightning-withdraw.7.md

45 changes: 45 additions & 0 deletions doc/lightning-autocleaninvoice.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
lightning-autocleaninvoice

7

lightning-autocleaninvoice

Set up auto-delete of expired invoice

**autocleaninvoice** \[*cycle\_seconds*\] \[*expired\_by*\]

DESCRIPTION
===========

The **autocleaninvoice** RPC command sets up automatic cleaning of
expired invoices.

Autoclean will be done every *cycle\_seconds* seconds. Setting
*cycle\_seconds* to 0 disables autoclean. If not specified, this
defaults to 3600 (one hour).

Every autoclean cycle, expired invoices, which have already been expired
for at least *expired\_by* seconds, will be deleted. If *expired\_by* is
not specified, this defaults to 86400 (one day).

On startup of the daemon, no autoclean is set up.

RETURN VALUE
============

On success, an empty object is returned.

AUTHOR
======

ZmnSCPxj &lt;<ZmnSCPxj@protonmail.com>&gt; is mainly responsible.

SEE ALSO
========

lightning-delexpiredinvoice(7), lightning-delinvoice(7)

RESOURCES
=========

Main web site: <https://github.com/ElementsProject/lightning>
40 changes: 40 additions & 0 deletions doc/lightning-check.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
lightning-check

7

lightning-check

Command for verifying parameters

**check** *command\_to\_check* \[*parameters*\]

DESCRIPTION
===========

The **check** RPC command verifies another command’s parameters without
running it.

The *command\_to\_check* is the name of the relevant command.

*parameters* is the command’s parameters.

This does not guarantee successful execution of the command in all
cases. For example, a call to lightning-getroute(7) may still fail to
find a route even if checking the parameters succeeds.

RETURN VALUE
============

On success, the *command\_to\_check* is returned. On failure, the
relevant RPC error is returned.

AUTHOR
======

Mark Beckwith &lt;<wythe@intrig.com>&gt; and Rusty Russell
&lt;<rusty@rustcorp.com.au>&gt; are mainly responsible.

RESOURCES
=========

Main web site: <https://github.com/ElementsProject/lightning>
92 changes: 92 additions & 0 deletions doc/lightning-cli.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
lightning-cli

1

lightning-cli

Control lightning daemon

**lightning-cli** \[*OPTIONS*\] *command*…

DESCRIPTION
===========

**lightning-cli** sends commands to the lightning daemon.

OPTIONS
=======

**--lightning-dir**=*DIR*
Set the directory for the lightning daemon we’re talking to; defaults to
*$HOME/.lightning*.

**--rpc-file**=*FILE*
Named pipe to use to talk to lightning daemon: default is
*lightning-rpc* in the lightning directory.

**--keywords**/**-k**
Use format *key*=*value* for parameters in any order

**--order**/**-o**
Follow strictly the order of parameters for the command

**--json**/**-J**
Return result in JSON format (default unless *help* command)

**--raw**/**-R**
Return raw JSON directly as lightningd replies

**--human-readable**/**-H**
Return result in human-readable output (default for *help* command)

**--help**/**-h**
Print summary of options to standard output and exit.

**--version**/**-V**
Print version number to standard output and exit.

COMMANDS
========

*lightning-cli* simply uses the JSON RPC interface to talk to
*lightningd*, and prints the results. Thus the commands available depend
entirely on the lightning daemon itself.

ARGUMENTS
=========

Arguments may be provided positionally or using *key*=*value* after the
command name, based on either **-o** or **-k** option. Arguments may be
integer numbers (composed entirely of digits), floating-point numbers
(has a radix point but otherwise composed of digits), *true*, *false*,
or *null*. Other arguments are treated as strings.

Some commands have optional arguments. You may use *null* to skip
optional arguments to provide later arguments.

EXAMPLES
========

lightning-cli help

BUGS
====

This manpage documents how it should work, not how it does work. The
pretty printing of results isn’t pretty.

AUTHOR
======

Rusty Russell &lt;<rusty@rustcorp.com.au>&gt; is mainly to blame.

RESOURCES
=========

Main web site: <https://github.com/ElementsProject/lightning>

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.
66 changes: 66 additions & 0 deletions doc/lightning-close.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
lightning-close

7

lightning-close

Command for closing channels with direct peers

**close** *id* \[*force*\] \[*timeout*\]

DESCRIPTION
===========

The **close** RPC command attempts to close the channel cooperatively
with the peer. If the given *id* 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 *id* is a channel ID
(64 hex digits as a string, or the short channel ID
*blockheight:txindex:outindex* form), then it applies to that channel.

The **close** command will time out and return with an error when the
number of seconds specified in *timeout* is reached. If unspecified, it
times out in 30 seconds.

The *force* argument, if the JSON value *true*, will cause the channel
to be unilaterally closed when the timeout is reached. If so, timeout
will not cause an error, but instead cause the channel to be failed and
put onchain unilaterally. Unilateral closes will lead to your funds
getting locked according to the *to\_self\_delay* parameter of the peer.

Normally the peer needs to be live and connected in order to negotiate a
mutual close. Forcing a unilateral close can be used if you suspect you
can no longer contact the peer.

RETURN VALUE
============

On success, an object with fields *tx* and *txid* containing the closing
transaction are returned. It will also have a field *type* which is
either the JSON string *mutual* or the JSON string *unilateral*. A
*mutual* close means that we could negotiate a close with the peer,
while a *unilateral* close means that the *force* flag was set and we
had to close the channel without waiting for the counterparty.

A unilateral close may still occur with *force* set to *false* 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 *to\_self\_delay* setting, not your own setting.

On failure, if **close** failed due to timing out with *force* argument
*false*, the channel will still eventually close once we have contacted
the peer.

AUTHOR
======

ZmnSCPxj &lt;<ZmnSCPxj@protonmail.com>&gt; is mainly responsible.

SEE ALSO
========

RESOURCES
=========

Main web site: <https://github.com/ElementsProject/lightning>
63 changes: 63 additions & 0 deletions doc/lightning-connect.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
lightning-connect

7

lightning-connect

Command for connecting to another lightning node.

**connect** *id* \[*host* *port*\]

DESCRIPTION
===========

The **connect** RPC command establishes a new connection with another
node in the Lightning Network.

*id* represents the target node’s public key. As a convenience, *id* may
be of the form *id@host* or *id@host:port*. In this case, the *host* and
*port* parameters must be omitted.

*host* is the peer’s hostname or IP address.

If not specified, the *port* defaults to 9735.

If *host* is not specified, the connection will be attempted to an IP
belonging to *id* obtained through gossip with other already connected
peers.

If *host* begins with a */* it is interpreted as a local path, and the
connection will be made to that local socket (see **bind-addr** in
lightningd-config(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
lightning-fundchannel(7).

RETURN VALUE
============

On success the peer *id* is returned.

The following error codes may occur:

- -1. Catchall nonspecific error. This may occur if the host is not
valid or there are problems communicating with the peer. **connect**
will make up to 10 attempts to connect to the peer before giving up.

AUTHOR
======

Rusty Russell &lt;<rusty@rustcorp.com.au>&gt; is mainly responsible.
Felix &lt;<fixone@gmail.com>&gt; is the original author of this manpage.

SEE ALSO
========

lightning-fundchannel(7), lightning-listpeers(7),
lightning-listchannels(7), lightning-disconnect(7)

RESOURCES
=========

Main web site: <https://github.com/ElementsProject/lightning>
Loading