Interact with the network

What does it mean to interact with the network?

Every action that inserts data into the blockchain, or alternatively extracts data from the blockchain is considered an interaction within the blockchain network.

Who or what interacts with the network?

  1. Exchanges interact heavily with the network. For example, by transferring tokens for their customers. It is highly recommended to utilise exchanges to set up a node in order to interact with the network reliably.

  2. Delegates also interact with the network by forging new blocks and adding them to the blockchain. A delegate is also typically known as a node operator.

  3. Node operators and developers also have a general interest in monitoring their node(s) as well as the network. Their nodes provide them with a private API that can be used to perform different queries, or to post transactions to the network. Depending on their preferences, node operators may wish to use Lisk Elements, Lisk Commander or a graphical interface such as Lisk Desktop.

  4. Applications interact with the network through the API. For convenience, applications may use wrappers such as @liskHQ/lisk-api-client.

  5. LSK Token Holders mostly interact with the network through Graphical User Interfaces such as wallet applications such as Lisk Desktop or Lisk Mobile.

How to interact with the network?

Network Interaction

The following tools covered here are suited for network interaction with both the Lisk Mainnet and Testnet. In addition, they can also be used to interact with other blockchain applications that have been developed using the Lisk SDK. However, in this case it may be necesssary to customize the tools in order to function correctly with these other applications.

It is possible to choose up to 5 different methods to interact with an existing network, based on the most convenient and appropriate requirements as described below:

A - Write scripts in Javascript

Lisk Elements is a collection of Javascript libraries that help applications to interact with the network.

On the Packages page of Lisk Elements, all available libraries are listed and documented.

One of the most useful packages in this regard is the @liskhq/lisk-api-client, as it provides an efficient and streamlined interface to interact with the network in Javascript.

B - Use the Command-line

Lisk Commander is the CLI-tool that allows interaction with the network in a convenient manner through the command line. Please see the list of all commands and their example responses on the following Commands page.

C - Use Lisk Desktop

Lisk Desktop is the Graphical User Interface (GUI) to interact with the network.

This consists of wallet functionalities, such as sending transactions and viewing account history, including more extended features such as delegate voting or registering as a delegate.

D - Lisk Explorer

Lisk Explorer is a web application that visualizes the vast information from Lisk’s blockchain.

Lisk offers Explorers for the 2 public networks:

The source code of Lisk Explorer is open source, and hence can be utilized to set up the user’s own Explorers to visualize and monitior the activity inside the network.

E - Query the API

Query the API manually. Either from a public node, or connect to your own private node to interact with the network.

To view the full specification of the Lisk Core API including example queries, please see the Lisk Core API.

To execute the query, use any applicable tool that is suitable for HTTP API requests.

Popular tools for HTTP requests:

  • reference/api.adoc[Swagger UI]: This is a Web interface that can send API requests in addition to providing the complete API specification.

  • Curl: This performs API requests from the command-line.

  • Postman: This is a user friendly graphical interface for sending API requests.

Use a public node

There are a number of nodes that are available for public use.

For example, LiskHQ is running a public testnet node that is also used to make reference/api.adoc[live requests] whilst trying out the different API endpoints in the documentation.

When pressing the "Try it out" button beside each endpoint, it is possible to execute the corresponding API request and receive a live response from the Lisk Testnet. It will also display the corresponding curl command in order to execute the request from the command-line.

Use your private node

When setting up Lisk Core, the API will be private by default. Therefore API requests will be only accepted from the localhost.

If it is required to change this, it is possible to define exclusive whitelists that allow specific addresses to perform API requests on that specific node.