From 169967f3e4fd3b18984dab6ae32ae6e675d9dae5 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Wed, 26 Aug 2020 14:35:37 +0200 Subject: [PATCH] Added doc file for the command getlog, help and listconfigs Signed-off-by: Vincenzo Palazzo --- doc/Makefile | 7 +- doc/index.rst | 4 + doc/lightning-getinfo.7.md | 4 +- doc/lightning-getlog.7.md | 79 ++++++++++++++ doc/lightning-help.7.md | 62 +++++++++++ doc/lightning-listconfigs.7.md | 187 +++++++++++++++++++++++++++++++++ doc/lightning-sendpsbt.7.md | 13 +-- doc/lightning-signpsbt.7.md | 8 +- 8 files changed, 346 insertions(+), 18 deletions(-) create mode 100644 doc/lightning-getlog.7.md create mode 100644 doc/lightning-help.7.md create mode 100644 doc/lightning-listconfigs.7.md diff --git a/doc/Makefile b/doc/Makefile index e96b20a2b559..1f2329339f1a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -54,12 +54,7 @@ MANPAGES := doc/lightning-cli.1 \ doc/lightning-waitblockheight.7 \ doc/lightning-waitsendpay.7 \ doc/lightning-withdraw.7 \ - doc/lightning-ping.7 \ - doc/lihgtning-signpsbt.7 \ - doc/lightning-sendpsbt.7 \ - doc/lightning-getinfo.7 \ - doc/lightning-listtransactions.7 \ - doc/lightning-listnodes.7 + doc/lightning-ping.7 doc-all: $(MANPAGES) doc/index.rst diff --git a/doc/index.rst b/doc/index.rst index 4970ce28e1d9..7721c1221664 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -47,12 +47,15 @@ c-lightning Documentation lightning-fundchannel_start lightning-fundpsbt lightning-getinfo + lightning-getlog lightning-getroute lightning-getsharedsecret + lightning-help lightning-hsmtool lightning-invoice lightning-keysend lightning-listchannels + lightning-listconfigs lightning-listforwards lightning-listfunds lightning-listinvoices @@ -63,6 +66,7 @@ c-lightning Documentation lightning-listtransactions lightning-newaddr lightning-pay + lightning-ping lightning-plugin lightning-reserveinputs lightning-sendonion diff --git a/doc/lightning-getinfo.7.md b/doc/lightning-getinfo.7.md index 1fcf63ea7513..327e831ca9b2 100644 --- a/doc/lightning-getinfo.7.md +++ b/doc/lightning-getinfo.7.md @@ -40,7 +40,7 @@ On success, an object with the following information is returned: - *port*: An integer that rappresents the port where the node are listening with this address. - *binding*: An array that rappresents all addresses where the node is binded and is ready to receive message. Each object contains the same object type of the address propriety above. - *version*: A string that rappresents the version of the node. -- *blockheight*: An integera that rappresents the blockchain height. +- *blockheight*: An integer that rappresents the blockchain height. - *network*: A string that rappresents the type of network on the node are working (i.e: bitcoin, testnet, regtest). On failure, one of the following error codes may be returned: @@ -97,7 +97,7 @@ Vincenzo Palazzo <> wrote the initial version o SEE ALSO ------ -lightning-connect(7), lightning-fundchannel(7) +lightning-connect(7), lightning-fundchannel(7), lightning-listconfigs(7). RESOURCES --------- diff --git a/doc/lightning-getlog.7.md b/doc/lightning-getlog.7.md new file mode 100644 index 000000000000..94afa7a2f956 --- /dev/null +++ b/doc/lightning-getlog.7.md @@ -0,0 +1,79 @@ +lightning-getlog -- Command to show logs. +========================================= + +SYNOPSIS +-------- + +**getlog** \[level\] + +DESCRIPTION +----------- + +The **getlog** the RPC command to show logs, with optional log *level*. + +- *level*: A string that rappresent the log level (info, unusual, debug, io). + +EXAMPLE JSON REQUEST +-------------------- +```json +{ + "id": 82, + "method": "getlog", + "params": { + "level": "debug" + } +} +``` + +RETURN VALUE +------------ + +On success, a object will be return with the following parameters: + +- *created_at*: An floating point value that rappresent the {}. +- *bytes_used*: A string that rappresent the dimension in bytes of the log file. +- *bytes_max*: An integer that rappresent the max dimension in bytes of log file. +- *log*: An array of object where each elements contains the following proprieties: + - *type*: A string that rappresent the log level. The propriety can have an value equal to SKIPPED. + - *time*: A floating point value that rappresent the time. + - *source*: A string that rappresent the source of line. + - *log*: A string that rappresent the content of line. +- *num_skipped*: An integer that it is present only if the log level is equal to SKIPPED. + + +On failure, one of the following error codes may be returned: + +- -32602. Error in given parameters. + +EXAMPLE JSON RESPONSE +--------------------- + +```json +{ + "created_at": "1598192543.820753463", + "bytes_used": 89285843, + "bytes_max": 104857600, + "log": [ + { + "type": "SKIPPED", + "num_skipped": 45 + }, + { + "type": "INFO", + "time": "0.453627568", + "source": "plugin-autopilot.py", + "log": "RPC method 'autopilot-run-once' does not have a docstring." + } + ] +} +``` + +AUTHOR +------ + +Vincenzo Palazzo <> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command. + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-help.7.md b/doc/lightning-help.7.md new file mode 100644 index 000000000000..29e31e865aba --- /dev/null +++ b/doc/lightning-help.7.md @@ -0,0 +1,62 @@ +lightning-help -- Command to return all information about RPC commands. +======================================================================= + +SYNOPSIS +-------- + +**help** + +DESCRIPTION +----------- + +The **help** is a RPC command which is possible consult all information about the RPC commands. + +EXAMPLE JSON REQUEST +-------------------- +```json +{ + "id": 82, + "method": "help", + "params": {} +} +``` + +RETURN VALUE +------------ + +On success, a object will be return with the following proprieties: + +- *command*: A string that rappresent the stucture of the command. +- *category*: A string that rappresent the category. +- *description*: A string that rappresent the description. +- *verbose*: A string that rappresent the verbode description. + +On failure, one of the following error codes may be returned: + +- -32602. Error in given parameters. + +EXAMPLE JSON RESPONSE +--------------------- + +```json +{ + "help": [ + { + "command": "autocleaninvoice [cycle_seconds] [expired_by]", + "category": "plugin", + "description": "Set up autoclean of expired invoices. ", + "verbose": "Perform cleanup every {cycle_seconds} (default 3600), or disable autoclean if 0. Clean up expired invoices that have expired for {expired_by} seconds (default 86400). " + } + ] +} +``` + +AUTHOR +------ + +Vincenzo Palazzo <> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command. + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md new file mode 100644 index 000000000000..46e32ba466d2 --- /dev/null +++ b/doc/lightning-listconfigs.7.md @@ -0,0 +1,187 @@ +lightning-listconfigs -- Command to list all configuration options. +================================================================ + +SYNOPSIS +-------- + +**listconfigs** \[config\] + +DESCRIPTION +----------- + +The **listconfigs** teh RPC command to list all configuration options, or with *config*, just that one. + +EXAMPLE JSON REQUEST +-------------------- + +```json +{ + "id": 82, + "method": "listconfigs", + "params": {} +} +``` + +RETURN VALUE +------------ + +On success, an object with the following proprieties is returned: + +- *# version*: A string that rappresents the version of node. +- *lightning-di*: A string that rappresents the work dir of the node. +- *network*: A string that rappresents the network (e.g: bitcoin). +- *allow-deprecated-apis*: A boolean value that rappresent if the deprecated api are avaible on the node. +- *rpc-file*: A string that rappresent the location of the rpc file. +- *plugins*: A array that rappresent the no important plugin registered. Each object contains the following proprieties: + - *path*: A string that rappresent the path of plugin. + - *name*: A string that rappresent the name of plugin. + - *options*: A object that contains all options accepted from comand line, if the plugin accepted parameters from command line. +- *important-plugins*: An array that rappresent all important pluging registered to the node. Each object contains the same proprieties of *plugin* array. +- *disable-plugin*: An array of string that rappresent the name of plugin disabled. +- *always-use-proxy*: A boolean value that rappresent if the node utilize always the proxy. +- *daemon*: A boolean value is the node have the daemon propriety enabled. +- *wallet*: A string that rappresent the location of wallet with database url convention. +- *wumbo*: A boolean value that rappresent the value of wumbo propriety. +- *rgb*: A string that rappresent the color of the node. +- *alias*: A string that rappresent the alias of the node. +- *pid-file*: A string that rappresent the location of the pid file. +- *ignore-fee-limits*: A boolean value that rappresent is the node ignore the fee limit. +- *watchtime-blocks*: An integer that rappresent the watchtime of the blocks. +- *max-locktime-blocks*: A integer that rappresent that max locktime for blocks. +- *funding-confirms*: An integer that rappresent the number of funding transaction confermation. +- *commit-fee-min*: A integer that rappresent the minimum commit fee. +- *commit-fee-max*: A integer that rappresent the maximum commit fee. +- *cltv-delta*: An integer that rappresent the value of cltv delta. +- *cltv-final*: An integer that rappresent the value of cltv final. +- *commit-time*: An integer that rappresent the value of commit time. +- *fee-base*: A integer that rappresent the value of fee base. +- *rescan*: A integer that rappresent the number of block that the node must rescan before to run. +- *fee-per-satoshi*: An integer that rappresent the fee for satoshi. +- *max-concurrent-htlcs*: A integer that rappresent the number of HTLCs one channel can handle concurrently in each direction. +- *min-capacity-sat*: A integer that rappresent the minimal effective channel capacity in satoshi to accept for channel opening requests. +- *addr*: A string that rappresent the address where the node are listen. +- *bind-addr*: A string that rappresent the address or UNIX domine socket where the node are listen. +- *announce-addr*: A string that rappresent the address where the node is annunced. +- *offline*: A boolean value that rappresent if the node is offline. +- *autolisten*: A boolean value that rappresent if the autolisten is enabled. +- *proxy*: A string that rappresent the proxy address. +- *disable-dns*: A boolean value that rappresent if the dns is disabled. +- *enable-autotor-v2-mode*: A boolean value that rappresent if the Tor v2 is enabled. +- *encrypted-hsm*: A boolean value that rappresent if the wallet is encrypted. +- *rpc-file-mode*: A string that rappresent the value rpc-file-mode. +- *log-level*: A string that rappresent the level of log. +- *log-prefix*: A string that rappresent the log prefix. +On failure, one of the following error codes may be returned: + +- -32602. Error in given parameters or field with *config* name doesn't exist. + +EXAMPLE JSON RESPONSE +--------------------- + +```json +{ + "# version": "v0.9.0-1", + "lightning-dir": "/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev", + "network": "testnet", + "allow-deprecated-apis": true, + "rpc-file": "lightning-rpc", + "plugins": [ + { + "path": "/home/vincent/Github/plugins/sauron/sauron.py", + "name": "sauron.py", + "options": { + "sauron-api-endpoint": "http://blockstream.info/testnet/api/", + "sauron-tor-proxy": "" + } + }, + { + "path": "/home/vincent/Github/reckless/reckless.py", + "name": "reckless.py" + } + ], + "important-plugins": [ + { + "path": "/home/vincent/Github/lightning/lightningd/../plugins/autoclean", + "name": "autoclean", + "options": { + "autocleaninvoice-cycle": null, + "autocleaninvoice-expired-by": null + } + }, + { + "path": "/home/vincent/Github/lightning/lightningd/../plugins/fundchannel", + "name": "fundchannel" + }, + { + "path": "/home/vincent/Github/lightning/lightningd/../plugins/keysend", + "name": "keysend" + }, + { + "path": "/home/vincent/Github/lightning/lightningd/../plugins/pay", + "name": "pay", + "options": { + "disable-mpp": false + } + } + ], + "important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/autoclean", + "important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/fundchannel", + "important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/keysend", + "important-plugin": "/home/vincent/Github/lightning/lightningd/../plugins/pay", + "plugin": "/home/vincent/Github/plugins/sauron/sauron.py", + "plugin": "/home/vincent/Github/reckless/reckless.py", + "disable-plugin": [ + "bcli" + ], + "always-use-proxy": false, + "daemon": "false", + "wallet": "sqlite3:///media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev/testnet/lightningd.sqlite3", + "wumbo": false, + "wumbo": false, + "rgb": "03ad98", + "alias": "BRUCEWAYN-TES-DEV", + "pid-file": "/media/vincent/Maxtor/sanboxTestWrapperRPC/lightning_dir_dev/lightningd-testne...", + "ignore-fee-limits": true, + "watchtime-blocks": 6, + "max-locktime-blocks": 2016, + "funding-confirms": 1, + "commit-fee-min": 0, + "commit-fee-max": 0, + "cltv-delta": 6, + "cltv-final": 10, + "commit-time": 10, + "fee-base": 1, + "rescan": 30, + "fee-per-satoshi": 10, + "max-concurrent-htlcs": 483, + "min-capacity-sat": 10000, + "addr": "autotor:127.0.0.1:9051", + "bind-addr": "127.0.0.1:9735", + "announce-addr": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion:9735", + "offline": "false", + "autolisten": true, + "proxy": "127.0.0.1:9050", + "disable-dns": "false", + "enable-autotor-v2-mode": "false", + "encrypted-hsm": false, + "rpc-file-mode": "0600", + "log-level": "DEBUG", + "log-prefix": "lightningd", +} + +``` + +AUTHOR +------ + +Vincenzo Palazzo <> wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command. + +SEE ALSO +-------- + +lightning-getinfo(7) + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-sendpsbt.7.md b/doc/lightning-sendpsbt.7.md index c578a10857cc..184f8a0aa174 100644 --- a/doc/lightning-sendpsbt.7.md +++ b/doc/lightning-sendpsbt.7.md @@ -1,10 +1,10 @@ lightning-sendpsbt -- Command to finalize, extract and send a partially signed bitcoin transaction (PSBT). -============================================================ +========================================================================================================== SYNOPSIS -------- -**sendpsbt** psbt +**sendpsbt** *psbt* DESCRIPTION ----------- @@ -14,7 +14,8 @@ The **sendpsbt** is a low-level RPC command which sent a PSBT. - *psbt*: A string that rappresent the hexadecimal of the psbt. It is required to run the **sendpsbt** command. The caller can build a psbt with command *fundpsbt*. EXAMPLE JSON REQUEST ------------- +-------------------- + ```json { "id": 82, @@ -38,7 +39,8 @@ 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 { "txid": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0", @@ -46,7 +48,6 @@ EXAMPLE JSON RESPONSE } ``` - AUTHOR ------ @@ -55,7 +56,7 @@ Vincenzo Palazzo <> wrote the initial version o SEE ALSO -------- -lightning-fundpsbt(7), lightning-listtransactions(7) +lightning-fundpsbt(7), lightning-signpsbt(7), lightning-listtransactions(7) RESOURCES --------- diff --git a/doc/lightning-signpsbt.7.md b/doc/lightning-signpsbt.7.md index 6c900cfa7807..c8639189f785 100644 --- a/doc/lightning-signpsbt.7.md +++ b/doc/lightning-signpsbt.7.md @@ -1,5 +1,5 @@ lightning-signpsbt -- Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT). -============================================================ +================================================================================================= SYNOPSIS -------- @@ -14,7 +14,7 @@ The **signpsbt** is a low-level RPC command which sign a PSBT. - *psbt*: A string that rappresent the hexadecimal of the psbt. EXAMPLE JSON REQUEST ------------- +-------------------- ```json { "id": 82, @@ -37,14 +37,14 @@ On failure, one of the following error codes may be returned: - -32602. Error in given parameters or there aren't wallet's inputs to sign. EXAMPLE JSON RESPONSE ------ +--------------------- + ```json { "psbt": "some_psbt" } ``` - AUTHOR ------