> For the complete documentation index, see [llms.txt](https://docs.fetcch.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fetcch.xyz/how-to-integrate/guides/utility/how-to-sign-messages/solana.md).

# Solana

* We are using `tweetnacl` and `bs58` for this particular example

```tsx
import nacl from "tweetnacl"

const message = await generateMessage()

const keypair = Keypair.generate() // use user's wallet

const signature = nacl.sign.detached(Buffer.from(message), keypair.secretKey)
```

{% hint style="info" %}
Wallets have exposed functions for [signing message](https://github.com/solana-labs/wallet-adapter/blob/master/FAQ.md#how-can-i-sign-and-verify-messages)
{% endhint %}
