Verify Message
API-v2verify_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.
Parameter* = required | Type | 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. |
Parameter* = required | Type | Description |
---|---|---|
is_valid* | boolean | true if the message signature is valid; false if it is not. |
Verify Message
POST
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"
}
}
{
"mmrpc": "2.0",
"result": {
"is_valid": true
},
"id": 0
}
{
"mmrpc": "2.0",
"result": {
"is_valid": false
},
"id": 0
}
Parameter* = required | Type | Description |
---|---|---|
AddressDecodingError | string | Optional. Given address could not be decoded |
CoinIsNotFound | string | Optional. Specified coin is not found |
InternalError | string | Optional. An internal error occurred during the verification process |
InvalidRequest | string | Optional. Message verification is not supported by the given coin type |
PrefixNotFound | string | Optional. sign_message_prefix is not set in coin config |
SignatureDecodingError | string | Optional. Given signature could not be decoded |
{
"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
}
{
"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
}
{
"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
}