├── composer.json └── src └── Client.php /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bluedroplet/ethereum-php-lib", 3 | "description": "A library for integrating PHP with Ethereum.", 4 | "require": { 5 | "php": ">=5.6", 6 | "graze/guzzle-jsonrpc": "~3.0" 7 | }, 8 | "autoload": { 9 | "psr-4": { 10 | "Ethereum\\": "src/" 11 | } 12 | }, 13 | "license": "Unlicense", 14 | "authors": [ 15 | { 16 | "name": "Jonathan Brown", 17 | "email": "jbrown@bluedroplet.com" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/Client.php: -------------------------------------------------------------------------------- 1 | client = RpcClient::factory($url); 18 | } 19 | 20 | public function request($method, array $params = []) { 21 | return $this->client->send($this->client->request($this->id++, $method, $params))->getRpcResult(); 22 | } 23 | 24 | } 25 | --------------------------------------------------------------------------------