The IOTA Javascript Library

Tech Updates Nov 27, 2016

As part of our effort in making IOTA developer friendly and easy to use, we are happy to announce today that the first of the proposed libraries is ready for public testing!  

The official github repo can be found here:  

Because it’s a javascript library, there are obviously various options for you to install the package:

npm install iota.lib.js

bower install iota.lib.js

Or if you want to use it in the browser directly, you can simply use theiota.jsoriota.min.jsfiles which are included in the /dist folder. You can also build them yourself with gulp.

Using the library itself is actually very straight forward. There is a full documentation that you can read through to know exactly what functionality is available to you.

Utilizing the library is as simple as creating a new instance of the IOTA object. In this object you have all the necessary functionality available that will make your life as a developer easier. Most notably, there are the subclasses api and utils. For deeper insight, simply refer to the documentation.  

Here is a simple example:

var iota = new IOTA();// get current information about the node iota.api.getNodeInfo(function(error, success) {console.log(success);})// Convert 1Ti into Giiota.utils.convertUnits(1, 'Ti', 'Gi')

Obviously this library as it is right now is early beta phase. As such I would appreciate any input from the developer community. This includes bugs, proposed fixes as well as suggestions for improved functionality. Feel free to reach out via Slack or on Github directly.

In a future release we will work on more useful tools such as the conversion from / to UTF-8 and ASCII into Trytes, event listeners for the Tangle, as well as more wrapper functions. If you have any proposal or want to join the development of the library, just reach out.

The other libraries (C#, Java and Python) are currently under development and will hopefully soon be ready as well!


IOTA Foundation

Official posts from the IOTA Foundation, and migrated posts from old platforms.