@shardeum-foundation/api-specs
v1.0.3
Published
OpenRPC specification for the Shardeum JSON-RPC API
Readme
Shardeum JSON-RPC API Specification
This repository contains the OpenRPC specification for the Shardeum JSON-RPC API.
Usage
- Explore: Use an OpenRPC playground or tool to interact with the
openrpc.jsonfile generated by the build. - Integrate: Use the generated
openrpc.jsonto build clients or documentation for the Shardeum API. - Latest build: Find the latest build artifact at
dist/build/openrpc.jsonafter runningyarn build(or view the sourceopenrpc.yaml).
Linting
To check code quality and style, run:
npm run lintTo automatically fix fixable issues, run:
npm run lint:fixIf you see errors, please fix them before submitting a PR. Linting helps keep the codebase consistent and maintainable.
Contributing
Contributions are welcome! Please follow standard GitHub practices (fork, branch, pull request).
Key areas for contribution:
- Ensuring standard Ethereum methods accurately reflect Shardeum's implementation.
- Improving descriptions, examples, and schemas.
How it works
This repository uses a simple build process:
- The canonical API specification is maintained in
openrpc.yaml. - The
yarn buildscript usesmerge-openrpc.jsto:- Load
openrpc.yaml. - Convert it to JSON format.
- Merge it with the Ethereum Execution APIs OpenRPC Document
- Save it to
src/build/openrpc.json.
- Load
- TypeScript (
tsc) compilessrc/index.ts(which exports the JSON spec) to thedist/directory.
Publishing
On release, the specs are published to npm under the package name defined in package.json (e.g., @shardeum-foundation/api-specs).
(Details about publishing to specific documentation sites or GitHub Pages can be added here if applicable).
