# suix_resolveNameServiceNames{deprecated} - Sui

> Example code for the suix_resolveNameServiceNames JSON-RPC method. Complete guide on how to use suix_resolveNameServiceNames JSON-RPC in GetBlock Web3 documentation.

This method performs reverse resolution to find all SuiNS names associated with a given SUI address. This is the inverse of `suix_resolveNameServiceAddress` and is useful for displaying human-readable names in user interfaces and transaction histories.

> **Warning:** This method is deprecated

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| address | SuiAddress | Yes | The SUI address to resolve |
| cursor | ObjectID | No | Pagination cursor |
| limit | uint | No | Maximum items per page |

## Request Example

#### cURL

```bash
curl -X POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "suix_resolveNameServiceNames",
  "params": [
    "0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2",
    null,
    10
  ]
}'
```

#### JavaScript (Axios)

#### request.js

```javascript
const axios = require('axios');

const payload = {
  jsonrpc: '2.0',
  id: 'getblock.io',
  method: 'suix_resolveNameServiceNames',
  params: ['0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2', null, 10]
};

axios.post('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));
```

#### Python

#### request.py

```python
import requests

payload = {
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "method": "suix_resolveNameServiceNames",
    "params": [
        "0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2",
        None,
        10
    ]
}

response = requests.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/", json=payload)
print(response.json())
```

#### Rust

#### request.rs

```rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let payload = json!({
        "jsonrpc": "2.0",
        "id": "getblock.io",
        "method": "suix_resolveNameServiceNames",
        "params": ["0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2", null, 10]
    });
    let response = client.post("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
        .json(&payload).send().await?;
    println!("{}", response.text().await?);
    Ok(())
}
```

## Response Example

```json
{
  "jsonrpc": "2.0",
  "result": {
    "data": ["alice.sui", "alice-main.sui"],
    "nextCursor": null,
    "hasNextPage": false
  },
  "id": "getblock.io"
}
```

## Response Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| data | array | Array of SuiNS name strings |
| nextCursor | string | Cursor for pagination |
| hasNextPage | boolean | More names available |

## Use Cases

* Display user-friendly names in UIs
* Show names in transaction histories
* Build profile pages with all owned names
* Verify name ownership

## Error Handling

| Error Code | Description |
| --- | --- |
| -32602 | Invalid params - malformed address |
| -32603 | Internal error - node issues |

## SDK Integration

#### Sui TypeScript SDK

#### example.ts

```typescript
import { SuiClient } from '@mysten/sui/client';

const client = new SuiClient({ url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/' });
const names = await client.resolveNameServiceNames({
  address: '0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2'
});
console.log(names);
```

#### Sui Rust SDK

#### example.rs

```rust
use sui_sdk::SuiClientBuilder;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
    let sui = SuiClientBuilder::default().build("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/").await?;
    let address = "0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2".parse()?;
    let names = sui.read_api().resolve_name_service_names(address, None, None).await?;
    println!("{:?}", names);
    Ok(())
}
```
