Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

rnsdomains/rns-js-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

rns-js-resolver

RNS Node.js SDK

CircleCI logo

Implementations for local resolvers for the RIF Name Service, available for Node.js.

npm i @rsksmart/rns-js-sdk
const Resolver = require('@rsksmart/rns-js-sdk');

const resolver = new ResolverContract();

Run tests

  1. Install ganache-cli with npm install -g ganache-cli
  2. Run local node with ganache-cli
  3. Run tests with npm test

Usage

Functions that require communicating with the node return promises, rather than using callbacks. A promise has a then function, which takes a callback and will call it when the promise is fulfilled; then returns another promise, so you can chain callbacks.

Contracts

RNS.sol

Implementation of the RNS Registry, the central contract used to look up resolvers and owners for domains.

PublicResolver.sol

Simple resolver implementation that allows the owner of any domain to configure how its name should resolve. One deployment of this contract allows any number of people to use it, by setting it as their resolver in the registry.

Documentation

For more information, read the docs.