NameService.LookupName
Lookup name through sui.rpc.v2.NameService/LookupName on Inodra's Sui gRPC endpoint.
Endpoint
| Network | Host | Authentication |
|---|---|---|
| Mainnet | mainnet-grpc.inodra.com:443 | x-api-key metadata |
| Testnet | testnet-grpc.inodra.com:443 | x-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
| Field | Type | Description |
|---|---|---|
name | string | Required. The SuiNS name to lookup. Supports both @name as well as name.sui formats. |
Response: LookupNameResponse
| Field | Type | Description |
|---|---|---|
record | NameRecord | The record for the requested name |
NameRecord
| Field | Type | Description |
|---|---|---|
id | string | Id of this record. Note that records are stored on chain as dynamic fields of the type Field<Domain,NameRecord>. |
name | string | The SuiNS name of this record |
registration_nft_id | string | The 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_timestamp | google.protobuf.Timestamp | Timestamp 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_address | string | The target address that this name points to |
data | map<string, string> | Additional data which may be stored in a record |
grpcurl
grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{
"name": "example.sui"
}' \
mainnet-grpc.inodra.com:443 \
sui.rpc.v2.NameService/LookupNameServer 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
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.