connect method

Future<bool> connect()

Implementation

Future<bool> connect() async {
  bool result = false;
  try {
    info = await _relayInfoProvider.get(url);

    // Relay must support NIP-15 and NIP-20
    if (info.nips.contains(15) && info.nips.contains(20)) {
      await _ws.connect();
      result = true;
    }
  } catch (e) {
    log(e.toString());
  }
  return result;
}