Pure-PHP Ethereum / EVM SDK — Keccak-256, secp256k1 ECDSA, RLP, EIP-1559 offline signing, ABI encoder, and an ethers.js-style JSON-RPC client in one composer require.
amashukov/eth-php is a standalone Ethereum / EVM SDK for PHP — a single umbrella package that pulls every EVM-side primitive you need: Keccak-256 / SHA-3 hashing, secp256k1 EC arithmetic with RFC-6979 low-S ECDSA, RLP encoding, EIP-1559 (Type-2) offline transaction signing, a Solidity ABI calldata encoder, and an ethers.js v6-style JSON-RPC client. Pure PHP, zero blockchain-library dependencies, no Symfony. It is the first maintained ethers.js-style PHP SDK with full EIP-1559 support.
composer require.web3p/web3.php is the historical PHP EVM client (~600★), but it is effectively abandoned and has no EIP-1559 (Type-2) support — it can only build legacy transactions, which most modern chains and tooling have moved past. amashukov/eth-php is the first maintained ethers.js-style PHP SDK with EIP-1559: deterministic low-S signing, an ABI encoder that matches ethers.js byte-for-byte, and a v6-style typed RPC client — each layer separately versioned, the whole stack behind one composer require.
composer require amashukov/eth-php
Each layer keeps its own namespace; import what you need:
use Amashukov\Keccak\Keccak;
use Amashukov\AbiEncoder\AbiEncoder;
use Amashukov\Eip1559TxSigner\Eip1559Signer;
use Amashukov\EthRpc\EthRpcClient;
use Amashukov\EthRpc\JsonRpcProvider;
// Hash, encode calldata, sign a Type-2 tx, and broadcast it — see each
// sub-package README for the full API.
The layers compose: the RPC client's getErc20Balance() builds its calldata through the ABI encoder, which derives selectors through Keccak — one consistent stack, no duplicated crypto.
ext-gmp (bigint EC + wei math)ext-bcmathamashukov/http-client-php + nyholm/psr7)| Package | Layer |
|---|---|
| amashukov/keccak-php | Keccak-256 / SHA-3 |
| amashukov/secp256k1-php | secp256k1 EC arithmetic + ECDSA (RFC 6979, low-S) |
| amashukov/rlp-php | RLP encoder / decoder |
| amashukov/eip1559-tx-signer-php | EIP-1559 (Type-2) offline raw-tx assembly + signing |
| amashukov/abi-encoder-php | Solidity ABI calldata encoder (ethers.js-exact) |
| amashukov/eth-rpc-client-php | ethers.js v6-style JSON-RPC client + typed VOs over PSR-18 |
| amashukov/http-client-php | PSR-18 cURL HTTP client |
| amashukov/ton-php | Sister umbrella SDK for TON (The Open Network) |
| amashukov/blockchain-context-bundle | Symfony 7 bundle wiring the TON + EVM stacks |
@PER-CS ruleset.MIT — see LICENSE. Each bundled package is MIT-licensed in its own repository.
How can I help you explore Laravel packages today?