File tree 1 file changed +28
-2
lines changed
1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,40 @@ $bitcoind = new BitcoinClient([
34
34
'ca' => '/etc/ssl/ca-cert.pem' // optional, for use with https scheme
35
35
]);
36
36
```
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:
38
38
``` php
39
39
$bitcoind->getBlock('000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f');
40
40
```
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:
42
55
``` php
43
56
$bitcoind->request('getBlock', '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f');
44
57
```
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
+ ```
45
71
46
72
## License
47
73
You can’t perform that action at this time.
0 commit comments