-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathValidators.php
More file actions
58 lines (52 loc) · 1.13 KB
/
Validators.php
File metadata and controls
58 lines (52 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
declare(strict_types=1);
namespace ArkEcosystem\Client\API;
class Validators extends AbstractAPI
{
/**
* Get all accounts.
*
* @param array $query
*
* @return array
*/
public function all(array $query = []): ?array
{
return $this->requestGet('validators', $query);
}
/**
* Get a block by the given id.
*
* @param string $id
*
* @return array
*/
public function get(string $id): ?array
{
return $this->requestGet("validators/{$id}");
}
/**
* Get all blocks for the given validator.
*
* @param string $id
* @param array $query
*
* @return array
*/
public function blocks(string $id, array $query = []): ?array
{
return $this->requestGet("validators/{$id}/blocks", $query);
}
/**
* Get all voters for the given validator.
*
* @param string $id
* @param array $query
*
* @return array
*/
public function voters(string $id, array $query = []): ?array
{
return $this->requestGet("validators/{$id}/voters", $query);
}
}