Example

Using DotSei SDK in TypeScript/JavaScript

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",
});

dotSei.name("123456789.sei").getAddress()
	.then((res) => {
    console.log(`Wallet Address: ${res}`);
  })
  .catch((err) => {
    console.error(`Error: ${err}`);
  });

 dotSei.getName("sei1dr94pqt23atf285xvl4c63wvhxaf7mkdjzle24")
	.then((res) => {
    console.log(`: ${res}`);
  })
  .catch((err) => {
    console.error(`Error: ${err}`);
  });

Response:

Wallet Address: sei1dr94pqt23atf285xvl4c63wvhxaf7mkdjzle24
Domain name: 123456789.sei

Last updated