Overview
Dynamic provides embedded wallet infrastructure that enables seamless user onboarding and wallet management. This guide shows you how to integrate Dynamic signers with Rhinestone smart accounts to create a unified, cross-chain wallet experience. How it works: Dynamic handles user authentication and wallet connections, providing wagmi-compatible clients. We use wagmi hooks to access these clients and pass them to Rhinestone’s SDK, which wraps them with cross-chain capabilities.Prerequisites
- A Dynamic account and project
- Dynamic API key
- React application setup
Create Integration Hook
Create a production-ready hook that integrates Dynamic wallets with Rhinestone accounts. This demonstrates the core pattern: get the wallet client from wagmi, then pass it to Rhinestone.
Dynamic automatically populates wagmi’s
useAccount() and useWalletClient() hooks when users connect their wallets.Usage
Basic Component Integration
Use the enhanced hook in your React components with proper loading and error states:Cross-Chain Transactions
Send transactions using the Dynamic-connected wallet with proper error handling:Environment Variables
Make sure to set the following environment variables:Complete Example
Try the full integration in our example repository:- Dynamic wallet connection and authentication
- Rhinestone smart account creation
- Cross-chain transactions
- Error handling and best practices
EIP-7702 Support
For EIP-7702 with Dynamic, you need to create a custom viem account that wraps Dynamic’s signer. Get the Dynamic signer from the connector, then use viem’stoAccount to create a compatible account:
eoa parameter:
Next Steps
- See it in action: Dynamic + Rhinestone Example
- Learn more about Dynamic’s features for user onboarding
- Explore chain abstraction capabilities
- Check out creating an account for more details