2

I was under the impression that the web3 Javascript API was the only API that DApps could use to communicate with an Ethereum node, and that the Ethereum client is implemented in various languages like C++ (cpp-ethereum), Go (go-ethereum) and Java (ethereumj). I interpreted "Ethereum client" as the software that runs on an Ethereum node which could be written in any language but that does not mean that it exposes a public API for applications written in that language to interact with.

Am I mistaken in thinking that the only "official" APIs to interact with an Ethereum node are Web3 (for Javascript apps) and JSON RPC API for applications written in other languages?

Or is it true that a node may run EthereumJ and a Java application running on that node can call Java methods providing Web3-like functionality that EthereumJ provides as an API? For example, org/ethereum/facade/Ethereum.java contains methods like createTransaction, submitTransaction, callConstantFunction etc.

Also, if this is an API that Java applications can invoke, then where is its user documentation?

  • I did some more reading and I believe that it is true that, if a node is running EthereumJ, there is a Java API that an application written in Java can use to interact with the node. – Ajoy Bhatia May 17 '17 at 1:04
1

I did some more reading and I believe that it is true that, if a node is running EthereumJ, it exposes a Java API that an application written in Java can use to interact with the node. Also, I found web3j, which is a lightweight Java library for applications to interact with a node. However, it is lightweight in the sense that it is not a complete implementation of the Ethereum protocol. It is just a wrapper that takes care of the plumbing to make JSON RPC API calls to an existing node.

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.