1

All the other RPC methods are working for me, except the validate_address one, which always returns an error. I tried both curl (CLI) and PHP, neither of them work, they return the same error:

{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

If anyone can help, it would be much appreciated.

1
  • You'll get better help if you edit your question to include the curl and php code that is failing for you.
    – jtgrassie
    Sep 15 at 4:49

1 Answer 1

0

I'm going to assume you're copying the example from the docs, which has an error in that params should read "params" (quoted).

A corrected and working example looks like:

$ curl localhost:18084/json_rpc -d \
    '{"jsonrpc":"2.0","id":"0","method":"validate_address", "params":{"address":"42go2d3XqA9Mx4HjZoqr93BHspcMxwAUBivs3yJKV1FyTycEcbgjNyEaGNEcgnUE9DDDAXNanzB16YgMt88Sa8cFSm2QcHK","any_net_type":true,"allow_openalias":true}'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "integrated": false,
    "nettype": "mainnet",
    "openalias_address": "",
    "subaddress": false,
    "valid": true
  }
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.