> For the complete documentation index, see [llms.txt](https://tokenscript.gitbook.io/token-negotiator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tokenscript.gitbook.io/token-negotiator/learn/smart-contract-and-wallet-interaction/sign-message.md).

# Sign message

Signing a message

Messages can be signed by the user by utilising the following method.&#x20;

```
// address: string user address to sign message
// message: string user message for them to sign against
await negotiator.web3WalletProvider.signMessage(
    address, 
    message
)
```

**Tip** 💡

When working with web3 wallets such as AlphaWallet or MetaMask, developers can utilise signatures as a means to identify the true owner of a wallet address. This process is crucial for building secure web3 applications that require user authentication and authorisation on the blockchain.&#x20;

The method shown in this example demonstrates how to request a signature from the user via Token Negotiator. The response (e.g. "0x4c8be3f2039b....) from this method can be used to verify the token holder by uncovering the signers public address using a method such as this (most securely and commonly utilised server-side).

```
// return the signers public address 
getSignatureAddress(signature: string, message:string): string {
    const verifySigner = ethers.utils.recoverAddress(ethers.utils.hashMessage(message), signature)
    return verifySigner
}
```
