Our main SDK package @dynamic-labs/sdk-react-core does not automatically include all the available supported wallets and their libraries. This is to reduce bundle size and allow you to choose which wallets you want to support.

Choosing the right package(s)

Below is a list of all the available wallet connectors and their corresponding packages.

Package NameChainWalletConnector to include
@dynamic-labs/ethereumEVMEthereumWalletConnectors
@dynamic-labs/algorandALGOAlgorandWalletConnectors
@dynamic-labs/solanaSOLSolanaWalletConnectors
@dynamic-labs/flowFLOWFlowWalletConnectors
@dynamic-labs/starknetSTARKStarknetWalletConnectors
@dynamic-labs/cosmosCOSMOSCosmosWalletConnectors
@dynamic-labs/bitcoinBTCBitcoinWalletConnectors
EVM Addon Wallets
Package NameWhich WalletsWalletConnector to include
@dynamic-labs/magicmagicMagicWalletConnectors
@dynamic-labs/blocto-evmbloctoBloctoEvmWalletConnectors
@dynamic-labs/starknetSTARKStarknetWalletConnectors
@dynamic-labs/ethereum-aaZeroDevZeroDevSmartWalletConnectors

EthereumWalletConnectors (@dynamic-labs/ethereum) also includes all EVM compatible chains including layer 2’s i.e. Base as well as Dynamic Embedded Wallets. Learn more about WalletConnectors here.

Implementation

1

Install the right Connectors

Install 1 or more wallet connectors from the packages listed above. Here is an example for Ethereum and Solana:

npm i @dynamic-labs/sdk-react-core @dynamic-labs/ethereum @dynamic-labs/solana
2

Add the connectors to DynamicContextProvider

Add to an array in your settings under walletConnectors. Here is an example for Ethereum and Solana:

import { DynamicContextProvider, DynamicWidget} from '@dynamic-labs/sdk-react-core';
import { EthereumWalletConnectors } from '@dynamic-labs/ethereum';
import { SolanaWalletConnectors } from '@dynamic-labs/solana';

const App = () => (
<DynamicContextProvider
    settings={{
    ...
    walletConnectors: [ EthereumWalletConnectors, SolanaWalletConnectors ],
        ...
    }}>
    <DynamicWidget />
</DynamicContextProvider>
);

export default App;

Was this page helpful?