1 | <?php |
||
19 | class ElectrumServer |
||
20 | { |
||
21 | /** |
||
22 | * @var Client |
||
23 | */ |
||
24 | private $client; |
||
25 | |||
26 | /** |
||
27 | * @var Math |
||
28 | */ |
||
29 | private $math; |
||
30 | |||
31 | /** |
||
32 | * @param Math $math |
||
33 | * @param Client $client |
||
34 | */ |
||
35 | 48 | public function __construct(Math $math, Client $client) |
|
40 | |||
41 | /** |
||
42 | * @param TransactionInterface $transaction |
||
43 | * @return \React\Promise\Promise |
||
44 | */ |
||
45 | 6 | public function transactionBroadcast(TransactionInterface $transaction) |
|
49 | |||
50 | /** |
||
51 | * @param $txid |
||
52 | * @return \React\Promise\Promise |
||
53 | */ |
||
54 | 6 | public function transactionGet($txid) |
|
61 | |||
62 | /** |
||
63 | * @param string $txid |
||
64 | * @param int $height |
||
65 | * @return \React\Promise\Promise |
||
66 | */ |
||
67 | 6 | public function transactionGetMerkle($txid, $height) |
|
71 | |||
72 | /** |
||
73 | * @param AddressInterface $address |
||
74 | * @param NetworkInterface $network |
||
75 | * @return \React\Promise\Promise |
||
76 | */ |
||
77 | public function addressGetHistory(AddressInterface $address, NetworkInterface $network = null) |
||
81 | |||
82 | /** |
||
83 | * @param AddressInterface $address |
||
84 | * @param NetworkInterface $network |
||
85 | * @return \React\Promise\Promise |
||
86 | */ |
||
87 | 6 | public function addressGetBalance(AddressInterface $address, NetworkInterface $network = null) |
|
91 | |||
92 | /** |
||
93 | * @param AddressInterface $address |
||
94 | * @param NetworkInterface $network |
||
95 | * @return \React\Promise\Promise |
||
96 | */ |
||
97 | public function addressGetProof(AddressInterface $address, NetworkInterface $network = null) |
||
101 | |||
102 | /** |
||
103 | * @param AddressInterface $address |
||
104 | * @param NetworkInterface $network |
||
105 | * @return \React\Promise\Promise |
||
106 | */ |
||
107 | 6 | public function addressListUnspent(AddressInterface $address, NetworkInterface $network = null) |
|
128 | |||
129 | /** |
||
130 | * @param string $txid |
||
131 | * @param int|string $vout |
||
132 | * @return \React\Promise\Promise |
||
133 | */ |
||
134 | 6 | public function utxoGetAddress($txid, $vout) |
|
138 | |||
139 | /** |
||
140 | * @param $height |
||
141 | * @return \React\Promise\Promise |
||
142 | */ |
||
143 | 6 | public function blockGetHeader($height) |
|
158 | |||
159 | /** |
||
160 | * @param int $height |
||
161 | * @return \React\Promise\Promise |
||
162 | */ |
||
163 | public function blockGetChunk($height) |
||
167 | } |
||
168 |