Weave 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

Ethereum Util Laravel Package

kornrunner/ethereum-util

kornrunner/ethereum-util is a lightweight PHP library for common Ethereum utilities, including address validation, EIP-55 checksum handling, and conversion helpers for working with keys and hex data in PHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Leaf-level, stateless utility library: hex/bin conversions, Keccak-256 hashing, EIP-55 address checksum/validation, unit conversion (wei/gwei/ether), and message-hash helpers used in Ethereum signing flows.
  • Correct placement is inside an internal adapter/service class, never called directly from controllers, models, Blade views, or jobs spread across the codebase. It supplies primitives; it does not provide RPC, transaction building, or key management.
  • Because it is pure PHP and side-effect free, it composes cleanly with a Laravel service container binding and is trivially mockable behind an interface.
  • It is a building block, not a platform: any Ethereum feature set (wallet, custody, on-chain reads, tx signing) requires companion packages or an RPC client alongside it.

Integration feasibility

  • Composer-installable, PSR-4 autoloaded, MIT licensed; no service provider, config, migrations, or framework coupling to unwind.
  • The main transitive dependency is the Keccak implementation (kornrunner/keccak); confirm the full tree and any ext-* requirements before committing.
  • Realistic effort: a one-to-two-day spike plus test-vector validation, then days (not weeks) to wrap and integrate for the low-risk functions (address validation, checksums, unit conversion).
  • The library's value is concentrated in a small number of subtle-correctness functions; the integration cost is dominated by verification, not plumbing.

Technical risk

  • Adoption signal is weak: 8 stars, 0 dependents, low opportunity score. This is a single-maintainer utility with effectively no ecosystem backstop. Bus factor is 1; abandonment risk is real even though the underlying specs are stable.
  • Crypto correctness risk is asymmetric: a passing test suite does not prove correctness. Wrong Keccak padding (SHA3 vs. Keccak-256), wrong EIP-55 casing rules, or a missing EIP-191 "\x19Ethereum Signed Message:\n" prefix produces plausible-looking but wrong addresses/signatures. Silent failure, not exceptions.
  • No evidence of a third-party security audit; treat all output as needing independent known-answer-test validation against published Ethereum test vectors.
  • Numeric handling: wei conversions exceed 64-bit integer range; verify the library returns strings/BCMath values and never floats or native ints.
  • Performance: pure-PHP Keccak is orders of magnitude slower than a C extension; risk is throughput, not correctness, but it constrains where the calls can live.
  • Supply chain: pin exact versions; a compromised or mistyped release in a low-visibility package is a plausible threat vector.

Key questions

  1. Which specific functions do we actually need — validation/formatting only, or does it touch signing-adjacent hashing? The risk profile differs sharply.
  2. Does it cover EIP-712 typed-data hashing and EIP-191 message hashing to the depth our product requires, or do we need a second library?
  3. What PHP version constraints and extension requirements does the dependency tree impose versus our runtime matrix?
  4. Who internally owns crypto correctness sign-off, and what is our test-vector acceptance gate?
  5. Is there a maintained alternative (web3.php ecosystem, a Node/Python sidecar, or an internal implementation of ~200 lines) that removes the single-maintainer dependency?
  6. What is our policy on vendoring/forking a dependency into a private mirror?

Integration Approach

Stack fit

  • Laravel fit is good if contained: bind a EthereumUtils interface in a service provider, implement it with a thin wrapper around this package, and inject it where needed.
  • Do not use it in request-critical hot paths (mass address validation on ingest, bulk reconciliation) without benchmarking first — offload to queued jobs or a batched command.
  • Keep it out of Eloquent accessors/mutators and Blade; checksum formatting belongs in API resources/presenters with cached results.
  • Pairs naturally with an RPC/client layer and a transaction-signing library; the util package should not be the thing that holds private keys.

