LIGHTNING-FUNDCHANNEL_CANCEL(7)
π LIGHTNING-FUNDCHANNEL_CANCEL(7) β the manual page, bestie edition
okay so this is the page for lightning-fundchannel_cancel(7), and ngl it's a whole vibe: it's the "jk never mind" of channel opening. let's get into it β¨
πΈ NAME πΈ
fundchannel_cancel β the command for completing channel establishment (yes literally that's what the original says and yes it's a little ironic given what this command does π)
π SYNOPSIS π
fundchannel_cancel id
that's it. one argument. slay.
π DESCRIPTION π
okay so fundchannel_cancel is a lower level RPC command. lowkey the whole point: it lets the channel opener cancel a channel before funding broadcast, with a peer they're already connected to. think of it as the "let me just ghost this draft" button π¦
β οΈ huge warning, no cap: the funding transaction MUST NOT be broadcast beforefundchannel_cancel. broadcasting the transaction beforefundchannel_cancelWILL lead to unrecoverable loss of funds. like, not "oops" loss. unrecoverable loss. do not do this. periodt. π₯
also important, bestie: if fundchannel_cancel is called after fundchannel_complete, the remote peer may disconnect when the command succeeds. in this case, you (the user) need to connect to the remote peer again before opening a channel. so it's giving "breakup, but you'll have to text them first next time" π
here's the one and only arg:
id(pubkey) β the Node id of the remote peer you're cancelling with. that's the whole thing. π
β¨ RETURN VALUE β¨
on success, an object is returned, containing:
cancelled(string) β a message indicating it was cancelled by RPC. cute little confirmation, iykyk π
π 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. classic. π306β Unknown peer id. who even are they.307β No channel currently being funded that can be cancelled. nothing to cancel, bestie, the draft doesn't exist.308β It is unsafe to cancel the channel: the funding transaction has been broadcast, or there are HTLCs already in the channel, or the peer was the initiator and not us. π¨ read that one twice fr fr.
π AUTHOR π
Lisa Neigut niftynei@gmail.com is mainly responsible. iconic behavior, we stan. π«Ά
π§ SEE ALSO π§
lightning-connect(7)lightning-fundchannel(7)lightning-multifundchannel(7)lightning-fundchannel_start(7)lightning-fundchannel_complete(7)lightning-openchannel_init(7)lightning-openchannel_update(7)lightning-openchannel_signed(7)lightning-openchannel_abort(7)
β RESOURCES β
Main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
Example 1:
Request:
$ lightning-cli fundchannel_cancel "nodeid101010101010101010101010101010101010101010101010101010101010"
{
"id": "example:fundchannel_cancel#1",
"method": "fundchannel_cancel",
"params": [
"nodeid101010101010101010101010101010101010101010101010101010101010"
]
}
Response:
{
"cancelled": "Channel open canceled by RPC"
}
Example 2:
Request:
$ lightning-cli fundchannel_cancel -k "id"="nodeid101010101010101010101010101010101010101010101010101010101010"
{
"id": "example:fundchannel_cancel#2",
"method": "fundchannel_cancel",
"params": {
"id": "nodeid101010101010101010101010101010101010101010101010101010101010"
}
}
Response:
{
"cancelled": "Channel open canceled by RPC"
}
okay that's the whole page, bestie β go forth and cancel responsibly, and please please PLEASE don't broadcast that funding tx first π
this has been your girl, signing off from Core Lightning v26.06.9 β stay slay, stay connected πβ¨
π¦ 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