* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace IPFS\Api; use IPFS\Annotation\Api as Endpoint; use IPFS\Command\Command; /** * @author Robert Schönthal * @autogenerated * @codeCoverageIgnore */ final class Swarm implements Api { /** * List interface listening addresses. * * @Endpoint(name="swarm:addrs:listen") * * @return Command */ public function addrsListen(): Command { return new Command(__METHOD__, get_defined_vars()); } /** * List local addresses. * * @Endpoint(name="swarm:addrs:local") * * @param bool $id show peer ID in addresses * * @return Command */ public function addrsLocal(bool $id = false): Command { return new Command(__METHOD__, get_defined_vars()); } /** * Open connection to a given address. * * @Endpoint(name="swarm:connect") * * @param string $arg address of peer to connect to * * @return Command */ public function connect(string $arg): Command { return new Command(__METHOD__, get_defined_vars()); } /** * Close connection to a given address. * * @Endpoint(name="swarm:disconnect") * * @param string $arg address of peer to disconnect from * * @return Command */ public function disconnect(string $arg): Command { return new Command(__METHOD__, get_defined_vars()); } /** * Add an address filter. * * @Endpoint(name="swarm:filters:add") * * @param string $arg multiaddr to filter * * @return Command */ public function filtersAdd(string $arg): Command { return new Command(__METHOD__, get_defined_vars()); } /** * Remove an address filter. * * @Endpoint(name="swarm:filters:rm") * * @param string $arg multiaddr filter to remove * * @return Command */ public function filtersRm(string $arg): Command { return new Command(__METHOD__, get_defined_vars()); } /** * List peers with open connections. * * @Endpoint(name="swarm:peers") * * @param bool $verbose display all extra information * @param bool $streams also list information about open streams for each peer * @param bool $latency also list information about latency to each peer * * @return Command */ public function peers(bool $verbose = false, bool $streams = false, bool $latency = false): Command { return new Command(__METHOD__, get_defined_vars()); } }