connect method

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

Implementation

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

  String bridgeUrl = _wallet?.bridgeUrl ?? '';
  String universalUrl = _wallet?.universalUrl ?? BridgeProvider.standartUniversalUrl;

  _gateway = BridgeGateway(
    _storage,
    bridgeUrl,
    sessionCrypto.sessionId,
    _gatewayListener,
    _gatewayErrorsListener,
  );

  await _gateway!.registerSession();

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

  return _generateUniversalUrl(universalUrl, request);
}