connect method

Future<String> connect(
  1. WalletApp 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(WalletApp wallet, [dynamic request]) async {
  if (connected) {
    throw WalletAlreadyConnectedError(null);
  }

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

  provider = _createProvider(wallet);

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