1 | <?php |
||
24 | final class Swarm implements Api |
||
25 | { |
||
26 | /** |
||
27 | * List interface listening addresses. |
||
28 | * |
||
29 | * @Endpoint(name="swarm:addrs:listen") |
||
30 | * |
||
31 | * @return Command |
||
32 | */ |
||
33 | public function addrsListen(): Command |
||
37 | |||
38 | /** |
||
39 | * List local addresses. |
||
40 | * |
||
41 | * @Endpoint(name="swarm:addrs:local") |
||
42 | * |
||
43 | * @param bool $id show peer ID in addresses |
||
44 | * |
||
45 | * @return Command |
||
46 | */ |
||
47 | public function addrsLocal(bool $id = false): Command |
||
51 | |||
52 | /** |
||
53 | * Open connection to a given address. |
||
54 | * |
||
55 | * @Endpoint(name="swarm:connect") |
||
56 | * |
||
57 | * @param string $arg address of peer to connect to |
||
58 | * |
||
59 | * @return Command |
||
60 | */ |
||
61 | public function connect(string $arg): Command |
||
65 | |||
66 | /** |
||
67 | * Close connection to a given address. |
||
68 | * |
||
69 | * @Endpoint(name="swarm:disconnect") |
||
70 | * |
||
71 | * @param string $arg address of peer to disconnect from |
||
72 | * |
||
73 | * @return Command |
||
74 | */ |
||
75 | public function disconnect(string $arg): Command |
||
79 | |||
80 | /** |
||
81 | * Add an address filter. |
||
82 | * |
||
83 | * @Endpoint(name="swarm:filters:add") |
||
84 | * |
||
85 | * @param string $arg multiaddr to filter |
||
86 | * |
||
87 | * @return Command |
||
88 | */ |
||
89 | public function filtersAdd(string $arg): Command |
||
93 | |||
94 | /** |
||
95 | * Remove an address filter. |
||
96 | * |
||
97 | * @Endpoint(name="swarm:filters:rm") |
||
98 | * |
||
99 | * @param string $arg multiaddr filter to remove |
||
100 | * |
||
101 | * @return Command |
||
102 | */ |
||
103 | public function filtersRm(string $arg): Command |
||
107 | |||
108 | /** |
||
109 | * List peers with open connections. |
||
110 | * |
||
111 | * @Endpoint(name="swarm:peers") |
||
112 | * |
||
113 | * @param bool $verbose display all extra information |
||
114 | * @param bool $streams also list information about open streams for each peer |
||
115 | * @param bool $latency also list information about latency to each peer |
||
116 | * |
||
117 | * @return Command |
||
118 | */ |
||
119 | public function peers(bool $verbose = false, bool $streams = false, bool $latency = false): Command |
||
123 | } |
||
124 |