PHPackages                             digitalsloth/znn-php - 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. digitalsloth/znn-php

ActiveLibrary[API Development](/categories/api)

digitalsloth/znn-php
====================

A PHP SDK for JSON-RPC endpoints of the zenon.network

1.0.0(1y ago)22.6k1mitPHPPHP &gt;=8.2

Since Dec 3Pushed 1y ago2 watchersCompare

[ Source](https://github.com/digitalSloth/znn-php)[ Packagist](https://packagist.org/packages/digitalsloth/znn-php)[ RSS](/packages/digitalsloth-znn-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (3)Used By (0)

znn-php
=======

[](#znn-php)

The ZNN-PHP package allows you to read the JSON-RPC endpoints of the [zenon.network](https://zenon.community/) as described [here](https://github.com/zenon-network/znn-wiki/blob/master/api.md). It also provides methods for working with the ABI data.

- RPC Endpoints
- ABI Decoding
- ABI Encoding
- Wallet &amp; Keyfile support
- Unit tests

Wallet and keyfile support is still a work in progress. PRs are welcome :)

Requirements
------------

[](#requirements)

PHP 8.2 and later.

```
composer require digitalsloth/znn-php

```

Usage
-----

[](#usage)

### RPC Setup

[](#rpc-setup)

- **Node Url** - By default, it will try and connect to a local node `127.0.0.1:35997` but you can pass in any public node URL.
- **Throw Errors** - You can choose to throw errors or not, defaults to `false`

Create a new instance of `$znn` calling the provider and method you want. All `accelerator`, `pillar`, `plasma`, `sentinel`, `stake`, `swap` , `token`, `ledger` and `stats` endpoints listed [here](https://github.com/zenon-network/znn-wiki/blob/master/api.md#embedded-smart-contracts) can be reached through the `$znn` instance.

```
// config
$nodeUrl = 'https://node.zenonhub.io:35997';
$throwErrors = true;

// zenon client
$znn = new \DigitalSloth\ZnnPhp\Zenon($nodeUrl, $throwErrors);

// load all pillars
$result = $znn->pillar->getAll();

if (! $result['status']) {
    die('Error loading data');
}

echo $result['data']->count;

foreach ($result['data']->list as $pillar) {
    var_dump($pillar);
}
```

### ABI Encoding/Decoding

[](#abi-encodingdecoding)

Create a new instance of a `$contract` to access the encode and decode methods:

```
// pick a contract to work with
$contract = new \DigitalSloth\ZnnPhp\Abi\Contracts\Accelerator();

$result = $contract->encode('CreateProject', ["Test", "Test", "Test.com", 1000000000, 10000000000]);
$result = base64_encode($result); // d8BEtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7msoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlQL5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFRlc3QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARUZXN0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIVGVzdC5jb20AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=

$result = $contract->decode('CreateProject', base64_decode('d8BEtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7msoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlQL5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFRlc3QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARUZXN0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIVGVzdC5jb20AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA='));
var_dump($result); // ["Test","Test","Test.com","1000000000","10000000000"]
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

552d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bfdd403de24998099ee74e553f730e04ac3413a16cbfd1a1384245034be20ff2?d=identicon)[digitalSloth](/maintainers/digitalSloth)

---

Top Contributors

[![digitalSloth](https://avatars.githubusercontent.com/u/104867337?v=4)](https://github.com/digitalSloth "digitalSloth (60 commits)")

---

Tags

phpzenonznn

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digitalsloth-znn-php/health.svg)

```
[![Health](https://phpackages.com/badges/digitalsloth-znn-php/health.svg)](https://phpackages.com/packages/digitalsloth-znn-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k40](/packages/civicrm-civicrm-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M563](/packages/shopware-core)[soneso/stellar-php-sdk

Stellar PHP SDK for the Stellar Network

4154.3k4](/packages/soneso-stellar-php-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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