lightning-fundchannel_cancel

lightning-fundchannel_cancel -- Command for completing channel establishment

SYNOPSIS

fundchannel_cancel id

DESCRIPTION

fundchannel_cancel is a lower level RPC command. It allows channel opener to cancel a channel before funding broadcast with a connected peer.

Note that the funding transaction MUST NOT be broadcast before fundchannel_cancel. Broadcasting transaction before fundchannel_cancel WILL lead to unrecoverable loss of funds.

If fundchannel_cancel is called after fundchannel_complete, the remote peer may disconnect when command succeeds. In this case, user need to connect to remote peer again before opening channel.

  • id (pubkey): Node id of the remote peer with which to cancel.

RETURN VALUE

On success, an object is returned, containing:

  • cancelled (string): A message indicating it was cancelled by RPC.

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.
  • 306: Unknown peer id.
  • 307: No channel currently being funded that can be cancelled.
  • 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.

AUTHOR

Lisa Neigut <[email protected]> is mainly responsible.

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"
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

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/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.