Add Account Abstraction
Alchemy Smart Accounts
This guide shows you how to use Dynamic as a signer for Alchemy Smart Accounts.
Install the sdk
By default, the latest version of the Dynamic SDK ships with Viem. If you need to use Ethers, please refer to this guide.
In this example, we are installing only the Ethereum connectors in order to keep bundle size light. If you need any others, you can find the references here.
Add Dynamic to your application
In order to use Dynamic, you should wrap your app with DynamicContextProvider at the highest possible level i.e.
Create a SmartAccountSigner
Next, inside any component which is wrapped by the above DynamicContextProvider, use the useDynamicContext hook to fetch your provider, and create a SmartAccountSigner:
Use it with Light Account
Let’s see it in action with aa-alchemy and LightSmartContractAccount from aa-accounts:
Was this page helpful?