getHemiNames
  • Introduction
    • Terminology
  • Getting Started
    • Setup Wallet
    • Mint your Identity
  • Domain Transfer
  • Use getHemiNames on Metamask
  • Developers
    • APIs
    • Resolving
  • Listing getHemiNames on NFT Marketplaces
  • Smart Contract Addresses
  • X (ex-twitter)
Powered by GitBook
On this page

Listing getHemiNames on NFT Marketplaces

PreviousResolvingNextSmart Contract Addresses

Last updated 2 months ago

How to integrate getHemiNames NFTs secondary market metadata?

You can integrate NFTs secondary market metadata following the steps below:

  1. Fetch the URI endpoint to call from the tokenURI(uint256 tokenId) function of the contract.

    • Where tokenId is the token ID of the NFT - uint256(keccak256(bytes("label"))).

    • The function returns the metadata endpoint to call for the NFT.

  2. Fetch the metadata from the endpoint.

    • you can expect the metadata to be in the format of a JSON file:

    {
      "name": "hello.hemi",
      "description": "This NFT represents the domain name hello.hemi on the getHemiNames system.",
      "image": "",
      "external_url": "https://www.getheminames.me/domain/hello.hemi",
      "attributes": [
        {
          "trait_type": "Resolved Address",
          "value": "0xe0096004fFb5A6d03769e6b9b333C010742d32d5"
        },
        {
          "trait_type": "Expiration Date",
          "value": "Mon Mar 09 2026"
        }
      ]
    }

  • Keep in mind that you need to calculate the tokenId from the label to fetch the correct metadata, so depending on the library you use, you might need to implement the logic to calculate the tokenId from the label.

You can always decide to save the base URI in your own storage and fetch it from there, thus avoiding the need to call the tokenURI function of the contract.

BaseRegistrar
BaseRegistrar