Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed doc missed #3938

Merged
12 changes: 11 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,17 @@ MANPAGES := doc/lightning-cli.1 \
doc/lightning-waitanyinvoice.7 \
doc/lightning-waitblockheight.7 \
doc/lightning-waitsendpay.7 \
doc/lightning-withdraw.7
doc/lightning-withdraw.7 \
doc/lightning-ping.7 \
doc/lightning-stop.7 \
doc/lightning-signpsbt.7 \
doc/lightning-sendpsbt.7 \
doc/lightning-getinfo.7 \
doc/lightning-listtransactions.7 \
doc/lightning-listnodes.7 \
doc/lightning-listconfigs.7 \
doc/lightning-help.7 \
doc/lightning-getlog.7

doc-all: $(MANPAGES) doc/index.rst

Expand Down
10 changes: 10 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,36 @@ c-lightning Documentation
lightning-fundchannel_complete <lightning-fundchannel_complete.7.md>
lightning-fundchannel_start <lightning-fundchannel_start.7.md>
lightning-fundpsbt <lightning-fundpsbt.7.md>
lightning-getinfo <lightning-getinfo.7.md>
lightning-getlog <lightning-getlog.7.md>
lightning-getroute <lightning-getroute.7.md>
lightning-getsharedsecret <lightning-getsharedsecret.7.md>
lightning-help <lightning-help.7.md>
lightning-hsmtool <lightning-hsmtool.8.md>
lightning-invoice <lightning-invoice.7.md>
lightning-keysend <lightning-keysend.7.md>
lightning-listchannels <lightning-listchannels.7.md>
lightning-listconfigs <lightning-listconfigs.7.md>
lightning-listforwards <lightning-listforwards.7.md>
lightning-listfunds <lightning-listfunds.7.md>
lightning-listinvoices <lightning-listinvoices.7.md>
lightning-listnodes <lightning-listnodes.7.md>
lightning-listpays <lightning-listpays.7.md>
lightning-listpeers <lightning-listpeers.7.md>
lightning-listsendpays <lightning-listsendpays.7.md>
lightning-listtransactions <lightning-listtransactions.7.md>
lightning-newaddr <lightning-newaddr.7.md>
lightning-pay <lightning-pay.7.md>
lightning-ping <lightning-ping.7.md>
lightning-plugin <lightning-plugin.7.md>
lightning-reserveinputs <lightning-reserveinputs.7.md>
lightning-sendonion <lightning-sendonion.7.md>
lightning-sendpay <lightning-sendpay.7.md>
lightning-sendpsbt <lightning-sendpsbt.7.md>
lightning-setchannelfee <lightning-setchannelfee.7.md>
lightning-signmessage <lightning-signmessage.7.md>
lightning-signpsbt <lightning-signpsbt.7.md>
lightning-stop <lightning-stop.7.md>
lightning-txdiscard <lightning-txdiscard.7.md>
lightning-txprepare <lightning-txprepare.7.md>
lightning-txsend <lightning-txsend.7.md>
Expand Down
123 changes: 123 additions & 0 deletions doc/lightning-getinfo.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 105 additions & 0 deletions doc/lightning-getinfo.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
lightning-getinfo -- Command to receive all information about the c-lightning node.
============================================================

SYNOPSIS
--------

**getinfo**

DESCRIPTION
-----------

The **getinfo** gives a summary of the current running node.


EXAMPLE JSON REQUEST
------------
```json
{
"id": 82,
"method": "getinfo",
"params": {}
}
```

RETURN VALUE
------------

On success, an object with the following information is returned:

- *id*: A string that represents the public key of the node. It will represents the node on the public network.
- *alias*: A string that represents the alias of the node, by default is calculate from the public key (node id). This is just for fun; the name can be anything and is not unique!
- *color*: A string that represents the preferred color of the node.
- *num_peers*: An integer that represents the number of peer connect to the node.
- *num_pending_channels*: An integer that represents the number of channel which are still awaiting opening confirmation.
- *num_active_channels*: A integer that represents the number of channel which are currently open.
- *num_inactive_channels*: A integer that represents the number of channel which are closing.
- *address*: An array that represents all published addresses of the node, each object inside the array contains the following proprieties:
- *type*: A string that represents the type of the address (currently `ipv4`, `ipv6`, `torv3` or `torv4`).
- *address*: A string that represents the value of the address.
- *port*: An integer that represents the port where the node is listening with this address.
- *binding*: An array that represents all addresses where the node is binded. Each object contains the same object type of the address propriety above.
- *version*: A string that represents the version of the node.
- *blockheight*: An integer that represents the blockchain height.
- *network*: A string that represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`).

On failure, one of the following error codes may be returned:

- -32602: Error in given parameters or some error happened during the command process.

EXAMPLE JSON RESPONSE
-----
```json
{
"id": "02bf811f7571754f0b51e6d41a8885f5561041a7b14fac093e4cffb95749de1a8d",
"alias": "SLICKERGOPHER",
"color": "02bf81",
"num_peers": 0,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 0,
"address": [
{
"type": "torv3",
"address": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion",
"port": 9736
},
{
"type": "torv3",
"address": "ifnntp5ak4homxrti2fp6ckyllaqcike447ilqfrgdw64ayrmkyashid.onion",
"port": 9736
}
],
"binding": [
{
"type": "ipv4",
"address": "127.0.0.1",
"port": 9736
}
],
"version": "0.9.0",
"blockheight": 644297,
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/media/vincent/Maxtor/C-lightning/node/bitcoin"
}

```


AUTHOR
------

Vincenzo Palazzo <<vincenzo.palazzo@protonmail.com>> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command.


SEE ALSO
------

lightning-connect(7), lightning-fundchannel(7), lightning-listconfigs(7).

RESOURCES
---------

Main web site: <https://github.com/ElementsProject/lightning>
97 changes: 97 additions & 0 deletions doc/lightning-getlog.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading