2020-08-31 14:42:28 +02:00
.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
\fB listtransactions\fR
.SH DESCRIPTION
The \fB listtransactions\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
2021-06-16 03:10:17 +02:00
On success, an object containing \fB transactions\fR is returned\. It is an array of objects, where each object contains:
2020-08-31 14:42:28 +02:00
.RS
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB hash\fR (txid): the transaction id
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB rawtx\fR (hex): the raw transaction
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB blockheight\fR (u32): the block height of this tx
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB txindex\fR (u32): the transaction number within the block
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB locktime\fR (u32): The nLocktime for this tx
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB version\fR (u32): The nVersion for this tx
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB inputs\fR (array of objects): Each input, in order:
2021-05-26 07:41:01 +02:00
.RS
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB txid\fR (txid): the transaction id spent
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB index\fR (u32): the output spent
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB sequence\fR (u32): the nSequence value
.IP \[ bu]
\fB type\fR (string, optional): the purpose of this input (\fI EXPERIMENTAL_FEATURES\fR only) (one of "theirs", "deposit", "withdraw", "channel_funding", "channel_mutual_close", "channel_unilateral_close", "channel_sweep", "channel_htlc_success", "channel_htlc_timeout", "channel_penalty", "channel_unilateral_cheat")
.IP \[ bu]
\fB channel\fR (short_channel_id, optional): the channel this input is associated with (\fI EXPERIMENTAL_FEATURES\fR only)
2020-08-31 14:42:28 +02:00
.RE
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB outputs\fR (array of objects): Each output, in order:
2021-05-26 07:41:01 +02:00
.RS
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB index\fR (u32): the 0-based output number
.IP \[ bu]
\fB msat\fR (msat): the amount of the output
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB scriptPubKey\fR (hex): the scriptPubKey
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 03:10:17 +02:00
\fB type\fR (string, optional): the purpose of this output (\fI EXPERIMENTAL_FEATURES\fR only) (one of "theirs", "deposit", "withdraw", "channel_funding", "channel_mutual_close", "channel_unilateral_close", "channel_sweep", "channel_htlc_success", "channel_htlc_timeout", "channel_penalty", "channel_unilateral_cheat")
.IP \[ bu]
\fB channel\fR (short_channel_id, optional): the channel this output is associated with (\fI EXPERIMENTAL_FEATURES\fR only)
2020-08-31 14:42:28 +02:00
.RE
2021-06-16 03:10:17 +02:00
.IP \[ bu]
\fB type\fR (array of strings, optional):
.RS
.IP \[ bu]
Reason we care about this transaction (\fI EXPERIMENTAL_FEATURES\fR only) (one of "theirs", "deposit", "withdraw", "channel_funding", "channel_mutual_close", "channel_unilateral_close", "channel_sweep", "channel_htlc_success", "channel_htlc_timeout", "channel_penalty", "channel_unilateral_cheat")
.RE
.IP \[ bu]
\fB channel\fR (short_channel_id, optional): the channel this transaction is associated with (\fI EXPERIMENTAL_FEATURES\fR only)
2020-08-31 14:42:28 +02:00
.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 <vincenzo.palazzo@protonmail.com\fR > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fB lightning-newaddr\fR (7), \fB lightning-listfunds\fR (7)
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2021-06-16 03:10:17 +02:00
\" SHA256STAMP:85b8fd1df3815845e8418d142a0e62589fd386784dc6fe90150db1e43519c4ce