Setting Starname info
Once you have registered a starname, you can associate address to it so that others can know how to reach you.
The command to associate info to your starname is
replace-resources
iovnscli tx starname replace-resources --domain iov --name benji --from benkeys --fees 2000000uvoi --src ~/my_targets.json
Flags | Description |
--domain | the domain part of the starname to edit |
--name | the name part of the starname to edit (if not empty) |
--src | the json file with the data to associate. The json needs to be in the format of a list of pairs of [{"uri":..., "resource":...}]. The max number of addresses per starname is set in the configuration resources_max and is 10 at launch. More details below. |
--from | the signer of the transaction, which needs to be the owner of the starname |
--fees |
The
--src
file might typically look like this:[
{
"uri": "asset:btc",
"resource": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
},
{
"uri": "asset:eth",
"resource": "0xd5af805d5429ec16b4059d76854d25a4bb1b7ba9"
},
{
"uri": "asset:atom",
"resource": "cosmos1y6yvdel7zys8x60gz9067fjpcpygsn62ae9x46"
}
]
You can check that the info has been correctly updated by resolving the starname
iovnscli query starname resolve --starname benji*delta
{
"account": {
"domain": "delta",
"name": "benji",
"owner": "star10lalxx8ml63hs86j64nk76kucf72dsucluexz8",
"valid_until": 4746278435,
"targets": [
{
"uri": "asset:btc",
"resource": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
},
{
"uri": "asset:eth",
"resource": "0xd5af805d5429ec16b4059d76854d25a4bb1b7ba9"
},
{
"uri": "asset:atom",
"resource": "cosmos1y6yvdel7zys8x60gz9067fjpcpygsn62ae9x46"
}
],
"broker": "",
"metadata_uri": ""
}
}
For the resolver to work, the target for a coin or asset needs to be composed of two parts:
- the
URI
: a stringtype
and an stringidentifier
separated by a:
,type:identifier
.The first string is the type of identifier provided by the second string. At launch, the IOV Name Service resolves only the typeasset
but you can input any type in the URI. A URI of typeasset
is expecting anidentifier
within the Symbol list - the
resource
: this is the string returned by the resolver when asked for this specificURI
. This is typically an address working with the coin identified in theURI
.
The valid format for targets can be checked with the
configuration get-config
commandiovnscli query configuration get-config
{
"configuration": {
"valid_uri": "^[-a-z0-9A-Z:]+$",
"valid_resource": "^[a-z0-9A-Z]+$",
"resources_max": 10,
}
}