# ScriptHashToAddress

Converts a scripthash to address.

## **Input Arguments**

<table><thead><tr><th width="286">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>scriptHash: string</code></td><td>SctiptHash is the script hash of the N3 account.</td></tr></tbody></table>

## **Success Response**

<table><thead><tr><th width="295">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>address: string</code></td><td>N3 account address.</td></tr></tbody></table>

## Example

### Request

```js
neolineN3.ScriptHashToAddress({ scriptHash: 'f0a33d62f32528c25e68951286f238ad24e30032' })
.then(result => {
    const { address } = result;
    console.log('address' + address);
})
.catch((error) => {
    const {type, description, data} = error;
    switch(type) {
        case 'NO_PROVIDER':
            console.log('No provider available.');
            break;
        case 'MALFORMED_INPUT':
            console.log('Please check your input');
            break;
        default:
            // Not an expected error object.  Just write the error to the console.
            console.error(error);
            break;
    }
});
```

### Response

```js
{
    address: 'NQUN2zkzwpypEi6kvGYexy8cQKN2ycyJjF'
}
```


---

# 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/neo3-provider-api-legacy/read-methods/scripthashtoaddress.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.
