# @siddomains/sei-sidjs

> sei-sidjs v1

Latest version **0.0.4** (published 2023-12-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @siddomains/sei-sidjs
pnpm add @siddomains/sei-sidjs
yarn add @siddomains/sei-sidjs
bun add @siddomains/sei-sidjs
```

## 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.4 |
| Published | 2023-12-01 |
| First published | 2023-06-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | ming_space, eddiezhu, yangy888, chn1807, spaceid |

## Links

- npm: https://www.npmjs.com/package/@siddomains/sei-sidjs
- Repository: https://github.com/Space-ID/sei-sidjs
- npm.io page: https://npm.io/package/@siddomains/sei-sidjs

## Dependencies (4)

- [@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.4 (latest) — 2023-12-01
- 0.0.3 — 2023-08-24
- 0.0.2 — 2023-06-25
- 0.0.1 — 2023-06-25

## README

~~# Use sei-sidjs SDK to interact with SEI-SID contracts

# SEI-SID.js

SEI-SIDjs integrates the SEI-SID contract.

## Overview of the API

### Installation

Install @siddomains/sei-sidjs, alongside [@sei-js/core](https://www.npmjs.com/package/@sei-js/core).

```
npm install @siddomains/sei-sidjs @sei-js/core
```

### Getting Started

All that's needed to get started is a CosmWasmClient instance, you should pass it and select chain id when creating a
new SeiID instance.

```javascript
// atlantic-2 testnet domain example
const SeiID = require('@siddomains/sei-sidjs').default
const {getSeiIDAddress} = require('@siddomains/sei-sidjs')
const {getCosmWasmClient} = require("@sei-js/core")

async function main(name) {
    const client = await getCosmWasmClient('https://rpc.atlantic-2.seinetwork.io/');
    const seiId = new SeiID({client, chainId: 'atlantic-2', seiIdAddress: getSeiIDAddress('atlantic-2')})

    const address = await seiId.name(name).getAddress()
    console.log("name: %s, address: %s", name, address)
}

main("000.sei")
```

```javascript
// pacific-1 mainnet domain example
const SeiID = require('@siddomains/sei-sidjs').default
const {getSeiIDAddress} = require('@siddomains/sei-sidjs')
const {getCosmWasmClient} = require("@sei-js/core")

async function main(name) {
    const client = await getCosmWasmClient('https://sei-rpc.polkachu.com/');
    const seiId = new SeiID({client, chainId: 'pacific-1', seiIdAddress: getSeiIDAddress('pacific-1')})

    const address = await seiId.name(name).getAddress()
    console.log("name: %s, address: %s", name, address)
}

main("allen.sei")
```

### exports

```
default - SeiID
getSeiIDAddress
domainNode
domainTokenId
validateName
```

### SeiID 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 SeiID name.

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

Returns the resolver for the current SeiID name.

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

Returns the address for the current SeiID 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 run build
node main.js
```~~

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