php call to getnewaddress through rpc gives isValid false address

1

I am using easybitcoin.php to make rpc calls to bitcoind running on my server.

When I call $result = $bitcoin->getnewaddress(); from the php code, I get back an address, however when I run that address through:

$result = $bitcoin->validateaddress('mwFXW37HgXTHwtigRyLZDCAohgabswktoF1'); 

The result is always isValid => false

If I create this from command line using bitcoin-cli getnewaddress, then validateaddress returns a json dump, as expected.

Why is the behavior different for both cases?

I am on -regtest and not mainnet.

My worry is that the getnewaddress through rpc is not creating a valid account somehow.

FYI, my wallet is encrypted with a passphrase.

Maninder Mandy Singh

Posted 2017-12-07T15:13:49.270

Reputation: 11

No answers