An API Wrapper library for RISE
Clone or download
Pull request Compare This branch is 10 commits ahead of vekexasia:master.
Latest commit 32f0fbc Sep 28, 2018

npm Build Status Coverage Status

RISE Javascript Library

A JavaScript API Wrapper for interacting with a rise node. The library works both in the browser and Node.js.

Table of Contents

API Reference

All available methods are available in the API reference at


Package Manager

Install via your favorite package manager

npm install --save risejs
# or using yarn
yarn add risejs

Include in your javascript

var rise = require('risejs').rise;
// or using es6
import { rise } from 'risejs'


Include via the unpkg CDN in your html

<script type="text/javascript" src=""></script>

rise is now globally available on the window object

    rise.nodeAddress = '';
    // ...



Set the node address on the RiseAPI object (note: omit any trailing slashes to the url)

rise.nodeAddress = 'http://localhost:5566';

To see other configuration options refer to the API reference


All API method responses can be handled with either a callback or a Promise. For example, to get the chain status using callbacks

rise.blocks.getStatus(function(err, res) {
    if (err) {
    return console.log('Error: ', err); // handle error
    console.log(res); // { success: true, broadHash: "12aebd7b...

using Promises

    .then(function(res) {
        console.log(res); // { success: true, broadHash: "12aebd7b...
    .catch(function(err) {
        console.log('Error: ', err); // handle error

using async / await

try {
    const res = await rise.blocks.getStatus()
    console.log(res) // { success: true, broadHash: "12aebd7b...
catch(err) {
    console.log('Error: ', err) // handle error

Error Handling

If rise.errorAsResponse is set to true (the default), application errors will be returned as an object in the response

    "success": false,
    "error": "Message"

So that handling errors is as follows

    .then(function(res) {
        if (!res.success) {
            return console.log('Application Error: ', res.error); // handle Application Error
        console.log(res); // { success: true, broadHash: "12aebd7b...
    .catch(function(err) {
        console.log('HTTP Error: ', err); // handle HTTP error


Our Libraries are written in typescript so that you can use types in your applications

import { rise, BlockStatusResponse } from 'risejs';

function handleStatus(err: Error, status: BlockStatusResponse) {

All available types are available in the API reference as well at

Advanced Usage

Additional APIWrapper objects can be made using the newWrapper method

var node1 = rise.newWrapper('http://node1:1234');
var node2 = rise.newWrapper('http://node2:1234', { timeout: 5000 });


Browser Support

Chrome Firefox Safari Opera Edge IE
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔ 8+ ✔

Browser Matrix

Node support

Node >= 4.x is fully supported :)


Read the Contributing Guide for guidelines as well as local development instructions. And thank you to all of our contributors.


Feel free to join the Slack!