Skip to content

NameService.LookupName ​

Lookup name through sui.rpc.v2.NameService/LookupName 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/LookupName. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: LookupNameRequest ​

FieldTypeDescription
namestringRequired. The SuiNS name to lookup. Supports both @name as well as name.sui formats.

Response: LookupNameResponse ​

FieldTypeDescription
recordNameRecordThe record for the requested name

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 '{
  "name": "example.sui"
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.NameService/LookupName

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

The body is a template: replace the example name with your own values before the call succeeds.

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 { address } = await client.resolveNameServiceAddress({ name: 'example.sui' })
console.log(address)

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_resolveNameServiceAddress. The JSON-RPC to gRPC migration guide has before and after code for the common calls.

The full-stack Sui data layer.