EVM Interactions
Sign a message in Ethereum/EVM
The Basics
- Installing Dynamic
- Chains / Networks
- Authentication
- Wallets
- Set Up Embedded Wallets
- Set Up Branded Wallets
- Smart Wallets
- Using Wallets
- Accessing Wallets
- Interacting with wallets
- General Interactions
- EVM Interactions
- Bitcoin Interactions
- Solana Interactions
- Multi Wallet
- Multi Asset UI
- Send Assets
- Users / VC's
- Design
- Onramps
Beyond The Basics
- Headless
- Cross-ecosystem Connectivity
- Bridge Widget
- Rate Limits
Developer Dashboard
- SDK and API Keys
- Sandbox vs Live
- Analytics
- User Management
- Test Accounts
- Settings
- Admin
- Webhooks
- Configuring Social Providers
Tutorials
- Farcaster
- Telegram
- Features
- Frameworks
- Integrations
- Webhooks
Migrating to Dynamic
- Migrating to Dynamic
- Migration Tutorials
For Wallets & Chains
Hackathons
EVM Interactions
Sign a message in Ethereum/EVM
In this example, we are creating a button to sign a message and log the signature to the console.
import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
const SignMessageButton = () => {
const { primaryWallet } = useDynamicContext();
const signMessage = async () => {
if (!primaryWallet) return;
const signature = await primaryWallet.signMessage('example');
console.log('signature', signature);
};
return <button onClick={signMessage}>Sign message</button>;
};
Was this page helpful?