signmessage -- Command to create a signature from this node
SYNOPSIS
signmessage message
DESCRIPTION
The signmessage RPC command creates a digital signature of message using this node's secret key. A receiver who knows your node's id and the message can be sure that the resulting signature could only be created by something with access to this node's secret key.
- message (string): Less than 65536 characters long message to be signed by the node.
RETURN VALUE
On success, an object is returned, containing:
- signature (hex) (always 128 characters): The signature.
- recid (hex) (always 2 characters): The recovery id (0, 1, 2 or 3).
- zbase (string): signature and recid encoded in a style compatible with lnd's [SignMessageRequest](https://api.lightning.community/#grpc-request- signmessagerequest).
AUTHOR
Rusty Russell [email protected] is mainly responsible.
SEE ALSO
lightning-checkmessage(7)
RESOURCES
Main web site: https://github.com/ElementsProject/lightning
EXAMPLES
Example 1:
Request:
lightning-cli signmessage -k "message"="this is a test!"{
"id": "example:signmessage#1",
"method": "signmessage",
"params": {
"message": "this is a test!"
}
}Response:
{
"signature": "b313a7ef5cec27f8be4e6389d208a5646ce3fa8fde4c5a2b84cf5d92e2c997f14f1c53fd72897f2025add34939d918a2abd2e2f675c4402b106f7777b364f85b",
"recid": "00",
"zbase": "d63t8j9xmusnx6f6j3tauwoewi1g3a94t9xrastmou8i5rzn3gm9nuahkx6zfnm9ry145w4j88ctteim4mtxc7qreyity55zq63sj6n5"
}Example 2:
Request:
lightning-cli signmessage -k "message"="message for you"{
"id": "example:signmessage#2",
"method": "signmessage",
"params": {
"message": "message for you"
}
}Response:
{
"signature": "a797422126bb3ecee680e2edc8a4c5afc6ebaf2a05a03c37e5ab62214ea5edc05a7db3b45ee8db4c022e6765b7258c82d0c769c8798e0c6baeb94f6fa9275302",
"recid": "01",
"zbase": "rnu3qotbr47u7uzgodtq51fraszhp47xfen4yxbzhsisrekqwzshysu7sq4f74g5jobnh35fsh1a3ysoa7who6cqbti47qkxp6w1qwan"
}