Migration path

  • If currently shelling out to web3.js/ethers via a Node sidecar for simple validation or hashing, this package can retire that sidecar for the read-only cases — a meaningful operational simplification (one less runtime).
  • For signing, do not migrate on this library alone; if it is used for message-hash construction, keep it behind the same interface as the current signer so the backend remains swappable.
  • Incremental cutover: shadow-run the new implementation against the existing one on real inputs, compare outputs, and only then flip.

Compatibility

  • Verify supported PHP range against your Laravel version matrix; PHP 8.x deprecations in a low-maintainer package are a plausible future break.
  • Pin with an exact version in composer.json and rely on composer.lock; add the package to your dependency-review and advisory-watch list.
  • Check for conflicts with any existing Keccak/hash or big-number dependency already in the tree; duplicate hash implementations are a common source of subtle divergence.
  • No Laravel-version coupling — safe across framework upgrades, which is a genuine plus.

Sequencing

  1. Spike: install, run the full published Ethereum test vectors (Keccak-256 vectors, EIP-55 checksum vectors, wei conversion edge cases, signed-message hash vectors). Gate on 100% pass.
  2. Wrap: define the internal interface + adapter, add contract tests, document which EIPs are covered and which are explicitly out of scope.
  3. Integrate low-risk surfaces first — address validation, checksum display, unit conversion — behind a feature flag.
  4. Integrate hashing used in authentication/signing flows only after security review sign-off and shadow-mode comparison.
  5. Remove the superseded path, keep the adapter boundary, and add a monitoring signal for validation failures.
  6. Decide on vendoring/forking at the point the package becomes load-bearing.

Operational Impact

Maintenance

  • Low churn is expected and acceptable — the underlying specifications are stable, and the package is small. The recent release date is a positive signal of a live maintainer, but do not read it as broad adoption.
  • Own it deliberately: pin, mirror to a private repository or fork, and record the exact commit/version in your architecture decision record.
  • Budget near-zero ongoing maintenance for the code and a small standing effort for advisory monitoring and periodic test-vector revalidation.

Support

  • No commercial support, no SLA, no vendor to escalate to. Internal ownership is mandatory; identify a named engineer.
  • Document the supported EIP surface and known limitations in-repo so the team does not over-trust the library.
  • Keep the known-answer test suite in CI — it is your only real regression net and it survives a maintainer disappearing.

Scaling

  • Pure-PHP Keccak is CPU-bound: benchmark hashes/sec on production-class hardware and size queues accordingly. Expect a small fraction of what ext-keccak/hash or a native sidecar delivers.
  • Cache derived values (checksummed addresses, hashed payloads) at the boundary; most workloads repeat the same inputs.
  • Horizontal scaling works, but hashing competes with request workers — isolate bulk operations to dedicated queue workers so a batch job cannot starve user traffic.
  • Storage and RPC are unaffected; the library is not a scaling bottleneck at typical volumes, only at high-throughput verification workloads.

Failure modes

  • Silent wrong output is the dominant risk: bad checksum casing, SHA3-vs-Keccak confusion, or a missing message prefix yields invalid addresses or unverifiable signatures with no error raised.
  • Numeric truncation in wei conversions if native integers are used anywhere in the chain.
  • Malformed input handling: decide explicitly whether exceptions from the library surface as 422s or 500s, and normalize at the adapter.
  • Dependency breakage on PHP/framework upgrades or a yanked release — mitigated by lockfile pinning and a fork.
  • Bus factor: maintainer disappearance freezes the package at its current state; with this surface area that is survivable, but only if you can patch a fork.
  • False confidence: developers treating "it's a crypto library" as "it's audited."

Ramp-up

  • API surface is small and conventional; a mid-level Laravel developer is productive in under a day.
  • The real ramp-up cost is domain literacy: EIP-55, EIP-191, EIP-712, hex/byte conventions, and wei denominations. Budget a short internal write-up plus the test-vector suite as onboarding material.
  • Require a second reviewer with Ethereum familiarity for any change touching signing or key-adjacent code; that review gate is cheaper than any tooling you could add.
  • Recommended posture: adopt narrowly for validation/formatting/hashing primitives, contain behind an interface, verify against published vectors, and do not let it near key material or signing authority without explicit security review.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource