> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign a message in Ethereum/EVM

> [card] Recommended: JavaScript SDK for React Native
>
> While this SDK is still supported, we recommend using newer [JavaScript SDK](https://docs.dynamic.xyz/docs/javascript/reference/react-native-quickstart.md), which is optimized for React Native, but also comes with a host of other benefits.

```ts React Native theme={"system"}
    // Requires setting up the RN Viem extension
    // See: /react-native/wallets/viem
    import { dynamicClient } from '<path-to-your-dynamicClient>'; // extended with ViemExtension

    export const signMessage = async () => {
      const wallet = dynamicClient.wallets.primary;
      if (!wallet) return;

      const walletClient = dynamicClient.viem.createWalletClient({ wallet });
      const signature = await walletClient.signMessage({ message: 'example' });
      console.log('signature', signature);
    }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.