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.

jtgrassie
  • 19,111
  • 4
  • 14
  • 51
Main USSE
  • 13
  • 2
  • 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 '22 at 04:49

1 Answers1

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
  }
}
jtgrassie
  • 19,111
  • 4
  • 14
  • 51