WalletConnectionOption

Generic type for getting the type of object that the wallet.connect method takes as the first argument.

type WalletConnectionOption<T extends WalletId> =
T extends "walletConnect"
? StandaloneWCConnectOptions
: T extends "smart"
: T extends "inApp" | "embedded"
: T extends typeof COINBASE
?
| InjectedConnectOptions
? InjectedConnectOptions | WCConnectOptions
? InjectedConnectOptions
: T extends EcosystemWalletId
? EcosystemWalletConnectionOptions

Example

type X = WalletConnectionOption<"io.metamask">;