PHPackages                             cointrunk/laravel-coin - 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. cointrunk/laravel-coin

ActiveLibrary[API Development](/categories/api)

cointrunk/laravel-coin
======================

Coin json rpc api

04PHP

Since Mar 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/cointrunk/laravel-coin)[ Packagist](https://packagist.org/packages/cointrunk/laravel-coin)[ RSS](/packages/cointrunk-laravel-coin/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

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

 [![Latest Stable Version](https://camo.githubusercontent.com/acc24d11dee0edf2496e2179f42ec4bf4362d50356ed186eb3eb6f78e46f5abc/68747470733a2f2f706f7365722e707567782e6f72672f636f696e7472756e6b2f6c61726176656c2d636f696e2f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/cointrunk/laravel-coin) [![Latest Unstable Version](https://camo.githubusercontent.com/7fa1136219137be463ecc8d167b51ad74226cce3503c795fb2b0eb4125f86ec5/68747470733a2f2f706f7365722e707567782e6f72672f636f696e7472756e6b2f6c61726176656c2d636f696e2f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/cointrunk/laravel-coin) [![License](https://camo.githubusercontent.com/f65262f679bf891da6fd7c6dc099d9b212467b6ceabc5091f4e07c2a2151344e/68747470733a2f2f706f7365722e707567782e6f72672f636f696e7472756e6b2f6c61726176656c2d636f696e2f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/cointrunk/laravel-coin) [![Total Downloads](https://camo.githubusercontent.com/50a51255d845aa5c3873ee4ced7b93678798d845a03e3b0c734dd997fa209fa6/68747470733a2f2f706f7365722e707567782e6f72672f636f696e7472756e6b2f6c61726176656c2d636f696e2f646f776e6c6f616473)](https://packagist.org/packages/cointrunk/laravel-coin)

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 cointrunk/laravel-coin
```

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

```
{
    "require": {
        "cointrunk/laravel-coin": "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 `cointrunk\LaravelCoin\CoinServiceProvider` to the `providers` array in your `config/app.php`:

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

    cointrunk\LaravelCoin\CoinServiceProvider::class,
],
```

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

```
use cointrunk\LaravelCoin\Facade\Ethereum;
```

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

```
'aliases' => [
    ...
    'Ethereum' => cointrunk\LaravelCoin\Facade\Ethereum::class,
],
```

### Using laravel-coin with Lumen

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

laravel-coin 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 cointrunk/laravel-coin
```

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

```
$app->register(cointrunk\LaravelCoin\CoinServiceProvider::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/cointrunk/laravel-coin/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 = \cointrunk\LaravelCoin\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 = \cointrunk\LaravelCoin\Facade\Ethereum::eth_protocolVersion();
        print_r($ret);
    }catch (Exception $e){
        echo $e->getMessage();
    }
```

Or

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

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

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/000e9e5f844d678b25e4c7562b6e4b3f028d57f3e50eedd29443ef49e4cb6d0d?d=identicon)[cointrunk](/maintainers/cointrunk)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/cointrunk-laravel-coin/health.svg)

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

###  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)
