LIGHTNING-LISTTRANSACTIONS(7)
π LIGHTNING-LISTTRANSACTIONS(7) β the manual page, but make it cute
okay so bestie, this is the lightning-listtransactions page from the LIGHTNING-LISTTRANSACTIONS(7) manual, and honestly? it's a whole vibe. it's your wallet's receipts folder. let's get into it β¨
πΈ NAME πΈ
listtransactions β the command that gets you the list of transactions that was stored in the wallet. that's it. that's the whole thing. periodt π
π¦ SYNOPSIS π¦
listtransactions
no flags, no args, no drama. she just is. π
π DESCRIPTION π
so the listtransactions command returns transactions tracked in the wallet. like, everything the wallet knows about itself. π«Ά
this includes:
- deposits π°
- withdrawals πΈ
- transactions related to channels π
and here's the iconic part β a transaction may have multiple types. for example, a transaction may both be a close and a deposit if it closes the channel and returns funds to the wallet. she contains multitudes. main character energy fr fr π
β¨ RETURN VALUE β¨
on success, an object containing transactions is returned. it's an array of objects, where each object contains:
hash(txid) β the transaction id. her name, her identity πrawtx(hex) β the raw transaction. the whole entire thing in hex π§blockheight(u32) β the block height of this txtxindex(u32) β the transaction number within the blocklocktime(u32) β thenLocktimefor this txversion(u32) β thenVersionfor this txinputs(array of objects) β each input, in order.:txid(txid) β the transaction id spentindex(u32) β the output spentsequence(u32) β thenSequencevalue
outputs(array of objects) β each output, in order.:index(u32) β the 0-based output numberamount_msat(msat) β the amount of the outputscriptPubKey(hex) β thescriptPubKey
like, gather. the inputs and the outputs both have their own little nested moments. it's giving structurally sound ποΈπ
π ERRORS π
on failure, one of the following error codes may be returned:
-32602β error in given parameters. like bestie... the params were not param-ing π
π 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 this rpc command. shoutout to the whole group chat, ngl π«Άβ¨
π SEE ALSO π
go read those too, they're lowkey iconic in their own right π
β RESOURCES β
- main web site:
https://github.com/ElementsProject/lightning
π EXAMPLES π
Example 1:
request:
$ lightning-cli listtransactions
{
"id": "example:listtransactions#1",
"method": "listtransactions",
"params": {}
}
response:
{
"transactions": [
{
"hash": "txid7000170001700017000170001700017000170001700017000170001",
"rawtx": "02000000000101lstx70001700017000170001700017000170001700017000170001700017000170001700017000170001700017000170001700017000170001700017000170001700017000170001700017000170001700017000170001",
"blockheight": 0,
"txindex": 0,
"locktime": 549000100,
"version": 2,
"inputs": [
{
"txid": "txid600116001160011600116001160011600116001160011600116001160011",
"index": 1,
"sequence": 2158511000
}
],
"outputs": [
{
"index": 1,
"amount_msat": 201998901100,
"scriptPubKey": "scriptpubkey01010101010101010101010101010101010101010101010101010101"
}
]
},
{
"hash": "txid7000270002700027000270002700027000270002700027000270002",
"rawtx": "02000000000101lstx70002700027000270002700027000270002700027000270002700027000270002700027000270002700027000270002700027000270002700027000270002700027000270002700027000270002700027000270002",
"blockheight": 102,
"txindex": 1,
"locktime": 549000200,
"version": 2,
"inputs": [
{
"txid": "txid600126001260012600126001260012600126001260012600126001260012",
"index": 1,
"sequence": 2158512000
}
],
"outputs": [
{
"index": 1,
"amount_msat": 201998902100,
"scriptPubKey": "scriptpubkey02010201020102010201020102010201020102010201020102010201"
},
{
"index": 2,
"amount_msat": 201998902200,
"scriptPubKey": "scriptpubkey02020202020202020202020202020202020202020202020202020202"
}
]
}
]
}
two transactions, one with a single output and one with a lil pair of outputs β see how the second txindex is 1 and its blockheight is 102? bestie they're β¨differentβ¨. notice that. iykyk π
and that's the whole page, bestie!! this was Core Lightning v26.06.9 β the LIGHTNING-LISTTRANSACTIONS(7) manual, dated and delivered with love. mwah. π«Άππ
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms