ZNS Docs
  • Introduction
  • ZNS SDK
  • Rest API
  • Published Contracts
  • zkSync rpc
  • ZNS enabling your dapp
  • ZNS Registry
  • Name processing
  • Public Resolver
  • Resolving Names On Chain
  • Reverse Registrar
  • Partners & Team
  • zkSync-IPFS Gateway
  • IPFS Decentralized Website
  • Create decentralized website
  • Create a website with 4EVERLAND
  • Create decentralized blog with Planet
  • Website
  • Twitter
  • Telegram
Powered by GitBook
On this page

Rest API

Convert Name to Address

// Replace "123.zkSync" with your name
const name = "123.zkSync";
const response = await fetch(`https://zns.is/api?method=getAddress&name=${name}`);
const { address } = await response.json();
//0x810791a3f967EB66B75aEb62251795d181bce680

Convert Address to Name(soon)

// Replace "address" with the address you want to lookup.
const address = "0x1234...abcdef";
const response = await fetch(`https://zns.is/api?method=getName&address=${address}`);
const { name } = await response.json();
PreviousZNS SDKNextPublished Contracts

Last updated 2 years ago