Usage

1.1 Resolve domain name

The name method allows you to resolve a domain name. It returns a Promise that resolves with the domain name or rejects with an error if the resolution fails.

Parameter:

  • domainName (string.sei): The domain name you want to resolve.

Example:

import { getCosmWasmClient } from "@sei-js/core";
import DotSei from "@dotnames/dotseijs"

const client = await getCosmWasmClient("https://sei-rpc.polkachu.com/");
const dotSei = new DotSei({
  client,
  networkId: "pacific-1",
});

const domainName = "---Enter domain name to resolve---";
const owner = await dotSei.name(domainName).getAddress();
console.log("Owner of given domain name:- ", owner)

1.2 Resolve wallet address

The getName method allows you to resolve the address. It returns a Promise that resolves with the wallet address or rejects with an error if the resolution fails.

Parameter:

  • walletAddress (sei${string}): The wallet address you want to resolve.

Example:

import { getCosmWasmClient } from "@sei-js/core";
import DotSei from "@dotnames/dotseijs"

const client = await getCosmWasmClient("https://sei-rpc.polkachu.com/");
const dotSei = new DotSei({
  client,
  networkId: "pacific-1",
});

const walletAddress = "---Enter Wallet Address---";
const domainName = await dotSei.getName(walletAddress);
console.log("Domain name for given address:- ", domainName);

Last updated