Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.63 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.63 KB

pTokens bridge JSON-RPC Specification

View the spec

The pTokens JSON-RPC is a collection of methods that all bridges implement.

Building

The specification is split into multiple files to improve readability. It can be compiled the spec 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 twp tools for testing contributions. The main one that runs as GitHub action is the OpenRPC validator:

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

The third tool can validate a live JSON-RPC provider against the specification:

$ ./scripts/debug.sh https://pbtconbsc-node-1a.eu.ngrok.io/v2/pbtc-on-bsc/ app_queryReport \"native\",2
data.json valid

License

This repository is licensed under MIT.