setShowAuthFlow
opens dynamic profile in non-multi-wallet, logged in statesThe Dynamic SDK uses a number of other Dynamic packages, among them is the sdk-api library which contains several internal APIs that are not relevant to making the SDK communicate properly with Dynamic’s backend.
Therefore we’ve created a new package called sdk-api-core which only contains endpoints and models relevant for the SDK, and this is what the V2 SDK uses.
If you need to interact with Dynamic’s backend for admin-related API calls or bulk work, among other things, you should explicitly install sdk-api, otherwise the only effect this has is lowering your bundle size!
We now use Wagmi V2 by default as opposed to V1 in V1 of our SDK, you can find the implementation guide here to upgrade that package implementation and integration.
Viem V2 is now the default, generally you don’t need to do anything as the SDK will install it for you but if you have Viem installed manually alongside the SDK, you’ll want to either uninstall it or ensure you’re using the latest version.
With the introduction of sms based login in addition to email we’ve adjusted some method naming to reflect this. Thus, useConnectWithEmailOtp becomes useConnectWithOtp.
This renaming is simply to align with standard terminology.
This prop was not specific enough so we renamed it to include “Transaction” as this is exactly what it hides - the transaction confirmation screens.
This flag is actually used to decide whether a wallet connector requires an external OTP provider instead of Dynamic’s default email OTP and therefore it made sense to rename it as such.
This was a boolean, available from useDynamicContext, which indicated whether any verifications are in progress for the current user (ex. connect, sign and email login verifications). However, this leads to the need for useEffects, which the React team recommends avoiding. Therefore we’ve remove this state and request that you add listeners to our callbacks in order to trigger functionalities in an event driven manner.
You can now use useIsLoggedIn instead of isFullyConnected to check the user’s login status.
The type looks like the following:
Use looks like this:
With the introduction of SMS authentication as well as pre-existing email authentication, it makes more sense to generalise the verification callbacks for you, rather than having 4 individual ones. Therefore we’ve created onOtpVerificationResult
so you can easily listen to success and failure for email and sms.
The signature of this new callback looks like the following
The usage of the callback is outlined as such:
setShowLinkNewWalletModal is not part of DynamicContext anymore, but is available as part of the new useDynamicModals hook.
const {setShowLinkNewWalletModal} = useDynamicContext();
const {setShowLinkNewWalletModal} = useDynamicContext();
const {setShowLinkNewWalletModal} = useDynamicModals();
evmNetworks now lives inside the overrides
prop on the DynamicContextProvider settings object, whereas before it lived directly in the settings object.
Our NFT Gating feature helps you gate by NFT ownership. We’ve now added support for ERC 1155 tokens, so you can now gate by NFT ownership for both ERC 721 and ERC 1155 token types!
You wanted an easier way to always have the userId of the user that triggered the event - now we also include the userId of the trigger in all webhook event objects!
useConnectWithEmailOtp
Now you can handle headless email signup with the useConnectWithEmailOtp hook! It exposes connectWithEmail
and verifyOneTimePassword
functions. It supports both Dynamic native login and our Magic integration.
setShowLinkNewWalletModal
This new method comes as part of useDynamicContext
and allows you to trigger the link new wallet method programmatically.
initialAuthenticationMode
prop on DynamicContextProvider
but this would be set in stone once the app loads. Now you can also set it programmatically via the setAuthMode
method on useDynamicContext
.This allows you to use the multi wallet prompts without needing the full user profile which in which these prompts are normally bundled.
setShowAuthFlow
opens dynamic profile in non-multi-wallet, logged in statesThe Dynamic SDK uses a number of other Dynamic packages, among them is the sdk-api library which contains several internal APIs that are not relevant to making the SDK communicate properly with Dynamic’s backend.
Therefore we’ve created a new package called sdk-api-core which only contains endpoints and models relevant for the SDK, and this is what the V2 SDK uses.
If you need to interact with Dynamic’s backend for admin-related API calls or bulk work, among other things, you should explicitly install sdk-api, otherwise the only effect this has is lowering your bundle size!
We now use Wagmi V2 by default as opposed to V1 in V1 of our SDK, you can find the implementation guide here to upgrade that package implementation and integration.
Viem V2 is now the default, generally you don’t need to do anything as the SDK will install it for you but if you have Viem installed manually alongside the SDK, you’ll want to either uninstall it or ensure you’re using the latest version.
With the introduction of sms based login in addition to email we’ve adjusted some method naming to reflect this. Thus, useConnectWithEmailOtp becomes useConnectWithOtp.
This renaming is simply to align with standard terminology.
This prop was not specific enough so we renamed it to include “Transaction” as this is exactly what it hides - the transaction confirmation screens.
This flag is actually used to decide whether a wallet connector requires an external OTP provider instead of Dynamic’s default email OTP and therefore it made sense to rename it as such.
This was a boolean, available from useDynamicContext, which indicated whether any verifications are in progress for the current user (ex. connect, sign and email login verifications). However, this leads to the need for useEffects, which the React team recommends avoiding. Therefore we’ve remove this state and request that you add listeners to our callbacks in order to trigger functionalities in an event driven manner.
You can now use useIsLoggedIn instead of isFullyConnected to check the user’s login status.
The type looks like the following:
Use looks like this:
With the introduction of SMS authentication as well as pre-existing email authentication, it makes more sense to generalise the verification callbacks for you, rather than having 4 individual ones. Therefore we’ve created onOtpVerificationResult
so you can easily listen to success and failure for email and sms.
The signature of this new callback looks like the following
The usage of the callback is outlined as such:
setShowLinkNewWalletModal is not part of DynamicContext anymore, but is available as part of the new useDynamicModals hook.
const {setShowLinkNewWalletModal} = useDynamicContext();
const {setShowLinkNewWalletModal} = useDynamicContext();
const {setShowLinkNewWalletModal} = useDynamicModals();
evmNetworks now lives inside the overrides
prop on the DynamicContextProvider settings object, whereas before it lived directly in the settings object.
Our NFT Gating feature helps you gate by NFT ownership. We’ve now added support for ERC 1155 tokens, so you can now gate by NFT ownership for both ERC 721 and ERC 1155 token types!
You wanted an easier way to always have the userId of the user that triggered the event - now we also include the userId of the trigger in all webhook event objects!
useConnectWithEmailOtp
Now you can handle headless email signup with the useConnectWithEmailOtp hook! It exposes connectWithEmail
and verifyOneTimePassword
functions. It supports both Dynamic native login and our Magic integration.
setShowLinkNewWalletModal
This new method comes as part of useDynamicContext
and allows you to trigger the link new wallet method programmatically.
initialAuthenticationMode
prop on DynamicContextProvider
but this would be set in stone once the app loads. Now you can also set it programmatically via the setAuthMode
method on useDynamicContext
.This allows you to use the multi wallet prompts without needing the full user profile which in which these prompts are normally bundled.