mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
added documentation of command listtransactions
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
c2f5e8ce73
commit
4c72a6b71f
@@ -58,6 +58,7 @@ c-lightning Documentation
|
|||||||
lightning-listpays <lightning-listpays.7.md>
|
lightning-listpays <lightning-listpays.7.md>
|
||||||
lightning-listpeers <lightning-listpeers.7.md>
|
lightning-listpeers <lightning-listpeers.7.md>
|
||||||
lightning-listsendpays <lightning-listsendpays.7.md>
|
lightning-listsendpays <lightning-listsendpays.7.md>
|
||||||
|
lightning-listtransactions <lightning-listtransactions.7.md>
|
||||||
lightning-newaddr <lightning-newaddr.7.md>
|
lightning-newaddr <lightning-newaddr.7.md>
|
||||||
lightning-pay <lightning-pay.7.md>
|
lightning-pay <lightning-pay.7.md>
|
||||||
lightning-plugin <lightning-plugin.7.md>
|
lightning-plugin <lightning-plugin.7.md>
|
||||||
|
|||||||
100
doc/lightning-listtransactions.7.md
Normal file
100
doc/lightning-listtransactions.7.md
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
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 rappresent the transaction with all 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.
|
||||||
|
- *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.
|
||||||
|
- *index*: An integer that rappresent the index of transaction.
|
||||||
|
- *sequence*: A integera that rappresent the sequence.
|
||||||
|
- *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.
|
||||||
|
- *satoshis*: A string that rappresent the amount in millisatoshi that contains the transaction.
|
||||||
|
- *scriptPubKey*: A string that contains the lock script.
|
||||||
|
|
||||||
|
On failure, an error is returned and any result was returned.
|
||||||
|
|
||||||
|
The following error codes may occur:
|
||||||
|
|
||||||
|
- -32602: parameter is malformed;
|
||||||
|
|
||||||
|
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 <<vincenzo.palazzo@protonmail.com>> wrote the initial version of this man page, but many others did the hard work of actually implementing of this rpc command.
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
|
||||||
|
FIXME: add somethings.
|
||||||
|
|
||||||
|
RESOURCES
|
||||||
|
---------
|
||||||
|
|
||||||
|
Main web site: <https://github.com/ElementsProject/lightning>
|
||||||
Reference in New Issue
Block a user