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

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/guides/web3-operations/stellar/sign-messages" horizontal />

## Verify Signatures

```typescript theme={null}
import { ParaStellarSigner } from "@getpara/stellar-sdk-v14-integration";
import { Networks, StrKey } from "@stellar/stellar-sdk";
import { useClient } from "@getpara/react-sdk";
import nacl from "tweetnacl";

function VerifySignature() {
  const para = useClient();

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

    const signer = new ParaStellarSigner(para, Networks.PUBLIC);

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

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

    // Extract the raw Ed25519 public key from the Stellar G-address
    const publicKeyBytes = StrKey.decodeEd25519PublicKey(signer.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:", signer.address);

    return isValid;
  };

  return <button onClick={verifyMessage}>Sign & Verify Message</button>;
}
```

<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/guides/web3-operations/stellar/sign-messages" icon="signature" />

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

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