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. Commented Sep 15, 2022 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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.