@@ -49,6 +49,6 @@ |
||
49 | 49 | */ |
50 | 50 | public function toRequest() |
51 | 51 | { |
52 | - return new Request(null, ElectrumClient::ADDRESS_SUBSCRIBE, [$this->address, $this->txid]); |
|
52 | + return new Request(null, ElectrumClient::ADDRESS_SUBSCRIBE, [ $this->address, $this->txid ]); |
|
53 | 53 | } |
54 | 54 | } |
@@ -154,6 +154,6 @@ |
||
154 | 154 | */ |
155 | 155 | public function toRequest() |
156 | 156 | { |
157 | - return new Request(null, MiningClient::MINING_SUBSCRIBE, [$this->job_id, $this->prevhash, $this->coinb1, $this->coinb2, $this->merkle_branch, $this->version, $this->nbits, $this->ntime, $this->clean_jobs]); |
|
157 | + return new Request(null, MiningClient::MINING_SUBSCRIBE, [ $this->job_id, $this->prevhash, $this->coinb1, $this->coinb2, $this->merkle_branch, $this->version, $this->nbits, $this->ntime, $this->clean_jobs ]); |
|
158 | 158 | } |
159 | 159 | } |
@@ -34,6 +34,6 @@ |
||
34 | 34 | */ |
35 | 35 | public function toRequest() |
36 | 36 | { |
37 | - return new Request(null, MiningClient::SET_DIFFICULTY, [$this->difficulty]); |
|
37 | + return new Request(null, MiningClient::SET_DIFFICULTY, [ $this->difficulty ]); |
|
38 | 38 | } |
39 | 39 | } |
@@ -21,17 +21,17 @@ |
||
21 | 21 | $clientFactory = new Factory($loop, $connector, $requestFactory); |
22 | 22 | $stratum = $clientFactory->create($host, $port); |
23 | 23 | |
24 | -$v = $stratum->request('server.version', ['1.9.7', ' 0.6'])->then(function (Response $r) { |
|
25 | - echo "Server version: " . $r->getResult() . "\n"; |
|
24 | +$v = $stratum->request('server.version', [ '1.9.7', ' 0.6' ])->then(function(Response $r) { |
|
25 | + echo "Server version: ".$r->getResult()."\n"; |
|
26 | 26 | }); |
27 | 27 | |
28 | 28 | // Make the query, receive a Promise |
29 | -$t = $stratum->request('blockchain.address.get_balance', ['1NfcqVqW4f6tACwaqjyKXRV75aqt3VEVPE']); |
|
30 | -$t->then(function (Response $response) { |
|
29 | +$t = $stratum->request('blockchain.address.get_balance', [ '1NfcqVqW4f6tACwaqjyKXRV75aqt3VEVPE' ]); |
|
30 | +$t->then(function(Response $response) { |
|
31 | 31 | var_dump($response); |
32 | -}, function (\BitWasp\Stratum\Exceptions\ApiError $error) { |
|
32 | +}, function(\BitWasp\Stratum\Exceptions\ApiError $error) { |
|
33 | 33 | echo sprintf(" [id: %s] error: %s", $error->getId(), $error->getMessage()); |
34 | -}, function () { |
|
34 | +}, function() { |
|
35 | 35 | |
36 | 36 | }); |
37 | 37 |