Skip to main content

LookupName

gRPC
RPC Methodsui.rpc.v2.NameService/LookupName

Looks up a SuiNS name and returns the associated record.

Proto files required

Running the examples below requires the official Sui proto files. Download the proto files, then set the example's -import-path relative to the proto root (the -proto path in the examples is relative to the proto root).

github.com/MystenLabs/sui-apis/tree/main/proto

Request Message
namestringrequired
Required. The SuiNS name to lookup. Supports both @name and name.sui formats.
Response Message
The record for the requested name.
idstring
Record ID.
namestring
SuiNS name.
registration_nft_idstring
RegistrationNFT ID.
expiration_timestampstring
Expiration timestamp.
target_addressstring
Resolved target address.
Additional data entries.
keystring
Entry key.
valuestring
Entry value.
grpcurl
grpcurl \
-import-path . \
-proto sui/rpc/v2/name_service.proto \
-H 'X-API-KEY: nodit-demo' \
-d '{
"name": "example.sui"
}' \
sui-mainnet.nodit.io:443 \
sui.rpc.v2.NameService/LookupName