LIGHTNING-CHECKMESSAGE(7)
π LIGHTNING-CHECKMESSAGE(7) β checkmessage
okay so bestie, welcome to lightning-checkmessage, one of the pages in the Core Lightning manual set (that's the LIGHTNING-CHECKMESSAGE(7) bit, iykyk) π this one's short, sweet, and honestly kind of iconic β it's the vibe check for signatures β¨
πΈ NAME πΈ
checkmessage β the command that checks whether a signature actually came from a given node π΅οΈββοΈπ
π SYNOPSIS π
checkmessage message zbase [pubkey]
that's it. three little slots. slay. π«Ά
π¦ DESCRIPTION π¦
okay so checkmessage is the RPC command that's the literal counterpart to signmessage π« here's the tea: you hand it a node id (pubkey), a signature (zbase), and a message, and it verifies that the signature was generated by that node for that message. and if we're being technical about it (we are, bestie, this is a manpage): by someone who knows that node's secret ππ
special case alert π¨ β if pubkey is not specified, we will try every known node key (as per listnodes), and verification succeeds if it matches for any one of them. and no cap, this is implemented far more efficiently than trying each one, so performance is not a concern π¨β¨ like she did the math so you don't have to.
message(string) β the message to be checked against the signature πzbase(string) β the Zbase32 encoded signature to verify πpubkey(pubkey, optional) β the Zbase32 encoded signature to verify π (yes, that's what it says, we're reporting it faithfully, don't come for me π)
π RETURN VALUE π
on success, you get an object back, containing:
verified(boolean) (always true) β whether the signature was valid β (and it's always true here, because if it weren't, you'd be in the ERRORS section instead, bestie)pubkey(pubkey) β thepubkeyparameter, or the pubkey found by looking for known nodes π―
π ERRORS π
on failure, an error is returned and core lightning exits with the following error code:
-32602β parameter missed or malformed π«1301β pubkey not found in the graph π
ngl,-32602is giving "you forgot an argument, diva" and1301is giving "who is she? never heard of her" π
β¨ AUTHOR β¨
Rusty Russell rusty@rustcorp.com.au is mainly responsible π«‘π honestly? legend behaviour.
π SEE ALSO π
lightning-signmessage(7) β the other half of this duo, go read it, it's the main character to this one's love interest π₯°
β RESOURCES β
main web site: https://github.com/ElementsProject/lightning β go snoop, it's fine π§ββοΈ
π EXAMPLES π
Example 1
request:
$ lightning-cli checkmessage -k "message"="testcase to check new rpc error" "zbase"="d66bqz3qsku5fxtqsi37j11pci47ydxa95iusphutggz9ezaxt56neh77kxe5hyr41kwgkncgiu94p9ecxiexgpgsz8daoq4tw8kj8yx" "pubkey"="03be3b0e9992153b1d5a6e1623670b6c3663f72ce6cf2e0dd39c0a373a7de5a3b7"
{
"id": "example:checkmessage#1",
"method": "checkmessage",
"params": {
"message": "testcase to check new rpc error",
"zbase": "d66bqz3qsku5fxtqsi37j11pci47ydxa95iusphutggz9ezaxt56neh77kxe5hyr41kwgkncgiu94p9ecxiexgpgsz8daoq4tw8kj8yx",
"pubkey": "03be3b0e9992153b1d5a6e1623670b6c3663f72ce6cf2e0dd39c0a373a7de5a3b7"
}
}
response:
{
"pubkey": "03be3b0e9992153b1d5a6e1623670b6c3663f72ce6cf2e0dd39c0a373a7de5a3b7",
"verified": true
}
look at her go, verified: true, we love a confirmed queen πβ¨
Example 2
request:
$ lightning-cli checkmessage -k "message"="this is a test!" "zbase"="d6tqaeuonjhi98mmont9m4wag7gg4krg1f4txonug3h31e9h6p6k6nbwjondnj46dkyausobstnk7fhyy998bhgc1yr98dfmhb4k54d7"
{
"id": "example:checkmessage#2",
"method": "checkmessage",
"params": {
"message": "this is a test!",
"zbase": "d6tqaeuonjhi98mmont9m4wag7gg4krg1f4txonug3h31e9h6p6k6nbwjondnj46dkyausobstnk7fhyy998bhgc1yr98dfmhb4k54d7"
}
}
response:
{
"pubkey": "nodeid010101010101010101010101010101010101010101010101010101010101",
"verified": true
}
see how there's no pubkey in the request? that's the special case in action, she went and found the node herself, main character energy fr fr π΅οΈββοΈπ
and that's the whole page, bestie β go forth and verify some signatures π
this has been Core Lightning v26.06.9, LIGHTNING-CHECKMESSAGE(7) β mwah, catch you in the next manpage πβ¨π«Ά
π¦ 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