Create and Initialize the Dynamic Client
First, install the client package and create a Dynamic Client with your environment ID.Add chain extensions for every chain you want to support
Install and add the extension for each chain you want in your adaptor. Each guide covers installation and how to add that chain’s extension.
The list from
getAvailableWalletProvidersData() (below) includes every wallet provider from every extension you added.
Enable those chains in the developer console
In the Dynamic developer console, enable each chain you added an extension for (e.g. EVM, Solana, Bitcoin). Available options match the chain extensions above.Fetch available wallet providers (your adaptor’s options)
UsegetAvailableWalletProvidersData to get the full list of wallet providers your adaptor can offer. It includes every chain–wallet combination from the extensions you added (e.g. metamaskevm, metamasksol, phantomevm, phantomsol).
- JavaScript
- React
Which wallets you can surface depends on the extensions you add to the client.
Add
addMetaMaskEvmExtension or addMetaMaskSolanaExtension for MetaMask SDK
pairing (desktop QR and mobile), and addWalletConnectEvmExtension or
addWalletConnectSolanaExtension for WalletConnect pairing with other mobile
wallets. See Adding extensions.Display wallet options in your UI
Each wallet provider includes metadata (display name, icon). Use it to build your wallet selection UI (buttons, list, or modal).- JavaScript
- React
Connect and verify
When the user picks a wallet from your adaptor UI, use the catalogue-key path for any wallet or one of the provider-key flows below for an installed wallet provider.Connect any wallet by catalogue key
UseconnectWalletOption when you have a wallet options catalogue key, such as 'metamask', instead of a wallet provider key. It can connect wallets the user does not have installed by handing a URI pairing to onConnectionUri, or by opening the wallet’s own in-app browser.
The function returns an unverified wallet account. Pair it with verifyWalletAccount, the verify flow below, to link the account to the user. See Connect a wallet by catalogue key for the full reference.
- JavaScript
- React
1. Connect and verify in one step
The wallet account is only added after a successful verification signature. Use this for login/signup flows.- JavaScript
- React
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.- JavaScript
- React
3. Verify a previously connected account
Verify a wallet that was connected but not yet verified. This associates it with a Dynamic user.- JavaScript
- React
Get all connected wallet accounts
Retrieve every wallet account the user has connected (across all chains) usinggetWalletAccounts.
- JavaScript
- React