The Portal Network JSON-RPC is a collection of methods that all clients implement. This interface allows downstream tooling and infrastructure to treat different Portal Network clients as modules that can be swapped at will.
When this doc was written, the build and test steps required node.js version
v16+. Verify if this version is current by inspecting the node-version
defined in the project's test config file.
The specification is split into multiple files to improve readability. It can be compiled the into a single document by running:
$ 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.
Preview the built result by copying the openrpc.json file into the open-rpc
playground.
The specification is written in OpenRPC. Refer to the OpenRPC specification and the JSON schema specification to get started.
There are currently two tools for testing contributions. The first tool is an OpenRPC validator.
$ npm install
$ npm run lint
OpenRPC spec validated successfully.The second tool can validate a live JSON-RPC provider hosted at
http://localhost:8545 against the specification:
$ ./scripts/debug.sh discv5_sendPing \"enr:-....\"
data.json valid