2019-08-10 02:12:44 +02:00
.TH "LIGHTNING-LISTFUNDS" "7" "" "" "lightning-listfunds"
.SH NAME
2019-08-31 14:30:56 +02:00
lightning-listfunds - Command showing all funds currently managed by the c-lightning node
2019-08-10 02:12:44 +02:00
.SH SYNOPSIS
2020-12-22 08:03:15 +01:00
\fB listfunds\fR [\fI spent\fR ]
2019-08-10 02:12:44 +02:00
.SH DESCRIPTION
The \fB listfunds\fR RPC command displays all funds available, either in
unspent outputs (UTXOs) in the internal wallet or funds locked in
currently open channels\.
2020-12-22 08:03:15 +01:00
\fI spent\fR is a boolean: if true, then the \fI outputs\fR will include spent outputs
in addition to the unspent ones\. Default is false\.
2019-08-10 02:12:44 +02:00
.SH RETURN VALUE
2021-06-16 03:06:17 +02:00
On success, an object is returned, containing:
2019-08-10 02:12:44 +02:00
2021-06-16 03:06:17 +02:00
.RS
.IP \[ bu]
2019-08-10 02:12:44 +02:00
2021-06-16 03:06:17 +02:00
\fB outputs\fR (array of objects):
2019-08-10 02:12:44 +02:00
2020-06-10 22:13:09 +02:00
.RS
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB txid\fR (txid): the ID of the spendable transaction
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB output\fR (u32): the index within \fI txid\fR
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB amount_msat\fR (msat): the amount of the output
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB scriptpubkey\fR (hex): the scriptPubkey of the output
2020-07-07 22:50:25 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB status\fR (string) (one of "unconfirmed", "confirmed", "spent")
2020-08-07 03:31:47 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB address\fR (string, optional): the bitcoin address of the output
2020-06-10 22:13:09 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB redeemscript\fR (hex, optional): the redeemscript, only if it's p2sh-wrapped
.RE
If \fB status\fR is "confirmed":
.RS
2021-05-26 03:14:50 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB blockheight\fR (u32): Block height where it was confirmed
2019-08-10 02:12:44 +02:00
2020-06-10 22:13:09 +02:00
.RE
2019-08-10 02:12:44 +02:00
2021-06-16 03:06:17 +02:00
If \fB reserved\fR is "true":
2019-08-10 02:12:44 +02:00
2020-06-10 22:13:09 +02:00
.RS
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB reserved_to_block\fR (u32): Block height where reservation will expire
.RE
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB channels\fR (array of objects):
.RS
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB peer_id\fR (pubkey): the peer with which the channel is opened
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB our_amount_msat\fR (msat): available satoshis on our node’ s end of the channel
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB amount_msat\fR (msat): total channel value
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB funding_txid\fR (txid): funding transaction id
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB funding_output\fR (u32): the 0-based index of the output in the funding transaction
2019-08-10 02:12:44 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB connected\fR (boolean): whether the channel peer is connected
2019-09-12 02:10:43 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB state\fR (string): the channel state, in particular "CHANNELD_NORMAL" means the channel can be used normally (one of "OPENINGD", "CHANNELD_AWAITING_LOCKIN", "CHANNELD_NORMAL", "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN", "ONCHAIN", "DUALOPEND_OPEN_INIT", "DUALOPEND_AWAITING_LOCKIN")
.RE
If \fB state\fR is "CHANNELD_NORMAL":
.RS
.IP \[ bu]
\fB short_channel_id\fR (short_channel_id): short channel id of channel
.RE
If \fB state\fR is "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN" or "ONCHAIN":
.RS
2019-09-12 02:10:43 +02:00
.IP \[ bu]
2021-06-16 03:06:17 +02:00
\fB short_channel_id\fR (short_channel_id, optional): short channel id of channel (only if funding reached lockin depth before closing)
.RE
2019-08-10 02:12:44 +02:00
2020-06-10 22:13:09 +02:00
.RE
2019-08-10 02:12:44 +02:00
.SH AUTHOR
2019-08-31 14:30:56 +02:00
Felix \fI <fixone@gmail.com\fR > is mainly responsible\.
2019-08-10 02:12:44 +02:00
.SH SEE ALSO
2020-08-13 18:19:35 +02:00
\fB lightning-newaddr\fR (7), \fB lightning-fundchannel\fR (7), \fB lightning-withdraw\fR (7), \fB lightning-listtransactions\fR (7)
2019-08-10 02:12:44 +02:00
.SH RESOURCES
2019-08-31 14:30:56 +02:00
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2019-08-10 02:12:44 +02:00
2021-06-16 03:08:17 +02:00
\" SHA256STAMP:0df04d09e7e7d3344a64f0ecd03186d1499014346d4c37c0d08390328f1f8f04