> For the complete documentation index, see [llms.txt](https://obytejs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obytejs.com/0.1.12/utils/validate-signed-message.md).

# Validate signed message

### Example

`validateSignedMessage` function can take multiple input parameters, first parameter is JSON object, which is required, second parameter is wallet address (optional) used for signing and third parameter is signed message (optional).

```javascript
const { signMessage, validateSignedMessage } = require('obyte/lib/utils');
const address_wif = '';
const wallet_address = 'TMWNLXR42CKIP4A774BQGNVBZAPHY7GH';
const message = 'Hello world';

const objSignedMessage = signMessage(message, address_wif);

console.log(validateSignedMessage(objSignedMessage, wallet_address, message));
console.log(validateSignedMessage(objSignedMessage, null, message));
console.log(validateSignedMessage(objSignedMessage));
```

### Returns

Returns boolean `true` if signed message is valid, otherwise boolean `false`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://obytejs.com/0.1.12/utils/validate-signed-message.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
