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

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

furqansiddiqui/ethereum-php
===========================

A modern, dependency-light Ethereum library powered by a clean cryptographic core

0.4.3(1mo ago)1724.9k—7.1%241MITPHPCI passing

Since Oct 29Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/furqansiddiqui/ethereum-php)[ Packagist](https://packagist.org/packages/furqansiddiqui/ethereum-php)[ Docs](https://github.com/furqansiddiqui/ethereum-php)[ RSS](/packages/furqansiddiqui-ethereum-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (29)Used By (1)

Ethereum PHP Library
====================

[](#ethereum-php-library)

[![Tests Passing](https://github.com/furqansiddiqui/ethereum-php/actions/workflows/tests.yml/badge.svg)](https://github.com/furqansiddiqui/ethereum-php/actions)[![MIT License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

A modern, dependency-light Ethereum library for PHP 8.5+, powered by a clean cryptographic core. This library provides a comprehensive suite of tools for interacting with the Ethereum blockchain, including account management, transaction handling, and smart contract interaction.

Features
--------

[](#features)

- **Account Management**: Generate keypairs, derive Ethereum addresses, and handle EIP-55 checksums.
- **JSON-RPC Client**: Full support for standard Ethereum RPC methods via a clean, extensible client.
- **Transaction Types**: Support for Legacy, EIP-2930 (Type 1), and EIP-1559 (Type 2) transactions.
- **Smart Contracts (EVM)**: Encode/decode ABI data, call contract methods, and handle contract events.
- **RLP &amp; ABI Codecs**: High-performance implementations of Recursive Length Prefix (RLP) and Application Binary Interface (ABI) encoding/decoding.
- **Unit Management**: Easy conversion between Wei, GWei, and Ether denominations using the `Wei` class.

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

[](#requirements)

- **PHP**: ^8.5 (64-bit)
- **Extensions**: `ext-openssl`, `ext-gmp`, `ext-bcmath`, `ext-curl`, `ext-json`
- **Dependencies**:
    - `furqansiddiqui/blockchain-core-php`
    - `charcoal-dev/http-client`

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

[](#installation)

Install via Composer:

```
composer require furqansiddiqui/ethereum-php
```

Quick Start
-----------

[](#quick-start)

### 1. Keypairs and Addresses

[](#1-keypairs-and-addresses)

```
use FurqanSiddiqui\Ethereum\Ethereum;
use Charcoal\Buffers\Types\Bytes32;

/** @var Ethereum $eth */
$privateKey = new Bytes32("..."); // 32-byte private key
$publicKey = $eth->keypair->generatePublicKey($privateKey);
$address = $eth->keypair->addressFromPublicKey($publicKey, withChecksum: true);

echo $address->address; // 0x...
```

### 2. JSON-RPC Client

[](#2-json-rpc-client)

```
use FurqanSiddiqui\Ethereum\Rpc\GethRpc;
use Charcoal\Http\Client\ClientConfig;

$rpc = new GethRpc("127.0.0.1", 8545, new ClientConfig());
$balance = $rpc->eth_getBalance("0x...", "latest");

echo $balance->eth(); // Balance in ETH
```

### 3. Smart Contract Interaction

[](#3-smart-contract-interaction)

```
use FurqanSiddiqui\Ethereum\Evm\SmartContract;
use FurqanSiddiqui\Ethereum\Evm\DeployedContract;
use FurqanSiddiqui\Ethereum\Keypair\EthereumAddress;

// Load ABI from DTO (Array)
$abi = SmartContract::fromDto($abiArray);

// Initialize deployed contract
$contract = new DeployedContract(
    new EthereumAddress("0x..."),
    $abi,
    $rpc
);

// Call a constant method
$method = $contract->methodFromSignature("symbol()");
$result = $contract->call($method);

print_r($result);
```

### 4. Transactions

[](#4-transactions)

```
// Create a Type 2 (EIP-1559) transaction
$tx = $eth->tx->type2();
$tx->nonce = 1;
$tx->to = new EthereumAddress("0x...");
$tx->value = \FurqanSiddiqui\Ethereum\Unit\Wei::fromETH("0.1");
$tx->gasLimit = 21000;
$tx->maxFeePerGas = \FurqanSiddiqui\Ethereum\Unit\Wei::fromGWei(50);
$tx->maxPriorityFeePerGas = \FurqanSiddiqui\Ethereum\Unit\Wei::fromGWei(2);

// Sign the transaction
$signedTx = $tx->withSignature($ecdsaSignature);

// Get raw hex for broadcasting
echo $signedTx->encode()->serialize();
```

Unit Management
---------------

[](#unit-management)

The `Wei` class provides a safe way to handle Ethereum's large numbers and unit conversions.

```
use FurqanSiddiqui\Ethereum\Unit\Wei;

$value = Wei::fromETH("1.5");
echo $value->wei->getArray(); // Raw Wei (GMP)
echo $value->gWei();          // 1500000000
echo $value->eth();           // 1.5
```

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance90

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community15

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 ~75 days

Recently: every ~131 days

Total

27

Last Release

57d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11485189?v=4)[M. Furqan Siddiqui](/maintainers/furqansiddiqui)[@furqansiddiqui](https://github.com/furqansiddiqui)

---

Top Contributors

[![furqansiddiqui](https://avatars.githubusercontent.com/u/11485189?v=4)](https://github.com/furqansiddiqui "furqansiddiqui (206 commits)")

### Embed Badge

![Health badge](/badges/furqansiddiqui-ethereum-php/health.svg)

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

###  Alternatives

[pocketmine/pocketmine-mp

A server software for Minecraft: Bedrock Edition written in PHP

3.5k74.6k86](/packages/pocketmine-pocketmine-mp)[godruoyi/php-snowflake

An ID Generator for PHP based on Snowflake Algorithm (Twitter announced).

8582.3M61](/packages/godruoyi-php-snowflake)[bitwasp/bitcoin

PHP Bitcoin library with functions for transactions, signatures, serialization, Random/Deterministic ECDSA keys, blocks, RPC bindings

1.1k533.2k43](/packages/bitwasp-bitcoin)[bitwasp/buffertools

Toolbox for working with binary and hex data. Similar to NodeJS Buffer.

65764.4k41](/packages/bitwasp-buffertools)[pocketmine/math

PHP library containing math related code used in PocketMine-MP

45573.2k14](/packages/pocketmine-math)[pocketmine/nbt

PHP library for working with Named Binary Tags

42574.4k13](/packages/pocketmine-nbt)

PHPackages © 2026

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