Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @rnsdomains/rns-sdk-js with all npm packages installed. Try it out:

var rnsSdkJs = require("@rnsdomains/rns-sdk-js")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@rnsdomains/rns-sdk-js v0.0.1

A RNS interface module built on NodeJS.


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


To run unit tests, clone this repository.

Install Ganache-cli for a local blockchain

$ npm install -g ganache-cli
$ ganache-cli

Finally opan another terminal and run

$ npm install
$ npm test

Usage and Getting Started

In a Javascript project:

$ npm install rns-sdk-js

In a JavaScript file:

// import RNS's Resolver SDK object.
var Resolver = require('rns-sdk-js');
resolver = new Resolver(web3.currentProvider, resolverAddress, resolverABI);

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.



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


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.


For more information, see RNS Docs.



RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free