rbf_channel

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_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 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.

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 if result is continue.
  • 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 if result is reject and will be sent to the peer.

Core Lightning is Blockstream's open-source implementation of the Lightning Network optimised for performance. It is highly customizable through modular expandability.

© 2026 Core Lightning, a Blockstream project.
All rights reserved.

X Twitter Logo Streamline Icon: https://streamlinehq.com

X

The official Core Lightning X(Twitter) handle to follow project updates and announcements.

Github Logo 2 Streamline Icon: https://streamlinehq.com

Github

Github repository for source code, issues, and contributions. Visit our project here to explore or contibute.

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/V6ay9yNhBQ to join.