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
  • Forward Resolve (from Name to Address)
  • Onchain
  • Reverse Resolve (from Address to Name)
  1. Developers

Resolving

PreviousAPIsNextListing getHemiNames on NFT Marketplaces

Last updated 2 months ago

Forward Resolve (from Name to Address)

Onchain

Assuming you have minted yourname.hemi with correct data (or correct setAddr), you need to call resolve on the universal resolver passing the dns encoded form of the name and the function you want to call (in this case, addr(bytes node)). Code can be found HERE

With Viem

const ensAddress = await publicClient.getEnsAddress({
  name: normalize('test.hemi'),
})

Reverse Resolve (from Address to Name)

Onchain

Assuming you have minted test.hemi with correct data (or correct setAddr), you need to call reverse on the universal resolver passing the dns encoded form of the reverse address. Check ENS documentation if you need more

With Viem

const ensName = await publicClient.getEnsName({
  address: '<your address>',
})
return ensName // =>yourname.hemi

getEnsAddress
getEnsName
Logo
Logo