Skip to content

API gateway for subscribing to blocks and sending GraphQL queries to Geth.

License

Notifications You must be signed in to change notification settings

codingchili/ethereum-gateway

Repository files navigation

Broker Ethereum

Publisher/subscriber services for the Geth JSON RPC-API implemented as microservices. All of the microservices are implemented using the chili-core framework and written in Kotlin.

Includes the following libraries

  • Hazelcast
  • Web3j
  • Vert.x (chili)
  • Polymer 3 / web components
  • ElasticSearch
  • Kibana
  • Geth 1.9.2

architecture overview

Overview of the services in the system, the *Service components are implemented using chili-core.

workspace screenshow

NOTE 1: the web interface is not a part of this repository as its unlicensed.

NOTE 2: uses block data enriched with mock whisper data as the whisper RPC calls isn't implemented in the Web3j client.

Build & Run

  1. Build the jar dist
./gradlew jar
  1. Start geth ethereum client
$ geth --testnet --graphql --shh --rpcapi admin,miner,eth,web3 --rpc console

Start all services in the same JVM

java -jar <beth>.jar --deploy all

Websocket now deployed on :8080.

To host the UI during development run

npm install
polymer serve

From the resouraces/web/ folder.

To build the distribution bundle run

polymer build

GraphQL

See: bitfalls.com/exploring-ethereum-graphql

Example query to grab block 0x1.

query { block(number: 1) { hash } }

About

API gateway for subscribing to blocks and sending GraphQL queries to Geth.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages