lightning-check

lightning-check -- Command for verifying parameters

SYNOPSIS

check command_to_check

DESCRIPTION

The check RPC command verifies another command without actually making any changes.

This is guaranteed to be safe, and will do all checks up to the point where something in the system would need to be altered (such as checking that channels are in the right state, peers connected, etc).

It does not guarantee successful execution of the command in all cases. For example, a call to lightning-getroute(7) may still fail to find a route even if checking the parameters succeeds.

  • command_to_check (string): Name of the relevant command.

RETURN VALUE

On success, an object is returned, containing:

  • command_to_check (string): The command_to_check argument.

AUTHOR

Mark Beckwith <[email protected]> and Rusty Russell <[email protected]> are mainly responsible.

RESOURCES

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

EXAMPLES

Example 1:

Request:

lightning-cli check -k "command_to_check"="sendpay" "route"='[{"amount_msat": 1011, "id": "nodeid030303030303030303030303030303030303030303030303030303030303", "delay": 20, "channel": "123x1x1"}, {"amount_msat": 1000, "id": "nodeid040404040404040404040404040404040404040404040404040404040404", "delay": 10, "channel": "130x1x1"}]' "payment_hash"="0000000000000000000000000000000000000000000000000000000000000000"
{
  "id": "example:check#1",
  "method": "check",
  "params": {
    "command_to_check": "sendpay",
    "route": [
      {
        "amount_msat": 1011,
        "id": "nodeid030303030303030303030303030303030303030303030303030303030303",
        "delay": 20,
        "channel": "123x1x1"
      },
      {
        "amount_msat": 1000,
        "id": "nodeid040404040404040404040404040404040404040404040404040404040404",
        "delay": 10,
        "channel": "130x1x1"
      }
    ],
    "payment_hash": "0000000000000000000000000000000000000000000000000000000000000000"
  }
}

Response:

{
  "command_to_check": "sendpay"
}

Example 2:

Request:

lightning-cli check -k "command_to_check"="dev" "subcommand"="slowcmd" "msec"=1000
{
  "id": "example:check#2",
  "method": "check",
  "params": {
    "command_to_check": "dev",
    "subcommand": "slowcmd",
    "msec": 1000
  }
}

Response:

{
  "command_to_check": "dev"
}

Example 3:

Request:

lightning-cli check -k "command_to_check"="recover" "hsmsecret"="6c696768746e696e672d31000000000000000000000000000000000000000000"
{
  "id": "example:check#3",
  "method": "check",
  "params": {
    "command_to_check": "recover",
    "hsmsecret": "6c696768746e696e672d31000000000000000000000000000000000000000000"
  }
}

Response:

{
  "command_to_check": "recover"
}

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.