Changes in 3.0.0-alpha.53 -> latest
See here for changes from 2.x.x to 3.0.0-alpha.52Wallet and WalletConnectors
No undesired prompting
No more undesired prompting to reconnect or switch wallets when not required! Now a wallet can be made primary at any time without extra prompting, even if the wallet is not connected or unlocked. Users will only be prompted to connect/unlock when sending/signing a transaction if the wallet is not connected or unlocked already.Wallet object has changed
- wallet.authenticated changed to wallet.isAuthenticated
- wallet.connected is now an async method wallet.isConnected()
- wallet.network is now an async method wallet.getNetwork()
- wallet.chain valid values have changed
-
EthereumWallet
- getPublicClient
- getWalletClient
-
SolanaWallet
- getConnection
- getSigner
-
BitcoinWallet
- sendBitcoin
- sendRawTransaction
- signMessageWithAddress
- signPsbt
- signPsbts
-
CosmosWallet
- getOfflineSigner
- getProvider
-
StarknetWallet
- getProvider
- getWalletAccount
-
AlgorandWallet
- getSigner
Wallet type checking
You should always use our utilities to check that you’re dealing with the correct wallet type before calling the wallet specific methods.Wallet connector object has changed
Since we have moved some methods from the connector to the wallet object, the wallet connector object is now slimmed down, you can find the methods and props available on both the connector and the wallet object in the Wallet Interactions section. As with the wallet object, each chain specific wallet connector has its own methods so we recommend checking out the appropriate section for the chain you are working with.Return value type changes
In V2, you needed to type method return values on specific wallet methods like fetching the Viem public client, Viem wallet client, Solana connection etc. In V3, you no longer need to do this. All you have to do is check for the wallet type (as shown in the previous section), and all the methods will come typed for you.Smart Wallet connector updates
- getEOAConnector has been removed
getEOAConnector
method is no longer available, you can use the useSmartWallets hook to get the EOA wallet.
Ethers support refactored
Instead of using theEthersExtension
on the Context Provider, you now need to use the ethers-v6
package directly, which exports all of the Ethers specific methods.
Helper method removed
- createWalletClientFromWallet has been removed
getWalletClient
method on the wallet object instead.
SignWithEmailWalletName has been removed
Instead please use the available email login flows2.X.X to 3.0.0-alpha.52
Packages restructuring
Solana Utils
@dynamic-labs/solana-utils has been renamed to @dynamic-labs/solana-coreViem Utils
@dynamic-labs/viem-utils has been renamed to @dynamic-labs/ethereum-coreEthereum RPC provider
@dynamic-labs/rpc-provider-ethereum has been removed. You can now use @dynamic-labs/ethereum-core to get the RPC provider.Solana RPC provider
@dynamic-labs/rpc-provider-solana has been removed. You can now use @dynamic-labs/solana-core to get the RPC provider.Starknet RPC provider
@dynamic-labs/rpc-provider-starknet has been removed. You can now use @dynamic-labs/starknet-core to get the RPC provider.UserProfile
Removed props that should be retrieved from the primaryWallet:chain
, ens
, wallet
Remove isAuthenticatedWithAWallet
as a prop and added it as a helper method.
See isAuthenticatedWithAWallet
Removed props from useDynamicContext
hideEmbeddedWalletTransactionUIs
has been removed from useDynamicContext. This is now a toggle in the dashboard.
setPrimaryWallet
has been removed. You should use useSwitchWallet instead.
isAuthenticated
has been removed. Please refer to this page for other ways to check the login state.
walletConnector
has been removed. You can get access to it by getting the primary wallet prop and doing primaryWallet?.connector
.
walletConnectorOptions
has been removed. You can get access to the available wallet options from the useWalletOptions hook.
Replaced props
setDefaultTabIndex
replaced withsetSelectedTabIndex
in useDynamicContext
Package restructuring
- ethers-v5 no longer available
ethers-v6
package. They have the same usability.
- rpcProviders no longer available in the sdk-react-core packages
@dynamic-labs/ethereum-core
& @dynamic-labs/solana-core
:
- ITurnkeySolanaSigner renamed to IEmbeddedWalletSolanaSigner and import path changed
Events arguments
- onAuthSuccess doesn’t return an authToken anymore
- onEmbeddedWalletCreated returns the user instead of the authToken
Other
- Polyfill for Solana Embedded Wallet users
Renamed Hooks
useSelectWalletOption
has been renamed to useWalletOptions
New Hooks
- Re-initialize the SDK (useReinitialize)
- Trigger state refresh (useRefreshUser)