LIGHTNING-FUNDCHANNEL_COMPLETE(7)
π LIGHTNING-FUNDCHANNEL_COMPLETE(7) β¨
okay so bestie, welcome to lightning-fundchannel_complete β it's a page from the Core Lightning manual, and it's literally the "finish the thing" button for channel establishment π
πΈ NAME πΈ
fundchannel_complete β the command for completing channel establishment. that's it, that's the vibe π¦
β¨ SYNOPSIS β¨
fundchannel_complete id psbt [withhold]
π DESCRIPTION π
okay so fundchannel_complete is a lower level RPC command, meaning it's giving main-character energy for people who already know what they're doing π
it lets a user complete an initiated channel establishment with a connected peer.
β οΈ no cap, this is the important part: the funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed, because the commitment transactions for this channel are not secured until this command successfully completes. broadcasting the transaction before that can lead to unrecoverable loss of funds π like, actual money, gone, forever. please please please don't.
now the params, one by one, slay:
id(pubkey) β the node id of the remote peer π«Άpsbt(string) β the transaction to use for funding. it does not need to be signed, but it must be otherwise complete β¨withhold(boolean, optional) β marks this channel'withheld'so we know we haven't broadcast the funding transaction. if the channel is closed before we callsendpsbton this psbt, it will simply be closed immediately πββοΈπ¨ (added inv25.12, iykyk)
π₯ RETURN VALUE π₯
on success, an object comes back at you, containing:
channel_id(hash) β thechannel_idof the resulting channel πcommitments_secured(boolean) (always true) β the indication that the channel is safe to use. yes bestie, safe π«Ά
π ERRORS π
on error the returned object will contain code and message properties, with code being one of the following:
-32602β if the given parameters are wrong π-1β catchall nonspecific error π305β peer is not connected π¦306β unknown peer id π309β PSBT does not have a unique, correct output to fund the channel β
π AUTHOR π
Lisa Neigut niftynei@gmail.com is mainly responsible π iconic behavior, honestly.
π SEE ALSO π
lightning-connect(7), lightning-fundchannel(7), lightning-multifundchannel(7), lightning-fundchannel_start(7), lightning-fundchannel_cancel(7), lightning-openchannel_init(7), lightning-openchannel_update(7), lightning-openchannel_signed(7), lightning-openchannel_bump(7), lightning-openchannel_abort(7)
π§ RESOURCES π§
main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
π Example 1
Request:
$ lightning-cli fundchannel_complete "nodeid101010101010101010101010101010101010101010101010101010101010" "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000"
{
"id": "example:fundchannel_complete#1",
"method": "fundchannel_complete",
"params": [
"nodeid101010101010101010101010101010101010101010101010101010101010",
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000201000"
]
}
Response:
{
"channel_id": "channelid0910109101091010910109101091010910109101091010910109101",
"commitments_secured": true
}
π Example 2
Request:
$ lightning-cli fundchannel_complete -k "id"="nodeid101010101010101010101010101010101010101010101010101010101010" "psbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000"
{
"id": "example:fundchannel_complete#2",
"method": "fundchannel_complete",
"params": {
"id": "nodeid101010101010101010101010101010101010101010101010101010101010",
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000401000"
}
}
Response:
{
"channel_id": "channelid0910209102091020910209102091020910209102091020910209102",
"commitments_secured": true
}
okay that's the whole page bestie, every single flag and every single error code, nothing skipped, we ate and left no crumbs πβ¨ this one's from Core Lightning v26.06.9 β go forth and complete those channels responsibly, 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