2.5.3 • Published 9 months ago

@decentraweb/resolver v2.5.3

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

Decentraweb node DNS resolver and DNS management library

This package is DNS resolver. It support resolving DWEB, ENS and ICANN domain names.

If domain ends with .eth then it is resolved through ENS. If domain has one of the ICANN TLDs, then it is resolved through regular DNS. All other domains are resolved with DWEB contracts.

List of ICANN domains can be found at https://data.iana.org/TLD/tlds-alpha-by-domain.txt and is stored in ./icann_tlds.txt file. It needs to be regulary updated.

Resolver types

This package include 3 resolver classes: 1. TCPResolver 2. UDPResolver 3. DOHResolver

TCP and UDP resolvers work with standard DNS protocol which uses binary data format known as "wire format".

DOHResolver support 2 types of resolution: 1. https://{server_address}/dns-query - standard RFC 8484 binary format 2. https://{server_address}/resolve - JSON API for app developers.

Binary queries

We use dns-packet package to encode/decode binary DNS packets. It has code samples for querying DNS over TCP, UPD and DoH https://github.com/mafintosh/dns-packet/tree/master/examples

JSON API

For app developers it is also possible to use simple JSON API to resolve names.

curl --location --request GET 'resolver.decentraweb.org/resolve?name=frontender.me&type=A'

Parameters: 1. name - domain name. 2. type - record type. Either id or string representation supported. List of types can be found here. Defaults to A if not specified.

Setup

npm install
npm run build

Create .env file. If you only want to read data, you can leave WALLET and PKEY empty.

To start resolver run:

npm run start:resolver 

In shell console run:

dig @127.0.0.1 -p 5333 sergiy.eth A
3.0.0-alpha.3

9 months ago

3.0.0-alpha.1

1 year ago

3.0.0-alpha.0

1 year ago

2.5.3

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.5.0

1 year ago

2.4.0

1 year ago

2.3.0

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.6

1 year ago

2.0.0-alpha.3

2 years ago

2.0.0-alpha.4

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

2.0.0-alpha.2

2 years ago

2.0.0-alpha.1

2 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.0-alpha.3

3 years ago

1.0.0-alpha.2

3 years ago

1.0.0-alpha.1

3 years ago

1.0.0-alpha.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago