"title":"Command to check if a signature is from a node",
"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."
],
"request":{
"required":[
"message",
"zbase"
],
"properties":{
"message":{
"type":"string",
"description":[
"Message to be checked against the signature."
]
},
"zbase":{
"type":"string",
"description":[
"The Zbase32 encoded signature to verify."
]
},
"pubkey":{
"type":"pubkey",
"description":[
"The Zbase32 encoded signature to verify."
]
}
}
},
"response":{
"required":[
"verified",
"pubkey"
],
"properties":{
"verified":{
"type":"boolean",
"enum":[
true
],
"description":[
"Whether the signature was valid."
]
},
"pubkey":{
"type":"pubkey",
"description":[
"The *pubkey* parameter, or the pubkey found by looking for known nodes."