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 funding_feerate_per_kw.
HOOK PAYLOAD
- rbf_channel (object):
- id (pubkey): The
node_idof the peer proposing the RBF. - channel_id (hash): The
channel_idof 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 contribution.
- our_last_funding_msat (msat): Our previous contribution to the funding 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 liquidity the peer is requesting us to lease.
This field is optional and only included if the peer requested a lease.
- id (pubkey): The
HOOK RETURN
- result (string) (one of "continue", "reject"): Whether to accept or reject the RBF proposal.
- psbt (string, optional): A PSBT containing additional inputs and outputs to contribute to the funding transaction.
Only valid ifresultiscontinue. - 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 rejection.
Only used ifresultisrejectand will be sent to the peer.