Resolving a Starname

This is how to get the information attached to a starname.

A starname can have two different formats:

  • *domain

  • name*domain

I know someone's starname, how do I know the associated info?

With the REST API

You can query the crypto-addresses associated with a starname ( fondation-aphp*iov as example) by running the command :

curl -X POST "https://iovnscli-rest-api.iov-mainnet-2.iov.one/starname/query/resolve" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d '{"starname":"fondation-aphp*iov"}'

If the starname looks like *mybusiness for example, you will run the same command :

curl -X POST "https://iovnscli-rest-api.iov-mainnet-2.iov.one/starname/query/resolve" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d '{"starname":"*mybusiness"}'

With the IONSCLI

You can query the crypto-addresses associated with a starname ( fondation-aphp*iov as example) by running the command :

iovnscli query starname resolve --starname fondation-aphp*iov

If the starname looks like *mybusiness for example, you will run the same command :

iovnscli query starname resolve --starname *mybusiness

The starname info

These commands will return the information attached to the starname. It will look like this

{
"account":{
"domain":"iov",
"name":"fondation-aphp",
"owner":"star12uv6k3c650kvm2wpa38wwlq8azayq6tlh75d3y",
"valid_until":1633046400,
"resources":[
{
"uri":"asset:eth",
"resource":"0x795997519227f64879977d1a53625707f29b25b2"
},
{"
uri":"asset:btc",
"resource":"14AcAvkYz9eUP226NpGvTf62uP4Du2NnZJ"
},
{
"uri":"asset:bch",
"resource":"bitcoincash:qzmddu0vq53dkeej9nwt6jm8nyzlfxgn2vnh46k77u"
},
{
"uri":"asset:ltc",
"resource":"M8N2BjsijFyQTYVAq7WXZGmC5dmLUbBefb"
},
{
"uri":"asset:xtz",
"resource":"tz1XAMyU4VtmMyber79FF56RESdrAcuN886z"
},
{
"uri":"asset:atom",
"resource":"cosmos18qvxu5t9h29pwhf6jtf0a2lpwt4y026e09tln9"
}
],
"certificates":null,
"broker":"",
"metadata_uri":""
}
}

Field name

Description

account

the type of what has been resolved. An account is a starname, i.e. this is a name*domain

domain

the string after the * in a starname

name

the string before the * in a starname

owner

the star address of who has the right to edit and perform transactions on this starname. Note: the owner of a closed domain has the right to delete any starname of a closed domain.

valid_until

the expiry date of the starname, in seconds from 1jan1970

resources

a map of the asset-id (string) to the associated crypto address (string). The list of asset-id can use is here.

broker

the star address of who has helped registering this starname -- most likely the app that was used to register the name, and it will be rewarded for this

metadata_uri

the uri of the metadata of the starname (string) -- For example it can be the URL of a link to IPFS which return a JSON file with the full name, a picture and a small description of the starname