2022-04-06 07:09:48 +02:00
lightning-listfunds -- Command showing all funds currently managed by the Core Lightning node
2019-08-31 14:30:56 +02:00
==========================================================================================
2019-08-10 01:54:18 +02:00
SYNOPSIS
--------
2022-01-26 18:18:49 +01:00
**listfunds** [*spent*]
2019-08-10 01:54:18 +02:00
DESCRIPTION
-----------
The **listfunds** 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
*spent* is a boolean: if true, then the *outputs* will include spent outputs
in addition to the unspent ones. Default is false.
2019-08-10 01:54:18 +02:00
RETURN VALUE
------------
2021-06-16 03:06:17 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
- **outputs** (array of objects):
- **txid** (txid): the ID of the spendable transaction
- **output** (u32): the index within *txid*
- **amount_msat** (msat): the amount of the output
- **scriptpubkey** (hex): the scriptPubkey of the output
- **status** (string) (one of "unconfirmed", "confirmed", "spent")
2022-05-14 09:31:10 +02:00
- **reserved** (boolean): whether this UTXO is currently reserved for an in-flight tx
2021-06-16 03:06:17 +02:00
- **address** (string, optional): the bitcoin address of the output
- **redeemscript** (hex, optional): the redeemscript, only if it's p2sh-wrapped
If **status** is "confirmed":
- **blockheight** (u32): Block height where it was confirmed
If **reserved** is "true":
- **reserved_to_block** (u32): Block height where reservation will expire
- **channels** (array of objects):
- **peer_id** (pubkey): the peer with which the channel is opened
2022-02-04 11:01:00 +01:00
- **our_amount_msat** (msat): available satoshis on our node's end of the channel
2021-06-16 03:06:17 +02:00
- **amount_msat** (msat): total channel value
- **funding_txid** (txid): funding transaction id
- **funding_output** (u32): the 0-based index of the output in the funding transaction
- **connected** (boolean): whether the channel peer is connected
- **state** (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")
If **state** is "CHANNELD_NORMAL":
- **short_channel_id** (short_channel_id): short channel id of channel
If **state** is "CHANNELD_SHUTTING_DOWN", "CLOSINGD_SIGEXCHANGE", "CLOSINGD_COMPLETE", "AWAITING_UNILATERAL", "FUNDING_SPEND_SEEN" or "ONCHAIN":
- **short_channel_id** (short_channel_id, optional): short channel id of channel (only if funding reached lockin depth before closing)
2021-09-03 12:07:59 +02:00
2021-06-16 03:06:17 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-END)
2019-08-10 01:54:18 +02:00
AUTHOR
------
Felix < < fixone @ gmail . com > > is mainly responsible.
SEE ALSO
--------
2020-08-13 18:19:35 +02:00
lightning-newaddr(7), lightning-fundchannel(7), lightning-withdraw(7), lightning-listtransactions(7)
2019-08-10 01:54:18 +02:00
RESOURCES
---------
Main web site: < https: / / github . com / ElementsProject / lightning >
2020-08-25 03:33:16 +02:00
JSON: don't print deprecated amount fields any more
A small change in one routine creates a lot of changes! We actually
recommended moving away from these in v0.7.0 (2019-02-28), but never
deprecated them formally.
Changelog-Deprecated: JSON-RPC: `pay`, `decode`, `decodepay`, `getroute`, `listinvoices`, `listpays` and `listsendpays` `msatoshi` fields (use `amount_msat`).
Changelog-Deprecated: JSON-RPC: `getinfo` `msatoshi_fees_collected` field (use `fees_collected_msat`).
Changelog-Deprecated: JSON-RPC: `listpeers` `channels`: `msatoshi_to_us`, `msatoshi_to_us_min`, `msatoshi_to_us_max`, `msatoshi_total`, `dust_limit_satoshis`, `our_channel_reserve_satoshis`, `their_channel_reserve_satoshis`, `spendable_msatoshi`, `receivable_msatoshi`, `in_msatoshi_offered`, `in_msatoshi_fulfilled`, `out_msatoshi_offered`, `out_msatoshi_fulfilled`, `max_htlc_value_in_flight_msat` and `htlc_minimum_msat` (use `to_us_msat`, `min_to_us_msat`, `max_to_us_msat`, `total_msat`, `dust_limit_msat`, `our_reserve_msat`, `their_reserve_msat`, `spendable_msat`, `receivable_msat`, `in_offered_msat`, `in_fulfilled_msat`, `out_offered_msat`, `out_fulfilled_msat`, `max_total_htlc_in_msat` and `minimum_htlc_in_msat`).
Changelog-Deprecated: JSON-RPC: `listinvoices` and `pay` `msatoshi_received` and `msatoshi_sent` (use `amount_received_msat`, `amount_sent_msat`)
Changelog-Deprecated: JSON-RPC: `listpays` and `listsendpays` `msatoshi_sent` (use `amount_sent_msat`)
Changelog-Deprecated: JSON-RPC: `listforwards` `in_msatoshi`, `out_msatoshi` and `fee` (use `in_msat`, `out_msat` and `fee_msat`)
Changelog-Deprecated: JSON-RPC: `listfunds` `outputs` `value` (use `amount_msat`)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-06-20 12:22:09 +02:00
[comment]: # ( SHA256STAMP:fdc550a0ff11f6fbbf51c29340c0494077d831566ae7ab008cce4b93034a76c5)