PHPackages                             cb0/lisk-php-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cb0/lisk-php-api

AbandonedArchivedLibrary[API Development](/categories/api)

cb0/lisk-php-api
================

A php wrapper for the lisk api.

0.1.1(8y ago)6462GPL-3.0PHPPHP &gt;=7.0.0

Since Aug 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cb0/LiskPHP)[ Packagist](https://packagist.org/packages/cb0/lisk-php-api)[ Docs](https://github.com/cb0/LiskPHP)[ RSS](/packages/cb0-lisk-php-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

LiskPhp - A PHP wrapper for the LISK API
========================================

[](#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
-----------------

[](#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

Installation
------------

[](#installation)

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

```
composer require cb0/lisk-php-api
```

Usage:
------

[](#usage)

### General

[](#general)

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');
```

### Accounts

[](#accounts)

#### Get Account Balance

[](#get-account-balance)

Request the balance of an account.

```
$client->getBalance($address);
```

#### Get Public Key

[](#get-public-key)

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

```
$client->getPublicKey($secret);
```

#### Open Account

[](#open-account)

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

```
$client->openAccount($secret);
```

#### Generate Public Key

[](#generate-public-key)

Returns the public key of the provided secret key.

```
$client->generatePublicKey($secret);
```

#### Get Account Information from Address

[](#get-account-information-from-address)

Returns account information of an address.

```
$client->getAccountInfo($address);
```

#### Get Delegates

[](#get-delegates)

Returns delegate accounts by address.

```
$client->getDelegates($address);
```

#### Vote Delegates

[](#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);
```

### Loader

[](#loader)

#### Get Loading Status

[](#get-loading-status)

```
$client->getLoadingStatus();
```

#### Get Synchronization Status

[](#get-synchronization-status)

Get the synchronization status of the client.

```
$client->getSynchronizationStatus();
```

#### Get Block Receipt Status

[](#get-block-receipt-status)

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

```
$client->getBlockStatus();
```

### Transactions

[](#transactions)

#### Get List of Transactions

[](#get-list-of-transactions)

List of transactions matched by provided parameters.

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

#### Send Transaction

[](#send-transaction)

Send transaction to broadcast network.

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

#### Get Transaction

[](#get-transaction)

Get transaction that matches the provided id.

```
$client->getTransaction($id);
```

#### Get Unconfirmed Transaction

[](#get-unconfirmed-transaction)

Get unconfirmed transaction that matches the provided id.

```
$client->getUnconfirmedTransaction($id);
```

#### Get List of Unconfirmed Transactions

[](#get-list-of-unconfirmed-transactions)

Gets a list of unconfirmed transactions.

```
$client->listUnconfirmedTransactions();
```

#### Get List of Queued Transactions

[](#get-list-of-queued-transactions)

Gets a list of queued transactions.

```
$client->listQueuedTransactions();
```

#### Get Specific Queued Transaction

[](#get-specific-queued-transaction)

Get queued transaction that matches the provided id.

```
$client->getQueuedTransaction($id);
```

### Peers

[](#peers)

#### Get Peers List

[](#get-peers-list)

Gets list of peers from provided filter parameters.

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

#### Get Peer Version/Build Time

[](#get-peer-versionbuild-time)

Gets a list peer versions and build times

```
$client->getPeerVersion();
```

#### Get Peer

[](#get-peer)

Gets peer by IP address and port.

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

### Blocks

[](#blocks)

#### Get Blocks

[](#get-blocks)

Gets all blocks by provided filter(s).

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

#### Get Block

[](#get-block)

Gets block by provided id.

```
$client->getBlock($id);
```

#### Get Blockchain Fee

[](#get-blockchain-fee)

Get transaction fee for sending “normal” transactions.

```
$client->getBlockchainFee();
```

#### Get Blockchain Fees Schedule

[](#get-blockchain-fees-schedule)

Get transaction fee for all types of transactions.

```
$client->getBlockchainFees();
```

#### Get Blockchain Reward Schedule

[](#get-blockchain-reward-schedule)

Gets the forging reward for blocks.

```
$client->getBlockchainReward();
```

#### Get Total Supply of Lisk Tokens (LSK)

[](#get-total-supply-of-lisk-tokens-lsk)

Gets the total amount of Lisk in circulation

```
$client->getTotalSupply();
```

#### Get Blockchain Height

[](#get-blockchain-height)

Gets the blockchain height of the client.

```
$client->getBlockchainHeight();
```

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

[](#get-status-of-height-fee-milestone-blockreward-and-supply)

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

```
$client->getStatusInfos();
```

#### Get Blockchain Nethash

[](#get-blockchain-nethash)

Gets the nethash of the blockchain on a client.

```
$client->getBlockchainNethash();
```

#### Get Blockchain Milestone

[](#get-blockchain-milestone)

Gets the milestone of the blockchain on a client.

```
$client->getBlockchainMilestone();
```

### Signatures

[](#signatures)

#### Get Signature Fees

[](#get-signature-fees)

Gets the second signature status of an account.

```
$client->getSignatureFee();
```

#### Add Second Signature

[](#add-second-signature)

Add a second signature to an account.

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

### Delegates

[](#delegates)

#### Enable Delegate on Account

[](#enable-delegate-on-account)

Puts request to create a delegate.

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

#### Get Delegates List

[](#get-delegates-list)

Gets list of delegates by provided filter.

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

#### Get Delegate

[](#get-delegate)

Gets delegate by public key or username.

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

#### Search for Delegates

[](#search-for-delegates)

Search for Delegates by “fuzzy” username.

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

#### Get Delegates Count

[](#get-delegates-count)

Get total count of registered delegates.

```
$client->getDelegateCount();
```

#### Get votes of account

[](#get-votes-of-account)

Get votes by account wallet address.

```
$client->getDelegateVotes($address);
```

#### Get Voters

[](#get-voters)

Get voters of delegate.

```
$client->getDelegateVoters($publicKey);
```

#### Enable Forging on Delegate

[](#enable-forging-on-delegate)

Enables forging for a delegate on the client node.

```
$client->enableForging($secret);
```

#### Disable Forging on Delegate

[](#disable-forging-on-delegate)

Disables forging for a delegate on the client node.

```
$client->disableForging($secret);
```

#### Get Forged by Account

[](#get-forged-by-account)

Get amount of Lisk forged by an account.

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

#### Get Next Forgers

[](#get-next-forgers)

Get next delegate lining up to forge.

```
$client->getNextForger($limit);
```

### Apps

[](#apps)

#### Registers Apps

[](#registers-apps)

Registers a Blockchain Application.

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

#### Get Apps

[](#get-apps)

Gets a list of Blockchain Applications registered on the network.

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

#### Get App

[](#get-app)

Gets a specific Blockchain Application by registered id.

```
$client->getApp($id);
```

#### Search for Apps

[](#search-for-apps)

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

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

#### Install App

[](#install-app)

Installs a app by id on the node.

```
$client->installApp($id);
```

#### Installed Apps

[](#installed-apps)

Returns a list of installed apps on the requested node.

```
$client->getInstalledApps();
```

#### Installed Apps Ids

[](#installed-apps-ids)

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

```
$client->getAllInstalledApps();
```

#### Uninstall Apps

[](#uninstall-apps)

Uninstalls a app by id from the requested node.

```
$client->uninstallApp($id);
```

#### Launch App

[](#launch-app)

Launches a app by id on the requested node.

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

#### Installing

[](#installing)

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

```
$client->installingApp();
```

#### Uninstalling

[](#uninstalling)

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

```
$client->uninstallingApp();
```

#### Launched

[](#launched)

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

```
$client->launchedApps();
```

#### Categories

[](#categories)

Returns a full list of app categories.

```
$client->getCategories();
```

#### Stop App

[](#stop-app)

Stops a app by id on the requested node.

```
$client->stopApp($id);
```

### Multi-signature

[](#multi-signature)

#### Create Multi-signature Account

[](#create-multi-signature-account)

Create a multi-signature account.

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

#### Get Multi-signature Accounts

[](#get-multi-signature-accounts)

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

```
$client->getMultiSignatureAccounts($publicKey);
```

#### Sign Multi-signature Transaction

[](#sign-multi-signature-transaction)

Signs a transaction that is awaiting signature.

```
$client->getPendingTransactions($publicKey);
```

#### Get Pending Multi-signature Transactions

[](#get-pending-multi-signature-transactions)

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

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

### ToDo:

[](#todo)

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

### Support

[](#support)

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

- **pelops** (6669300595452632273L) on MainNet
- **pelops\_testnet** (3697531586899904038L) on TestNet

Development
-----------

[](#development)

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

[](#project-supporters)

These people have contributed to this project:

- [diszad](https://github.com/diszad/LiskPHP) - since 10/2017

Thanks you very much!

License
-------

[](#license)

License under GNU General Public License v3.0

Copyright (c) 2017 Marcus Puchalla &lt;cb0@0xcb0.com&gt;

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 .

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~78 days

Total

2

Last Release

3104d ago

### Community

---

Top Contributors

[![cb0](https://avatars.githubusercontent.com/u/809871?v=4)](https://github.com/cb0 "cb0 (47 commits)")[![diszad](https://avatars.githubusercontent.com/u/42012?v=4)](https://github.com/diszad "diszad (1 commits)")

### Embed Badge

![Health badge](/badges/cb0-lisk-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/cb0-lisk-php-api/health.svg)](https://phpackages.com/packages/cb0-lisk-php-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M474](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
