APIs
Name and addresses can be looked up by a public API.
Name Lookup
- MainNet Endpoint:
https://vet.domains/api/lookup/name/{name}
- TestNet Endpoint:
https://testnet.vet.domains/api/lookup/name/{name}
- Searches for the address record for a given name
Example:
$ curl -s https://vet.domains/api/lookup/name/my.vet | jq
{
"resolverAddress": "0xC992D23870ca891A3D06307E177Fed38232907A7",
"address": "0x105199a26b10e55300cb71b46c5b5e867b7df427",
"name": "my.vet"
}
Address Lookup
- MainNet Endpoint:
https://vet.domains/api/lookup/address/{address}
- TestNet Endpoint:
https://testnet.vet.domains/api/lookup/address/{address}
- Searches for the primary name for a given address
- Returns a
verified
flag that checks if the name also points to the address, to prevent homograph attacks (opens in a new tab)- verified is
true
if name points to the same address - verified is
false
if name points to a different address
- verified is
Example:
$ curl -s https://vet.domains/api/lookup/address/0x105199a26b10e55300cb71b46c5b5e867b7df427 | jq
{
"resolverAddress": "0xC992D23870ca891A3D06307E177Fed38232907A7",
"address": "0x105199a26b10e55300cb71b46c5b5e867b7df427",
"name": "😵💫😵💫😵💫.vet",
"verified": true
}
Metadata
- MainNet Endpoint:
https://vet.domains/api/metadata/{tokenId}
- TestNet Endpoint:
https://testnet.vet.domains/api/metadata/{tokenId}
- Provides basic NFT metadata
Example:
$ curl -s https://testnet.vet.domains/api/metadata/12910348618308260923200348219926901280687058984330794534952861439530514639560 | jq
{
"name": "hello.vet",
"description": "hello.vet is a vet.domains name",
"attributes": [
{
"trait_type": "name_length",
"value": 5
}
],
"external_url": "https://testnet.vet.domains/hello.vet",
"image": "https://testnet.vet.domains/api/images/hello.vet.png"
}
Owned Names (Indexer)
This endpoint is currently not marked stable and can change without further notice.
- MainNet Endpoint:
https://vet.domains/api/users/{address}/names
- TestNet Endpoint:
https://testnet.vet.domains/api/users/{address}/names
- Searches for all names owned by a given address
Example:
$ curl -s https://vet.domains/api/users/0x105199a26b10e55300cb71b46c5b5e867b7df427/names | jq
[
{
"name": "hello.vet",
"id": "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8",
"contract": "0x1cf6c86e12cec2c4a834f31b11192f77ea70aa57",
"blockHeight": 17600384
}
]
blockHeight
is the block number when the index was updated.
Contracts
- MainNet Endpoint:
https://vet.domains/api/system/main
- TestNet Endpoint:
https://testnet.vet.domains/api/system/test
- Lists all network relevant details, especially deployed contract addresses
Example:
$ curl -s https://testnet.vet.domains/api/system/test | jq
{
"id": "1176455790972829927178843975305401940018261314401477529965699268608",
"name": "vechain_testnet",
"network": "homestead",
"nativeCurrency": {
"name": "VeChainThor",
"symbol": "VET",
"decimals": 18
},
"rpcUrls": {
"public": {
"http": [
"https://node-testnet.vechain.energy"
]
},
"default": {
"http": [
"https://node-testnet.vechain.energy"
]
}
},
"contracts": {
"ensRegistry": {
"address": "0x7f1382a543FE4eCE9477d7b6BE7c6F1e0389a7A6"
},
"ensBaseRegistrarImplementation": {
"address": "0xcbbECde6CF7c6F2E20C8BE25700C933e7130cBC4"
},
"ensDnsRegistrar": {
"address": "0x0000000000000000000000000000000000000000"
},
"ensEthRegistrarController": {
"address": "0xFa03Aa3c077707037BB184B98DaC5e2Cc6319c5D"
},
"ensNameWrapper": {
"address": "0xb06d79179E225Fc3dA97f4Ade32b7058977b8A65"
},
"ensPublicResolver": {
"address": "0xC992D23870ca891A3D06307E177Fed38232907A7"
},
"ensReverseRegistrar": {
"address": "0xd4B1E4B3f358AbF25bF8047B6520d9668A62Fd46"
},
"ensBulkRenewal": {
"address": "0xDD423104f55F4D234ef5477C8fa8FDfdA71fdF29"
},
"ensDnssecImpl": {
"address": "0x0000000000000000000000000000000000000000"
},
"ensUniversalResolver": {
"address": "0x9d7c4c28cb0764ae7Ee5015e36569220A13b7c22"
},
"multicall3": {
"address": "0x03F4838B69d4413893BDb96c50b6A30d61c52Eb5"
},
"venOracle": {
"address": "0xdcCAaBd81B38e0dEEf4c202bC7F1261A4D9192C6"
}
},
"batch": {
"multicall3": true
},
"blockExplorers": {
"default": {
"name": "Explorer",
"url": "https://explore-testnet.vechain.org"
}
}
}
blockHeight
is the block number when the index was updated.