Version 1.0
Resolve a web3 domain
This API provides the resolution records of a given web3 domain
METHOD: GET
ENDPOINT:
javascripthttps://rslvr.freename.io/domain/resolve
Query params
Key | Allowed type | Description | Example |
q | String | The domain name | cederico.metaverse |
Endpoint example:
javascripthttps://rslvr.freename.io/domain/resolve?q=cederico.metaverse
Output ‡οΈ
javascript{"host":"cederico.metaverse","network":"POLYGON","tld":"metaverse","tokenID":"27852860280769187492768842851433555806350745604062440243777647496936527137670","sld":"cederico","isTld":false,"isSld":true,"records":[{"key":"token.MATIC.0","type":"MATIC","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.EUROC.0","type":"EUROC","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.USDT.0","type":"USDT","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.USDC.0","type":"USDC","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.BTC.0","type":"BTC","value":"bc1qmklcz6knjtudu5vk535zegfk9xf4n0vg8tsv6n"},{"key":"token.ETH.0","type":"ETH","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.BNB.0","type":"BNB","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.AURORA.0","type":"AURORA","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.xDAI.0","type":"xDAI","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"token.BUSD.0","type":"BUSD","value":"0x673c4F104F425BEB439EdeEF2e22bDFCEdAD0Ac5"},{"key":"redirect.WEBSITE.0","type":"WEBSITE","value":"https:\/\/dot.cards\/federicocosta"},{"key":"record.TXT.0","type":"TXT","value":"https:\/\/dot.cards\/federicocosta"},{"key":"profile.OWNER.0","type":"OWNER","value":"Federico Costa"}]}
Response
Key | Type | Description | Example |
host | String | The domain searched | cederico.metaverse |
network | String | The blockchain where the domain is minted | POLYGON |
tld | String | The TLD of the domain | metaverse |
tokenID | String | The Token ID of the domain | 1232321β¦ |
sld | String | The second level domain part | cederico |
isTld | Boolean | Is the entered element a tld | false |
is Sld | Boolean | Is the entered element a sld | true |
records | Array<RecordElement> | The content of the domain |
RecordElement Response
Key | Type | Description | Example |
key | String | The record key | βredirect.WEBSITE.0β |
type | String | An extraction of the contest from the key | WEBSITE |
value | String | The content of the record | https://google.com |
Records to use for a browser resolution
Browsers can check the following records to run their own resolution
- redirect.WEBSITE.0
- Browser.redirect_url
- Format: RFC-1738
Example: https://google.com
This record contains an URL for the redirect. For example, if a user types cederico.metaverse and this record is setted up, then the browser will redirect to what its contained inside (in the example above would be https://google.com)
- record.A.0
- Format: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$
- Example: 123.123.123.123
This record contains an IP address just like the normal record A. If the browser support this resolution then when the user types cederico.metaverse the browser will resolve to the A record contained and opens an HTTP request to the IP address containing in the HTTP Header the host must be cederico.metaverse.
javascriptdweb.ipfs.hash
- Format [0-9a-zA-Z]{46}
Example: QmVaAtQbi3EtsfpKoLzALm6vXphdi2KjMgxEDKeGg6wHvK
Use this field to resolve with the DWeb a decentralized website running in IPFS or similar.