> 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/aptos.md).

# Aptos

## Aptos Signature Guide

* We are using `tweetnacl` for this particular example

```tsx
import nacl from "tweetnacl"

const secretKey = ""
const publicKey = "" // without prefix 0x

const generatedMessage = await generateMessage()

const message = `APTOS\nmessage: {generatedMessage.message}\nnonce: {generatedMessage.nonce}`

const signature = nacl.sign.detached(Buffer.from(message), Buffer.from(message, 'hex'))
```

{% hint style="info" %}
APTOS has a standard for signing message, there will be `APTOS` before message and `nonce` after message, `nonce` is provided by the generateMessage, use that as a nonce
{% endhint %}
