LIGHTNING-CHECK(7)
π LIGHTNING-CHECK(7) β the check page, bestie β¨
okay so this is lightning-check, and it's literally the "are we sure about this tho?" command of Core Lightning. no cap.
πΈ NAME
check β the command for verifying parameters π (yes, that's its whole job and it does it fabulously)
β¨ SYNOPSIS
check command_to_check
π¦ DESCRIPTION
The check RPC command verifies another command without actually making any changes. it's the "try it on in the dressing room but don't buy it" of RPC calls π
This is guaranteed to be safe, and it will do all the checks up to the point where something in the system would need to be altered β like checking that channels are in the right state, peers are connected, etc. it goes right up to the line and then respectfully does not cross it π«Ά
But β and this is the part where you need to listen, bestie β 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. so like, the vibe check passed but the actual route hunt is a whole separate situation π
Here's the argument:
command_to_check(string) β the name of the relevant command. that's it. that's the whole input π
π RETURN VALUE
On success, an object is returned, containing:
command_to_check(string) β thecommand_to_checkargument, just handed right back to you like "yep, I checked the thing you asked me to check" β
π AUTHOR
Mark Beckwith wythe@intrig.com and Rusty Russell rusty@rustcorp.com.au are mainly responsible. icons, honestly π«‘
π RESOURCES
Main web site: https://github.com/ElementsProject/lightning β go be nosy π₯
π 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"
}
lowkey the whole point: check lets you peek at whether a command would pass its checks, without touching a single thing in your node. safe, iconic, no notes π
β¨
k that's the page!! mwah π«Ά this was brought to you by Core Lightning v26.06.9 β she's serving documentation realness, periodt ππ
π¦ 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