connect method

Future<String> connect(
  1. Map<String, dynamic> request
)

Implementation

Future<String> connect(Map<String, dynamic> request) async {
  _closeGateways();
  final sessionCrypto = SessionCrypto();

  var bridgeUrl = '';
  var universalUrl = BridgeProvider.standartUniversalUrl;

  bridgeUrl = _wallet['bridgeUrl'];
  if (_wallet.containsKey('universalUrl')) {
    universalUrl = _wallet['universalUrl'];
  }
  _gateway = BridgeGateway(
    _storage,
    bridgeUrl,
    sessionCrypto.sessionId,
    _gatewayListener,
    _gatewayErrorsListener,
  );

  await _gateway!.registerSession();

  _session.sessionCrypto = sessionCrypto;
  _session.bridgeUrl = bridgeUrl;

  return _generateUniversalUrl(universalUrl, request);
}