Setup
1
Create and Initialize the Dynamic Client
First, install the client package and create a Dynamic Client with your environment ID.See Creating a Dynamic Client for more details.
2
Add Chain Extensions
Install and add the extensions for the chains you want to support. Each extension enables support for wallets on that chain.For EVM wallets (Ethereum, Polygon, etc.):See Adding EVM Extensions for more options.For Solana wallets:See Adding Solana Extensions for more options.
3
Enable Chains in the Dashboard
Enable the chains you want to support in the Dynamic dashboard:
Fetch Available Wallets
UsegetAvailableWalletProvidersData to get a list of wallet providers the user can connect to. Each chain and wallet combination is treated as a separate provider (e.g., metamaskevm, metamasksol, phantomevm, phantomsol).
Display a Wallet Icon
Each wallet provider includes metadata with its display name and icon. Use this to build your wallet selection UI.Connect to a Wallet
The JS SDK provides three connection methods depending on when you want verification to occur.1. Connect and verify in one step
The wallet account is only added after a successful verification signature. Use this for login/signup flows.2. Connect without verifying
The wallet account is added to the session but not yet associated to a Dynamic user. Use this to defer verification.3. Verify a previously connected account
Verify a wallet that was connected but not yet verified. This associates it with a Dynamic user.Get Connected Wallet Accounts
Retrieve all connected wallet accounts usinggetWalletAccounts.