PHPackages                             kilmas/gxcrpc - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. kilmas/gxcrpc

ActiveLibrary[HTTP &amp; Networking](/categories/http)

kilmas/gxcrpc
=============

A client to interact with gxchain implemented in PHP

203PHPCI failing

Since Mar 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kilmas/gxclient-php)[ Packagist](https://packagist.org/packages/kilmas/gxcrpc)[ RSS](/packages/kilmas-gxcrpc/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Remind
------

[](#remind)

Prepare for transfer to official maintenance [gxchain/gxclient-php](https://github.com/gxchain/gxclient-php/)

gxclient-php
============

[](#gxclient-php)

A client to interact with gxchain implemented in PHP

 [![](https://raw.githubusercontent.com/gxchain/gxips/master/assets/images/task-gxclient.png)](https://raw.githubusercontent.com/gxchain/gxips/master/assets/images/task-gxclient.png) [![](https://raw.githubusercontent.com/gxchain/gxips/master/assets/images/task-gxclient-en.png)](https://raw.githubusercontent.com/gxchain/gxips/master/assets/images/task-gxclient-en.png)

Supported Versions
==================

[](#supported-versions)

PHP7.0 x64

Install
=======

[](#install)

You can install this library via Composer:

```
composer require gxchain/gxclient

```

APIs
====

[](#apis)

- [Keypair API](#keypair-api)
- [Chain API](#chain-api)
- [Faucet API](#faucet-api)
- [Account API](#account-api)
- [Asset API](#asset-api)
- [Contract API](#contract-api)
- [Staking API](#staking-api)

Constructors
------------

[](#constructors)

```
//init GXClient
new GXClient($private_key, $account_id_or_name, $entry_point);
```

Keypair API
-----------

[](#keypair-api)

```
//generate key pair locally
function generateKey(String $brainKey);
//export public key from private key
function privateToPublic(String $privateKey);
//check if public key is valid
function isValidPublic(String $publicKey);
//check if private key is valid
function isValidPrivate(String $privateKey);
```

Chain API
---------

[](#chain-api)

```
//get current blockchain id
function getChainID();
//get dynamic global properties
function getDynamicGlobalProperties();
//get block object
function getObject(String $object_id);
//get block objects
function getObjects(Array $object_ids);
// get block by block height
function getBlock(Integer $blockHeight);
//send transfer request to entryPoint node
function transfer(String $to, String $memo, String $amount_asset, Boolean $broadcast, String $fee_paying_asset);
//vote for accounts
function vote(Array $accounts, String $fee_paying_asset, Boolean $broadcast);
//broadcast transaction
function broadcast(Object $tx)
```

Faucet API
----------

[](#faucet-api)

```
//register gxchain account
function register(String $account, String $activeKey, String $ownerKey, String $memoKey, String $faucet);
```

Account API
-----------

[](#account-api)

```
// get account info by account name
function getAccount(String $account_name);
//get account_ids by public key
function getAccountByPublicKey(String $publicKey);
//get account balances by account name
function getAccountBalances(String $account_name);
```

Asset API
---------

[](#asset-api)

```
//get asset info by symbol
function getAsset(String $symbol);
```

Contract API
------------

[](#contract-api)

```
// call smart contract method
function callContract(String $contract_name, String $method_name, Object $params, String $amount_asset, Boolean $broadcast, String $fee_paying_asset);
// create smart contract method
function createContract(String $contract_name, String $code, Object $abi, String $vm_type, String $vm_version, Boolean $broadcast, String $fee_paying_asset);
// update smart contract method
function updateContract(String $contract_name, String $newOwner, String $code, Object $abi, Boolean $broadcast, String $fee_paying_asset);
//get contract table by contract_name
function getContractTable(String $contract_name)
//get contract abi by contract_name
function getContractABI(String $contract_name)
public List getContractTable(String contractName);
//get contract table objects
function getTableObjects(String $contract_name, String $table_name, Integer $start, Integer $limit)
```

Staking API
-----------

[](#staking-api)

```
// get staking programs method
function getStakingPrograms();
// create staking method
function createStaking(String $to, Number $amount, String program_id, Boolean $broadcast, Array $options);
// update staking method
function updateStaking(String $to, String $staking_id, Boolean $broadcast, Array $options);
// claim staking method
function claimStaking(String $staking_id, Boolean $broadcast, Array $options)
```

Usage
=====

[](#usage)

```
require "vendor/autoload.php";

use GXChain\GXClient\GXClient;

$client = new GXClient();

$keyPair = $client->generateKey();

echo(json_encode($keyPair));
```

For more examples, please refer to the examples directory.

Other
=====

[](#other)

- It's very welcome for developers to translate this project into different programing languages
- We are looking forward to your pull requests

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

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

---

Top Contributors

[![kilmas](https://avatars.githubusercontent.com/u/15965206?v=4)](https://github.com/kilmas "kilmas (8 commits)")[![lanhaoxiang](https://avatars.githubusercontent.com/u/3286465?v=4)](https://github.com/lanhaoxiang "lanhaoxiang (4 commits)")[![xlogiccc](https://avatars.githubusercontent.com/u/24650108?v=4)](https://github.com/xlogiccc "xlogiccc (3 commits)")[![xzshinan](https://avatars.githubusercontent.com/u/7299894?v=4)](https://github.com/xzshinan "xzshinan (2 commits)")

### Embed Badge

![Health badge](/badges/kilmas-gxcrpc/health.svg)

```
[![Health](https://phpackages.com/badges/kilmas-gxcrpc/health.svg)](https://phpackages.com/packages/kilmas-gxcrpc)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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