Claim Name
Claim Name
This POST route is used to claim a name for a given address and domain. It will throw an error if the name has already been claimed.
URL Parameters
  • single_claim (1 or 0): If this parameter is 1, each address can claim only one name.
Post Parameters
  • name (string): The name being set, i.e., the "example" in example.testbrand.eth.
  • domain (string): The domain ("testbrand.eth").
  • address (string): The ethereum address the name points to.
  • contenthash (string)(Optional): The link for an ipfs or ipns website.
  • text_records (object)(Optional): An object containing key-value pairs representing the text records to be set.
Example
POST https://namestone.xyz/api/public_v1/claim-name { "domain":"testbrand.eth", "name":"example", "address":"0xE997...3C57", "text_records": { "com.twitter":"namestonehq", "com.github":"aslobodnik", "com.discord":"superslobo", "url":"https://www.namestone.xyz", "location":"📍 nyc", "description":"APIs are cool", "avatar":"https://raw.githubusercontent.com/aslobodnik/profile/main/pic.jpeg" } } headers: { `Authorization: YOUR_API_KEY` }
Curl Example
curl -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: YOUR_API_KEY' \ -d '{ "domain":"testbrand.eth", "name":"example", "address":"0xE997...3C57", "text_records": { "com.twitter": "namestonehq", "com.github":"aslobodnik", "com.discord":"superslobo", "url":"https://www.namestone.xyz", "location":"📍 nyc", "description":"APIs are cool", "avatar":"https://raw.githubusercontent.com/aslobodnik/profile/main/pic.jpeg" } }' \ https://namestone.xyz/api/public_v1/claim-name
Standard Text Records
Standard text records are those that the ENS app will show.
  • • description
  • • com.discord
  • • com.github
  • • com.twitter
  • • url
  • • avatar