# @dotnames/dotseijs

> DotSeiJs : A Javascript Library To Resolve Names On Sei Blockchain

Latest version **0.0.3** (published 2024-01-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dotnames/dotseijs
pnpm add @dotnames/dotseijs
yarn add @dotnames/dotseijs
bun add @dotnames/dotseijs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2024-01-24 |
| First published | 2023-11-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 21 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dotnames |
| Maintainers | dotname |
| Keywords | dotsei-sdk, dotnames, dotsei, sei, dotsei-js |

## Links

- npm: https://www.npmjs.com/package/@dotnames/dotseijs
- Repository: https://github.com/dotnames/dotseijs
- Homepage: https://github.com/dotnames/dotseijs#readme
- Issues: https://github.com/dotnames/dotseijs/issues
- npm.io page: https://npm.io/package/@dotnames/dotseijs

## Dependencies (5)

- [@sei-js/core](https://npm.io/package/@sei-js/core.md) ^3.1.3
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.4.4
- [lodash.toarray](https://npm.io/package/lodash.toarray.md) ^4.4.0
- [@ensdomains/ens-validation](https://npm.io/package/@ensdomains/ens-validation.md) ^0.1.0
- [@ensdomains/eth-ens-namehash](https://npm.io/package/@ensdomains/eth-ens-namehash.md) ^2.0.15

## Recent versions

- 0.0.3 (latest) — 2024-01-24
- 0.0.2 — 2024-01-24
- 0.0.1 — 2023-11-29

## README

# DotSeiJs : A Javascript Library To Resolve Names On Sei Blockchain

## Overview of the API

### Installation

Install @dotnames/dotseijs

```
yarn add @dotnames/dotseijs
```

Install @sei-js/core

```
yarn add @sei-js/core
```

### Getting Started

Initalize CosmWasmClient from @sei-js/core

```
const { getCosmWasmClient } = require("@sei-js/core");

const client = await getCosmWasmClient(
     " RPC_URL"
    );
```
Setup 
```
   const dotSei = new DotSei({
      client,
      networkId: "pacific-1",
      dotSeiAddr: getRegistryAddress("pacific-1")  //optional
    });
```

### exports

```
default - DotSei
getRegistryAddress
domainNode
domainTokenId
validateName
```

### DotSei Interface

```
name(name: String) => Name
```

Returns a Name Object, that allows you to make record queries.

```
resolver(address: SeiAddress) => Resolver
```

Returns a Resolver Object, allowing you to query names from this specific resolver. Most useful when querying a different resolver that is different than is currently recorded on the registry. E.g. migrating to a new resolver

```
async getName(address: SeiAddress) => Promise<Name>
```

Returns the reverse record for a particular Sei address.

### Name Interface

```ts
async getOwner() => Promise<SeiAddress>
```

Returns the owner/controller for the current DotSei name.

```ts
async getResolver() => Promise<SeiAddress>
```

Returns the resolver for the current DotSei name.

```ts
async getAddress() => Promise<SeiAddress>
```

Returns the address for the current DotSei name.

```ts
async getAvatar() => Promise<NFTUrl>
```

Returns the url of NFT PFP for the current DotSei name.

## Resolver Interface

```ts
address;
```

Static property that returns current resolver address

```ts
name(name) => Name
```

Returns a Name Object that hardcodes the resolver

Build SDK and test on your test machine

```shell
yarn install
yarn test
```

---
_Source: https://npm.io/package/@dotnames/dotseijs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
