Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Eth Rpc Client Php Laravel Package

amashukov/eth-rpc-client-php

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy for Ethereum/EVM integration in PHP applications, avoiding reinventing RPC client logic, fee math (EIP-1559), and transport-layer concerns. Reduces technical debt by leveraging a modern, typed, and transport-agnostic solution.
  • Roadmap Priorities:
    • Blockchain/DeFi Features: Accelerate development of wallets, gas estimation tools, oracles, or smart contract interaction tools (e.g., transaction monitoring, balance checks, ERC-20 token balances).
    • Audit-Grade Systems: Use EthRpcClient for critical paths requiring hex parity with Ethereum’s wire format (e.g., compliance tools, transaction validation).
    • EIP-1559 Compliance: Ensure fee calculations (maxFeePerGas, baseFee) align with London fork standards without manual math.
  • Use Cases:
    • Backend Services: Integrate Ethereum node interactions into PHP microservices (e.g., gas price APIs, transaction relayers).
    • Symfony/Laravel Apps: Plug into existing PSR-18 HTTP clients (e.g., Symfony’s HttpClient) with minimal boilerplate.
    • Testing/Simulation: Use Psr\Clock\ClockInterface for deterministic transaction polling in CI/CD or local development.
    • Legacy Migration: Replace abandoned packages like web3p/web3.php with a maintained, typed alternative.

When to Consider This Package

  • Adopt When:

    • Your PHP stack is PHP 8.3+ with ext-gmp/ext-bcmath enabled (critical for bigint safety).
    • You need EIP-1559 support (e.g., London-era fee math) out of the box.
    • Your team prefers typed Value Objects over raw hex/decimal strings (reduces bugs in transaction/receipt handling).
    • You’re using PSR-18 HTTP clients (e.g., Symfony HttpClient, Guzzle) and want transport-agnostic RPC.
    • You require audit-grade RPC mirroring (EthRpcClient) for compliance or exact wire-format parity.
    • You’re building Ethereum tooling (e.g., explorers, wallets, gas trackers) and want to avoid reinventing RPC logic.
  • Look Elsewhere If:

    • You need offline transaction signing (use amashukov/eip1559-tx-signer-php alongside this).
    • Your project uses PHP < 8.3 or lacks ext-gmp/ext-bcmath (risk of integer overflows).
    • You require WebSocket subscriptions (this package is HTTP-only; consider web3p/web3.php or ethereum/web3.php for WS support).
    • You’re in a high-throughput environment where raw performance (e.g., batch requests) is critical (this prioritizes correctness over speed).
    • Your stakeholders prefer JavaScript/TypeScript for blockchain interactions (use ethers.js directly).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us build Ethereum integrations in PHP faster and safer by eliminating custom RPC client development. Key benefits:

  • Reduces risk: MIT-licensed, PHPStan L9, and battle-tested fee math (EIP-1559) aligned with ethers.js.
  • Saves dev time: Two layers—raw eth_* mirror for audits and a typed JsonRpcProvider facade for new code—cut boilerplate by 70%.
  • Future-proof: Transport-agnostic design lets us swap HTTP clients (e.g., add retries, load balancing) without rewriting core logic.
  • Compliance-ready: Hex parity with Ethereum’s wire format ensures auditability for financial or regulatory use cases. Use case: If we’re building a gas price API, wallet backend, or DeFi tool, this replaces months of custom code with a maintained, typed library. ROI is immediate in dev velocity and reduced bugs."*

For Engineering Teams:

*"This is a modern, PHP-native alternative to abandoned libraries like web3p/web3.php. Why switch?

  • Typed Safety: No more parsing raw hex strings—EthereumTxBundle gives you isStatusSuccess() predicates and decimal-string wei values (no float loss).
  • EIP-1559 Out of the Box: getFeeData() handles maxFeePerGas = 2 × baseFee + tip correctly, with Erigon/pre-London node quirks patched.
  • PSR Standards: Works with your existing PSR-18 HTTP stack (e.g., Symfony HttpClient). Retries? Key rotation? Handle it in middleware.
  • Testable: waitForTransaction uses Psr\Clock\ClockInterface, so polling is mockable in tests. Trade-offs: No WebSocket support (HTTP-only), but if you need WS, we can layer web3.php alongside this for subscriptions. Action: Let’s prototype this for [X use case]—it’s a drop-in replacement for web3.php with fewer dependencies and better typing."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity