Announcing the JavaScript SDK for Openchain

nodejs-2560x1440We are happy to announce the release of openchain-js, the JavaScript SDK for Openchain. It works both on Node.js and in the browser.

The library is available as an NPM and Bower package, and encapsulates all the logic necessary to work with Openchain, including transaction serialization in protocol buffers format and signing. The library relies on Bitcore for signing and key management given that Openchain uses the same cryptography as Bitcoin.

To install it through NPM (Node.js):

If you want to install it through Bower:

If you decide to use it in the browser, make sure to reference the scripts in your page:

It is easy to build and submit a transaction to openchain using the TransactionBuilder class. Here is a code sample issuing an asset on Openchain programatically:

For more code samples, check the GitHub repository. In particular, the last code sample will show you how to store arbitrary data securely in the chain in just a few lines of code.

Finally, we have “rewritten” the Openchain wallet to make use of that new library.

You may also like...