cb0 / LiskPHP

A PHP client for the LISK API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LiskPhp - A PHP wrapper for the LISK API

This is php wrapper for LISK API written in OOP style.

It’s supposed to be a full implementation of the API.

Included in here is a CLI Parser which makes it possible to call all actions from command line. e.g.:

php api.php getBlocks --height=2967414

API compatibility

Currently supports Lisp API Version 0.8 The following sections from the lisk api are available:

  • [x] Accounts
  • [x] Loader
  • [x] Transactions
  • [x] Peers
  • [x] Blocks
  • [x] Signatures
  • [x] Delegates
  • [x] Apps
  • [x] Multi-signature

For more infos see https://docs.lisk.io/docs/lisk-api


It’s a composer based package. \ Installation is as easy as:

composer require cb0/lisk-php-api



To start communicating with a lisk server you need to instanciate lisk client and specify the servers ip and port.

This would connect to the official lisk testnet.

$client = new \Lisk\Client('http://testnet.lisk.io:7000');


Get Account Balance

Request the balance of an account.


Get Public Key

Get the public key of an account. If the account does not exist the API call will return an error.


Open Account

Request information about an account. If account with secret does not exist, account will be created.


Generate Public Key

Returns the public key of the provided secret key.


Get Account Information from Address

Returns account information of an address.


Get Delegates

Returns delegate accounts by address.


Vote Delegates

Vote for the selected delegates. Maximum of 33 delegates at once. (Note: This is currently not working with lisk api. Exception: “a.asset.votes.join is not a function”)

$client->voteDelegates($delegates, $secret, $secondSecret = null, $publicKey = null);


Get Loading Status


Get Synchronization Status

Get the synchronization status of the client.


Get Block Receipt Status

Get the status of last received block. Returns true if block was received in the past 120 seconds.



Get List of Transactions

List of transactions matched by provided parameters.

$client->listTransactions($blockId, $senderId, $recipientId, $limit, $offset, $orderBy);

Send Transaction

Send transaction to broadcast network.

$client->sendTransaction($secret, $amount, $recipientId, $publicKey, $secondSecret);

Get Transaction

Get transaction that matches the provided id.


Get Unconfirmed Transaction

Get unconfirmed transaction that matches the provided id.


Get List of Unconfirmed Transactions

Gets a list of unconfirmed transactions.


Get List of Queued Transactions

Gets a list of queued transactions.


Get Specific Queued Transaction

Get queued transaction that matches the provided id.



Get Peers List

Gets list of peers from provided filter parameters.

$client->getPeerList($state, $os, $version, $limit, $offset, $orderBy);

Get Peer Version/Build Time

Gets a list peer versions and build times


Get Peer

Gets peer by IP address and port.

$client->getPeer($ip, $port);


Get Blocks

Gets all blocks by provided filter(s).

$client->getBlocks($totalFee, $totalAmount, $previousBlock, $height, $generatorPublicKey, $limit, $offset, $orderBy);

Get Block

Gets block by provided id.


Get Blockchain Fee

Get transaction fee for sending “normal” transactions.


Get Blockchain Fees Schedule

Get transaction fee for all types of transactions.


Get Blockchain Reward Schedule

Gets the forging reward for blocks.


Get Total Supply of Lisk Tokens (LSK)

Gets the total amount of Lisk in circulation


Get Blockchain Height

Gets the blockchain height of the client.


Get Status of Height, Fee, Milestone, Blockreward and Supply

Gets status of height, fee, milestone, blockreward and supply


Get Blockchain Nethash

Gets the nethash of the blockchain on a client.


Get Blockchain Milestone

Gets the milestone of the blockchain on a client.



Get Signature Fees

Gets the second signature status of an account.


Add Second Signature

Add a second signature to an account.

$client->addSecondSignature($secret, $secondSecret, $publicKey);


Enable Delegate on Account

Puts request to create a delegate.

$client->createDelegate($secret, $username, $secondSecret);

Get Delegates List

Gets list of delegates by provided filter.

$client->getDelegateList($limit, $offset, $orderBy);

Get Delegate

Gets delegate by public key or username.

$client->getDelegate($publicKey, $username);

Search for Delegates

Search for Delegates by “fuzzy” username.

$client->searchDelegate($username, $orderBy);

Get Delegates Count

Get total count of registered delegates.


Get votes of account

Get votes by account wallet address.


Get Voters

Get voters of delegate.


Enable Forging on Delegate

Enables forging for a delegate on the client node.


Disable Forging on Delegate

Disables forging for a delegate on the client node.


Get Forged by Account

Get amount of Lisk forged by an account.

$client->getForgedByAccount($generatorPublicKey, $start, $end);

Get Next Forgers

Get next delegate lining up to forge.



Registers Apps

Registers a Blockchain Application.

$client->registerApp($secret, $category, $name, $type, $link, $secondSecret, $publicKey, $description, $tags, $icon);

Get Apps

Gets a list of Blockchain Applications registered on the network.

$client->getApps($category, $name, $appType, $link, $limit, $offset, $orderBy);

Get App

Gets a specific Blockchain Application by registered id.


Search for Apps

Searches for Blockchain Applications by filter(s) on a node.

$client->searchApps($q, $category, $installed);

Install App

Installs a app by id on the node.


Installed Apps

Returns a list of installed apps on the requested node.


Installed Apps Ids

Returns a list of installed app ids on the requested node.


Uninstall Apps

Uninstalls a app by id from the requested node.


Launch App

Launches a app by id on the requested node.

$client->launchApp($id, $params);


Returns a list of app ids currently being installed on the requested node.



Returns a list of app ids currently being uninstalled on the client node.



Returns a list of app ids which are currently launched on the client node.



Returns a full list of app categories.


Stop App

Stops a app by id on the requested node.



Create Multi-signature Account

Create a multi-signature account.

$client->createMultiSignatureAccount($secret, $lifetime, $min, $keysgroup, $secondSecret);

Get Multi-signature Accounts

Gets a list of accounts that belong to a multi-signature account.


Sign Multi-signature Transaction

Signs a transaction that is awaiting signature.


Get Pending Multi-signature Transactions

Returns a list of multi-signature transactions that waiting for signature by publicKey.

$client->signPendingTransaction($secret, $transactionId, $publicKey);


  • [x] [1] complete API
  • [ ] [2] complete documentation
  • [ ] [3] put package on packagist
  • [ ] […] more


If you want to support me please consider voting for my lisk delegate

  • pelops (6669300595452632273L) on MainNet
  • pelops_testnet (3697531586899904038L) on TestNet


If you want to support the development just create a pull request or fork this project. I’ll try to merge everything into the projects asap.

Project Supporters

These people have contributed to this project:

Thanks you very much!


License under GNU General Public License v3.0

Copyright (c) 2017 Marcus Puchalla <cb0@0xcb0.com>

LiskPhp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

LiskPhp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with LiskPhp. If not, see http://www.gnu.org/licenses/.


A PHP client for the LISK API

License:GNU General Public License v3.0


Language:PHP 100.0%