I am attempting to use a PHP RPC Wrapper to connect to bitcoind for RPC API calls, estimatesmartfee, more specifically.
My question is, do I need to specify the argument keys, or just the values?
For example, the below is with just the values
public function getSmartFeeEstimate($blocks)
{
$command = new \Nbobtc\Command\Command('estimatesmartfee', [$blocks, 'CONSERVATIVE']);
$response = $this->client->sendCommand($command);
$contents = $response->getBody()->getContents();
return $contents;
}
or do I need to specify the keys as well, for example...
public function getSmartFeeEstimate($blocks)
{
$command = new \Nbobtc\Command\Command('estimatesmartfee', ['conf_target' => $blocks, 'estimate_mode' => 'CONSERVATIVE']);
$response = $this->client->sendCommand($command);
$contents = $response->getBody()->getContents();
return $contents;
}
Normally I would just try each one and see what the functions return, however, I am in regtest mode, and its returning the same thing for both, which leads me to believe that it's ignoring the arguments and just telling me its not working...
{"result":{"errors":["Insufficient data or no feerate found"],"blocks":2},"error":null,"id":null}