denpamusic / php-bitcoinrpc

Fully unit-tested Bitcoin JSON-RPC client based on GuzzleHttp.
MIT License
282 stars 100 forks source link

ListTransactions #51

Closed old-mikser closed 5 years ago

old-mikser commented 5 years ago

Fatal error: Uncaught Denpa\Bitcoin\Exceptions\BadRemoteCallException: Method not found in /var/www/html/bot/vendor/denpa/php-bitcoinrpc/src/Exceptions/Handler.php:70 Stack trace: #0 /var/www/html/bot/vendor/denpa/php-bitcoinrpc/src/Exceptions/Handler.php(107): Denpa\Bitcoin\Exceptions\Handler->requestExceptionHandler(Object(GuzzleHttp\Exception\ClientException)) #1 /var/www/html/bot/vendor/denpa/php-bitcoinrpc/src/Client.php(161): Denpa\Bitcoin\Exceptions\Handler->handle(Object(GuzzleHttp\Exception\ClientException)) #2 /var/www/html/bot/vendor/denpa/php-bitcoinrpc/src/Client.php(227): Denpa\Bitcoin\Client->request('listransactions') #3 /var/www/html/bot/index.php(19): Denpa\Bitcoin\Client->__call('listransactions', Array) #4 {main} thrown in /var/www/html/bot/vendor/denpa/php-bitcoinrpc/src/Exceptions/Handler.php on line 70

This is what I'm getting trying to run $bitcoind->listransactions(); Tried to use parameters like $bitcoind->listransactions('*',10); etc - got the same.

You referred to https://bitcoin.org/en/developer-reference#bitcoin-core-apis in the description. Are there any other functions which are not working?

Cryptocurrency

Environment

denpamusic commented 5 years ago

Hi, Every function is working fine, since this is simple client. You just have a typo in function name. It should be listtransactions (note double letter 't') instead of listransactions that you're trying to call. See function description.

denpamusic commented 5 years ago

In order to avoid such typos in the future, I suggest, that you write method names in camel-case (i. e. $bitcoind->listTransactions()). It's a lot easier to spot typos this way.

old-mikser commented 5 years ago

Damn, I'm so embarrassed. I apologize for disturbing.

Thanks for help!

denpamusic commented 5 years ago

No problem, it happens even to the best of us. Glad that I've been able to help.