For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.
Triggered when an embedded wallet’s private key or recovery phrase is successfully revealed and the user has acknowledged it
embeddedWalletRevealFailure
error: unknown
Triggered when an embedded wallet’s private key or recovery phrase reveal fails
primaryWalletChanged
newPrimaryWallet: Wallet
Triggered whenever the primary wallet changes
primaryWalletNetworkChanged
newNetwork: number | string
Triggered whenever the primary wallet network changes
userWalletsChanged
params: UserWalletsChangedParams
Triggered whenever a wallet is added or removed from the user profile, the primary wallet changes to another one, the primary wallet network changes or a non-primary wallet network changes
walletConnectionQrCodeReady
qrCodeUri: string
Triggered when the QR code is ready to be scanned for wallet connection (mainly used for WalletConnect wallets or MetaMask mobile)
OTP related events
Event
Arguments
Description
emailVerificationResult
param: boolean, email: string
Triggered when the email verification result is received
smsVerificationResult
param: boolean, phone: string
Triggered when the sms verification result is received
mfaCompletionFailure
args: { error: unknown }
Emitted when there is an error verifiyng the MFA challenge
mfaCompletionSuccess
args: { mfaToken?: string }
Emitted when the user succesfully completes an MFA challenge