Verify Message
verify_message
The verify_message method allows you to confirm the authenticity of a signed message. By using the original message, the wallet’s address, and the signature, the verification process can confirm that the message was created by the owner and that it has not been altered.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | ✓ | The address used to sign the message. |
| coin | string | ✓ | The coin to verify the message with. |
| message | string | ✓ | The message input via the sign_message method. |
| signature | string | ✓ | The signature generated for the message. |
Response Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| is_valid | boolean | ✓ | true if the message signature is valid; false if it is not. |
📌 Examples
POST Verify Message
verify_message {
"userpass": "RPC_UserP@SSW0RD",
"method": "verify_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion",
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=",
"address": "RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"
}
} curl --url "http://127.0.0.1:7783" --data '{
"userpass": "RPC_UserP@SSW0RD",
"method": "verify_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion",
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=",
"address": "RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"
}
}' import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "verify_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion",
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=",
"address": "RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2)) const payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "verify_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion",
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=",
"address": "RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json()); <?php
$payload = <<<'JSON'
{
"userpass": "RPC_UserP@SSW0RD",
"method": "verify_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion",
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=",
"address": "RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response; package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"userpass":"RPC_UserP@SSW0RD","method":"verify_message","mmrpc":"2.0","id":0,"params":{"coin":"DOC","message":"Between subtle shading and the absence of light lies the nuance illusion","signature":"H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=","address":"RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
} require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"userpass": "RPC_UserP@SSW0RD",
"method": "verify_message",
"mmrpc": "2.0",
"id": 0,
"params": {
"coin": "DOC",
"message": "Between subtle shading and the absence of light lies the nuance illusion",
"signature": "H43eTmJxBKEPiHkrCe/8NsRidkKCIkXDxLyp30Ez/RwoApGdg89Hlvj9mTMSPGp8om5297zvdL8EVx3IdIe2swY=",
"address": "RUYJYSTuCKm9gouWzQN1LirHFEYThwzA2d"
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body)) Show Verify Message Response
Response (valid)
{
"mmrpc": "2.0",
"result": {
"is_valid": true
},
"id": 0
}Response (not valid)
{
"mmrpc": "2.0",
"result": {
"is_valid": false
},
"id": 0
} Error Types
| Parameter | Type | Required | Description |
|---|---|---|---|
| PrefixNotFound | string | – | sign_message_prefix is not set in coin config |
| CoinIsNotFound | string | – | Specified coin is not found |
| InvalidRequest | string | – | Message verification is not supported by the given coin type |
| InternalError | string | – | An internal error occurred during the verification process |
| SignatureDecodingError | string | – | Given signature could not be decoded |
| AddressDecodingError | string | – | Given address could not be decoded |
Show Error Responses
⚠️ Error Responses
PrefixNotFound
{
"mmrpc": "2.0",
"error": "sign_message_prefix is not set in coin config",
"error_path": "eth",
"error_trace": "eth:2332]",
"error_type": "PrefixNotFound",
"id": null
}InternalError
{
"mmrpc": "2.0",
"error": "Internal error: No such coin: as",
"error_path": "lp_coins",
"error_trace": "lp_coins:5122] lp_coins:5034]",
"error_type": "InternalError",
"error_data": "No such coin: SHEKEL",
"id": null
}SignatureDecodingError
{
"mmrpc": "2.0",
"error": "Signature decoding error: Invalid last symbol 100, offset 86.",
"error_path": "utxo_common",
"error_trace": "utxo_common:2803]",
"error_type": "SignatureDecodingError",
"error_data": "Invalid last symbol 100, offset 86.",
"id": null
}