diff --git a/doc/Makefile b/doc/Makefile index d83114a27a1f..5748ca83332b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/doc/index.rst b/doc/index.rst index afd8f7a1a7dc..7721c1221664 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -46,26 +46,36 @@ c-lightning Documentation lightning-fundchannel_complete 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 + lightning-listnodes lightning-listpays lightning-listpeers lightning-listsendpays + lightning-listtransactions lightning-newaddr lightning-pay + lightning-ping lightning-plugin lightning-reserveinputs lightning-sendonion lightning-sendpay + lightning-sendpsbt lightning-setchannelfee lightning-signmessage + lightning-signpsbt + lightning-stop lightning-txdiscard lightning-txprepare lightning-txsend diff --git a/doc/lightning-getinfo.7 b/doc/lightning-getinfo.7 new file mode 100644 index 000000000000..5d1bb242f748 --- /dev/null +++ b/doc/lightning-getinfo.7 @@ -0,0 +1,123 @@ +.TH "LIGHTNING-GETINFO" "7" "" "" "lightning-getinfo" +.SH NAME +lightning-getinfo - Command to receive all information about the c-lightning node\. +.SH SYNOPSIS + +\fBgetinfo\fR + +.SH DESCRIPTION + +The \fBgetinfo\fR gives a summary of the current running node\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "getinfo", + "params": {} +} +.RE + +.fi +.SH RETURN VALUE + +On success, an object with the following information is returned: + +.RS +.IP \[bu] +\fIid\fR: A string that represents the public key of the node\. It will represents the node on the public network\. +.IP \[bu] +\fIalias\fR: 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! +.IP \[bu] +\fIcolor\fR: A string that represents the preferred color of the node\. +.IP \[bu] +\fInum_peers\fR: An integer that represents the number of peer connect to the node\. +.IP \[bu] +\fInum_pending_channels\fR: An integer that represents the number of channel which are still awaiting opening confirmation\. +.IP \[bu] +\fInum_active_channels\fR: A integer that represents the number of channel which are currently open\. +.IP \[bu] +\fInum_inactive_channels\fR: A integer that represents the number of channel which are closing\. +.IP \[bu] +\fIaddress\fR: An array that represents all published addresses of the node, each object inside the array contains the following proprieties:.RS +.IP \[bu] +\fItype\fR: A string that represents the type of the address (currently \fBipv4\fR, \fBipv6\fR, \fBtorv3\fR or \fBtorv4\fR)\. +.IP \[bu] +\fIaddress\fR: A string that represents the value of the address\. +.IP \[bu] +\fIport\fR: An integer that represents the port where the node is listening with this address\. + +.RE + +.IP \[bu] +\fIbinding\fR: An array that represents all addresses where the node is binded\. Each object contains the same object type of the address propriety above\. +.IP \[bu] +\fIversion\fR: A string that represents the version of the node\. +.IP \[bu] +\fIblockheight\fR: An integer that represents the blockchain height\. +.IP \[bu] +\fInetwork\fR: A string that represents the type of network on the node are working (e\.g: \fBbitcoin\fR, \fBtestnet\fR, or \fBregtest\fR)\. + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters or some error happened during the command process\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "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" +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +\fBlightning-connect\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-listconfigs\fR(7)\. + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:9e6a0e0c25569bfc9d23b07e84392a3f70f6c94a86cd482fbf48c3d668a1796d diff --git a/doc/lightning-getinfo.7.md b/doc/lightning-getinfo.7.md new file mode 100644 index 000000000000..a5e09b2313a9 --- /dev/null +++ b/doc/lightning-getinfo.7.md @@ -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 <> 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: diff --git a/doc/lightning-getlog.7 b/doc/lightning-getlog.7 new file mode 100644 index 000000000000..003940c85ebf --- /dev/null +++ b/doc/lightning-getlog.7 @@ -0,0 +1,97 @@ +.TH "LIGHTNING-GETLOG" "7" "" "" "lightning-getlog" +.SH NAME +lightning-getlog - Command to show logs\. +.SH SYNOPSIS + +\fBgetlog\fR [\fIlevel\fR] + +.SH DESCRIPTION + +The \fBgetlog\fR the RPC command to show logs, with optional log \fIlevel\fR\. + +.RS +.IP \[bu] +\fIlevel\fR: A string that represents the log level (\fIbroken\fR, \fIunusual\fR, \fIinfo\fR, \fIdebug\fR, or \fIio\fR)\. The default is \fIinfo\fR\. + +.RE +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "getlog", + "params": { + "level": "debug" + } +} +.RE + +.fi +.SH RETURN VALUE + +On success, a object will be return with the following parameters: + +.RS +.IP \[bu] +\fIcreated_at\fR: An floating point value that represents the UNIX timestamp when logging began\. +.IP \[bu] +\fIbytes_used\fR: A string that represents the dimension in bytes of the log file\. +.IP \[bu] +\fIbytes_max\fR: An integer that represents the max dimension in bytes of log file\. +.IP \[bu] +\fIlog\fR: An array of objects where each element contains the following proprieties:.RS +.IP \[bu] +\fItype\fR: A string that represents the log level\. The propriety can have an value equal to SKIPPED to indicate the existence of omitted entries\. +.IP \[bu] +\fItime\fR: A floating point value that represents the time since \fIcreated_at\fR\. +.IP \[bu] +\fIsource\fR: A string that represents the source of line\. +.IP \[bu] +\fIlog\fR: A string that represents the content of line\. + +.RE + +.IP \[bu] +\fInum_skipped\fR: An integer that it is present only if the log level is equal to SKIPPED\. + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "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." + } + ] +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:789e23927120d0fefd374592a3c655244fd6c28a122368bdd8da2f3cdde66798 diff --git a/doc/lightning-getlog.7.md b/doc/lightning-getlog.7.md new file mode 100644 index 000000000000..dad81dc0fecb --- /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 represents the log level (*broken*, *unusual*, *info*, *debug*, or *io*). The default is *info*. + +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 represents the UNIX timestamp when logging began. +- *bytes_used*: A string that represents the dimension in bytes of the log file. +- *bytes_max*: An integer that represents the max dimension in bytes of log file. +- *log*: An array of objects where each element contains the following proprieties: + - *type*: A string that represents the log level. The propriety can have an value equal to SKIPPED to indicate the existence of omitted entries. + - *time*: A floating point value that represents the time since *created_at*. + - *source*: A string that represents the source of line. + - *log*: A string that represents 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 b/doc/lightning-help.7 new file mode 100644 index 000000000000..b7c3bf8ec118 --- /dev/null +++ b/doc/lightning-help.7 @@ -0,0 +1,75 @@ +.TH "LIGHTNING-HELP" "7" "" "" "lightning-help" +.SH NAME +lightning-help - Command to return all information about RPC commands\. +.SH SYNOPSIS + +\fBhelp\fR [\fIcommand\\\fR] + +.SH DESCRIPTION + +The \fBhelp\fR is a RPC command which is possible consult all information about the RPC commands, or a specific command if \fIcommand\fR is given\. + + +Note that the \fBlightning-cli\fR(1) tool will prefer to list a man page when a +specific \fIcommand\fR is specified, and will only return the JSON if the man +page is not found\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "help", + "params": {} +} +.RE + +.fi +.SH RETURN VALUE + +On success, a object will be return with the following proprieties: + +.RS +.IP \[bu] +\fIcommand\fR: A string that represents the stucture of the command\. +.IP \[bu] +\fIcategory\fR: A string that represents the category\. +.IP \[bu] +\fIdescription\fR: A string that represents the description\. +.IP \[bu] +\fIverbose\fR: A string that represents the verbode description\. + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "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). " + } + ] +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:cbd027bd9117d2e71167ab1c9d95a63c90b8e9c556dd75e951d4913a2891cb37 diff --git a/doc/lightning-help.7.md b/doc/lightning-help.7.md new file mode 100644 index 000000000000..31626b39af05 --- /dev/null +++ b/doc/lightning-help.7.md @@ -0,0 +1,66 @@ +lightning-help -- Command to return all information about RPC commands. +======================================================================= + +SYNOPSIS +-------- + +**help** \[*command\*] + +DESCRIPTION +----------- + +The **help** is a RPC command which is possible consult all information about the RPC commands, or a specific command if *command* is given. + +Note that the lightning-cli(1) tool will prefer to list a man page when a +specific *command* is specified, and will only return the JSON if the man +page is not found. + +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 represents the stucture of the command. +- *category*: A string that represents the category. +- *description*: A string that represents the description. +- *verbose*: A string that represents 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 b/doc/lightning-listconfigs.7 new file mode 100644 index 000000000000..d54182a7f5f9 --- /dev/null +++ b/doc/lightning-listconfigs.7 @@ -0,0 +1,167 @@ +.TH "LIGHTNING-LISTCONFIGS" "7" "" "" "lightning-listconfigs" +.SH NAME +lightning-listconfigs - Command to list all configuration options\. +.SH SYNOPSIS + +\fBlistconfigs\fR [config] + +.SH DESCRIPTION + +The \fBlistconfigs\fR RPC command to list all configuration options, or with \fIconfig\fR, just that one\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "listconfigs", + "params": { + "config": "network" + } +} +.RE + +.fi +.SH RETURN VALUE + +On success, an object is returned with members reflecting the +corresponding \fBlightningd-config\fR(5) options which were specified in +the configuration file(s) and command line\. + + +Additional members include: + +.RS +.IP \[bu] +\fI# version\fR: A string that represents the version of node\. +.IP \[bu] +\fIplugins\fR: A array that represents the non-important plugin registered\. Each object contains the following members:.RS +.IP \[bu] +\fIpath\fR: A string that represents the path of plugin\. +.IP \[bu] +\fIname\fR: A string that represents the name of plugin\. +.IP \[bu] +\fIoptions\fR: A object that contains all options accepted from command line or configuration file, if the plugin has opitions + +.RE + +.IP \[bu] +\fIimportant-plugins\fR: An array that represents all important plugins registered to the node\. Each object contains the same members as the \fIplugin\fR array\. + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters or field with \fIconfig\fR name doesn't exist\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "# 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", +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +\fBlightning-getinfo\fR(7), \fBlightningd-config\fR(5) + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:19542af1d9c13e31ec6fada46f85a080433c2c7a863779a8b9e3ac86a5903b48 diff --git a/doc/lightning-listconfigs.7.md b/doc/lightning-listconfigs.7.md new file mode 100644 index 000000000000..1f01658f2e32 --- /dev/null +++ b/doc/lightning-listconfigs.7.md @@ -0,0 +1,156 @@ +lightning-listconfigs -- Command to list all configuration options. +================================================================ + +SYNOPSIS +-------- + +**listconfigs** \[config\] + +DESCRIPTION +----------- + +The **listconfigs** RPC command to list all configuration options, or with *config*, just that one. + +EXAMPLE JSON REQUEST +-------------------- + +```json +{ + "id": 82, + "method": "listconfigs", + "params": { + "config": "network" + } +} +``` + +RETURN VALUE +------------ + +On success, an object is returned with members reflecting the +corresponding lightningd-config(5) options which were specified in +the configuration file(s) and command line. + +Additional members include: + +- *# version*: A string that represents the version of node. +- *plugins*: A array that represents the non-important plugin registered. Each object contains the following members: + - *path*: A string that represents the path of plugin. + - *name*: A string that represents the name of plugin. + - *options*: A object that contains all options accepted from command line or configuration file, if the plugin has opitions +- *important-plugins*: An array that represents all important plugins registered to the node. Each object contains the same members as the *plugin* array. + +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), lightningd-config(5) + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-listfunds.7 b/doc/lightning-listfunds.7 index a3b6b3406b65..8c9f3727b634 100644 --- a/doc/lightning-listfunds.7 +++ b/doc/lightning-listfunds.7 @@ -82,10 +82,10 @@ Felix \fI is mainly responsible\. .SH SEE ALSO -\fBlightning-newaddr\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7) +\fBlightning-newaddr\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7), \fBlightning-listtransactions\fR(7) .SH RESOURCES Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:3f4f346ab97ae18e5c38a641def243716c07979c81168e093f7b6b8089c9bd1d +\" SHA256STAMP:d7b4a30a1ca19e772529fbe517fb73e8c0d5c07ec3c05969ab614a4abc1865a4 diff --git a/doc/lightning-listfunds.7.md b/doc/lightning-listfunds.7.md index f633ebab43a8..e09238973550 100644 --- a/doc/lightning-listfunds.7.md +++ b/doc/lightning-listfunds.7.md @@ -60,7 +60,7 @@ Felix <> is mainly responsible. SEE ALSO -------- -lightning-newaddr(7), lightning-fundchannel(7), lightning-withdraw(7) +lightning-newaddr(7), lightning-fundchannel(7), lightning-withdraw(7), lightning-listtransactions(7) RESOURCES --------- diff --git a/doc/lightning-listnodes.7 b/doc/lightning-listnodes.7 new file mode 100644 index 000000000000..886638a5d8d1 --- /dev/null +++ b/doc/lightning-listnodes.7 @@ -0,0 +1,104 @@ +.TH "LIGHTNING-LISTNODES" "7" "" "" "lightning-listnodes" +.SH NAME +lightning-listnodes - Command to get the list of nodes in the known network\. +.SH SYNOPSIS + +\fBlistnodes\fR [id] + +.SH DESCRIPTION + +The \fBlistnodes\fR command returns nodes the node has learned about via gossip messages, or a single one if the node \fIid\fR was specified\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "listnodes", + "params": { + "id": "02e29856dab8ddd9044c18486e4cab79ec717b490447af2d4831e290e48d57638a" + } +} +.RE + +.fi +.SH RETURN VALUE + +On success, the command will return a list of nodes, each object represents a node, with the following details: + +.RS +.IP \[bu] +\fInodeid\fR: A string that represents the node id\. + +.RE + +For nodes which have sent a node_announcement message, the following +are also returned: + +.RS +.IP \[bu] +\fIalias\fR: A string that represents alias of the node on the network\. +.IP \[bu] +\fIcolor\fR: A string that represents the personal color of the node\. +.IP \[bu] +\fIlast_timestamp\fR: An integer that represents the timestamp of the last-received node_announcement message\. +.IP \[bu] +\fIfeatures\fR: A string that represents the features value\. +.IP \[bu] +\fIaddresses\fR: An array that represents the addreses avaible\. Each address is represented with an object with the following properties:.RS +.IP \[bu] +\fItype\fR: A string that represents the address type (ipv4 or ipv6)\. +.IP \[bu] +\fIaddress\fR: A string that represents the address value\. +.IP \[bu] +\fIport\fR: An integer that represents the port number where the node are listening\. + +.RE + + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "nodes": [ + { + "nodeid": "02e29856dab8ddd9044c14586e4cab79ec717b490447af2d4831e290e48d58638a", + "alias": "some_alias", + "color": "68f442", + "last_timestamp": 1597213741, + "features": "02a2a1", + "addresses": [ + { + "type": "ipv4", + "address": "zzz.yy.xx.xx", + "port": 9735 + } + ] + } + ] +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +FIXME: + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:901b147ccbfe0a18310a44ca848b623e83fa3c68912dacadefd045d4a2095523 diff --git a/doc/lightning-listnodes.7.md b/doc/lightning-listnodes.7.md new file mode 100644 index 000000000000..333f3f3abc68 --- /dev/null +++ b/doc/lightning-listnodes.7.md @@ -0,0 +1,86 @@ +lightning-listnodes -- Command to get the list of nodes in the known network. +============================================================ + +SYNOPSIS +-------- + +**listnodes** \[id\] + +DESCRIPTION +----------- + +The **listnodes** command returns nodes the node has learned about via gossip messages, or a single one if the node *id* was specified. + +EXAMPLE JSON REQUEST +------------ +```json +{ + "id": 82, + "method": "listnodes", + "params": { + "id": "02e29856dab8ddd9044c18486e4cab79ec717b490447af2d4831e290e48d57638a" + } +} +``` + +RETURN VALUE +------------ + +On success, the command will return a list of nodes, each object represents a node, with the following details: + +- *nodeid*: A string that represents the node id. + +For nodes which have sent a node_announcement message, the following +are also returned: + +- *alias*: A string that represents alias of the node on the network. +- *color*: A string that represents the personal color of the node. +- *last_timestamp*: An integer that represents the timestamp of the last-received node_announcement message. +- *features*: A string that represents the features value. +- *addresses*: An array that represents the addreses avaible. Each address is represented with an object with the following properties: + - *type*: A string that represents the address type (ipv4 or ipv6). + - *address*: A string that represents the address value. + - *port*: An integer that represents the port number where the node are listening. + +On failure, one of the following error codes may be returned: + +- -32602: Error in given parameters. + +EXAMPLE JSON RESPONSE +----- +```json +{ + "nodes": [ + { + "nodeid": "02e29856dab8ddd9044c14586e4cab79ec717b490447af2d4831e290e48d58638a", + "alias": "some_alias", + "color": "68f442", + "last_timestamp": 1597213741, + "features": "02a2a1", + "addresses": [ + { + "type": "ipv4", + "address": "zzz.yy.xx.xx", + "port": 9735 + } + ] + } + ] +} +``` + + +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 +-------- + +FIXME: + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-listtransactions.7 b/doc/lightning-listtransactions.7 new file mode 100644 index 000000000000..9355dd788432 --- /dev/null +++ b/doc/lightning-listtransactions.7 @@ -0,0 +1,121 @@ +.TH "LIGHTNING-LISTTRANSACTIONS" "7" "" "" "lightning-listtransactions" +.SH NAME +lightning-listtransactions - Command to get the list of transactions that was stored in the wallet\. +.SH SYNOPSIS + +\fBlisttransactions\fR + +.SH DESCRIPTION + +The \fBlisttransactions\fR command returns transactions tracked in the wallet\. This includes deposits, withdrawals and transactions related to channels\. A transaction may have multiple types, e\.g\., a transaction may both be a close and a deposit if it closes the channel and returns funds to the wallet\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "listtransactions", + "params": {} +} +.RE + +.fi +.SH RETURN VALUE + +On success, the command will return a list of transactions, each object represents a transaction, with the following details: + +.RS +.IP \[bu] +\fIhash\fR: A string that represents the hash of transaction, which the caller can use to find it on the blockchain\. +.IP \[bu] +\fIrawtx\fR: A string that represents the hexadecimal dump of the transaction\. +.IP \[bu] +\fIblockheight\fR: An integer that represents the block height that contains the transaction on the blockchain\. +.IP \[bu] +\fItxindex\fR: An integer that represents the transaction index inside the block\. +.IP \[bu] +\fIlocktime\fR: An integer that represents the nLocktime field\. +.IP \[bu] +\fIversion\fR: An integer that represents the nVersion field\. +.IP \[bu] +\fIinputs\fR: A list of spent transaction outputs, each spent transaction output is represented with an object with the following properties:.RS +.IP \[bu] +\fItxid\fR: A string that represents the hash of transaction\. This is the output index of the transaction output being spent\. +.IP \[bu] +\fIindex\fR: An integer that represents the index of transaction\. +.IP \[bu] +\fIsequence\fR: An integer that represents the nSequence field\. + +.RE + +.IP \[bu] +\fIoutputs\fR: A list of transactions, each transaction is represented with an object with the following proprieties:.RS +.IP \[bu] +\fIindex\fR: An integer that represents the index of transaction\. +.IP \[bu] +\fIsatoshis\fR: A string that represents the amount in millisatoshi\. +.IP \[bu] +\fIscriptPubKey\fR: A string that contains the lock script in hexadecimal dump form\. + +.RE + + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "transactions": [ + { + "hash": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0", + "rawtx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000", + "blockheight": 0, + "txindex": 0, + "locktime": 0, + "version": 2, + "inputs": [ + { + "txid": "804254330e02a4b53b1492efdfe207875940965fcd3a89e0a325fc5126913270", + "index": 1, + "sequence": 4294967295 + }, + { + "txid": "4ee2eafa9a9b9e900aad69b7d3e4d6a5851556b0680ac1caeb3886f7b4a429d2", + "index": 0, + "sequence": 4294967295 + } + ], + "outputs": [ + { + "index": 0, + "satoshis": "88721000msat", + "scriptPubKey": "a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf87" + } + ] + } + ] +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +\fBlightning-newaddr\fR(7), \fBlightning-listfunds\fR(7) + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:88c68faf136cd7ce305bab0b89813d1c0122b8f31688a2dc9c064f7cba480a1d diff --git a/doc/lightning-listtransactions.7.md b/doc/lightning-listtransactions.7.md new file mode 100644 index 000000000000..cf8b47d2024e --- /dev/null +++ b/doc/lightning-listtransactions.7.md @@ -0,0 +1,97 @@ +lightning-listtransactions -- Command to get the list of transactions that was stored in the wallet. +============================================================ + +SYNOPSIS +-------- + +**listtransactions** + +DESCRIPTION +----------- + +The **listtransactions** command returns transactions tracked in the wallet. This includes deposits, withdrawals and transactions related to channels. A transaction may have multiple types, e.g., a transaction may both be a close and a deposit if it closes the channel and returns funds to the wallet. + +EXAMPLE JSON REQUEST +------------ +```json +{ + "id": 82, + "method": "listtransactions", + "params": {} +} +``` + +RETURN VALUE +------------ + +On success, the command will return a list of transactions, each object represents a transaction, with the following details: + +- *hash*: A string that represents the hash of transaction, which the caller can use to find it on the blockchain. +- *rawtx*: A string that represents the hexadecimal dump of the transaction. +- *blockheight*: An integer that represents the block height that contains the transaction on the blockchain. +- *txindex*: An integer that represents the transaction index inside the block. +- *locktime*: An integer that represents the nLocktime field. +- *version*: An integer that represents the nVersion field. +- *inputs*: A list of spent transaction outputs, each spent transaction output is represented with an object with the following properties: + - *txid*: A string that represents the hash of transaction. This is the output index of the transaction output being spent. + - *index*: An integer that represents the index of transaction. + - *sequence*: An integer that represents the nSequence field. +- *outputs*: A list of transactions, each transaction is represented with an object with the following proprieties: + - *index*: An integer that represents the index of transaction. + - *satoshis*: A string that represents the amount in millisatoshi. + - *scriptPubKey*: A string that contains the lock script in hexadecimal dump form. + +On failure, one of the following error codes may be returned: +- -32602: Error in given parameters. + +EXAMPLE JSON RESPONSE +----- +```json +{ + "transactions": [ + { + "hash": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0", + "rawtx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000", + "blockheight": 0, + "txindex": 0, + "locktime": 0, + "version": 2, + "inputs": [ + { + "txid": "804254330e02a4b53b1492efdfe207875940965fcd3a89e0a325fc5126913270", + "index": 1, + "sequence": 4294967295 + }, + { + "txid": "4ee2eafa9a9b9e900aad69b7d3e4d6a5851556b0680ac1caeb3886f7b4a429d2", + "index": 0, + "sequence": 4294967295 + } + ], + "outputs": [ + { + "index": 0, + "satoshis": "88721000msat", + "scriptPubKey": "a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf87" + } + ] + } + ] +} +``` + + +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-newaddr(7), lightning-listfunds(7) + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-newaddr.7 b/doc/lightning-newaddr.7 index 6d43c1b47bf5..d2576e6c24f4 100644 --- a/doc/lightning-newaddr.7 +++ b/doc/lightning-newaddr.7 @@ -41,10 +41,10 @@ Felix \fI is mainly responsible\. .SH SEE ALSO -\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7) +\fBlightning-listfunds\fR(7), \fBlightning-fundchannel\fR(7), \fBlightning-withdraw\fR(7), \fBlightning-listtransactions\fR(7) .SH RESOURCES Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:5629893e244874b3685b217aed66f4768e140444fc58e14be719e40598494e26 +\" SHA256STAMP:00cbee36ae0e616fc3610191dfb1c14cb112971d9900fb8549ec66e4f700942f diff --git a/doc/lightning-newaddr.7.md b/doc/lightning-newaddr.7.md index b1f422feb88e..8daec73c0fed 100644 --- a/doc/lightning-newaddr.7.md +++ b/doc/lightning-newaddr.7.md @@ -44,7 +44,7 @@ Felix <> is mainly responsible. SEE ALSO -------- -lightning-listfunds(7), lightning-fundchannel(7), lightning-withdraw(7) +lightning-listfunds(7), lightning-fundchannel(7), lightning-withdraw(7), lightning-listtransactions(7) RESOURCES --------- diff --git a/doc/lightning-ping.7 b/doc/lightning-ping.7 new file mode 100644 index 000000000000..aca80e7b2561 --- /dev/null +++ b/doc/lightning-ping.7 @@ -0,0 +1,73 @@ +.TH "LIGHTNING-PING" "7" "" "" "lightning-ping" +.SH NAME +lightning-ping - Command to check if a node is up\. +.SH SYNOPSIS + +\fBping\fR \fIid\fR [len] [pongbytes] + +.SH DESCRIPTION + +The \fBping\fR command checks if the node with \fIid\fR is ready to talk\. It accepts the following parameters: + +.RS +.IP \[bu] +\fIid\fR: A string that represents the node id; +.IP \[bu] +\fIlen\fR: A integer that represents the length of the ping (default 128); +.IP \[bu] +\fIpongbytes\fR: An integer that represents the length of the reply (default 128)\. + +.RE +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "ping", + "params": { + "len": 128, + "pongbytes": 128 + } +} +.RE + +.fi +.SH RETURN VALUE + +On success, the command will return an object with a single string\. + +.RS +.IP \[bu] +\fItotlen\fR: A string that represents the answer length of the reply message (including header) + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters or unknown peer\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "totlen": 132 +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +\fBlightning-connect\fR(7) + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:eac5506bc761a2a9570a92c7e533b4c6ba72c56c4d69dce773887a9f88ea7ac2 diff --git a/doc/lightning-ping.7.md b/doc/lightning-ping.7.md new file mode 100644 index 000000000000..9f2e0bf306ac --- /dev/null +++ b/doc/lightning-ping.7.md @@ -0,0 +1,65 @@ +lightning-ping -- Command to check if a node is up. +============================================================ + +SYNOPSIS +-------- + +**ping** *id* \[len\] \[pongbytes\] + +DESCRIPTION +----------- + +The **ping** command checks if the node with *id* is ready to talk. It accepts the following parameters: + +- *id*: A string that represents the node id; +- *len*: A integer that represents the length of the ping (default 128); +- *pongbytes*: An integer that represents the length of the reply (default 128). + +EXAMPLE JSON REQUEST +------------ +```json +{ + "id": 82, + "method": "ping", + "params": { + "len": 128, + "pongbytes": 128 + } +} +``` + +RETURN VALUE +------------ + +On success, the command will return an object with a single string. + +- *totlen*: A string that represents the answer length of the reply message (including header) + +On failure, one of the following error codes may be returned: + +- -32602: Error in given parameters or unknown peer. + +EXAMPLE JSON RESPONSE +----- +```json +{ + "totlen": 132 +} + +``` + + +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-connect(7) + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-sendpsbt.7 b/doc/lightning-sendpsbt.7 new file mode 100644 index 000000000000..c54bd9faaa3f --- /dev/null +++ b/doc/lightning-sendpsbt.7 @@ -0,0 +1,71 @@ +.TH "LIGHTNING-SENDPSBT" "7" "" "" "lightning-sendpsbt" +.SH NAME +lightning-sendpsbt - Command to finalize, extract and send a partially signed bitcoin transaction (PSBT)\. +.SH SYNOPSIS + +\fBsendpsbt\fR \fIpsbt\fR + +.SH DESCRIPTION + +The \fBsendpsbt\fR is a low-level RPC command which sends a fully-signed PSBT\. + +.RS +.IP \[bu] +\fIpsbt\fR: A string that represents psbt value\. + +.RE +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "sendpsbt", + "params": { + "psbt": "some_psbt" + } +} +.RE + +.fi +.SH RETURN VALUE + +On success, the tx and txid of the transaction are returned\. + +.RS +.IP \[bu] +\fItxid\fR: A string that represents the hash of transaction\. +.IP \[bu] +\fItx\fR: A string that represents the hexadecimal dump of the transaction\. + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters or some error happened during the command process\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "txid": "05985072bbe20747325e69a159fe08176cc1bbc96d25e8848edad2dddc1165d0", + "tx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000", +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +\fBlightning-fundpsbt\fR(7), \fBlightning-signpsbt\fR(7), \fBlightning-listtransactions\fR(7) + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:795058b68607af4148d2866faa88b3743269e1641725c95efcabdbe82c886420 diff --git a/doc/lightning-sendpsbt.7.md b/doc/lightning-sendpsbt.7.md new file mode 100644 index 000000000000..20e1ac3f4848 --- /dev/null +++ b/doc/lightning-sendpsbt.7.md @@ -0,0 +1,64 @@ +lightning-sendpsbt -- Command to finalize, extract and send a partially signed bitcoin transaction (PSBT). +========================================================================================================== + +SYNOPSIS +-------- + +**sendpsbt** *psbt* + +DESCRIPTION +----------- + +The **sendpsbt** is a low-level RPC command which sends a fully-signed PSBT. + +- *psbt*: A string that represents psbt value. + +EXAMPLE JSON REQUEST +-------------------- + +```json +{ + "id": 82, + "method": "sendpsbt", + "params": { + "psbt": "some_psbt" + } +} +``` + +RETURN VALUE +------------ + +On success, the tx and txid of the transaction are returned. + +- *txid*: A string that represents the hash of transaction. +- *tx*: A string that represents the hexadecimal dump of the transaction. + +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", + "tx": "02000000027032912651fc25a3e0893acd5f9640598707e2dfef92143bb5a4020e335442800100000017160014a5f48b9aa3cb8ca6cc1040c11e386745bb4dc932ffffffffd229a4b4f78638ebcac10a68b0561585a5d6e4d3b769ad0a909e9b9afaeae24e00000000171600145c83da9b685f9142016c6f5eb5f98a45cfa6f686ffffffff01915a01000000000017a9143a4dfd59e781f9c3018e7d0a9b7a26d58f8d22bf8700000000", +} +``` + +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-fundpsbt(7), lightning-signpsbt(7), lightning-listtransactions(7) + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-signpsbt.7 b/doc/lightning-signpsbt.7 new file mode 100644 index 000000000000..0f5641c9f68e --- /dev/null +++ b/doc/lightning-signpsbt.7 @@ -0,0 +1,80 @@ +.TH "LIGHTNING-SIGNPSBT" "7" "" "" "lightning-signpsbt" +.SH NAME +lightning-signpsbt - Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT)\. +.SH SYNOPSIS + +\fBsignpsbt\fR \fIpsbt\fR [\fIsignonly\fR] + +.SH DESCRIPTION + +\fBsignpsbt\fR is a low-level RPC command which signs a PSBT as defined by +BIP-174\. + +.RS +.IP \[bu] +\fIpsbt\fR: A string that represents the PSBT value\. +.IP \[bu] +\fIsignonly\fR: An optional array of input numbers to sign\. + +.RE + +By default, all known inputs are signed, and others ignored: with +\fIsignonly\fR, only those inputs are signed, and an error is returned if +one of them cannot be signed\. + + +Note that the command will fail if there are no inputs to sign, or +if the inputs to be signed were not previously reserved\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "signpsbt", + "params": { + "psbt": "some_psbt" + } +} +.RE + +.fi +.SH RETURN VALUE + +On success, a object will be returned with a string\. + +.RS +.IP \[bu] +\fIpsbt\fR: A string that represents the psbt value with all inputs signed transaction\. + +.RE + +On failure, one of the following error codes may be returned: + +.RS +.IP \[bu] +-32602: Error in given parameters, or there aren't wallet's inputs to sign, or we couldn't sign all of \fIsignonly\fR, or inputs are not reserved\. + +.RE +.SH EXAMPLE JSON RESPONSE +.nf +.RS +{ + "psbt": "some_psbt" +} +.RE + +.fi +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH SEE ALSO + +\fBlightning-fundpsbt\fR(7), \fBlightning-sendpsbt\fR(7) + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:5d7f12bed20a73dabf41d219ccd960e4e36a4674e8528d95ef26f7c8c55b1a0f diff --git a/doc/lightning-signpsbt.7.md b/doc/lightning-signpsbt.7.md new file mode 100644 index 000000000000..7c3ae9490d2d --- /dev/null +++ b/doc/lightning-signpsbt.7.md @@ -0,0 +1,71 @@ +lightning-signpsbt -- Command to sign a wallet's inputs on a provided bitcoin transaction (PSBT). +================================================================================================= + +SYNOPSIS +-------- + +**signpsbt** *psbt* [*signonly*] + +DESCRIPTION +----------- + +**signpsbt** is a low-level RPC command which signs a PSBT as defined by +BIP-174. + +- *psbt*: A string that represents the PSBT value. +- *signonly*: An optional array of input numbers to sign. + +By default, all known inputs are signed, and others ignored: with +*signonly*, only those inputs are signed, and an error is returned if +one of them cannot be signed. + +Note that the command will fail if there are no inputs to sign, or +if the inputs to be signed were not previously reserved. + + +EXAMPLE JSON REQUEST +-------------------- +```json +{ + "id": 82, + "method": "signpsbt", + "params": { + "psbt": "some_psbt" + } +} +``` + +RETURN VALUE +------------ + +On success, a object will be returned with a string. + +- *psbt*: A string that represents the psbt value with all inputs signed transaction. + +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, or we couldn't sign all of *signonly*, or inputs are not reserved. + +EXAMPLE JSON RESPONSE +--------------------- + +```json +{ + "psbt": "some_psbt" +} +``` + +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-fundpsbt(7), lightning-sendpsbt(7) + +RESOURCES +--------- + +Main web site: diff --git a/doc/lightning-stop.7 b/doc/lightning-stop.7 new file mode 100644 index 000000000000..c5a1f905388c --- /dev/null +++ b/doc/lightning-stop.7 @@ -0,0 +1,36 @@ +.TH "LIGHTNING-STOP" "7" "" "" "lightning-stop" +.SH NAME +lightning-stop - Command to shutdown the c-lightning node\. +.SH SYNOPSIS + +\fBstop\fR + +.SH DESCRIPTION + +The \fBstop\fR is a RPC command to shut off the c-lightning node\. + +.SH EXAMPLE JSON REQUEST +.nf +.RS +{ + "id": 82, + "method": "stop", + "params": {} +} +.RE + +.fi +.SH RETURN VALUE + +On success, the command will return a empty object\. Once it has returned, +the daemon has cleaned up completely, and if desired may be restarted\. + +.SH AUTHOR + +Vincenzo Palazzo \fI wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\. + +.SH RESOURCES + +Main web site: \fIhttps://github.com/ElementsProject/lightning\fR + +\" SHA256STAMP:b080fabf70873cb5383ea28d79fba5be5abe1a60ebd9bf280419d2e590dfb762 diff --git a/doc/lightning-stop.7.md b/doc/lightning-stop.7.md new file mode 100644 index 000000000000..36b64adf9293 --- /dev/null +++ b/doc/lightning-stop.7.md @@ -0,0 +1,40 @@ +lightning-stop -- Command to shutdown the c-lightning node. +============================================================ + +SYNOPSIS +-------- + +**stop** + +DESCRIPTION +----------- + +The **stop** is a RPC command to shut off the c-lightning node. + +EXAMPLE JSON REQUEST +------------ +```json +{ + "id": 82, + "method": "stop", + "params": {} +} +``` + +RETURN VALUE +------------ + +On success, the command will return a empty object. Once it has returned, +the daemon has cleaned up completely, and if desired may be restarted. + + +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: