suix_resolveNameServiceNames - 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.
Parameters
address
SuiAddress
Yes
The SUI address to resolve
cursor
ObjectID
No
Pagination cursor
limit
uint
No
Maximum items per page
Request Example
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "getblock.io",
"method": "suix_resolveNameServiceNames",
"params": [
"0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2",
null,
10
]
}'const axios = require('axios');
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'suix_resolveNameServiceNames',
params: ['0x5cd6fa76ed1d18f05f15e35075252ddec4fb83621d55952d9172fcfcb72feae2', null, 10]
};
axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', payload)
.then(response => console.log(response.data));Response Example
Response Parameters
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
-32602
Invalid params - malformed address
-32603
Internal error - node issues
SDK Integration
Last updated
Was this helpful?