> ## 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.

# Verify Signatures with Stellar Libraries

> Verify Ed25519 signatures from Stellar addresses in React Native

Verify Ed25519 signatures to confirm that a message was signed by a specific Stellar address. Essential for authentication and ensuring data integrity.

<Card title="Sign Messages First" description="Learn how to sign messages before verifying them" href="/v3/react-native/guides/web3-operations/stellar/sign-messages" horizontal />

## Verify Signatures

```typescript theme={null}
import { useParaStellarSigner } from "@getpara/react-native-wallet/stellar";
import { Networks, StrKey } from "@stellar/stellar-sdk";
import { Text, Button } from "react-native";
import nacl from "tweetnacl";

function VerifySignature() {
  const { stellarSigner, isLoading } = useParaStellarSigner({
    networkPassphrase: Networks.PUBLIC,
  });

  const verifyMessage = async () => {
    if (!stellarSigner) return;

    const message = "Hello, Stellar!";
    const messageBytes = Buffer.from(new TextEncoder().encode(message));

    // Sign the message
    const signature = await stellarSigner.signBytes(messageBytes);

    // Extract the raw Ed25519 public key from the Stellar G-address
    const publicKeyBytes = StrKey.decodeEd25519PublicKey(stellarSigner.address);

    // Verify the signature using tweetnacl
    const isValid = nacl.sign.detached.verify(
      new Uint8Array(messageBytes),
      new Uint8Array(signature),
      publicKeyBytes
    );

    console.log("Message:", message);
    console.log("Signature:", signature.toString("hex"));
    console.log("Signature valid:", isValid);
    console.log("Signer:", stellarSigner.address);

    return isValid;
  };

  if (isLoading) return <Text>Loading...</Text>;

  return <Button title="Sign & Verify Message" onPress={verifyMessage} />;
}
```

<Note>
  Install `tweetnacl` for Ed25519 signature verification: `npm install tweetnacl`. The `StrKey.decodeEd25519PublicKey` method from `@stellar/stellar-sdk` extracts the raw 32-byte public key from a Stellar G-address.
</Note>

## Next Steps

<CardGroup cols={3}>
  <Card title="Sign Messages" description="Create signatures to verify" href="/v3/react-native/guides/web3-operations/stellar/sign-messages" icon="signature" />

  <Card title="Send Tokens" description="Transfer XLM between accounts" href="/v3/react-native/guides/web3-operations/stellar/send-tokens" icon="paper-plane" />

  <Card title="Execute Transactions" description="Build complex Stellar transactions" href="/v3/react-native/guides/web3-operations/stellar/execute-transactions" icon="bolt" />
</CardGroup>
