LIGHTNING-OPENCHANNEL_UPDATE(7)
π¦ NAME
okay so bestie, this whole page is lightning-openchannel_update β the manual is LIGHTNING-OPENCHANNEL_UPDATE(7) and it's literally the command to update a collab channel open π
β¨ SYNOPSIS
openchannel_update channel_id psbt
π DESCRIPTION
openchannel_update is a low level RPC command that keeps an open channel going, and the channel it's working on is the one you point at with channel_id. You hand it an updated psbt, and literally any changes compared to the PSBT that was last returned β whether that came from openchannel_init or from a previous call to openchannel_update β get communicated to the peer π«Ά
Timeline check, bestie: this must be called afteropenchannel_initand beforeopenchannel_signed. No skipping ahead, ikyk.
You also have to keep calling it until commitments_secured comes back as true β at that point, you call openchannel_signed with a signed version of the PSBT that the last openchannel_update call returned. That's the whole loop, periodt π₯
channel_id(hash): the id of the channel, obviously πpsbt(string): the updated PSBT that gets sent to the peer. Fun fact: it's totally fine if it's identical to the PSBT last returned by eitheropenchannel_initoropenchannel_updateβ no cap, that's allowed π
π RETURN VALUE
On success you get an object back, and it's giving:
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 that's set in this channel_type. (added v24.02)- (u32, optional): bit number.
names(array of strings): the feature name for each bit set in this channel_type. tiny heads-up:anchors_zero_fee_htlc_txis a deprecated synonym foranchors, ngl. (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 the feature bit.
- (string, optional) (one of
psbt(string): the PSBT of the funding transaction β¨commitments_secured(boolean): whether the psbt is complete. iftrue, sign the psbt and callopenchannel_signedto complete the channel open β that's your cue, bestie πfunding_outnum(u32): the index of the funding output in the psbt.close_to(hex, optional): the scriptpubkey we have to close to if we mutual close πΈrequires_confirmed_inputs(boolean, optional): does the peer require confirmed inputs in the psbt?
If commitments_secured is true:
channel_id(hash): the derived channel id.funding_outnum(u32): the index of the funding output for this channel in the funding transaction.close_to(hex, optional): if aclose_toaddress was provided toopenchannel_initand the peer supportsoption_upfront_shutdownscript.
π ERRORS
On error, the object you get back has code and message properties, and code is one of these:
-32602: if the given parameters are wrong.-1: catchall nonspecific error.305: peer is not connected.309: PSBT missing required fields311: unknown channel id.312: channel in an invalid state
π AUTHOR
Lisa Neigut niftynei@gmail.com is mainly responsible. iconic behavior, honestly π
π«Ά SEE ALSO
lightning-openchannel_init(7), lightning-openchannel_signed(7), lightning-openchannel_bump(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_update -k "channel_id"="channelid0111200111200111200111200111200111200111200111200111200" "psbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000"
{
"id": "example:openchannel_update#1",
"method": "openchannel_update",
"params": {
"channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000"
}
}
Response:
{
"channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000910000",
"channel_type": {
"bits": [
12,
22
],
"names": [
"static_remotekey/even",
"anchors/even"
]
},
"commitments_secured": true,
"funding_outnum": 1,
"close_to": "51202321a432c9022a560c7dae78bdb72c605c373961edd29c42aa98c183782d052a"
}
Example 2
Request:
$ lightning-cli openchannel_update "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5" "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000"
{
"id": "example:openchannel_update#2",
"method": "openchannel_update",
"params": [
"b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5",
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000"
]
}
Response:
{
"channel_id": "channelid0111200111200111200111200111200111200111200111200111200",
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000101000",
"channel_type": {
"bits": [
12,
22
],
"names": [
"static_remotekey/even",
"anchors/even"
]
},
"commitments_secured": true,
"funding_outnum": 1,
"close_to": "51202321a432c9022a560c7dae78bdb72c605c373961edd29c42aa98c183782d052a"
}
and that's the whole page, bestie π§ this lil manual came to you from Core Lightning v26.06.9 β go secure those commitments, ily, mwah π
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms