From d5a20b90b43f94d3a4f0e628f496470d50cd04bd Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Thu, 13 Aug 2020 18:19:35 +0200 Subject: [PATCH] added documentation of commands listnodes, sendpsbt Some grammar mistake was fixed as suggest and more command docs were added. Signed-off-by: Vincenzo Palazzo --- doc/index.rst | 2 + doc/lightning-listfunds.7 | 2 +- doc/lightning-listfunds.7.md | 2 +- doc/lightning-listnodes.7.md | 82 +++++++++++++++++++++++++++++ doc/lightning-listtransactions.7.md | 29 +++++----- doc/lightning-newaddr.7 | 2 +- doc/lightning-newaddr.7.md | 2 +- doc/lightning-sendpsbt.7.md | 63 ++++++++++++++++++++++ 8 files changed, 164 insertions(+), 20 deletions(-) create mode 100644 doc/lightning-listnodes.7.md create mode 100644 doc/lightning-sendpsbt.7.md diff --git a/doc/index.rst b/doc/index.rst index 6dbdcbaf7..7ccf5c1cd 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -55,6 +55,7 @@ c-lightning Documentation lightning-listforwards lightning-listfunds lightning-listinvoices + lightning-listnodes lightning-listpays lightning-listpeers lightning-listsendpays @@ -65,6 +66,7 @@ c-lightning Documentation lightning-reserveinputs lightning-sendonion lightning-sendpay + lightning-sendpsbt lightning-setchannelfee lightning-signmessage lightning-txdiscard diff --git a/doc/lightning-listfunds.7 b/doc/lightning-listfunds.7 index a3b6b3406..74350f95e 100644 --- a/doc/lightning-listfunds.7 +++ b/doc/lightning-listfunds.7 @@ -82,7 +82,7 @@ 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 diff --git a/doc/lightning-listfunds.7.md b/doc/lightning-listfunds.7.md index f633ebab4..e09238973 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.md b/doc/lightning-listnodes.7.md new file mode 100644 index 000000000..34d1f5e7e --- /dev/null +++ b/doc/lightning-listnodes.7.md @@ -0,0 +1,82 @@ +lightning-listnodes -- Command to get the list of nodes in the own node network +============================================================ + +SYNOPSIS +-------- + +**listnodes** \[id\] + +DESCRIPTION +----------- + +The **listnodes** command returns nodes in the own node network, 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 rappresents the node id. +- *alias*: A string that rappresents alias of the node on the network. +- *color*: A string that rappresents the personal color of the node. +- *last_timestamp*: An integer that rappresent the last timestamp. +- *features*: An string that rappresent the features value. +- *addresses*: An array that rappresent the addreses avaible, each address is rappresented with an object with the following properties: + - *type*: A string that rappresent the type of address (ipv4 or ipv6). + - *address*: A string that rappresent the address value. + - *port*: An integer that rappresent 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.md b/doc/lightning-listtransactions.7.md index c94607324..ea7bb519c 100644 --- a/doc/lightning-listtransactions.7.md +++ b/doc/lightning-listtransactions.7.md @@ -24,28 +24,25 @@ EXAMPLE JSON REQUEST RETURN VALUE ------------ -On success, the command will return a list of transactions, each object rappresent the transaction with all details. +On success, the command will return a list of transactions, each object represents a transaction, with the following details: -- *hash*: A string that rappresent the hash of transaction, with the caller can use to find it on blockchain. -- *rawtx*: A string that rappresent the hexdecimal of transaction. -- *blockheight*: An integer that rappresent the block height that contains the transaction on blockchain. +- *hash*: A string that rappresents the hash of transaction, which the caller can use to find it on the blockchain. +- *rawtx*: A string that rappresents the hexadecimal dump of the transaction. +- *blockheight*: An integer that rappresents the block height that contains the transaction on the blockchain. - *txindex*: An integer that rappresent the transaction index inside the block. - *locktime*: An integer that rappresent the locktime. - *version*: An integer that rappresent the version. -- *inputs*: A list of transactions, each transaction is rappresented with an object with the following proprieties: - - *txid*: A string that rappresent the hash of transaction. +- *inputs*: A list of spent transaction outputs, each spent transaction output is rappresented with an object with the following properties: + - *txid*: A string that rappresent the hash of transaction. This is the output index of the transaction output being spent. - *index*: An integer that rappresent the index of transaction. - - *sequence*: A integera that rappresent the sequence. + - *sequence*: An integer that rappresent the sequence number. - *outputs*: A list of transactions, each transaction is rappresented with an object with the following proprieties: - - *index*: An integer that rappresent the index of transaction. + - *index*: An integer that rappresent the index of transaction. This is the output index of the transaction output. - *satoshis*: A string that rappresent the amount in millisatoshi that contains the transaction. - - *scriptPubKey*: A string that contains the lock script. + - *scriptPubKey*: A string that contains the lock script in hexadecimal dump form.. -On failure, an error is returned and any result was returned. - -The following error codes may occur: - -- -32602: parameter is malformed; +On failure, one of the following error codes may be returned: + -32602. Error in given parameters. EXAMPLE JSON RESPONSE ----- @@ -87,12 +84,12 @@ EXAMPLE JSON RESPONSE AUTHOR ------ -Vincenzo Palazzo <> wrote the initial version of this man page, but many others did the hard work of actually implementing of this rpc command. +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: add somethings. +lightning-newaddr(7), lightning-listfunds(7) RESOURCES --------- diff --git a/doc/lightning-newaddr.7 b/doc/lightning-newaddr.7 index 6d43c1b47..c2629b6fe 100644 --- a/doc/lightning-newaddr.7 +++ b/doc/lightning-newaddr.7 @@ -41,7 +41,7 @@ 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 diff --git a/doc/lightning-newaddr.7.md b/doc/lightning-newaddr.7.md index b1f422feb..8daec73c0 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-sendpsbt.7.md b/doc/lightning-sendpsbt.7.md new file mode 100644 index 000000000..608b8d713 --- /dev/null +++ b/doc/lightning-sendpsbt.7.md @@ -0,0 +1,63 @@ +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 sent a PSBT. + +- *psbt*: A string that rappresent the hexadecimal of the psbt. It is required to run the **sendpsbt** command. The called can build a psbt with a the command *fundpsbt* + +EXAMPLE JSON REQUEST +------------ +```json +{ + "id": 82, + "method": "sendpsbt", + "params": { + "psbt": "some_psbt" + } +} +``` + +RETURN VALUE +------------ + +On success, the tx and txid of the transaction is returned, as well as the channel_id of the newly created channel. + +- *txid*: A string that rappresent the hash of transaction which the caller can use to find it on the blockchain. +- *tx*: A string that rappresent 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-listtransactions(7) + +RESOURCES +--------- + +Main web site: