Connect
Connect a user's wallet to your game.
Usage
Configuration
walletConnection
Your Wallet Connection configuration, this is an object that can be used with any of the available providers.
provider
Available providers:
WalletProvider.Coinbase
: Coinbase WalletWalletProvider.MetaMask
: MetaMaskWalletProvider.WalletConnect
: WalletConnectWalletProvider.LocalWallet
: Local WalletWalletProvider.SmartWallet
: Smart WalletWalletProvider.Hyperplay
: HyperplayWalletProvider.InAppWallet
: In-App WalletWalletProvider.Rabby
: Rabby
chainId
The ID of the blockchain to switch to upon connection.
Must be a BigInteger
(or int
).
password
Optional password for encrypted Local Wallet account, uses auto-generated password if left empty.
Must be a string
.
Optional email for default In-App Wallet email flow.
Must be a string
.
phoneNumber
Optional phone number for default In-App Wallet phone flow.
Optional email for default In-App Wallet email flow.
Must be a string
.
personalWallet
Admin signer to use with Smart Account as your main provider.
Must be a WalletProvider
.
smartWalletAccountOverride
Optionally choose to connect to a smart account the personal wallet is not an admin of. Useful for advanced session key use cases.
Must be a string
.
authOptions
In-App Wallet Authentication Options.
Must be an AuthOptions
object.
Return Value
Returns a string
representing the connected wallet address with a valid checksum.