- Connect any wallet by its wallet options catalogue key In this case, the SDK selects an installed provider, a URI pairing, or the wallet’s in-app browser. The connected wallet account is unverified until you complete the verification step.
- Connect and verify in a single SDK call In this case, the wallet account is only added to the wallet accounts list once it passes the verification step.
- Connect without verifying In this case, the wallet account is added to the wallet accounts list as soon as the user accepts the connection, but it will only be persisted in the local session and not associated to a Dynamic user.
-
Verify a wallet account that has been connected but not verified before
In this case, the wallet account remains in the wallet accounts list, no matter if the verification step is successful or not.
The difference is that the wallet account will have a new
verifiedCredentialIdproperty, be persisted in the Dynamic server and associated to a Dynamic user.
1. Connect any wallet by catalogue key
UseconnectWalletOption when you have a wallet options catalogue key, such as 'metamask', instead of a wallet provider key. The SDK selects the connection path that the wallet supports on the user’s device:
- An installed wallet provider when the user has the wallet.
- A URI pairing through WalletConnect or the MetaMask SDK, handed to
onConnectionUri. - The wallet’s own in-app browser through
handleWalletBrowserRedirect.
verifyWalletAccount in section 4 to link it to the user. See Connect a wallet by catalogue key for the full reference.
- JavaScript
- React
2. Connect and verify a wallet in a single SDK call
On mobile,
connectAndVerifyWithWalletProvider throws a DeeplinkConnectAndVerifyUnsupportedError
for deep link wallet providers (e.g. Phantom redirect). This is because it triggers two sequential
deep links and iOS will not honor the second one. Use options 3 and 4 below to connect and verify
separately. See the Phantom Redirect Extension docs
for a full example.- JavaScript
- React
3. Connect a wallet without verifying it
- JavaScript
- React
4. Verify a connected wallet account
You can use this function to verify a wallet account that was connected but not verified before.- JavaScript
- React
Hardware wallet connections
BothconnectWithWalletProvider and connectAndVerifyWithWalletProvider accept an optional
hardwareWalletVendor parameter to connect via a hardware wallet (e.g., Ledger) through a
compatible software wallet:
Related functions
connectWalletOptionis the entry point when you have a wallet catalogue key rather than a wallet provider key.- Getting Wallet Accounts
- Adding EVM Extensions
- Adding Solana Extensions
- Wallet Provider Events
- Hardware Wallet Support