reynevan/web3-php

Web3 PHP helpers

Maintainers

Package info

github.com/reynevan/web3-php

pkg:composer/reynevan/web3-php

Transparency log

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.1.1 2026-08-17 17:17 UTC

This package is auto-updated.

Last update: 2026-08-17 17:33:46 UTC


README

A lightweight PHP library for working with Ethereum (EVM) transactions. It decodes raw EIP-1559 transactions (0x02...) into a readable object and recovers the sender address (from) from the ECDSA signature, without needing to connect to an RPC node.

Features

  • Decoding a raw (RLP) EIP-1559 transaction into an Eip1559Transaction object
  • Recovering the sender address from the signature (ecrecover) using the secp256k1 curve
  • accessList support (AccessListEntry)
  • Input validation (throws InvalidArgumentException for invalid transactions)

Requirements

  • PHP >= 8.1
  • gmp extension

Installation

composer require reynevan/web3-php

Usage example

use Reynevan\Web3\Eip1559TransactionDecoder;

$decoder = new Eip1559TransactionDecoder();

$transaction = $decoder->decode('0x02f8...');

echo $transaction->from;
echo $transaction->to;
echo $transaction->value;

Tests

composer install
vendor/bin/phpunit

License

MIT