core-lightning/doc/lightning-checkmessage.7.md
Rusty Russell eb6b8551d4 tools/fromschema.py: don't try to handle more complex cases.
We only handle top-level objects with an array of objects:
make sure it is one before we call the routines.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-01-30 15:15:41 -06:00

1.5 KiB

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

SYNOPSIS

checkmessage message zbase [pubkey]

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.

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.

RETURN VALUE

On success, an object is returned, containing:

  • verified (boolean): whether the signature was valid (always true)
  • pubkey (pubkey): the pubkey parameter, or the pubkey found by looking for known nodes

AUTHOR

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

SEE ALSO

lightning-signmessage(7)

RESOURCES

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