Breaking changes
Starknet V6
We upgraded to Starknet v6 See this guide for more details: https://starknetjs.com/docs/guides/migrate/ There are no code changes required on the Dynamic SDK side, however if you have installed the starknet package, you will need to upgrade to >= v6.11.0.Walletbook methods
isWalletMethodSupported and isWalletEventSupported have been removed from wallet-book as part of a refactor to improve the way the SDK operates.eventsCallbacks removed
In V2, we deprecated the eventsCallbacks prop on the DynamicContextProvider in favour of a prop calledevents
which has the same purpose. In V4 we are removing the old prop entirely.
authToken and minAuthToken
In V4 we stopped exporting authToken and minAuthToken from the dynamic context. You can still get these values by callinggetAuthToken
and getMinAuthToken
.
Note that if you just want to know if the user is logged in or not, you can use the useIsLoggedIn
hook.
useFunding hook method changed
In V4, we changed theopenFunding
method exported from useFunding
hook to openExternalFunding
which now takes in a required parameter of onrampProvider
.
ZeroDev package upgraded to 5.4.5
In V4, we updated the ZeroDev package to 5.4.5 which contains some breaking changes regarding the kernel client. Learn more hereNew features
Events
useDynamicEvents
which allows you to listen to events emitted by the SDK now exposes more events. The full list of available events is now:
Auth Events
authFailure
authFlowCancelled
authFlowClose
authFlowOpen
authInit
logout
Wallet Events
walletAdded
walletRemoved
embeddedWalletCreated
primaryWalletChanged
primaryWalletNetworkChanged
userWalletsChanged
OTP/MFA Events
emailVerificationResult
smsVerificationResult
mfaCompletionFailure
mfaCompletionSuccess