Skip to content

mumot1999/ethereum-php

 
 

Repository files navigation

PHP interface to Ethereum JSON-RPC API

Usage

composer require ...

Extend

use Ethereum\EthereumClient;
use Ethereum\Ethereum_Message;
use Ethereum\Ethereum_Transaction;

class EthereumController extends ControllerBase {

  public $client;

  public function __construct($host = FALSE) {
    if (!$host) {
      $host = 'http://localhost:8445'
    }
    $this->client = new EthereumClient($host);
  }

}

Use

    try {
      $eth = new EthereumController();
      $eth->client->eth_protocolVersion();
    }
    catch (\Exception $exception) {
      die ("Unable to connect.");
    }

Documentation

For documentation see the Ethereum RPC documentation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%