addReservedPeer method

Future<String?> addReservedPeer(
  1. String peer
)

Adds a reserved peer. Returns the empty string or an error. The string parameter should encode a p2p multiaddr.

/ip4/198.51.100.19/tcp/30333/p2p/QmSk5HQbn6LhUwDiNMseVUjuRYhEtYj4aUZ6WfWoGURpdV is an example of a valid, passing multiaddr with PeerId attached.

unsafe: This method is only active with appropriate flags

Implementation

Future<String?> addReservedPeer(String peer) async {
  final response = await _provider.send('system_addReservedPeer', [peer]);
  return response.result as String?;
}