RIF Name Service (RNS) is a decentralized service that allows users to have a human-readable domain in any blockchain. It can be used to identify anything in the blockchain simply by associating a name to an address; (learn how to register a domain in this article). It sounds good, but we all know that it can be pretty difficult to interact directly with smart contracts if you are not a blockchain developer. There is a lot of knowledge required to interact with an entire decentralized system Even if there is just one contract, having the blockchain basics are a must before starting. That’s why we’ve created the RNS JS library. We believe that if blockchain is easy to use, then it will be easier to get it adopted.
No more ABIs to instantiate contracts, no more contract addresses, just one library: RNS JS. It’s fully customizable and has the needed presets to work with either RSK Mainnet or RSK Testnet without any extra configuration. No need to wait any longer, let’s go to the playground.
We’ve just provided one simple example here but the library has plenty of operations you can play with-check them out here and use them in the JS Fiddle.
Do you want it running in your local machine? It’s really easy, just follow our Getting Started tutorial. It will guide you through the installation process and explain how to run an RNS Hello World!
For blockchain developers, you will probably want to run a local node with the whole RNS suite, so you can use the library against your local blockchain. We also have a package to install the full contract suite in one command. Check it out here and, once you’re ready, learn how to instantiate the RNS JS library to be used with your local suite here, it is just one extra parameter!
The RNS JS library was mainly thought to be integrated into existing dapps and wallets. Can you imagine how easy will it be for end users to send funds to “alice.rsk” instead of “1LcwUei5JgqQX4dGvszELEVX2Ggs54MhQ1” or “0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5”? Yes, you saw a Bitcoin and an Ethereum address. With RNS JS you can resolve addresses from any blockchain, not just RSK. Let’s take a look at our Integration guideline to learn more about RNS integration with dApps and wallets.
RNS JS has been built by and for developers, so we are always looking for collaboration. Don’t hesitate to contact us for any proposals, issues or put in requests at https://github.com/rnsdomains/rns-js.
Keep up to date with the latest news from RIF by following us on Twitter @rif_os.