Supported Frameworks

The SDK supports React (v17 and above) and NextJS (v12 and above). To get going quickly, see the Quick Start guide.

Components

DynamicContextProvider settings: Settings available when you first initialize DynamicContextProvider in your App.

DynamicConnectButton: A standalone button to handle connecting wallets without being coupled to the main Dynamic widget.

DynamicUserProfile: Responsible for displaying the dialog or dropdown of the user’s profile information, connected wallets, and more.

DynamicWidgetNav: Responsible for rendering the network picker and the connected account field.

DynamicWidget: A widget that combines the Connect Button, User Profile and the Nav.

Hooks

useDynamicContext: Dynamic’s React Context which is initially set via DynamicContextProvider

useWalletItemActions: Set of utility functions to sign with a specific wallet.

useAuthenticateConnectedUser: Can be used to authenticate already connected user

useDynamicScopes: Check if user has specific scope set using our Access List scopes or NFT/Token gating.

useUserUpdateRequest: Update user profile information in your application.

useEmailVerificationRequest: Handle email verification and securely update user profiles.

useSendBalance: Request Send Balance UI and optionally prepopulate the form for the user.

useSocialAccounts: Trigger social account linking and unlinking for the authenticated user.

Utilities

getAuthToken: Used to get a JWT token generated by Dynamic which is stored inside of localStorage

getNetwork: Used to find the current network used by a wallet. It receives the wallet connector and returns a promise that will resolve with the network.

Callbacks

onAuthFlowClose: Called after the auth flow modal is closed.

onAuthFlowOpen: Called after the auth flow modal is opened.

onAuthSuccess: Called after the user successfully authenticates.

onLinkSuccess: Called when the user successfully links a wallet.

onLogout: Called after the user logs out.

onUnLinkSuccess: Called when the user successfully unlinks a wallet.

onBeforeConnectSuccessConfirmation: Callback that runs before Dynamic establishes a wallet connection.

onconnectsuccess: Called when the user successfully connects a wallet.

onEmailVerificationFailure: Called when the email verification process fails.

onEmailVerificationSuccess: Called when the email verification process succeeds.

References

WalletConnector: This is Dynamic’s abstraction over the wallet interface. This can be used to interact with the users wallet.

UserProfile: An object containing attributes about the user such as the wallet address, email, first name, etc.

Wallet: An object containing the attributes about the connected wallet. This object would be available immediately after a wallet has been connected.

JWT Payload: JWT to verify some claims about the end user.

JwtBlockchainAccount: A representation of a verified wallet.

AccessDeniedCustomButton: An object containing custom text and action for access denied modal.

EvmNetwork: Object which represents a network on the Ethereum Virtual Machine (EVM).

WalletsByChain: Array of objects, used primarily for bridging.