home | help
LIGHTNING-HOOK-RBF_CHANNEL(7)			   LIGHTNING-HOOK-RBF_CHANNEL(7)

NAME
     rbf_channel -- Hook for handling RBF channel funding requests

DESCRIPTION
     The  rbf_channel  hook is called when a peer proposes replacing the funding
     transaction of an existing channel using Replace-By-Fee (RBF).

     The plugin can choose to reject or continue the negotiation.

     If continuing, the plugin may contribute additional inputs and  outputs  by
     returning a PSBT and specifying an our_funding_msat amount.

     The  our_funding_msat value must not be included in any output in the PSBT.
     Change outputs should be included and calculated using the  provided  fund-
     ing_feerate_per_kw.

HOOK PAYLOAD
     *	rbf_channel (object):
	*  id (pubkey): The node_id of the peer proposing the RBF.
	*  channel_id (hash): The channel_id of the channel being modified.
	*  their_last_funding_msat  (msat):  The peer's previous contribution to
	   the funding transaction.
	*  their_funding_msat (msat): The peer's proposed new funding  contribu-
	   tion.
	*  our_last_funding_msat  (msat): Our previous contribution to the fund-
	   ing transaction.
	*  funding_feerate_per_kw (u32): The feerate  to  use  for  the  updated
	   funding transaction, in satoshis per kw.
	*  feerate_our_max  (u32):  The maximum feerate we are willing to accept
	   for the funding transaction.
	*  feerate_our_min (u32): The minimum feerate we are willing  to  accept
	   for the funding transaction.
	*  channel_max_msat  (msat):  The maximum total channel capacity allowed
	   for this channel.
	*  locktime (u32): The locktime to use for the funding transaction.
	*  require_confirmed_inputs (boolean): Indicates whether the remote peer
	   requires all inputs in the PSBT to be confirmed.  If true, the plugin
	   must avoid adding unconfirmed inputs. (added v23.02)
	*  requested_lease_msat (msat, optional): If present, the amount of liq-
	   uidity the peer is requesting us to lease.  This  field  is	optional
	   and only included if the peer requested a lease.

HOOK RETURN
     *	result	(string) (one of "continue", "reject"): Whether to accept or re-
	ject the RBF proposal.
     *	psbt (string, optional): A PSBT containing additional inputs and outputs
	to contribute to the funding transaction.  Only valid if result is  con-
	tinue.
     *	our_funding_msat (msat, optional): The amount we are contributing to the
	new  funding  transaction.   Must  not	be included in any output in the
	PSBT.
     *	error_message (string, optional): An error message explaining the rejec-
	tion.  Only used if result is reject and will be sent to the peer.

Core Lightning v26.06.1 			   LIGHTNING-HOOK-RBF_CHANNEL(7)

home | help