Skip to main content
What you need to know: Add the EVM extension from the Chains table on Adding extensions. You need at least one EVM extension to support Ethereum-compatible chains. There are only two kinds of wallet: embedded and external. Each extension below lets you support one or both for EVM.
To interact with EVM wallets, add one or more EVM extensions to your client. Each extension enables a different way to discover and connect EVM wallets (e.g. EIP-6963, window.ethereum, or Dynamic embedded wallets). Enable the EVM chain in the Dynamic dashboard as well.

Installation

npm install @dynamic-labs-sdk/evm

Default EVM extension

If you wish to support the standard EVM wallets and Dynamic embedded wallets, you can add the default EVM extension to your client using the addEvmExtension method.
import { createDynamicClient } from '@dynamic-labs-sdk/client';
import { addEvmExtension } from '@dynamic-labs-sdk/evm';

const dynamicClient = createDynamicClient({
  ...
});

addEvmExtension();

Standalone EVM extensions

If you want to be more granular, you can add the standalone EVM extensions individually to your client.

EIP-6963 extension

import { addEIP6963Extension } from '@dynamic-labs-sdk/evm/eip6963';

const dynamicClient = createDynamicClient({
  ...
});

// this will add support for wallets that implement EIP-6963, which are most of the EVM external wallets
addEIP6963Extension();

Window-injected extension

When users open your app inside a wallet’s built-in browser (e.g. MetaMask Mobile, Trust Wallet, Coinbase Wallet), the wallet injects its provider into window.ethereum rather than announcing via EIP-6963. Use this extension as a fallback to support those environments:
import { addEvmWindowInjectedExtension } from '@dynamic-labs-sdk/evm/window-injected';

const dynamicClient = createDynamicClient({
  ...
});

// this will add support for wallets injected into window.ethereum (built-in browser or legacy extensions)
addEvmWindowInjectedExtension();

When used alongside addEIP6963Extension, EIP-6963 providers take priority automatically — so if a wallet supports both, the EIP-6963 version is used.

WAAS EVM extension

import { addWaasEvmExtension } from '@dynamic-labs-sdk/evm/waas';

const dynamicClient = createDynamicClient({
  ...
});

// this will add support for Dynamic embedded EVM wallets
addWaasEvmExtension();

Combining extensions

You can combine as many extensions as you want to support all the wallets you want to support.
import { addEIP6963Extension } from '@dynamic-labs-sdk/evm/eip6963';
import { addWaasEvmExtension } from '@dynamic-labs-sdk/evm/waas';

const dynamicClient = createDynamicClient({
  ...
});

addEIP6963Extension();
addWaasEvmExtension();