> For the complete documentation index, see [llms.txt](/llms.txt).

# Sign messages

Your dapp can ask users to sign a message with their Solana account; for example, to verify ownership or authorize an action.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

Follow the [quickstart](/metamask-connect/solana/quickstart/javascript/) to install, initialize, and connect the Solana client.

## Use `solana:signMessage`[​](#use-solanasignmessage "Direct link to use-solanasignmessage")

Use the [solana:signMessage](/metamask-connect/solana/reference/methods/#supported-wallet-standard-features) feature to request a human-readable signature that doesn't need to be verified onchain.

The following example requests a signed message using MetaMask:

```
import { createSolanaClient } from '@metamask/connect-solana'

const solanaClient = await createSolanaClient({
  dapp: {
    name: 'My Solana Dapp',
    url: window.location.origin,
  },
})

const wallet = solanaClient.getWallet()

// Connect and get the user's account
const { accounts } = await wallet.features['standard:connect'].connect()

async function signMessage() {
  const message = new TextEncoder().encode('Only good humans allowed. Paw-thorize yourself.')

  const [{ signature }] = await wallet.features['solana:signMessage'].signMessage({
    account: accounts[0],
    message,
  })

  return signature
}

```

## Next steps[​](#next-steps "Direct link to Next steps")

- [Sign in with Solana (SIWS)](/metamask-connect/solana/guides/sign-data/siws/) to authenticate users with domain-bound, phishing-resistant sign-in messages.
- [Send a legacy transaction](/metamask-connect/solana/guides/send-transactions/legacy/) to transfer SOL or interact with Solana programs.
- [Send a versioned transaction](/metamask-connect/solana/guides/send-transactions/versioned/) to use Address Lookup Tables for complex operations.
- [MetaMask Connect Solana methods](/metamask-connect/solana/reference/methods/) for the full list of Wallet Standard features.
