10

Web3 implements the Ethereum JSON-RPC spec and seems to be the preferred method for communicating between a javascript applications and the Ethereum node. However there are situations where you might want a non javascript based application to interact with the blockchain for example:

  • IoT devices
  • Blockchain monitors
  • Oracles and services
  • Bridges between Ethereum and other server side code

What methods exist for communicating with Ethereum nodes from other languages? That is are there any libraries for Python, Java/Scala, Go, C++ ... ect which either:

  • Implement the Json-RPC spec
  • Allow communication using some other method such as IPC.
  • Allow a node to be embedded within existing code and expose an interface.
10

Here are some libraries for interacting with an Ethereum node. They are grouped by language, and roughly according to their last commit, with any appropriate brief notes. Javascript has been included since they are alternatives to web3.js and provide value to the overall list.

Javascript

https://github.com/AugurProject/ethrpc with IPC support, last commit 1 day ago

https://github.com/tarrencev/ethjs written in ES6, RPC calls return a promise/stream, last commit 10 days ago

Python

https://github.com/ConsenSys/ethjsonrpc all 62 JSON-RPC methods, last commit 11 days ago

https://github.com/pipermerriam/ethereum-rpc-client RPC, last commit Jan 2 2016

https://github.com/pipermerriam/ethereum-ipc-client IPC, last commit Jan 4 2016

C# .NET

https://github.com/LawrenceBotley/EthereumRpc-NET appears to have majority of RPC done, last commit Dec 13 2015

Ruby

https://github.com/tymat/ethereum-ruby appears to be minimal and from 2 years ago


For other languages, general JSON-RPC libraries are available as a starting point.

https://en.wikipedia.org/wiki/JSON-RPC#Implementations

http://json-rpc.org/wiki/implementations

  • Thanks, but while rolling your own based on a general JSON-RPC library is a good practical approach I'm really asking if there are any existing libraries which wrap the Ethereum JSON-RPC API in convenience methods (like web3 does in javascript). For example this Python client for Ethereum over IPC by pipermerriam. – JackWinters Feb 3 '16 at 12:58
  • I see, thanks for clarifying. I'll add some of what I find. – eth Feb 3 '16 at 18:27
  • There is ethereumj , for all Java lovers as well – Abhiram mishra Jun 28 '16 at 17:35
  • @TheNeoNoirDeveloper Thanks, I converted answer to wiki and feel free to add Java and other resources :) – eth Jun 28 '16 at 22:43
  • Anyone tried python ethererum rpc client ? I tried to run the python script but I have this error : ValueError: No JSON object could be decoded when I'm using client.get_coinbase() – John Nov 22 '16 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.