• This repository has been archived on 11/Jun/2024
  • Stars
    star
    2,721
  • Rank 16,737 (Top 0.4 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ”ฉ Lisk software development kit

Logo

Lisk SDK

Build status npm GitHub tag (latest by date) GitHub repo size DeepScan grade GitHub issues GitHub closed issues codecov License: Apache 2.0

What is the Lisk SDK?

The Lisk SDK aims to provide an easy and reliable software development kit for building blockchain applications which are compatible with the Lisk protocol.

The architecture of the Lisk SDK has been designed so that it can be extended to meet the requirements of a wide variety of blockchain application use cases.

The codebase is written entirely in JavaScript/TypeScript, which means for a majority of developers, no significant change of tools or mindset is required to get started.

The Lisk SDK makes every effort to allow developers to focus simply and purely on writing the code that matters to their own blockchain application, and nothing more.

Usage

Lisk SDK is an all-in-one package that provides you with tools to create, run and maintain blockchain applications in JavaScript/TypeScript.

Dependencies

The following dependencies need to be installed in order to run blockchain clients created with the Lisk SDK.

Node.js

If you are using NVM, install the correct version as shown below:

nvm install v18.16.0

Lisk Commander

It is recommended to install Lisk Commander globally with NPM (Node Package Manager), to facilitate the convenient usage of the Lisk Commander CLI.

npm install --global lisk-commander@beta

To check the successful installation of Lisk Commander, run the following command:

$ lisk --version
lisk-commander/6.0.0 darwin-arm64 node-v18.16.0

Toolchain dependencies

Once Lisk Commander is installed, install the following compiler dependencies as well.

Ubuntu
sudo apt update
sudo apt install -y libtool automake autoconf curl build-essential python2-minimal
macOS

Ensure that Homebrew is installed.

brew install autoconf automake libtool python2

Initializing a new blockchain client

Execute the lisk init command of Lisk Commander as shown below, to bootstrap a default blockchain client in the current folder.

lisk init

As a result of executing the init command, you will be asked for the Name, ChainID, Description, Author, and License of the new blockchain client.

Using template "lisk-ts"
Initializing git repository
Updating .liskrc.json file
Creating project structure
? Application name my_client
? Chain ID in hex representation. ChainID must be 4 bytes (8 characters) 12345678
? Application description A simple blockchain client for my Web3 application
? Author XYZ
? License ISC

Next, all the required files are created by Lisk Commander.

It is now already possible to start the newly bootstrapped blockchain client with default configurations for a local Devnet:

./bin/run start

Configure your blockchain parameters

The blockchain client offers a variety of configuration options such as blockTime, maxTransactionsSize, and much more.

For a complete overview of the client configuration options, please check out the SDK configuration reference and the Blockchain client configuration guide.

To use the custom config with the client, use the --config flag. Also add the --overwrite-config flag, if you used another config the last time the client was started.

./bin/run start --config config/custom_config.json --overwrite-config

Registering new modules and plugins

A module defines the logic that makes state changes on-chain, meaning that it will be a part of the blockchain protocol.

A plugin, on the other hand, defines an off-chain logic that is not part of the blockchain protocol but enhances the blockchain application features.

Add your new module or plugin to your blockchain client conveniently with Lisk Commander:

Generating a new module

Use the generate:module command in the root folder of the blockchain client to generate a ready-to-use module template.

lisk generate:module my-module-name

For more detailed explanations how to create a module, please refer to the guide How to create a module

Generating a new plugin

Use the generate:plugin command in the root folder of the blockchain client to generate a ready-to-use plugin template.

lisk generate:plugin my-plugin-name

For a more detailed explanation of how to create a plugin, please refer to the guide: How to create a plugin

Documentation

For further explanations, guides and tutorials, see the official Lisk SDK documentation.

Architecture Overview

The Lisk SDK operates on the NodeJS runtime and consists primarily of an application framework (Lisk Framework), a collection of libraries providing blockchain application functionalities (Lisk Elements), and a powerful command-line tool (Lisk Commander) helping developers to build a blockchain application using Lisk Framework. The diagram below provides a high-level overview of the architecture:

Diagram

Packages

Directory Description
Framework An application framework responsible for establishing and maintaining the interactions between the modules of a Lisk blockchain application.
Elements A collection of libraries, each of them implementing some form of blockchain application functionality such as cryptography, transactions, p2p, etc.
Commander A command line tool to help developers to build a blockchain application using Lisk Framework.

Get Involved

Reason How
Want to chat with our community Reach them on Discord
Found a bug Open a new issue
Found a security issue See our bounty program
Want to share your research Propose your research
Want to develop with us Create a fork

How to Contribute

To contribute to lisk-sdk, framework or elements:

  1. Clone the repository: git clone https://github.com/LiskHQ/lisk-sdk.git

  2. Install Yarn Classic globally

  3. Install dependencies and build:

    1. yarn
    2. yarn build

Testing your local lisk-sdk in your application.

In order to link your local lisk-sdk repository and test your application which uses lisk-sdk, simply follow the steps below in your local lisk-sdk repository and run yarn link lisk-sdk in the root of your application.

  1. cd sdk

  2. yarn link

  3. Once you have linked your local repo, every time you make changes in lisk-sdk/elements you must build packages before testing:

    a. To build all packages: npm run build or yarn build

    b. To build specific package: yarn workspace <package name> build or go into each package folder and yarn build or npm run build Example: yarn workspace @liskhq/lisk-p2p build

Note: In case you face any issues during the installation, make sure you have the right version of yarn and node and try resetting the project with yarn clean:full.

Contributors

https://github.com/LiskHQ/lisk-sdk/graphs/contributors

Disclaimer

By using the Beta release of the Lisk SDK, you acknowledge and agree that you have an adequate understanding of the risks associated with the use of the Beta release of the Lisk SDK and that it is provided on an โ€œas isโ€ and โ€œas availableโ€ basis, without any representations or warranties of any kind. To the fullest extent permitted by law, in no event shall the Lisk Foundation or other parties involved in the development of the Beta release of the Lisk SDK have any liability whatsoever to any person for any direct or indirect loss, liability, cost, claim, expense or damage of any kind, whether in contract or in tort, including negligence, or otherwise, arising out of or related to the use of all or part of the Beta release of the Lisk SDK.

License

Copyright 2016-2023 Lisk Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

lisk-elements

โš™๏ธ Library for sending Lisk transactions from the client or server
TypeScript
250
star
2

lisk-nano

๐Ÿ–ฅ Minimal Lisk graphical user interface for desktop
JavaScript
159
star
3

lisk-commander

๐Ÿฑ A command line interface for Lisk
TypeScript
142
star
4

lisk-explorer

๐Ÿ“ฆ Lisk blockchain explorer
JavaScript
121
star
5

lisk-mobile

๐Ÿ“ฑ Lisk graphical user interface for mobile
JavaScript
103
star
6

lips

๐Ÿ“˜ Lisk improvement proposals
66
star
7

lisk-build

๐Ÿ—๏ธ Lisk binary package building tool
Shell
55
star
8

lisk-dapps-sdk

:octocat: Prototype SDK for the Lisk blockchain application platform
JavaScript
43
star
9

lisk-template

๐Ÿ“„ Template repository for Lisk projects
JavaScript
39
star
10

lisk-sdk-examples

๐Ÿ”ฉ Example proof of concept blockchain applications built using the Lisk software development kit
JavaScript
36
star
11

lisk-service

โš™๏ธ API based service provider to Lisk user interfaces
JavaScript
32
star
12

lisk-legacy-docs

๐Ÿ“˜ Lisk documentation repository
CSS
30
star
13

lisk-ui

๐Ÿ–ฅ๏ธ Lisk user-interface submodule
HTML
24
star
14

lisk-docker

๐Ÿ“ฆ Lisk docker-compose examples
22
star
15

wamp-socket-cluster

๐Ÿ”Œ Wrapper for both WAMPClient and WAMPServer
JavaScript
14
star
16

lisk-faucet

๐Ÿšฐ Lisk faucet
JavaScript
13
star
17

lisk-website

๐ŸŒ Old Lisk website
CSS
12
star
18

lisk-node

:octocat: Specialized version of Node.js for running Lisk dapps
JavaScript
10
star
19

lisk-migrator

๐Ÿš€ Lisk mainnet migration tool
TypeScript
6
star
20

lisk-scripts

๐Ÿ“œ Scripts used to install and manage Lisk
Shell
6
star
21

lisk-cli

:octocat: Command line interface for bootstrapping and managing Lisk blockchain applications
JavaScript
5
star
22

lisk-tokens-dapp

:octocat: Lisk tokens dapp
JavaScript
4
star
23

lisk-newrelic

๐Ÿ“Ÿ NewRelic instrumentation for Lisk Core
JavaScript
4
star
24

eslint-config-lisk-base

:octocat: The base ESLint config for use in Lisk projects
JavaScript
3
star
25

lisk-sandbox

:octocat: Specialized Node.js module for running sandboxed Lisk dapps
JavaScript
2
star
26

lisk-db

๐Ÿ“˜ A database access implementation according to the Lisk protocol
Rust
2
star
27

lisk-messaging-dapp

:octocat: Lisk messaging dapp
JavaScript
2
star
28

lisk-modular

๐Ÿ“Ÿ A blueprint for the new Lisk Core application architecture
JavaScript
2
star
29

lisk-dex-core

๐Ÿ’Ž Lisk DEX blockchain application
TypeScript
1
star
30

lisk-dex-specs

๐Ÿ“˜ Lisk DEX blockchain specifications
1
star
31

mocha-bdd

:octocat: Helper functions for practising BDD with Mocha
JavaScript
1
star
32

lisk-jenkins

:octocat: Shared libraries for Jenkins files
Groovy
1
star
33

lisk-reddit-dapp

:octocat: Lisk reddit dapp
JavaScript
1
star
34

amstockcharts

:octocat: Javascript Stock Chart v3
JavaScript
1
star
35

app-registry

๐Ÿ—‚๏ธ Lisk blockchain application registry
JavaScript
1
star
36

lisk-core

๐Ÿ’Ž Lisk blockchain client
TypeScript
1
star