connect method

Future<String> connect(
  1. dynamic wallet, [
  2. dynamic request
])

Generates universal link for an external wallet and subscribes to the wallet's bridge, or sends connect request to the injected wallet.

Implementation

Future<String> connect(dynamic wallet, [dynamic request]) async {
  if (connected) {
    throw WalletAlreadyConnectedError(null);
  }

  if (provider != null) {
    provider!.closeConnection();
  }

  provider = _createProvider(wallet);

  return await provider!.connect(_createConnectRequest(request));
}