mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
376e6f8bd1
Using a 'feestep' is more restrictive than you'd want, instead we enforce that the next feerate must be at least 1/64th more than the last, but put no upper limit on it Includes update to lnprototest changes Contributed-By: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Changelog-EXPERIMENTAL: Protocol: Replaces init_rbf's `fee_step` for RBF of v2 opens with `funding_feerate_perkw`, breaking change
648 lines
23 KiB
Groff
Generated
648 lines
23 KiB
Groff
Generated
.TH "LIGHTNING-LISTPEERS" "7" "" "" "lightning-listpeers"
|
|
.SH NAME
|
|
lightning-listpeers - Command returning data on connected lightning nodes
|
|
.SH SYNOPSIS
|
|
|
|
\fBlistpeers\fR [\fIid\fR] [\fIlevel\fR]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The \fBlistpeers\fR RPC command returns data on nodes that are connected
|
|
or are not connected but have open channels with this node\.
|
|
|
|
|
|
Once a connection to another lightning node has been established, using
|
|
the \fBconnect\fR command, data on the node can be returned using
|
|
\fBlistpeers\fR and the \fIid\fR that was used with the \fBconnect\fR command\.
|
|
|
|
|
|
If no \fIid\fR is supplied, then data on all lightning nodes that are
|
|
connected, or not connected but have open channels with this node, are
|
|
returned\.
|
|
|
|
|
|
Supplying \fIid\fR will filter the results to only return data on a node
|
|
with a matching \fIid\fR, if one exists\.
|
|
|
|
|
|
Supplying \fIlevel\fR will show log entries related to that peer at the
|
|
given log level\. Valid log levels are "io", "debug", "info", and
|
|
"unusual"\.
|
|
|
|
|
|
If a channel is open with a node and the connection has been lost, then
|
|
the node will still appear in the output of the command and the value of
|
|
the \fIconnected\fR attribute of the node will be "false"\.
|
|
|
|
|
|
The channel will remain open for a set blocktime, after which if the
|
|
connection has not been re-established, the channel will close and the
|
|
node will no longer appear in the command output\.
|
|
|
|
.SH RETURN VALUE
|
|
|
|
On success, an object containing \fBpeers\fR is returned\. It is an array of objects, where each object contains:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBid\fR (pubkey): the public key of the peer
|
|
.IP \[bu]
|
|
\fBconnected\fR (boolean): True if the peer is currently connected
|
|
.IP \[bu]
|
|
|
|
\fBchannels\fR (array of objects):
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBstate\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")
|
|
.IP \[bu]
|
|
\fBopener\fR (string): Who initiated the channel (one of "local", "remote")
|
|
.IP \[bu]
|
|
\fBfeatures\fR (array of strings):
|
|
.RS
|
|
.IP \[bu]
|
|
BOLT #9 features which apply to this channel (one of "option_static_remotekey", "option_anchor_outputs")
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBscratch_txid\fR (txid, optional): The txid we would use if we went onchain now
|
|
.IP \[bu]
|
|
\fBfeerate\fR (object, optional): Feerates for the current tx:
|
|
.RS
|
|
.IP \[bu]
|
|
\fBperkw\fR (u32): Feerate per 1000 weight (i\.e kSipa)
|
|
.IP \[bu]
|
|
\fBperkb\fR (u32): Feerate per 1000 virtual bytes
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBowner\fR (string, optional): The current subdaemon controlling this connection
|
|
.IP \[bu]
|
|
\fBshort_channel_id\fR (short_channel_id, optional): The short_channel_id (once locked in)
|
|
.IP \[bu]
|
|
\fBchannel_id\fR (hex, optional): The full channel_id (always 64 characters)
|
|
.IP \[bu]
|
|
\fBfunding_txid\fR (txid, optional): ID of the funding transaction
|
|
.IP \[bu]
|
|
\fBinitial_feerate\fR (string, optional): For inflight opens, the first feerate used to initiate the channel open
|
|
.IP \[bu]
|
|
\fBlast_feerate\fR (string, optional): For inflight opens, the most recent feerate used on the channel open
|
|
.IP \[bu]
|
|
\fBnext_feerate\fR (string, optional): For inflight opens, the next feerate we'll use for the channel open
|
|
.IP \[bu]
|
|
\fBnext_fee_step\fR (u32, optional): For inflight opens, the next feerate step we'll use for the channel open
|
|
.IP \[bu]
|
|
\fBinflight\fR (array of objects, optional): Current candidate funding transactions (only for dual-funding):
|
|
.RS
|
|
.IP \[bu]
|
|
\fBfunding_txid\fR (txid): ID of the funding transaction
|
|
.IP \[bu]
|
|
\fBfunding_outnum\fR (u32): The 0-based output number of the funding transaction which opens the channel
|
|
.IP \[bu]
|
|
\fBfeerate\fR (string): The feerate for this funding transaction in per-1000-weight, with "kpw" appended
|
|
.IP \[bu]
|
|
\fBtotal_funding_msat\fR (msat): total amount in the channel
|
|
.IP \[bu]
|
|
\fBour_funding_msat\fR (msat): amount we have in the channel
|
|
.IP \[bu]
|
|
\fBscratch_txid\fR (txid): The commitment transaction txid we would use if we went onchain now
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBclose_to\fR (hex, optional): scriptPubkey which we have to close to if we mutual close
|
|
.IP \[bu]
|
|
\fBprivate\fR (boolean, optional): if False, we will not announce this channel
|
|
.IP \[bu]
|
|
\fBcloser\fR (string, optional): Who initiated the channel close (\fBnull\fR is deprecated!) (one of "local", "remote", \fInull\fR)
|
|
.IP \[bu]
|
|
\fBfunding\fR (object, optional):
|
|
.RS
|
|
.IP \[bu]
|
|
\fBlocal_msat\fR (msat): Amount of channel we funded
|
|
.IP \[bu]
|
|
\fBremote_msat\fR (msat): Amount of channel they funded
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBto_us_msat\fR (msat, optional): how much of channel is owed to us
|
|
.IP \[bu]
|
|
\fBmin_to_us_msat\fR (msat, optional): least amount owed to us ever
|
|
.IP \[bu]
|
|
\fBmax_to_us_msat\fR (msat, optional): most amount owed to us ever
|
|
.IP \[bu]
|
|
\fBtotal_msat\fR (msat, optional): total amount in the channel
|
|
.IP \[bu]
|
|
\fBfee_base_msat\fR (msat, optional): amount we charge to use the channel
|
|
.IP \[bu]
|
|
\fBfee_proportional_millionths\fR (u32, optional): amount we charge to use the channel in parts-per-million
|
|
.IP \[bu]
|
|
\fBdust_limit_msat\fR (msat, optional): minimum amount for an output on the channel transactions
|
|
.IP \[bu]
|
|
\fBmax_total_htlc_in_msat\fR (msat, optional): max amount accept in a single payment
|
|
.IP \[bu]
|
|
\fBtheir_reserve_msat\fR (msat, optional): minimum we insist they keep in channel
|
|
.IP \[bu]
|
|
\fBour_reserve_msat\fR (msat, optional): minimum they insist we keep in channel
|
|
.IP \[bu]
|
|
\fBspendable_msat\fR (msat, optional): total we could send through channel
|
|
.IP \[bu]
|
|
\fBreceivable_msat\fR (msat, optional): total peer could send through channel
|
|
.IP \[bu]
|
|
\fBminimum_htlc_in_msat\fR (msat, optional): the minimum amount HTLC we accept
|
|
.IP \[bu]
|
|
\fBtheir_to_self_delay\fR (u32, optional): the number of blocks before they can take their funds if they unilateral close
|
|
.IP \[bu]
|
|
\fBour_to_self_delay\fR (u32, optional): the number of blocks before we can take our funds if we unilateral close
|
|
.IP \[bu]
|
|
\fBmax_accepted_htlcs\fR (u32, optional): Maximum number of incoming HTLC we will accept at once
|
|
.IP \[bu]
|
|
\fBstate_changes\fR (array of objects, optional): Prior state changes:
|
|
.RS
|
|
.IP \[bu]
|
|
\fBtimestamp\fR (string): UTC timestamp of form YYYY-mm-ddTHH:MM:SS\.%03dZ
|
|
.IP \[bu]
|
|
\fBold_state\fR (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")
|
|
.IP \[bu]
|
|
\fBnew_state\fR (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")
|
|
.IP \[bu]
|
|
\fBcause\fR (string): What caused the change (one of "unknown", "local", "user", "remote", "protocol", "onchain")
|
|
.IP \[bu]
|
|
\fBmessage\fR (string): Human-readable explanation
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBstatus\fR (array of strings, optional):
|
|
.RS
|
|
.IP \[bu]
|
|
Billboard log of significant changes
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBin_payments_offered\fR (u64, optional): Number of incoming payment attempts
|
|
.IP \[bu]
|
|
\fBin_offered_msat\fR (msat, optional): Total amount of incoming payment attempts
|
|
.IP \[bu]
|
|
\fBin_payments_fulfilled\fR (u64, optional): Number of successful incoming payment attempts
|
|
.IP \[bu]
|
|
\fBin_fulfilled_msat\fR (msat, optional): Total amount of successful incoming payment attempts
|
|
.IP \[bu]
|
|
\fBout_payments_offered\fR (u64, optional): Number of outgoing payment attempts
|
|
.IP \[bu]
|
|
\fBout_offered_msat\fR (msat, optional): Total amount of outgoing payment attempts
|
|
.IP \[bu]
|
|
\fBout_payments_fulfilled\fR (u64, optional): Number of successful outgoing payment attempts
|
|
.IP \[bu]
|
|
\fBout_fulfilled_msat\fR (msat, optional): Total amount of successful outgoing payment attempts
|
|
.IP \[bu]
|
|
|
|
\fBhtlcs\fR (array of objects, optional): current HTLCs in this channel:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBdirection\fR (string): Whether it came from peer, or is going to peer (one of "in", "out")
|
|
.IP \[bu]
|
|
\fBid\fR (u64): Unique ID for this htlc on this channel in this direction
|
|
.IP \[bu]
|
|
\fBamount_msat\fR (msat): Amount send/received for this HTLC
|
|
.IP \[bu]
|
|
\fBexpiry\fR (u32): Block this HTLC expires at
|
|
.IP \[bu]
|
|
\fBpayment_hash\fR (hex): the hash of the payment_preimage which will prove payment (always 64 characters)
|
|
.IP \[bu]
|
|
\fBlocal_trimmed\fR (boolean, optional): if this is too small to enforce onchain (always \fItrue\fR)
|
|
.IP \[bu]
|
|
\fBstatus\fR (string, optional): set if this HTLC is currently waiting on a hook (and shows what plugin)
|
|
|
|
.RE
|
|
|
|
If \fBdirection\fR is "out":
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBstate\fR (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")
|
|
|
|
.RE
|
|
|
|
If \fBdirection\fR is "in":
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBstate\fR (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")
|
|
|
|
.RE
|
|
|
|
|
|
.RE
|
|
|
|
If \fBclose_to\fR is present:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBclose_to_addr\fR (string, optional): The bitcoin address we will close to
|
|
|
|
.RE
|
|
|
|
If \fBscratch_txid\fR is present:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBlast_tx_fee_msat\fR (msat): fee attached to this the current tx
|
|
|
|
.RE
|
|
|
|
If \fBshort_channel_id\fR is present:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBdirection\fR (u32): 0 if we're the lesser node_id, 1 if we're the greater
|
|
|
|
.RE
|
|
|
|
If \fBinflight\fR is present:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBinitial_feerate\fR (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended
|
|
.IP \[bu]
|
|
\fBlast_feerate\fR (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended
|
|
.IP \[bu]
|
|
\fBnext_feerate\fR (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
|
|
\fBlog\fR (array of objects, optional): if \fIlevel\fR is specified, logs for this peer:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBtype\fR (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT")
|
|
|
|
.RE
|
|
|
|
If \fBtype\fR is "SKIPPED":
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBnum_skipped\fR (u32): number of deleted/omitted entries
|
|
|
|
.RE
|
|
|
|
If \fBtype\fR is "BROKEN", "UNUSUAL", "INFO" or "DEBUG":
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBtime\fR (string): UNIX timestamp with 9 decimal places
|
|
.IP \[bu]
|
|
\fBsource\fR (string): The particular logbook this was found in
|
|
.IP \[bu]
|
|
\fBlog\fR (string): The actual log message
|
|
.IP \[bu]
|
|
\fBnode_id\fR (pubkey): The peer this is associated with
|
|
|
|
.RE
|
|
|
|
If \fBtype\fR is "IO_IN" or "IO_OUT":
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBtime\fR (string): UNIX timestamp with 9 decimal places
|
|
.IP \[bu]
|
|
\fBsource\fR (string): The particular logbook this was found in
|
|
.IP \[bu]
|
|
\fBlog\fR (string): The actual log message
|
|
.IP \[bu]
|
|
\fBnode_id\fR (pubkey): The peer this is associated with
|
|
.IP \[bu]
|
|
\fBdata\fR (hex): The IO which occurred
|
|
|
|
.RE
|
|
|
|
|
|
.RE
|
|
|
|
If \fBconnected\fR is \fItrue\fR:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fBnetaddr\fR (array of strings): A single entry array:
|
|
.RS
|
|
.IP \[bu]
|
|
address, e\.g\. 1\.2\.3\.4:1234
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fBfeatures\fR (hex): bitmap of BOLT #9 features from peer's INIT message
|
|
|
|
.RE
|
|
|
|
On success, an object with a "peers" key is returned containing a list
|
|
of 0 or more objects\.
|
|
|
|
|
|
Each object in the list contains the following data:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fIid\fR : The unique id of the peer
|
|
.IP \[bu]
|
|
\fIconnected\fR : A boolean value showing the connection status
|
|
.IP \[bu]
|
|
\fInetaddr\fR : A list of network addresses the node is listening on
|
|
.IP \[bu]
|
|
\fIfeatures\fR : Bit flags showing supported features (BOLT #9)
|
|
.IP \[bu]
|
|
\fIchannels\fR : An array of objects describing channels with the peer\.
|
|
.IP \[bu]
|
|
\fIlog\fR : Only present if \fIlevel\fR is set\. List logs related to the
|
|
peer at the specified \fIlevel\fR
|
|
|
|
.RE
|
|
|
|
If \fIid\fR is supplied and no matching nodes are found, a "peers" object
|
|
with an empty list is returned\.
|
|
|
|
|
|
The objects in the \fIchannels\fR array will have at least these fields:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fIstate\fR: Any of these strings:
|
|
.RS
|
|
.IP \[bu]
|
|
\fB"OPENINGD"\fR: The channel funding protocol with the peer is ongoing
|
|
and both sides are negotiating parameters\.
|
|
.IP \[bu]
|
|
\fB"CHANNELD_AWAITING_LOCKIN"\fR: The peer and you have agreed on channel
|
|
parameters and are just waiting for the channel funding transaction to
|
|
be confirmed deeply\.
|
|
Both you and the peer must acknowledge the channel funding transaction
|
|
to be confirmed deeply before entering the next state\.
|
|
.IP \[bu]
|
|
\fB"CHANNELD_NORMAL"\fR: The channel can be used for normal payments\.
|
|
.IP \[bu]
|
|
\fB"CHANNELD_SHUTTING_DOWN"\fR: A mutual close was requested (by you or
|
|
peer) and both of you are waiting for HTLCs in-flight to be either
|
|
failed or succeeded\.
|
|
The channel can no longer be used for normal payments and forwarding\.
|
|
Mutual close will proceed only once all HTLCs in the channel have
|
|
either been fulfilled or failed\.
|
|
.IP \[bu]
|
|
\fB"CLOSINGD_SIGEXCHANGE"\fR: You and the peer are negotiating the mutual
|
|
close onchain fee\.
|
|
.IP \[bu]
|
|
\fB"CLOSINGD_COMPLETE"\fR: You and the peer have agreed on the mutual close
|
|
onchain fee and are awaiting the mutual close getting confirmed deeply\.
|
|
.IP \[bu]
|
|
\fB"AWAITING_UNILATERAL"\fR: You initiated a unilateral close, and are now
|
|
waiting for the peer-selected unilateral close timeout to complete\.
|
|
.IP \[bu]
|
|
\fB"FUNDING_SPEND_SEEN"\fR: You saw the funding transaction getting
|
|
spent (usually the peer initiated a unilateral close) and will now
|
|
determine what exactly happened (i\.e\. if it was a theft attempt)\.
|
|
.IP \[bu]
|
|
\fB"ONCHAIN"\fR: You saw the funding transaction getting spent and now
|
|
know what happened (i\.e\. if it was a proper unilateral close by the
|
|
peer, or a theft attempt)\.
|
|
.IP \[bu]
|
|
\fB"CLOSED"\fR: The channel closure has been confirmed deeply\.
|
|
The channel will eventually be removed from this array\.
|
|
|
|
.RE
|
|
|
|
.IP \[bu]
|
|
\fIstate_changes\fR: An array of objects describing prior state change events\.
|
|
.IP \[bu]
|
|
\fIopener\fR: A string \fB"local"\fR or \fB"remote\fR" describing which side opened this
|
|
channel\.
|
|
.IP \[bu]
|
|
\fIcloser\fR: A string \fB"local"\fR or \fB"remote\fR" describing which side
|
|
closed this channel or \fBnull\fR if the channel is not (being) closed yet\.
|
|
.IP \[bu]
|
|
\fIstatus\fR: An array of strings containing the most important log messages
|
|
relevant to this channel\.
|
|
Also known as the "billboard"\.
|
|
.IP \[bu]
|
|
\fIowner\fR: A string describing which particular sub-daemon of \fBlightningd\fR
|
|
currently is responsible for this channel\.
|
|
One of: \fB"lightning_openingd"\fR, \fB"lightning_channeld"\fR,
|
|
\fB"lightning_closingd"\fR, \fB"lightning_onchaind"\fR\.
|
|
.IP \[bu]
|
|
\fIto_us_msat\fR: A string describing how much of the funds is owned by us;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fItotal_msat\fR: A string describing the total capacity of the channel;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fIfee_base_msat\fR: The fixed routing fee we charge for forwards going out over
|
|
this channel, regardless of payment size\.
|
|
.IP \[bu]
|
|
\fIfee_proportional_millionths\fR: The proportional routing fees in ppm (parts-
|
|
per-millionths) we charge for forwards going out over this channel\.
|
|
.IP \[bu]
|
|
\fIfeatures\fR: An array of feature names supported by this channel\.
|
|
|
|
.RE
|
|
|
|
These fields may exist if the channel has gotten beyond the \fB"OPENINGD"\fR
|
|
state, or in various circumstances:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fIshort_channel_id\fR: A string of the short channel ID for the channel;
|
|
Format is \fB"BBBBxTTTxOOO"\fR, where \fB"BBBB"\fR is the numeric block height
|
|
at which the funding transaction was confirmed, \fB"TTT"\fR is the numeric
|
|
funding transaction index within that block, and \fB"OOO"\fR is the
|
|
numeric output index of the transaction output that actually anchors
|
|
this channel\.
|
|
.IP \[bu]
|
|
\fIdirection\fR: The channel-direction we own, as per BOLT #7\.
|
|
We own channel-direction 0 if our node ID is "less than" the peer node ID
|
|
in a lexicographical ordering of our node IDs, otherwise we own
|
|
channel-direction 1\.
|
|
Our \fBchannel_update\fR will use this \fIdirection\fR\.
|
|
.IP \[bu]
|
|
\fIchannel_id\fR: The full channel ID of the channel;
|
|
the funding transaction ID XORed with the output number\.
|
|
.IP \[bu]
|
|
\fIfunding_txid\fR: The funding transaction ID of the channel\.
|
|
.IP \[bu]
|
|
\fIclose_to\fR: The raw \fBscriptPubKey\fR that was indicated in the starting
|
|
\fBfundchannel_start\fR command and accepted by the peer\.
|
|
If the \fBscriptPubKey\fR encodes a standardized address, an additional
|
|
\fIclose_to_addr\fR field will be present with the standardized address\.
|
|
.IP \[bu]
|
|
\fIprivate\fR: A boolean, true if the channel is unpublished, false if the
|
|
channel is published\.
|
|
.IP \[bu]
|
|
\fIfunding_msat\fR: An object, whose field names are the node
|
|
IDs involved in the channel, and whose values are strings (numbers with
|
|
a unit suffix) indicating how much that node originally contributed in
|
|
opening the channel\.
|
|
.IP \[bu]
|
|
\fImin_to_us_msat\fR: A string describing the historic point at which
|
|
we owned the least amount of funds in this channel;
|
|
a number followed by a string unit\.
|
|
If the peer were to succesfully steal from us, this is the amount we
|
|
would still retain\.
|
|
.IP \[bu]
|
|
\fImax_to_us_msat\fR: A string describing the historic point at which
|
|
we owned the most amount of funds in this channel;
|
|
a number followed by a string unit\.
|
|
If we were to successfully steal from the peer, this is the amount we
|
|
could potentially get\.
|
|
.IP \[bu]
|
|
\fIdust_limit_msat\fR: A string describing an amount;
|
|
if an HTLC or the amount wholly-owned by one node is at or below this
|
|
amount, it will be considered "dusty" and will not appear in a close
|
|
transaction, and will be donated to miners as fee;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fImax_total_htlc_in_msat\fR: A string describing an amount;
|
|
the sum of all HTLCs in the channel cannot exceed this amount;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fItheir_reserve_msat\fR: A string describing the minimum amount that
|
|
the peer must keep in the channel when it attempts to send out;
|
|
if it has less than this in the channel, it cannot send to us on
|
|
that channel;
|
|
a number followed by a string unit\.
|
|
We impose this on them, default is 1% of the total channel capacity\.
|
|
.IP \[bu]
|
|
\fIour_reserve_msat\fR: A string describing the minimum amount that
|
|
you must keep in the channel when you attempt to send out;
|
|
if you have less than this in the channel, you cannot send out
|
|
via this channel;
|
|
a number followed by a string unit\.
|
|
The peer imposes this on us, default is 1% of the total channel capacity\.
|
|
.IP \[bu]
|
|
\fIspendable_msat\fR and \fIreceivable_msat\fR: A string describing an
|
|
\fB\fIestimate\fR\fR of how much we can send or receive over this channel in a
|
|
single payment (or payment-part for multi-part payments);
|
|
a number followed by a string unit\.
|
|
This is an \fB\fIestimate\fR\fR, which can be wrong because adding HTLCs requires
|
|
an increase in fees paid to onchain miners, and onchain fees change
|
|
dynamically according to onchain activity\.
|
|
For a sufficiently-large channel, this can be limited by the rules imposed
|
|
under certain blockchains;
|
|
for example, individual Bitcoin mainnet payment-parts cannot exceed
|
|
42\.94967295 mBTC\.
|
|
.IP \[bu]
|
|
\fIminimum_htlc_in_msat\fR: A string describing the minimum amount that
|
|
an HTLC must have before we accept it\.
|
|
.IP \[bu]
|
|
\fItheir_to_self_delay\fR: The number of blocks that the peer must wait
|
|
to claim their funds, if they close unilaterally\.
|
|
.IP \[bu]
|
|
\fIour_to_self_delay\fR: The number of blocks that you must wait to claim
|
|
your funds, if you close unilaterally\.
|
|
.IP \[bu]
|
|
\fImax_accepted_htlcs\fR: The maximum number of HTLCs you will accept on
|
|
this channel\.
|
|
.IP \[bu]
|
|
\fIin_payments_offered\fR: The number of incoming HTLCs offered over this
|
|
channel\.
|
|
.IP \[bu]
|
|
\fIin_offered_msat\fR: A string describing the total amount of all incoming
|
|
HTLCs offered over this channel;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fIin_payments_fulfilled\fR: The number of incoming HTLCs offered \fIand
|
|
successfully claimed\fR over this channel\.
|
|
.IP \[bu]
|
|
\fIin_fulfilled_msat\fR: A string describing the total amount of all
|
|
incoming HTLCs offered \fIand successfully claimed\fR over this channel;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fIout_payments_offered\fR: The number of outgoing HTLCs offered over
|
|
this channel\.
|
|
.IP \[bu]
|
|
\fIout_offered_msat\fR: A string describing the total amount of all
|
|
outgoing HTLCs offered over this channel;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fIout_payments_fulfilled\fR: The number of outgoing HTLCs offered \fIand
|
|
successfully claimed\fR over this channel\.
|
|
.IP \[bu]
|
|
\fIout_fulfilled_msat\fR: A string describing the total amount of all
|
|
outgoing HTLCs offered \fIand successfully claimed\fR over this channel;
|
|
a number followed by a string unit\.
|
|
.IP \[bu]
|
|
\fIscratch_txid\fR: The txid of the latest transaction (what we would sign and
|
|
send to chain if the channel were to fail now)\.
|
|
.IP \[bu]
|
|
\fIlast_tx_fee\fR: The fee on that latest transaction\.
|
|
.IP \[bu]
|
|
\fIfeerate\fR: An object containing the latest feerate as both \fIperkw\fR and \fIperkb\fR\.
|
|
.IP \[bu]
|
|
\fIhtlcs\fR: An array of objects describing the HTLCs currently in-flight
|
|
in the channel\.
|
|
|
|
.RE
|
|
|
|
Objects in the \fIhtlcs\fR array will contain these fields:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
\fIdirection\fR: Either the string \fB"out"\fR or \fB"in"\fR, whether it is an
|
|
outgoing or incoming HTLC\.
|
|
.IP \[bu]
|
|
\fIid\fR: A numeric ID uniquely identifying this HTLC\.
|
|
.IP \[bu]
|
|
\fIamount_msat\fR: The value of the HTLC\.
|
|
.IP \[bu]
|
|
\fIexpiry\fR: The blockheight at which the HTLC will be forced to return
|
|
to its offerer: an \fB"in"\fR HTLC will be returned to the peer, an
|
|
\fB"out"\fR HTLC will be returned to you\.
|
|
\fBNOTE\fR If the \fIexpiry\fR of any outgoing HTLC will arrive in the next
|
|
block, \fBlightningd\fR(8) will automatically unilaterally close the
|
|
channel in order to enforce the timeout onchain\.
|
|
.IP \[bu]
|
|
\fIpayment_hash\fR: The payment hash, whose preimage must be revealed to
|
|
successfully claim this HTLC\.
|
|
.IP \[bu]
|
|
\fIstate\fR: A string describing whether the HTLC has been communicated to
|
|
or from the peer, whether it has been signed in a new commitment, whether
|
|
the previous commitment (that does not contain it) has been revoked, as
|
|
well as when the HTLC is fulfilled or failed offchain\.
|
|
.IP \[bu]
|
|
\fIlocal_trimmed\fR: A boolean, existing and \fBtrue\fR if the HTLC is not
|
|
actually instantiated as an output (i\.e\. "trimmed") on the commitment
|
|
transaction (and will not be instantiated on a unilateral close)\.
|
|
Generally true if the HTLC is below the \fIdust_limit_msat\fR for the
|
|
channel\.
|
|
|
|
.RE
|
|
|
|
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
|
|
with \fBcode\fR being one of the following:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
-32602: If the given parameters are wrong\.
|
|
|
|
.RE
|
|
.SH AUTHOR
|
|
|
|
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
|
|
|
.SH SEE ALSO
|
|
|
|
\fBlightning-connect\fR(7), lightning-fundchannel_\fBstart\fR(7),
|
|
\fBlightning-setchannelfee\fR(7)
|
|
|
|
.SH RESOURCES
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Lightning
|
|
RFC site (BOLT #9):
|
|
\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md\fR
|
|
|
|
\" SHA256STAMP:16d808a5a346bb7dbffc263846617d33c74fdc6e0d5165f462d634ed8409f882
|