peers method

Future<List<PeerInfo<H, N>>> peers()

Returns currently connected peers

unsafe: This method is only active with appropriate flags

Implementation

Future<List<PeerInfo<H, N>>> peers() async {
  final response = await _provider.send('system_peers', []);
  return (response.result as List)
      .cast<Map<String, dynamic>>()
      .map((json) => PeerInfo<H, N>.fromJson(json))
      .toList();
}