Skip to content
ZNS-ConnectPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

ZNS Connect Developer SDK

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

SDK for lookup up and interacting with ZNS domains

Install

npm install @znsconnect/sdk

Usage

Creating a client

import { http } from 'viem';
import { createZnsPublicClient, Chain } from '@znsconnect/sdk';

const client = createZnsPublicClient({
  chain: Chain.PolygonMumbai,
  transport: http(),
});

Lookup a domain

const result = client.lookup({
  name: 'syed',
  tld: 'zeta',
});

console.log(result.owner); //= 0x137645BC5f1A8efB2BAB22FAb6829DF8f12847BA

Reverse Lookup a domain

const result = client.reverseLookup({
  address: '0x137645BC5f1A8efB2BAB22FAb6829DF8f12847BA',
  tld: 'zeta',
});

console.log(result.primaryDomain); //= { name: "syed', tokenId: 1 }

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages