verifymessage - Dogecoin
This method verifies a signed message.
- Returns
trueif the signature is valid for the address and message. - Returns
falseif the signature is invalid. - Does not require the private key (public verification only).
- Compatible with signatures from
signmessage.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | Yes | The Dogecoin address that signed the message. |
| signature | string | Yes | The base64-encoded signature. |
| message | string | Yes | The original message that was signed. |
Request
cURL
bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "verifymessage",
"params": ["DLGbK6mCjBT67r8wjJqCg8hkFiBYV5JquH", "H1b2c3d4e5f6g7h8i9j0...", "Hello, Dogecoin!"],
"id": "getblock.io"
}'verifymessage.js
javascriptconst axios = require('axios');
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "verifymessage",
"params": ["DLGbK6mCjBT67r8wjJqCg8hkFiBYV5JquH", "H1b2c3d4e5f6g7h8i9j0...", "Hello, Dogecoin!"],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));verifymessage.py
pythonimport requests
import json
url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
payload = json.dumps({
"jsonrpc": "2.0",
"method": "verifymessage",
"params": ["DLGbK6mCjBT67r8wjJqCg8hkFiBYV5JquH", "H1b2c3d4e5f6g7h8i9j0...", "Hello, Dogecoin!"],
"id": "getblock.io"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)verifymessage.rs
rustuse reqwest::header;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::new();
let response = client
.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
.header(header::CONTENT_TYPE, "application/json")
.body(r#"{
"jsonrpc": "2.0",
"method": "verifymessage",
"params": ["DLGbK6mCjBT67r8wjJqCg8hkFiBYV5JquH", "signature", "Hello, Dogecoin!"],
"id": "getblock.io"
}"#)
.send()
.await?;
println!("{}", response.text().await?);
Ok(())
}Response
response.json
json{
"result": true,
"error": null,
"id": "getblock.io"
}Response Parameters
| Field | Type | Description |
|---|---|---|
| result | boolean | True if signature is valid, false otherwise. |
| error | null | Error object (null if no error). |
| id | string | Request identifier. |
Use Case
The verifymessage method is essential for:
- Verifying address ownership proofs
- Authentication validation
- Signature verification
- Trust verification systems
- Proof of identity checks
Error Handling
| Error Code | Message | Cause |
|---|---|---|
| -3 | Invalid address | Invalid Dogecoin address. |
| -5 | Malformed signature | Invalid base64 signature. |
| 403 | Forbidden | Missing or invalid ACCESS-TOKEN. |