# @ensdomains/dnsregistrar

> [![Build Status](https://travis-ci.org/ensdomains/dnsregistrar.svg?branch=master)](https://travis-ci.org/ensdomains/dnsregistrar) [![License](https://img.shields.io/badge/License-BSD--2--Clause-blue.svg)](LICENSE)

Latest version **0.4.0** (published 2021-01-21) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @ensdomains/dnsregistrar
pnpm add @ensdomains/dnsregistrar
yarn add @ensdomains/dnsregistrar
bun add @ensdomains/dnsregistrar
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2021-01-21 |
| First published | 2018-06-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 5.1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | makoto_inoue, decanus, nickjohnson, jefflau |

## Links

- npm: https://www.npmjs.com/package/@ensdomains/dnsregistrar
- npm.io page: https://npm.io/package/@ensdomains/dnsregistrar

## Dependencies (10)

- [web3](https://npm.io/package/web3.md) 1.0.0-beta.34
- [js-sha3](https://npm.io/package/js-sha3.md) ^0.5.7
- [dns-packet](https://npm.io/package/dns-packet.md) ^5.0.4
- [@ensdomains/ens](https://npm.io/package/@ensdomains/ens.md) ^0.5.0
- [@ensdomains/root](https://npm.io/package/@ensdomains/root.md) ^0.1.0
- [eth-ens-namehash](https://npm.io/package/eth-ens-namehash.md) ^2.0.8
- [@ensdomains/buffer](https://npm.io/package/@ensdomains/buffer.md) 0.0.6
- [@ensdomains/dnsprovejs](https://npm.io/package/@ensdomains/dnsprovejs.md) ^0.1.8
- [@ensdomains/test-utils](https://npm.io/package/@ensdomains/test-utils.md) ^1.3.0
- [@ensdomains/dnssec-oracle](https://npm.io/package/@ensdomains/dnssec-oracle.md) ^0.2.0

## Recent versions

- 0.4.0 (latest) — 2021-01-21
- 0.3.9 — 2019-09-02
- 0.3.8 — 2019-08-27
- 0.3.7 — 2019-08-27
- 0.3.6 — 2019-06-24
- 0.3.5 — 2019-04-24
- 0.3.4 — 2019-04-24
- 0.3.3 — 2019-04-24
- 0.3.2 — 2019-04-23
- 0.3.1 — 2019-03-12
- 0.3.0 — 2019-02-21
- 0.2.3 — 2019-02-21
- 0.2.2 — 2018-12-17
- 0.2.0 — 2018-12-05
- 0.1.1 — 2018-11-28
- … 10 more at https://npm.io/package/@ensdomains/dnsregistrar/versions

## README

# DNS registrar for ENS

[![Build Status](https://travis-ci.org/ensdomains/dnsregistrar.svg?branch=master)](https://travis-ci.org/ensdomains/dnsregistrar) [![License](https://img.shields.io/badge/License-BSD--2--Clause-blue.svg)](LICENSE)

This project implements a registrar for ENS that grants ENS domains to anyone who can prove ownership of the corresponding domain in DNS; it uses the [DNSSEC Oracle](https://github.com/Arachnid/dnssec-oracle) to prove this.

For details on how to use this, see [How to claim your DNS domain in ENS](https://medium.com/the-ethereum-name-service/how-to-claim-your-dns-domain-on-ens-e600ef2d92ca).

## Installing

```
npm install '@ensdomains/dnsregistrar' --save
```

## Including DNSRegistrar within smart contract

```
import '@ensdomains/dnsregistrar/contracts/dnsregistar.sol'
```

### Using js binding

In addition to `DNSRegistrar` Truffle based artifact which you can call the smart contract directly, we provide a javascript wrapper which looks up DNS record, extract a proof, submit the proof via DNSSec Oracle, and register to ENS via DNSRegistrar using the proof

```js
var DNSRegistrarJs = require('@ensdomains/dnsregistrar');
dnsregistrar = new DNSRegistrarJs(provider, dnsregistraraddress);
dnsregistrar.claim('foo.test').then(claim => {
  claim.submit({ from: account });
});
```

For more detail, please [read the doc](https://dnsregistrar.readthedocs.io/en/latest/)

## Contribution guide

#### Setting up

```
git clone https://github.com/ensdomains/dnsregistrar
cd dnsregistrar
npm install
```

### Running test

```
npm run test
```

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