2024-01-15 13:35:14 -08:00
{
"$schema" : "../rpc-schema-draft.json" ,
"type" : "object" ,
"additionalProperties" : false ,
"rpc" : "listtransactions" ,
"title" : "Command to get the list of transactions that was stored in the wallet." ,
"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."
] ,
2024-07-22 19:21:49 -07:00
"categories" : [
"readonly"
] ,
2024-01-15 13:35:14 -08:00
"request" : {
"required" : [ ] ,
"properties" : { }
} ,
"response" : {
"required" : [
"transactions"
] ,
"properties" : {
"transactions" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"required" : [
"hash" ,
"rawtx" ,
"blockheight" ,
"txindex" ,
"locktime" ,
"version" ,
"inputs" ,
"outputs"
] ,
"properties" : {
"hash" : {
"type" : "txid" ,
"description" : [
"The transaction id."
]
} ,
"rawtx" : {
"type" : "hex" ,
"description" : [
"The raw transaction."
]
} ,
"blockheight" : {
"type" : "u32" ,
"description" : [
"The block height of this tx."
]
} ,
"txindex" : {
"type" : "u32" ,
"description" : [
"The transaction number within the block."
]
} ,
"locktime" : {
"type" : "u32" ,
"description" : [
"The nLocktime for this tx."
]
} ,
"version" : {
"type" : "u32" ,
"description" : [
"The nVersion for this tx."
]
} ,
"inputs" : {
"type" : "array" ,
"description" : [
"Each input, in order."
] ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"required" : [
"txid" ,
"index" ,
"sequence"
] ,
"properties" : {
"txid" : {
"type" : "txid" ,
"description" : [
"The transaction id spent."
]
} ,
"index" : {
"type" : "u32" ,
"description" : [
"The output spent."
]
} ,
"sequence" : {
"type" : "u32" ,
"description" : [
"The nSequence value."
]
}
}
}
} ,
"outputs" : {
"type" : "array" ,
"description" : [
"Each output, in order."
] ,
"items" : {
"type" : "object" ,
"additionalProperties" : false ,
"required" : [
"index" ,
"amount_msat" ,
"scriptPubKey"
] ,
"properties" : {
"index" : {
"type" : "u32" ,
"description" : [
"The 0-based output number."
]
} ,
"amount_msat" : {
"type" : "msat" ,
"description" : [
"The amount of the output."
]
} ,
"scriptPubKey" : {
"type" : "hex" ,
"description" : [
"The scriptPubKey."
]
}
}
}
}
}
}
}
}
} ,
2024-06-20 14:57:02 -07:00
"errors" : [
"On failure, one of the following error codes may be returned:" ,
"" ,
"- -32602: Error in given parameters."
] ,
"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."
] ,
"see_also" : [
"lightning-newaddr(7)" ,
"lightning-listfunds(7)"
] ,
"resources" : [
"Main web site: <https://github.com/ElementsProject/lightning>"
] ,
"examples" : [
2024-01-15 13:35:14 -08:00
{
2024-03-27 18:45:18 -07:00
"request" : {
"id" : "example:listtransactions#1" ,
"method" : "listtransactions" ,
"params" : { }
} ,
"response" : {
"transactions" : [
{
2024-07-18 00:28:22 -07:00
"hash" : "1712c8af55f6853be3179bf20398689bb9204695fe3d6171c3248783218814e3" ,
"rawtx" : "02000000000101096b01ae63d631e321f039d49df4c5b055ce3afa655a3d5c22c2a8594f41f5cd0000000000fdffffff02002d31010000000017a914655728f36cfe36d01aa50d3236704469f84a55408771c4d4280100000017a9147cdfb08e6e44fc1152c4f423225d2b7148248a9d870247304402202ff40c938d644198c10d60fe660c1380bd601b6dc4533b64c64d3809290edf4a022028206e39cc36423524816a34806a721061814478b297c2bfb2bc3c417548c466012102129f00a7502a031999fe81aa35afed6f09617a9748e5fdde0f7a0191d364f59b65000000" ,
"blockheight" : 102 ,
"txindex" : 1 ,
"locktime" : 101 ,
2024-03-27 18:45:18 -07:00
"version" : 2 ,
"inputs" : [
{
2024-07-18 00:28:22 -07:00
"txid" : "cdf5414f59a8c2225c3d5a65fa3ace55b0c5f49dd439f021e331d663ae016b09" ,
"index" : 0 ,
"sequence" : 4294967293
}
] ,
"outputs" : [
{
"index" : 0 ,
"amount_msat" : 20000000000 ,
"scriptPubKey" : "a914655728f36cfe36d01aa50d3236704469f84a554087"
} ,
{
2024-03-27 18:45:18 -07:00
"index" : 1 ,
2024-07-18 00:28:22 -07:00
"amount_msat" : 4979999857000 ,
"scriptPubKey" : "a9147cdfb08e6e44fc1152c4f423225d2b7148248a9d87"
}
]
} ,
{
"hash" : "9454852bb62e304ee8933662284e10bd22a7f3710c262da4c94bdcc8b05ae407" ,
"rawtx" : "02000000000101e3148821838724c371613dfe954620b99b689803f29b17e33b85f655afc812170000000017160014d6b969d36dffdad9869193f663ee480dfdc73488fdffffff0135143101000000002251206c27e1956acfa61e68292c80908880e813450f754132e8a2ac471a86bf1326b50247304402201b09adb26aa7674b2e4954bef85e5d4cb5baee1e20c91e6d26db624407588b4e022044bae97372215531507b464b7978e6f9dc25f986aed5ab62dbc011c1e80a544f012102b9c0c6844e12a531c968e55c55078ec16d9bf76be9290fd87d1cca72b4839a1766000000" ,
"blockheight" : 103 ,
"txindex" : 1 ,
"locktime" : 102 ,
"version" : 2 ,
"inputs" : [
{
"txid" : "1712c8af55f6853be3179bf20398689bb9204695fe3d6171c3248783218814e3" ,
"index" : 0 ,
"sequence" : 4294967293
}
] ,
"outputs" : [
{
"index" : 0 ,
"amount_msat" : 19993653000 ,
"scriptPubKey" : "51206c27e1956acfa61e68292c80908880e813450f754132e8a2ac471a86bf1326b5"
}
]
} ,
{
"hash" : "706e569239dfe88a33ae6d276ae68d6c787a2403ecf0ac97ed14eec28aa6039d" ,
"rawtx" : "02000000000101e3148821838724c371613dfe954620b99b689803f29b17e33b85f655afc8121701000000171600142577677b3b18e431cfe9ac900e842b4d0567d251fdffffff0200c2eb0b00000000160014661c23b790dd3491373af0b1d8bed0877d5cde22cd01e91c010000001600140527f5b39d5b246fc5ed823c59ccdc5cc50e70580247304402205d01bd83c715b11e29040b0e8a193629194f638b7369270d668df172616d872302205bbad12ce8fc7a4694195dc3871302e808547b24e7098ffd089d0e340ccf3b950121034bcbb11214c52ca895d87add0c0de5a1dfb429966aa50f59afe33669319ea99266000000" ,
"blockheight" : 103 ,
"txindex" : 2 ,
"locktime" : 102 ,
"version" : 2 ,
"inputs" : [
{
"txid" : "1712c8af55f6853be3179bf20398689bb9204695fe3d6171c3248783218814e3" ,
"index" : 1 ,
"sequence" : 4294967293
}
] ,
"outputs" : [
{
"index" : 0 ,
"amount_msat" : 200000000000 ,
"scriptPubKey" : "0014661c23b790dd3491373af0b1d8bed0877d5cde22"
} ,
{
"index" : 1 ,
"amount_msat" : 4779999693000 ,
"scriptPubKey" : "00140527f5b39d5b246fc5ed823c59ccdc5cc50e7058"
}
]
} ,
{
"hash" : "7547ffc11396c62852104f7100d5ca27a2b9c0d5d43d08122147b2b03eb157a5" ,
"rawtx" : "02000000000101e4f55092d059070e27bc6d3a8cce1ba7137244e997c499ce47ca9828d82319fc0000000000fdffffff0280841e00000000001600149fb67bfcefee6cb7db4c7e55d9c6bfd749e31d1e8c721bed0000000016001442e74d56791e0c6447ebb87c612d324a8fd1e9f90247304402201843081a5417aec6d9e77e894ca159622d76360a16b9ee66e7d363a38ccd2a6102206b2dfb4bd0b0e8c25ed798842288c0ef3a0e328fa4f42d6fb5c479715ab2f0710121023770a6280695342030684ebaf25094a197f97acbb988e1ec8459b6228e20f8596b000000" ,
"blockheight" : 108 ,
"txindex" : 1 ,
"locktime" : 107 ,
"version" : 2 ,
"inputs" : [
{
"txid" : "fc1923d82898ca47ce99c497e9447213a71bce8c3a6dbc270e0759d09250f5e4" ,
"index" : 0 ,
"sequence" : 4294967293
}
] ,
"outputs" : [
{
"index" : 0 ,
"amount_msat" : 2000000000 ,
"scriptPubKey" : "00149fb67bfcefee6cb7db4c7e55d9c6bfd749e31d1e"
2024-03-27 18:45:18 -07:00
} ,
{
2024-07-18 00:28:22 -07:00
"index" : 1 ,
"amount_msat" : 3977998988000 ,
"scriptPubKey" : "001442e74d56791e0c6447ebb87c612d324a8fd1e9f9"
}
]
} ,
{
"hash" : "737d6835ddafd515ba9e9def733bb4e4211f6053a32b1422bf1c8cc240850f96" ,
"rawtx" : "020000000001019d03a68ac2ee14ed97acf0ec03247a786c8de66a276dae338ae8df3992566e700000000000fdffffff02816cdc0b0000000022512035f1184f6b470c9df347da62c4b28e7ec9ee10b220bac3accd22209def0036ea40420f00000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd0247304402207336a772e8643be4dc672957feaa3c9d97dde0aa5d8014a35ebc4772d8dacf91022074cd9cf97077fbf2f5d380b3917565f05232cc07db22aef12f327d6603861d6f012103fa9c95085e42b1e5003cd1f418178c30c96e4ae77954ca0fc48c58826ff4eb0e6c000000" ,
"blockheight" : 109 ,
"txindex" : 1 ,
"locktime" : 108 ,
"version" : 2 ,
"inputs" : [
{
"txid" : "706e569239dfe88a33ae6d276ae68d6c787a2403ecf0ac97ed14eec28aa6039d" ,
2024-03-27 18:45:18 -07:00
"index" : 0 ,
2024-07-18 00:28:22 -07:00
"sequence" : 4294967293
2024-03-27 18:45:18 -07:00
}
] ,
"outputs" : [
{
"index" : 0 ,
2024-07-18 00:28:22 -07:00
"amount_msat" : 198995073000 ,
"scriptPubKey" : "512035f1184f6b470c9df347da62c4b28e7ec9ee10b220bac3accd22209def0036ea"
} ,
{
"index" : 1 ,
"amount_msat" : 1000000000 ,
"scriptPubKey" : "00205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd"
2024-03-27 18:45:18 -07:00
}
]
}
]
}
2024-01-15 13:35:14 -08:00
}
]
}