PHPackages                             sinyakinilya/ethereum-geth-client - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sinyakinilya/ethereum-geth-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sinyakinilya/ethereum-geth-client
=================================

v0.1(8y ago)61764MITPHP

Since Aug 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sinyakinilya/ethereum-geth-client)[ Packagist](https://packagist.org/packages/sinyakinilya/ethereum-geth-client)[ RSS](/packages/sinyakinilya-ethereum-geth-client/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Simple Client for Ethereum(geth)
================================

[](#simple-client-for-ethereumgeth)

Client use guzzlehttp/guzzle;

All method [json-rpc-methods](https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-methods)

Example:

```
include_once 'vendor/autoload.php';

use SinyakinIlya\Ethereum\Client;
use SinyakinIlya\Ethereum\Helper\Hash;

$walletAccount = '0x...';

//geth must be run with params: geth --rpc --rpcaddr 0.0.0.0 --rpcapi admin,miner,shh,txpool,personal,eth,net,web3
$ip = '..ip..';
$port = 8545;

$client = new Client($ip, $port);

$lastBlock = $client->callMethod('eth_blockNumber');
$currentBockNumber = Hash::hexToNumber($lastBlock);
$toTransactions = $fromTransactions = [];

do {
    $block = $client->callMethod('eth_getBlockByNumber', [Hash::toHex($currentBockNumber), true]);
    if (!is_array($block)) {
        break;
    }
    foreach ($block['transactions'] as $transaction) {
        if ($transaction['from'] == $walletAccount) {
            $fromTransactions[$transaction['to']][] = $transaction;
        } elseif ($transaction['to'] == $walletAccount) {
            $toTransactions[$transaction['from']][] = $transaction;
        }
    }
    echo 'Process block: ', $currentBockNumber--, PHP_EOL;
} while ($currentBockNumber >= 4000000);

file_put_contents('tr.json', json_encode(['f' => $fromTransactions, 't' => $toTransactions]));
```

Example: send transaction with calling smart-contract function

```
include_once 'vendor/autoload.php';

use SinyakinIlya\Ethereum\Client;
use SinyakinIlya\Ethereum\Helper\Hash;
use SinyakinIlya\Ethereum\Helper\SmartContract;

$ip           = '0.0.0.0';             // geth address
$addressSC    = '0x0c328e06....';
$ownerAddress = '0x978bEE7F....';
$ABI          = 'sc-abi.json';         // file with ABI for smart-contract

$senderAddress = '0x5237BC08b2FE....';
$senderPassPhrase = '..passphrase..';

$client = new Client($ip);
$sc     = new SmartContract($client);
$sc->setAddress($addressSC);
$sc->setContractInterface(file_get_contents($ABI));

function sendTransferFrom($from, $txData, $passphrase)
{
    global $sc, $client;
    $functionSignature = 'transferFrom(address,address,uint256)';     //this is string you get from $sc->getFunctions();
    $inputData = $sc->createSandRawData($functionSignature, $txData);
    $params = new stdClass;
    $params->from = $from;
    $params->to = $sc->getAddress();
    $params->gas = Hash::toHex(1000000);
    $params->gasPrice = $client->callMethod('eth_gasPrice');
    $params->value = Hash::toHex(0);
    $params->data = $inputData[$functionSignature];

    return $client->callMethod('personal_sendTransaction', [$params, $passphrase]);
}

$data = [
    $ownerAddress,   // from address
    $senderAddress,  // to adderss
    12345            // amount tokens
];

$txHash = sendTransferFrom($senderAddress, $data, $senderPassPhrase);
echo $txHash, PHP_EOL;
```

Help and docs
-------------

[](#help-and-docs)

- [Documentation](https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-api)

Installing
----------

[](#installing)

The recommended way to install Client is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version:

```
php composer.phar require sinyakinilya/ethereum-geth-client
```

After installing, you need to require Composer's autoloader:

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Every ~139 days

Total

2

Last Release

3065d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28ca2d8461e75711954aa447d345588ef47b6228a2bc48a34f7fd50b0c63ad10?d=identicon)[sinyakinilya](/maintainers/sinyakinilya)

---

Top Contributors

[![sinyakinilya](https://avatars.githubusercontent.com/u/2581385?v=4)](https://github.com/sinyakinilya "sinyakinilya (8 commits)")

---

Tags

ethereum-clientgethsmart-contracts

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sinyakinilya-ethereum-geth-client/health.svg)

```
[![Health](https://phpackages.com/badges/sinyakinilya-ethereum-geth-client/health.svg)](https://phpackages.com/packages/sinyakinilya-ethereum-geth-client)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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