Skip to main content

Power SDK Quick Start Guide

Table of Contents

Introduction

Here is a JavaScript implementation of The Power API. The API description can be found here.

Quick start

To start using to start using the JavaScript implementation of The Power API:

  1. Clone tp_sdk_js repository into desired working directory:

    git clone https://github.com/thepower/tp_sdk_js.git
  2. Go to tp_sdk_js directory:

    cd tp_sdk_js
  3. Register the tp_msgpack submodule:

    git submodule init
  4. Update the submodule:

    git submodule update
  5. Install the library:

    npm install
  6. Build the library:

    npm run build

tp_sdk_js/build directory now contains tp-sdk.min.js file. This file can be included into your HTML page. Global object tpSdk will be available for you. It contains libraries for The Power API.

As another option, you may simply import address-lib.js (address library) or transactions-lib.js (transaction library) files directly.

Attention

When using transaction library, please make sure the js-sha512/sha512.min.js file is accessible via root-relative link /sha512.min.js.

What's next?

  1. Visit our Hello World apps section to learn how to work with our

  2. Go get information about The Power libraries to dive into the development here.