Lisk Elements

Logo

Lisk Elements is a JavaScript library containing several separately installable npm packages, each covering a distinct region of Lisk-related functionality.

Setup

Supported platforms

  • Platforms with Node.js version 8.10 and above.

Pre-installation

Lisk Elements requires Node.js as the underlying engine for code execution. This document describes how to install Node and NPM for installation via NPM.

Install node

Follow the instructions for your operating system on the Node.js downloads page.

NPM is automatically installed along with Node.js.

Verify installation

Confirm that Node.JS and NPM have been successfully installed by running the following commands:

node --version
npm --version

Installation

This section describes how to install Lisk Elements for a given distribution.

As all packages in Lisk Elements are independent from each other, they can be installed seperately.

Installation via NPM

To install the latest version of Lisk Elements for use as a dependency in a Node.js project, please proceed with the following:

Complete library

npm install lisk-elements

Specific package

npm install @liskhq/<package-name> (1)
1 <package-name> can be any of the packages in Lisk Elements.
For concrete code examples for each package, check the Packages section.

Upon successful completion, NPM will add the Lisk Elements package to your package.json file.

Load via CDN

Include the script below using the following HTML. The lisk variable will be exposed.

Client library

<script src="https://js.lisk.io/lisk-client-2.1.1.js"></script>

Or minified:

<script src="https://js.lisk.io/lisk-client-2.1.1.min.js"></script>

To include other packages of Lisk Elements, replace lisk-client with any of the packages of Lisk Elements.

Upgrade

To update your installation to the latest version of Lisk Elements, simply execute the following command:

npm update lisk-elements