Skip to content

Commit 4572dfa

Browse files
committed
Changelog-Deprecated: move channels[] out of listpeers into listpeerchannels. Detailed changes:
modified to refer to listpeerchannels: doc/lightning-listpeers.7 modified to refer to listpeerchannels: doc/lightning-listpeers.7.md new file: doc/schemas/listpeerchannels.schema.json modified to remove channels[]: doc/schemas/listpeers.schema.json modified to add listpeerchannels and deprecate channels[]: lightningd/peer_control.c
1 parent f1e0fe5 commit 4572dfa

File tree

5 files changed

+857
-1112
lines changed

5 files changed

+857
-1112
lines changed

doc/lightning-listpeers.7

Lines changed: 4 additions & 231 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/lightning-listpeers.7.md

Lines changed: 4 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -42,96 +42,6 @@ RETURN VALUE
4242
On success, an object containing **peers** is returned. It is an array of objects, where each object contains:
4343
- **id** (pubkey): the public key of the peer
4444
- **connected** (boolean): True if the peer is currently connected
45-
- **channels** (array of objects):
46-
- **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")
47-
- **opener** (string): Who initiated the channel (one of "local", "remote")
48-
- **features** (array of strings):
49-
- BOLT #9 features which apply to this channel (one of "option_static_remotekey", "option_anchor_outputs")
50-
- **scratch_txid** (txid, optional): The txid we would use if we went onchain now
51-
- **feerate** (object, optional): Feerates for the current tx:
52-
- **perkw** (u32): Feerate per 1000 weight (i.e kSipa)
53-
- **perkb** (u32): Feerate per 1000 virtual bytes
54-
- **owner** (string, optional): The current subdaemon controlling this connection
55-
- **short_channel_id** (short_channel_id, optional): The short_channel_id (once locked in)
56-
- **channel_id** (hex, optional): The full channel_id (always 64 characters)
57-
- **funding_txid** (txid, optional): ID of the funding transaction
58-
- **initial_feerate** (string, optional): For inflight opens, the first feerate used to initiate the channel open
59-
- **last_feerate** (string, optional): For inflight opens, the most recent feerate used on the channel open
60-
- **next_feerate** (string, optional): For inflight opens, the next feerate we'll use for the channel open
61-
- **next_fee_step** (u32, optional): For inflight opens, the next feerate step we'll use for the channel open
62-
- **inflight** (array of objects, optional): Current candidate funding transactions (only for dual-funding):
63-
- **funding_txid** (txid): ID of the funding transaction
64-
- **funding_outnum** (u32): The 0-based output number of the funding transaction which opens the channel
65-
- **feerate** (string): The feerate for this funding transaction in per-1000-weight, with "kpw" appended
66-
- **total_funding_msat** (msat): total amount in the channel
67-
- **our_funding_msat** (msat): amount we have in the channel
68-
- **scratch_txid** (txid): The commitment transaction txid we would use if we went onchain now
69-
- **close_to** (hex, optional): scriptPubkey which we have to close to if we mutual close
70-
- **private** (boolean, optional): if False, we will not announce this channel
71-
- **closer** (string, optional): Who initiated the channel close (`null` is deprecated!) (one of "local", "remote", *null*)
72-
- **funding** (object, optional):
73-
- **local_msat** (msat): Amount of channel we funded
74-
- **remote_msat** (msat): Amount of channel they funded
75-
- **to_us_msat** (msat, optional): how much of channel is owed to us
76-
- **min_to_us_msat** (msat, optional): least amount owed to us ever
77-
- **max_to_us_msat** (msat, optional): most amount owed to us ever
78-
- **total_msat** (msat, optional): total amount in the channel
79-
- **fee_base_msat** (msat, optional): amount we charge to use the channel
80-
- **fee_proportional_millionths** (u32, optional): amount we charge to use the channel in parts-per-million
81-
- **dust_limit_msat** (msat, optional): minimum amount for an output on the channel transactions
82-
- **max_total_htlc_in_msat** (msat, optional): max amount accept in a single payment
83-
- **their_reserve_msat** (msat, optional): minimum we insist they keep in channel
84-
- **our_reserve_msat** (msat, optional): minimum they insist we keep in channel
85-
- **spendable_msat** (msat, optional): total we could send through channel
86-
- **receivable_msat** (msat, optional): total peer could send through channel
87-
- **minimum_htlc_in_msat** (msat, optional): the minimum amount HTLC we accept
88-
- **their_to_self_delay** (u32, optional): the number of blocks before they can take their funds if they unilateral close
89-
- **our_to_self_delay** (u32, optional): the number of blocks before we can take our funds if we unilateral close
90-
- **max_accepted_htlcs** (u32, optional): Maximum number of incoming HTLC we will accept at once
91-
- **state_changes** (array of objects, optional): Prior state changes:
92-
- **timestamp** (string): UTC timestamp of form YYYY-mm-ddTHH:MM:SS.%03dZ
93-
- **old_state** (string): Previous state (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")
94-
- **new_state** (string): New state (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")
95-
- **cause** (string): What caused the change (one of "unknown", "local", "user", "remote", "protocol", "onchain")
96-
- **message** (string): Human-readable explanation
97-
- **status** (array of strings, optional):
98-
- Billboard log of significant changes
99-
- **in_payments_offered** (u64, optional): Number of incoming payment attempts
100-
- **in_offered_msat** (msat, optional): Total amount of incoming payment attempts
101-
- **in_payments_fulfilled** (u64, optional): Number of successful incoming payment attempts
102-
- **in_fulfilled_msat** (msat, optional): Total amount of successful incoming payment attempts
103-
- **out_payments_offered** (u64, optional): Number of outgoing payment attempts
104-
- **out_offered_msat** (msat, optional): Total amount of outgoing payment attempts
105-
- **out_payments_fulfilled** (u64, optional): Number of successful outgoing payment attempts
106-
- **out_fulfilled_msat** (msat, optional): Total amount of successful outgoing payment attempts
107-
- **htlcs** (array of objects, optional): current HTLCs in this channel:
108-
- **direction** (string): Whether it came from peer, or is going to peer (one of "in", "out")
109-
- **id** (u64): Unique ID for this htlc on this channel in this direction
110-
- **amount_msat** (msat): Amount send/received for this HTLC
111-
- **expiry** (u32): Block this HTLC expires at
112-
- **payment_hash** (hex): the hash of the payment_preimage which will prove payment (always 64 characters)
113-
- **local_trimmed** (boolean, optional): if this is too small to enforce onchain (always *true*)
114-
- **status** (string, optional): set if this HTLC is currently waiting on a hook (and shows what plugin)
115-
116-
If **direction** is "out":
117-
- **state** (string): Status of the HTLC (one of "SENT_ADD_HTLC", "SENT_ADD_COMMIT", "RCVD_ADD_REVOCATION", "RCVD_ADD_ACK_COMMIT", "SENT_ADD_ACK_REVOCATION", "RCVD_REMOVE_HTLC", "RCVD_REMOVE_COMMIT", "SENT_REMOVE_REVOCATION", "SENT_REMOVE_ACK_COMMIT", "RCVD_REMOVE_ACK_REVOCATION")
118-
119-
If **direction** is "in":
120-
- **state** (string): Status of the HTLC (one of "RCVD_ADD_HTLC", "RCVD_ADD_COMMIT", "SENT_ADD_REVOCATION", "SENT_ADD_ACK_COMMIT", "RCVD_ADD_ACK_REVOCATION", "SENT_REMOVE_HTLC", "SENT_REMOVE_COMMIT", "RCVD_REMOVE_REVOCATION", "RCVD_REMOVE_ACK_COMMIT", "SENT_REMOVE_ACK_REVOCATION")
121-
122-
If **close_to** is present:
123-
- **close_to_addr** (string, optional): The bitcoin address we will close to
124-
125-
If **scratch_txid** is present:
126-
- **last_tx_fee_msat** (msat): fee attached to this the current tx
127-
128-
If **short_channel_id** is present:
129-
- **direction** (u32): 0 if we're the lesser node_id, 1 if we're the greater
130-
131-
If **inflight** is present:
132-
- **initial_feerate** (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended
133-
- **last_feerate** (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended
134-
- **next_feerate** (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended
13545
- **log** (array of objects, optional): if *level* is specified, logs for this peer:
13646
- **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT")
13747

@@ -165,13 +75,15 @@ Each object in the list contains the following data:
16575
- *connected* : A boolean value showing the connection status
16676
- *netaddr* : A list of network addresses the node is listening on
16777
- *features* : Bit flags showing supported features (BOLT \#9)
168-
- *channels* : An array of objects describing channels with the peer.
16978
- *log* : Only present if *level* is set. List logs related to the
17079
peer at the specified *level*
17180

17281
If *id* is supplied and no matching nodes are found, a "peers" object
17382
with an empty list is returned.
17483

84+
A list of the peer's channels can be retrieved with the **listpeerchannels**
85+
RPC command, which takes a peer *id* and returns an object with a "channels"
86+
key containing a list of 0 or more objects describing channels with the peer.
17587
The objects in the *channels* array will have at least these fields:
17688

17789
* *state*: Any of these strings:
@@ -375,4 +287,4 @@ Main web site: <https://github.com/ElementsProject/lightning> Lightning
375287
RFC site (BOLT \#9):
376288
<https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md>
377289

378-
[comment]: # ( SHA256STAMP:91d30768a795456c75c72cf499df529ae8dbcc8088d06d1ed27150272425ab37)
290+
[comment]: # ( SHA256STAMP:240e6e40040c18a9d85f857bd698cb1342bb9791df2ed49c7614b15e010a05aa)

0 commit comments

Comments
 (0)