Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 872 Bytes

validateaddress.md

File metadata and controls

66 lines (53 loc) · 872 Bytes

validateaddress 方法

验证地址是否是正确的 NEO 地址。

{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": [address],
  "id": 1
}

参数说明

  • address:地址。

调用示例

请求正文:

{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": ["AQVh2pG732YvtNaxEGkQUei3YA4cvo7d2i"],
  "id": 1
}

响应正文:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "address": "AQVh2pG732YvtNaxEGkQUei3YA4cvo7d2i",
        "isvalid": true
    }
}

请求正文:

{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": ["152f1muMCNa7goXYhYAQC61hxEgGacmncB"],
  "id": 1
}

响应正文:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "address": "152f1muMCNa7goXYhYAQC61hxEgGacmncB",
        "isvalid": false
    }
}