validateaddress
validateaddress coin address
The validateaddress method checks if an input string is a valid address of the specified coin.
| Structure | Type | Description |
|---|---|---|
| coin | string | the coin to validate address for |
| address | string | the input string to validate |
| Structure | Type | Description |
|---|---|---|
| is_valid | bool | Whether input string is a valid coin address. |
| reason | string (optional) | Only present if not valid. The reason why input string is not a valid address. |
POST
validateaddress{
"userpass": "RPC_UserP@SSW0RD",
"method": "validateaddress",
"coin": "DOC",
"address": "RRnMcSeKiLrNdbp91qNVQwwXx5azD4S4CD"
}
{
"result": {
"is_valid": true
}
}
{
"result": {
"is_valid": false,
"reason": "utxo:415] Checksum verification failed"
}
}
{
"result": {
"is_valid": false,
"reason": "eth:360] eth:2522] Invalid address checksum"
}
}