Giter Site home page Giter Site logo

geth-jsonrpc-php-client's Introduction

Downloads this Month Latest Stable Version Build Status Scrutinizer Code Quality Coverage Status

Introduction

This API client lib is used to communicate with geth (go-ethereum) node.

Via this client lib you can easily run operation on the node such is:

  • Get account balance,
  • sign transactions,
  • deploy transactions,
  • ...

Full documentation of all methods that can be run on geth node are described here: https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-methods

Install

composer require achse/geth-jsonrpc-php-client

Usage

// Create HTTP client instance (you can use something simplier just wrap it by using IHttpClient interface)
// Create JsonRpc client which can run any operation on your geth node
$httpClient = new GuzzleClient(new GuzzleClientFactory(), 'localhost', 8545);
$client = new Client($httpClient);

// Run operation (all are described here: https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-methods)
$result = $client->callMethod('eth_getBalance', ['0xf99ce9c17d0b4f5dfcf663b16c95b96fd47fc8ba', 'latest']);

// $result ==='0x16345785d8a0000'

geth-jsonrpc-php-client's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.