File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,40 @@ $bitcoind = new BitcoinClient([
3434 'ca' => '/etc/ssl/ca-cert.pem' // optional, for use with https scheme
3535]);
3636```
37- Then call methods defined in [ Bitcoin Core API Documentation] ( https://bitcoin.org/en/developer-reference#bitcoin-core-apis ) with magic
37+ Then call methods defined in [ Bitcoin Core API Documentation] ( https://bitcoin.org/en/developer-reference#bitcoin-core-apis ) with magic:
3838``` php
3939$bitcoind->getBlock('000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f');
4040```
41- or as an argument
41+ To send asynchronous request, add Async to method name:
42+ ``` php
43+ $bitcoind->getBlockAsync(
44+ '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
45+ function ($success) {
46+ //
47+ },
48+ function ($exception) {
49+ //
50+ }
51+ );
52+ ```
53+
54+ You can also send requests using request method:
4255``` php
4356$bitcoind->request('getBlock', '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f');
4457```
58+ or requestAsync method for asynchronous calls:
59+ ``` php
60+ $bitcoind->requestAsync(
61+ 'getBlock',
62+ '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
63+ function ($success) {
64+ //
65+ },
66+ function ($exception) {
67+ //
68+ }
69+ );
70+ ```
4571
4672## License
4773
You can’t perform that action at this time.
0 commit comments