2017 © Pedro Peláez
 

project geth-php

A PHP wrapper to the geth JSON-RPC API.

image

kemalevren/geth-php

A PHP wrapper to the geth JSON-RPC API.

  • Thursday, March 15, 2018
  • by kemalevren
  • Repository
  • 1 Watchers
  • 3 Stars
  • 70 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 17 Versions
  • 21 % Grown

The README.md

GETH-PHP

A PHP wrapper to the Geth JSON-RPC, (*1)

Requirements

  • PHP >= 7.0.x
  • phpunit >= 6.5.*
  • cURL Extension
  • illuminate/support >= 5.1.*

Installation

composer require kemalevren/geth-php

Usage

$geth = new \kemalevren\Geth\JsonRpc([
        // Geth JSON-RPC version
        'version' => '2.0',
        // Host part of address
        'host' => '127.0.0.1',
        // Port part of address
        'port' => 8545,
        // Return results as associative arrays instead of objects
        'assoc' => true,
]);

$version = $geth->web3_getVersion();

$accounts = $geth->eth_accounts();
foreach($accounts as $account) {
    echo $account, ': ', $geth->eth_getBalance($account, 'latest'), PHP_EOL;
}

Laravel 5

Add the service provider and facade in your config/app.php, (*2)

Service Provider, (*3)

kemalevren\Geth\Laravel5\GethPhpServiceProvider::class,

Facade, (*4)

'JsonRpc'   => kemalevren\Geth\Laravel5\Facades\JsonRpc::class,

Laravel 5 Usage

JsonRpc::setOptions([
        // Geth JSON-RPC version
        'version' => '2.0',
        // Host part of address
        'host' => '127.0.0.1',
        // Port part of address
        'port' => 8545,
        // Return results as associative arrays instead of objects
        'assoc' => true,
]);

$version = JsonRpc::web3_getVersion();

$accounts = JsonRpc::eth_accounts();
foreach($accounts as $account) {
    echo $account, ': ', JsonRpc::eth_getBalance($account, 'latest'), PHP_EOL;
}

The Versions

15/03 2018

dev-master

9999999-dev

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

15/03 2018

v1.1.3

1.1.3.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

15/03 2018

v1.1.2

1.1.2.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

07/03 2018

v1.1.1

1.1.1.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.1.0

1.1.0.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.11

1.0.11.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.10

1.0.10.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.9

1.0.9.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.8

1.0.8.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.6

1.0.6.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.7

1.0.7.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.5

1.0.5.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.4

1.0.4.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.2

1.0.2.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.3

1.0.3.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.1

1.0.1.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth

14/12 2017

v1.0.0

1.0.0.0

A PHP wrapper to the geth JSON-RPC API.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kemal Evren

php eth geth