PHPackages                             dimonml/laravel-ethereum - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. dimonml/laravel-ethereum

ActiveLibrary[HTTP &amp; Networking](/categories/http)

dimonml/laravel-ethereum
========================

the ethereum json rpc api

1211PHP

Since Jan 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dimonml/laravel-ethereum)[ Packagist](https://packagist.org/packages/dimonml/laravel-ethereum)[ RSS](/packages/dimonml-laravel-ethereum/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 Ethereum Package for Laravel
------------------------------

[](#----ethereum-package-for-laravel)

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

[](#installation)

To install the PHP client library using Composer:

```
composer require jcsofts/laravel-ethereum
```

Alternatively, add these two lines to your composer require section:

```
{
    "require": {
        "jcsofts/laravel-ethereum": "dev-master"
    }
}
```

### Laravel 5.5+

[](#laravel-55)

If you're using Laravel 5.5 or above, the package will automatically register the `Ethereum` provider and facade.

### Laravel 5.4 and below

[](#laravel-54-and-below)

Add `Jcsofts\LaravelEthereum\EthereumServiceProvider` to the `providers` array in your `config/app.php`:

```
'providers' => [
    // Other service providers...

    Jcsofts\LaravelEthereum\EthereumServiceProvider::class,
],
```

If you want to use the facade interface, you can `use` the facade class when needed:

```
use Jcsofts\LaravelEthereum\Facade\Ethereum;
```

Or add an alias in your `config/app.php`:

```
'aliases' => [
    ...
    'Ethereum' => Jcsofts\LaravelEthereum\Facade\Ethereum::class,
],
```

### Using Laravel-Ethereum with Lumen

[](#using-laravel-ethereum-with-lumen)

laravel-ethereum works with Lumen too! You'll need to do a little work by hand to get it up and running. First, install the package using composer:

```
composer require jcsofts/laravel-ethereum
```

Next, we have to tell Lumen that our library exists. Update `bootstrap/app.php`and register the `EthereumServiceProvider`:

```
$app->register(Jcsofts\LaravelEthereum\EthereumServiceProvider::class);
```

Finally, we need to configure the library. Unfortunately Lumen doesn't support auto-publishing files so you'll have to create the config file yourself by creating a config directory and copying the config file out of the package in to your project:

```
mkdir config
cp vendor/jcsofts/laravel-ethereum/config/ethereum.php config/ethereum.php
```

At this point, set `ETH_HOST` and `ETH_PORT` in your `.env` file and it should be working for you. You can test this with the following route:

```
try{
        $ret = \Jcsofts\LaravelEthereum\Facade\Ethereum::eth_protocolVersion();
        print_r($ret);
    }catch (Exception $e){
        echo $e->getMessage();
    }
```

Configuration
-------------

[](#configuration)

You can use `artisan vendor:publish` to copy the distribution configuration file to your app's config directory:

```
php artisan vendor:publish
```

Then update `config/ethereum.php` with your credentials. Alternatively, you can update your `.env` file with the following:

```
ETH_HOST=http://localhost
ETH_PORT=8545
```

Usage
-----

[](#usage)

To use the Ethereum Client Library you can use the facade, or request the instance from the service container:

```
try{
        $ret = \Jcsofts\LaravelEthereum\Facade\Ethereum::eth_protocolVersion();
        print_r($ret);
    }catch (Exception $e){
        echo $e->getMessage();
    }
```

Or

```
$thereum = app('Ethereum');

$result=$thereum->eth_protocolVersion();
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/298a54408fd6fb7642d04535f6cb9f491e635e639fa091012cf67383abb05985?d=identicon)[dimonml](/maintainers/dimonml)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/dimonml-laravel-ethereum/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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