iamgroot

Crates.ioiamgroot
lib.rsiamgroot
version0.2.8
sourcesrc
created_at2023-03-07 22:35:38.086048
updated_at2024-05-13 16:13:06.719877
descriptionRust code generation from Open-RPC spec
homepage
repository
max_upload_size
id804010
size1,105,756
Sergey Melnychuk (sergey-melnychuk)

documentation

README

I am groot

[Proof of Concept] Rust code generator from OpenRPC spec

OpenRPC spec

JSON-RPC spec

StarkNet OpenRPC spec

Usage

  • Generate the code and then run suggested example:
export KEY="..."
export URL="https://starknet-mainnet.g.alchemy.com/v2/$KEY"

./x.sh

RUST_LOG=debug cargo run --example demo

cargo run --example gen > data.json
## Sample call
curl \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"starknet_getStateUpdate","params":[{"block_hash": "0x4684a9257747388a70848ccf222fd4c7e0bde27b84457e829ee48cac28ea21d"}],"id":1}' \
$URL

TODO

  1. async version of the Rpc trait and the client
  2. Seamless inclusion into a build process
    • extract -build sub-crate for [build-dependencies]

Misc

Total lines of code: find ./src -type f -name "*.rs" | xargs grep . | wc -l

Commit count: 0

cargo fmt