# personal\_sign

Presents a plain text signature challenge to the user and returns the signed response. Equivalent to `eth_sign` on some other wallets, and prepends a safe prefix to the signed message to prevent the challenge tricking users into signing a financial transaction. This method requires that the user has granted permission to interact with their account first, so make sure to call `eth_requestAccounts` (recommended) first.

## Params

#### 1. challenge *(required)*

A hex-encoded UTF-8 string to present to the user. See how to encode a string like this in the [`browser-string-hexer`](https://github.com/danfinlay/browser-string-hexer) module.

string

Match pattern:^0x\[a-fA-F\d]+$

#### 2. address *(required)*

The address of the requested signing account.

string

Match pattern:^0x\[0-9a-fA-F]{40}$

## Example

### Request

```javascript
await window.NEOLineNeoX.request({
  "method": "personal_sign",
  "params": [
    "0x68656c6c6f",
    "0xE45e9AdC2B51514849ea5B38dF37d1a65e6D52f5"
  ]
});
```

### Result

```javascript
"0xcdd4ca6ce68fe94c4fe4a6d222b18cf7dc5909ce0be003aa72b4db9eaa2ccd307a3bf3450b741195d3e6d51e04db7c2e53a9a076f7da4e355a53e349afdaec111c"
```


---

# Agent Instructions: 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:

```
GET https://tutorial.neoline.io/reference/json-rpc-api/personal_sign.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
