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

# Sign Messages with Para

> Learn how to sign a "Hello, Para!" message using the Para React Native SDK

export const Card = ({imgUrl, title, description, href, horizontal = false, newTab = false}) => {
  const [isHovered, setIsHovered] = useState(false);
  const handleClick = e => {
    e.preventDefault();
    if (newTab) {
      window.open(href, '_blank', 'noopener,noreferrer');
    } else {
      window.location.href = href;
    }
  };
  return <div className={`not-prose relative my-2 p-[1px] rounded-xl transition-all duration-300 ${isHovered ? 'bg-gradient-to-r from-[#FF4E00] to-[#874AE3]' : 'bg-gray-200'}`} onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
      <a href={href} onClick={handleClick} className={`not-prose flex ${horizontal ? 'flex-row' : 'flex-col'} font-normal h-full bg-white overflow-hidden w-full cursor-pointer rounded-[11px] no-underline`}>
        {imgUrl && <div className={`relative overflow-hidden flex-shrink-0 ${horizontal ? 'w-[30%] rounded-l-[11px]' : 'w-full'}`} onClick={e => e.stopPropagation()}>
            <img src={imgUrl} alt={title} className="w-full h-full object-cover pointer-events-none select-none" draggable="false" />
            <div className="absolute inset-0 pointer-events-none" />
          </div>}
        <div className={`flex-grow px-6 py-5 ${horizontal ? 'w-[70%]' : 'w-full'} flex flex-col ${horizontal && imgUrl ? 'justify-center' : 'justify-start'}`}>
          {title && <h2 className="font-semibold text-base text-gray-800 m-0">{title}</h2>}
          {description && <div className={`font-normal text-gray-500 re leading-6 ${horizontal || !imgUrl ? 'mt-0' : 'mt-1'}`}>
              <p className="m-0 text-xs">{description}</p>
            </div>}
        </div>
      </a>
    </div>;
};

The `signMessage` method is a **low-level API** that signs raw bytes directly without any modifications. This is useful for verifying your Para integration with a simple "Hello, Para!" test after initial setup and authentication.

<Warning>
  **Important:** `signMessage` signs raw bytes without standard modifications like EIP-191 message prefixes that libraries like Ethers and Viem automatically add. For production use, always use proper Web3 libraries that handle message formatting, encoding standards, and chain-specific requirements.
</Warning>

<Note>
  **When to use signMessage:** This method is best suited for signing simple text messages and basic authentication flows. For complex operations like transactions, typed data (EIP-712), or chain-specific functionality, **you should use the appropriate Web3 library** (Viem, Ethers, Solana Web3.js, CosmJS). These libraries provide proper encoding, type safety, and chain-specific features that signMessage alone cannot offer.
</Note>

## Message Signing

This method signs the exact bytes you provide — perfect for initial "hello world" testing:

<MethodDocs
  defaultExpanded={true}
  preventCollapse={true}
  name="useSignMessage()"
  description="A mutation hook that signs a message using a specified wallet."
  parameters={[
{
  name: "walletId",
  type: "string",
  required: true,
  description: "The ID of the wallet to use for signing."
},
{
  name: "messageBase64",
  type: "string",
  required: true,
  description: "The message to sign as a base64-encoded string."
},
{
  name: "timeoutMs",
  type: "number",
  optional: true,
  description: "The duration in milliseconds to wait before the signing operation times out."
},
{
  name: "cosmosSignDocBase64",
  type: "string",
  optional: true,
  description: "For Cosmos transactions, the `SignDoc` as a base64-encoded string."
},
{
  name: "isCanceled",
  type: "() => boolean",
  optional: true,
  description: "A callback that returns a boolean, indicating whether the signing operation should be cancelled."
},
{
  name: "onPoll",
  type: "() => void",
  optional: true,
  description: "A callback function that will be invoked on each method poll."
},
{
  name: "onCancel",
  type: "() => void",
  optional: true,
  description: "A callback function that will be invoked if the method call is canceled."
}
]}
  returns={{ type: "{ signMessage: (params) => void, signMessageAsync: (params) => Promise<FullSignatureRes>, data: FullSignatureRes | undefined, isPending: boolean, error: Error | null, reset: () => void }", description: "A mutation result with `signMessage` / `signMessageAsync` functions, `data`, and standard React Query mutation fields." }}
  async={true}
/>

```tsx SignMessageExample.tsx theme={null}
import { useSignMessage, useWallet } from "@getpara/react-native-wallet";
import { View, Button, Alert } from "react-native";

export default function SignMessageExample() {
  const { signMessageAsync, isPending } = useSignMessage();
  const { data: wallet } = useWallet();

  const handleSign = async () => {
    if (!wallet) return;

    const message = "Hello, Para!";
    const messageBase64 = btoa(message);

    try {
      const result = await signMessageAsync({
        walletId: wallet.id,
        messageBase64,
      });
      Alert.alert("Signature", `0x${result.signature}`);
    } catch (err) {
      console.error("Failed to sign:", err);
    }
  };

  return (
    <View>
      <Button title={isPending ? "Signing..." : "Sign Message"} onPress={handleSign} disabled={isPending} />
    </View>
  );
}
```

## Next Steps

Now that you've verified your Para setup, explore chain-specific libraries for more advanced operations:

<CardGroup cols={3}>
  <Card title="EVM Libraries" imgUrl="/images/v2/network-evm.png" href="/v2/react-native/guides/evm" description="Use Para with Viem, Ethers, or Wagmi on EVM chains" />

  <Card title="Solana Libraries" imgUrl="/images/v2/network-solana.png" href="/v2/react-native/guides/solana" description="Use Para with Solana Web3.js in your mobile app" />

  <Card title="Cosmos Libraries" imgUrl="/images/v2/network-cosmos.png" href="/v2/react-native/guides/cosmos" description="Use Para with CosmJS in your mobile app" />

  <Card title="Stellar Libraries" href="/v2/react-native/guides/web3-operations/stellar/setup-libraries" description="Use Para with the Stellar SDK in your mobile app" />
</CardGroup>
