Collection of JSON-RPC APIs provided by Ethereum execution engines
Go to file
Danny Ryan 39de89b367
Merge pull request #214 from mkalinin/error-code-fix
Engine API: adjust error codes with JSON-RPC 2.0 spec
2022-05-05 16:04:01 -06:00
.github/workflows Fixed deploy 2022-01-10 15:00:23 -08:00
scripts Add graphql validation 2022-03-16 16:20:37 +01:00
src Merge pull request #214 from mkalinin/error-code-fix 2022-05-05 16:04:01 -06:00
.editorconfig remove js indent size 2021-08-23 22:47:48 +02:00
.gitignore Fixed build where refs were still dereffed 2022-01-10 15:21:56 -08:00
LICENSE add license and readme 2021-06-15 22:31:43 -06:00
README.md Merge pull request #181 from rootulp/patch-1 2022-04-29 12:34:25 +02:00
graphql.json Add script for fetching graphql schema from client 2022-03-16 15:57:12 +01:00
package-lock.json Add script for fetching graphql schema from client 2022-03-16 15:57:12 +01:00
package.json Add graphql validation 2022-03-16 16:20:37 +01:00
spellcheck.yaml fix spelling errors 2021-09-22 19:22:48 +02:00
wordlist.txt Merge pull request #167 from holiman/auth 2022-02-08 11:19:38 -07:00

README.md

Ethereum JSON-RPC Specification

View the spec

The Ethereum JSON-RPC is a collection of methods that all clients implement. This interface allows downstream tooling and infrastructure to treat different Ethereum clients as modules that can be swapped at will.

Building

The specification is split into multiple files to improve readability. The spec can be compiled into a single document as follows:

$ npm install
$ npm run build
Build successful.

This will output the file openrpc.json in the root of the project. This file will have all schema #refs resolved.

Contributing

The specification is written in OpenRPC. Refer to the OpenRPC specification and the JSON schema specification to get started.

Testing

There are currently three tools for testing contributions. The main two that run as GitHub actions are an OpenRPC validator and a spellchecker:

$ npm install
$ npm run lint
OpenRPC spec validated successfully.

$ pip install pyspelling
$ pyspelling -c spellcheck.yaml
Spelling check passed :)

The third tool can validate a live JSON-RPC provider hosted at http://localhost:8545 against the specification:

$ ./scripts/debug.sh eth_getBlockByNumber \"0xc7d772\",false
data.json valid

License

This repository is licensed under CC0.