2021-02-07 17:20:23 +01:00
|
|
|
lightning-checkmessage -- Command to check if a signature is from a node
|
2019-10-13 07:19:37 +02:00
|
|
|
=====================================================================
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
|
2022-01-26 18:18:49 +01:00
|
|
|
**checkmessage** *message* *zbase* [*pubkey*]
|
2019-10-13 07:19:37 +02:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2022-05-24 10:17:27 +02:00
|
|
|
On failure, an error is returned and core lightning exit with the following error code:
|
2023-10-14 10:09:05 +02:00
|
|
|
|
2022-05-24 10:17:27 +02:00
|
|
|
- -32602: Parameter missed or malformed;
|
|
|
|
- 1301: *pubkey* not found in the graph.
|
|
|
|
|
2019-10-13 07:19:37 +02:00
|
|
|
RETURN VALUE
|
|
|
|
------------
|
|
|
|
|
2021-06-16 03:12:17 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-START)
|
|
|
|
On success, an object is returned, containing:
|
2022-09-05 23:33:09 +02:00
|
|
|
|
2022-07-12 11:55:02 +02:00
|
|
|
- **verified** (boolean): whether the signature was valid (always *true*)
|
|
|
|
- **pubkey** (pubkey): the *pubkey* parameter, or the pubkey found by looking for known nodes
|
2021-09-03 12:07:59 +02:00
|
|
|
|
2021-06-16 03:12:17 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-END)
|
2019-10-13 07:19:37 +02:00
|
|
|
|
|
|
|
AUTHOR
|
|
|
|
------
|
|
|
|
|
|
|
|
Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible.
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
|
|
|
|
lightning-signmessage(7)
|
|
|
|
|
|
|
|
RESOURCES
|
|
|
|
---------
|
|
|
|
|
|
|
|
Main web site: <https://github.com/ElementsProject/lightning>
|
2020-08-25 03:33:16 +02:00
|
|
|
|
2023-01-30 07:24:16 +01:00
|
|
|
[comment]: # ( SHA256STAMP:4a7c148e1b7f321a7710f540de2d8418850f1a6269badab8cbe47545c41f4d01)
|