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

Latest commit

 

History

History
51 lines (36 loc) · 1.7 KB

README.md

File metadata and controls

51 lines (36 loc) · 1.7 KB

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.