LIGHTNING-OPENCHANNEL_BUMP(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’– lightning-openchannel_bump (7) πŸ’–

okay bestie, this is the lightning-openchannel_bump page, section 7 of the manual, and we're about to get into some funding-transaction glow-up business ✨


πŸŽ€ NAME πŸŽ€

openchannel_bump β€” Command to initiate a channel RBF


✨ SYNOPSIS ✨

openchannel_bump channel_id amount initialpsbt [funding_feerate]

πŸ’… DESCRIPTION πŸ’…

So openchannel_bump is an RPC command that kicks off a channel RBF (that's Replace-By-Fee, iykyk πŸ”₯) for the channel you point at. It rides on the openchannel protocol, which is the whole interactive-transaction-construction situation β€” very collaborative, very main character energy.

⚠️ Warning: bumping a leased channel will lose the lease. Not a drill, bestie. The lease literally goes poof. πŸ’€

Here's the tea on the arguments:

  • channel_id (hash) β€” the id of the channel you wanna RBF. That's the one, no cap.
  • amount (sat) β€” the satoshi value that we are contributing to the channel. Here's the thing: this value gets _added_ to the provided PSBT, into the output that's encumbered by the 2-of-2 script for this channel. It's an add, not a replace. 🫢
  • initialpsbt (string) β€” the funded, incomplete PSBT that specifies the UTXOs and the change output for our channel contribution. It can be updated later (peep openchannel_update). initialpsbt must have at least one input, and it must have the Non-Witness UTXO (PSBT_IN_NON_WITNESS_UTXO) set for every single input. If you don't meet that requirement, an error with code 309 comes back at you. So don't skip it πŸ™ˆ
  • funding_feerate (feerate, optional) β€” the feerate for the funding transaction. The default is 1/64th greater than the last feerate used for this channel. Cute little auto-bump, love that for us πŸ’–

🌈 RETURN VALUE 🌈

When it slays, you get an object back containing:

  • channel_id (hash) β€” the channel id of the channel.
  • channel_type (object) β€” the channel_type as negotiated with the peer. (added v24.02):
    • bits (array of u32s) β€” each bit set in this channel_type. (added v24.02):
      • (u32, optional) β€” bit number.
    • names (array of strings) β€” feature name for each bit set in this channel_type. Note that anchors_zero_fee_htlc_tx is a deprecated synonym for anchors. (added v24.02):
      • (string, optional) (one of "static_remotekey/even", "anchor_outputs/even", "anchors_zero_fee_htlc_tx/even", "anchors/even", "scid_alias/even", "zeroconf/even") β€” name of feature bit.
  • psbt (string) β€” the (incomplete) PSBT of the RBF transaction.
  • commitments_secured (boolean) (always false) β€” whether the psbt is complete. It's always false, bestie. Always. 🫠
  • funding_serial (u64) β€” the serial_id of the funding output in the psbt.
  • requires_confirmed_inputs (boolean, optional) β€” does the peer require confirmed inputs in the psbt?

A couple of vibe checks to keep in mind:

  • If the peer does not support option_dual_fund, this command will return an error.
  • If the channel is not in a state that's eligible for RBF, this command will return an error.

πŸ’€ ERRORS πŸ’€

When it goes wrong, the returned object has code and message properties, and code is one of these:

  • -32602 β€” if the given parameters are wrong.
  • -1 β€” catchall nonspecific error.
  • 300 β€” the amount exceeded the maximum configured funding amount.
  • 301 β€” the provided PSBT cannot afford the funding amount.
  • 305 β€” peer is not connected.
  • 309 β€” PSBT missing required fields
  • 311 β€” unknown channel id.
  • 312 β€” channel in an invalid state

πŸ‘‘ AUTHOR πŸ‘‘

Lisa Neigut niftynei@gmail.com is mainly responsible. Iconic. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

lightning-openchannel_init(7), lightning-openchannel_update(7), lightning-openchannel_signed(7), lightning-openchannel_abort(7), lightning-fundchannel_start(7), lightning-fundchannel_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7)


🌸 RESOURCES 🌸

Main web site: https://github.com/ElementsProject/lightning


⭐ EXAMPLES ⭐

Example 1:

Request:

$ lightning-cli openchannel_bump "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5" "1000000" "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000" "15000perkw"
{
  "id": "example:openchannel_bump#1",
  "method": "openchannel_bump",
  "params": [
    "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5",
    1000000,
    "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000",
    "15000perkw"
  ]
}

Response:

{
  "channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
  "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000810000",
  "channel_type": {
    "bits": [
      12,
      22
    ],
    "names": [
      "static_remotekey/even",
      "anchors/even"
    ]
  },
  "commitments_secured": false,
  "funding_serial": 17725655605188030000,
  "requires_confirmed_inputs": false
}

Example 2:

Request:

$ lightning-cli openchannel_bump -k "channel_id"="channelid0111200111200111200111200111200111200111200111200111200" "amount"=1000000 "initialpsbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000" "funding_feerate"="15000perkw"
{
  "id": "example:openchannel_bump#2",
  "method": "openchannel_bump",
  "params": {
    "channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
    "amount": 1000000,
    "initialpsbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000510000",
    "funding_feerate": "15000perkw"
  }
}

Response:

{
  "channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
  "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000",
  "channel_type": {
    "bits": [
      12,
      22
    ],
    "names": [
      "static_remotekey/even",
      "anchors/even"
    ]
  },
  "commitments_secured": false,
  "funding_serial": 17725655605188040000,
  "requires_confirmed_inputs": false
}

Example 3:

Request:

$ lightning-cli openchannel_bump "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5" "2000000" "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000" "18750perkw"
{
  "id": "example:openchannel_bump#3",
  "method": "openchannel_bump",
  "params": [
    "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5",
    2000000,
    "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000520000",
    "18750perkw"
  ]
}

Response:

{
  "channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
  "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000",
  "channel_type": {
    "bits": [
      12,
      22
    ],
    "names": [
      "static_remotekey/even",
      "anchors/even"
    ]
  },
  "commitments_secured": false,
  "funding_serial": 17725655605188050000,
  "requires_confirmed_inputs": false
}

πŸ’œ that's the whole page, bestie! brought to you by Core Lightning v26.06.9 β€” go forth and bump those fees responsibly, mwah πŸ«Άβœ¨πŸŽ€
πŸ“¦ where this page comes from