PHPackages                             6phere/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. [API Development](/categories/api)
4. /
5. 6phere/laravel-ethereum

ActiveLibrary[API Development](/categories/api)

6phere/laravel-ethereum
=======================

the ethereum json rpc api

015PHP

Since Apr 9Pushed 6y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

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

 [![Latest Stable Version](https://camo.githubusercontent.com/40a69bfb2178f4e4aeb62666edd064af129c2dc03bdfeb22bc6eb4f21f2ceedc/68747470733a2f2f706f7365722e707567782e6f72672f6a63736f6674732f6c61726176656c2d657468657265756d2f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/jcsofts/laravel-ethereum) [![Latest Unstable Version](https://camo.githubusercontent.com/1362646089a0d81861f732b9fe5e5912709cb17c50a6c7cd02c79cad1285bb73/68747470733a2f2f706f7365722e707567782e6f72672f6a63736f6674732f6c61726176656c2d657468657265756d2f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/jcsofts/laravel-ethereum) [![License](https://camo.githubusercontent.com/dee1683a7ec1d2800d82e8e2b205b7be2fc1271b9f785bc29f2d25e9db6b322b/68747470733a2f2f706f7365722e707567782e6f72672f6a63736f6674732f6c61726176656c2d657468657265756d2f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/jcsofts/laravel-ethereum) [![Total Downloads](https://camo.githubusercontent.com/4d13c2d4945b69f9f7db1a45def3cef53b03158e6a026c0bb943f99e3a8aaaaa/68747470733a2f2f706f7365722e707567782e6f72672f6a63736f6674732f6c61726176656c2d657468657265756d2f646f776e6c6f616473)](https://packagist.org/packages/jcsofts/laravel-ethereum)

Introduction
------------

[](#introduction)

This is a simple Laravel Service Provider providing for [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC)

and [Management API](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)

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

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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/989068cdcc5cc8249ba649c566903058d9f7f1a61caa24e662b0984e40ffdda1?d=identicon)[pablo.roman](/maintainers/pablo.roman)

![](https://www.gravatar.com/avatar/7610df99e02a00b49296911caccfd5a6f862ccec254921169505e8c6ac91eaf4?d=identicon)[jesusmariajurado](/maintainers/jesusmariajurado)

---

Top Contributors

[![jcsofts](https://avatars.githubusercontent.com/u/33087222?v=4)](https://github.com/jcsofts "jcsofts (4 commits)")[![jesusmariajurado](https://avatars.githubusercontent.com/u/19391337?v=4)](https://github.com/jesusmariajurado "jesusmariajurado (2 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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