GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LIGHTNING-CHECKMESSAGE(7) LIGHTNING-CHECKMESSAGE(7)

lightning-checkmessage -- Command to check if a signature is from a node

checkmessage message zbase [pubkey]

The checkmessage RPC command is the counterpart to signmessage: given a node id (pubkey), signature (zbase) and a message, it verifies that the signature was generated by that node for that message (more technically: by someone who knows that node's secret).

As a special case, 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. Note: this is implemented far more efficiently than trying each one, so performance is not a concern.

  • message (string): Message to be checked against the signature.

  • zbase (string): The Zbase32 encoded signature to verify.

  • pubkey (pubkey, optional): The Zbase32 encoded signature to verify.

On success, an object is returned, containing:

  • verified (boolean) (always true): Whether the signature was valid.

  • pubkey (pubkey): The pubkey parameter, or the pubkey found by looking for known nodes.

On failure, an error is returned and core lightning exit with the following error code:

  • -32602: Parameter missed or malformed;

  • 1301: pubkey not found in the graph.

Rusty Russell <rusty@rustcorp.com.au> is mainly responsible.

lightning-signmessage(7)

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

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 }

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 }
Core Lightning v25.02.2

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.