status-go/geth/rpc
Ivan Daniluk 9eee21f1ca Add support for JSON-RPC array payload. (#335)
This PR introduces solution for #333 - it adds support for array JSON-RPC payload.

unmarshalMessage tries to unmarshal JSON paylod into *jsonrpcMessage object, and in case of failure, analyzes error and, if it's unmarshalling array error, tries to unmarshal it as an array.
2017-09-17 17:06:18 +03:00
..
README.md Add some docs/readmes (#329) 2017-09-15 19:00:00 +03:00
call_raw.go Add support for JSON-RPC array payload. (#335) 2017-09-17 17:06:18 +03:00
call_raw_test.go Add support for JSON-RPC array payload. (#335) 2017-09-17 17:06:18 +03:00
client.go Refactor RPC client #304 (#311) 2017-09-14 23:14:31 +03:00
client_test.go Add support for JSON-RPC array payload. (#335) 2017-09-17 17:06:18 +03:00
doc.go Add some docs/readmes (#329) 2017-09-15 19:00:00 +03:00
route.go Refactor RPC client #304 (#311) 2017-09-14 23:14:31 +03:00
route_test.go Refactor RPC client #304 (#311) 2017-09-14 23:14:31 +03:00

README.md

rpc GoDoc

rpc - JSON-RPC client with custom routing.

Download:

go get github.com/status-im/status-go/geth/rpc

rpc - JSON-RPC client with custom routing.

Package rpc implements status-go JSON-RPC client and handles requests to different endpoints: upstream or local node.

Every JSON-RPC request coming from either JS code or any other part of status-go should use this package to be handled and routed properly.

Routing rules are following:

  • if Upstream is disabled, everything is routed to local ethereum-go node
  • otherwise, some requests (from the list, see below) are routed to upstream, others - locally.

List of methods to be routed is currently available here: https://docs.google.com/spreadsheets/d/1N1nuzVN5tXoDmzkBLeC9_mwIlVH8DGF7YD2XwxA8BAE/edit#gid=0

Note, upon creation of a new client, it ok to be offline - client will keep trying to reconnect in background.


Automatically generated by autoreadme on 2017.09.15