denpamusic / php-bitcoinrpc

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

Batch support #49

Closed theflu closed 5 years ago

theflu commented 5 years ago

Is there support for batch requests? I could not find any info about it.

It would be nice if we could do something like this:

$block = $bitcoind->getBlockHash([100, 101]');

and

$block = $bitcoind->getBlock(['000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, '00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048']');
theflu commented 5 years ago

Batch support was added to Bitcoin Core 0.7.0

Here is the spec: https://www.jsonrpc.org/specification#batch

denpamusic commented 5 years ago

Currently not, but there will be support for batch requests in both sync and async modes in version 2.2. It should hopefully come out before the end of the month.