Skip to content

NameService.ReverseLookupName ​

Reverse lookup name through sui.rpc.v2.NameService/ReverseLookupName on Inodra's Sui gRPC endpoint.

Endpoint ​

NetworkHostAuthentication
Mainnetmainnet-grpc.inodra.com:443x-api-key metadata
Testnettestnet-grpc.inodra.com:443x-api-key metadata

Full method name: sui.rpc.v2.NameService/ReverseLookupName. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: ReverseLookupNameRequest ​

FieldTypeDescription
addressstringRequired. The address to perform a reverse lookup for.

Response: ReverseLookupNameResponse ​

FieldTypeDescription
recordNameRecordThe record for the SuiNS name linked to the requested address

NameRecord ​

FieldTypeDescription
idstringId of this record. Note that records are stored on chain as dynamic fields of the type Field<Domain,NameRecord>.
namestringThe SuiNS name of this record
registration_nft_idstringThe ID of the RegistrationNFT assigned to this record. The owner of the corresponding RegistrationNFT has the rights to be able to change and adjust the target_address of this domain. It is possible that the ID changes if the record expires and is purchased by someone else.
expiration_timestampgoogle.protobuf.TimestampTimestamp when the record expires. This is either the expiration of the record itself or the expiration of this record's parent if this is a leaf record.
target_addressstringThe target address that this name points to
datamap<string, string>Additional data which may be stored in a record

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "address": "0x0000000000000000000000000000000000000000000000000000000000000002"
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.NameService/ReverseLookupName

Server reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.

TypeScript ​

typescript
import { GrpcWebFetchTransport, SuiGrpcClient } from '@mysten/sui/grpc'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://mainnet-grpc.inodra.com',
  meta: { 'x-api-key': process.env.INODRA_API_KEY! }
})
const client = new SuiGrpcClient({ network: 'mainnet', transport })

const { data } = await client.defaultNameServiceName({
  address: '0x0000000000000000000000000000000000000000000000000000000000000002'
})
console.log(data.name)

Uses the typed SuiGrpcClient method from @mysten/sui v2 that calls this RPC. Install with npm install @mysten/sui and set INODRA_API_KEY. The gRPC gateway guide covers native gRPC transport for backends.

Credits ​

1 credit per call. See credits and billing for the full table.

JSON-RPC equivalent ​

Replaces suix_resolveNameServiceNames. The JSON-RPC to gRPC migration guide has before and after code for the common calls.

The full-stack Sui data layer.