Open BelfordZ opened 5 years ago
This is great, do you know if there are plans to generate Go servers out of a OpenRPC spec?
Thanks for the suggestion @BelfordZ. This is certainly something we'd be interested in looking into.
@gchaincl Thank you for taking a look, and asking.
Yes. We are working on generated go clients at the moment. I'd expect it to be ready before the new year.
If you are interested in helping in the efforts to getting a great go client together, feel free to pop by the open-rpc github, specifically https://github.com/open-rpc/generator-client
ATM we dont have an issue filed for the go client, would greatly appreciate this as a contribution.
@hrharder No problem. If you need any help or have any questions, I'm at your disposal.
Great work on this project BTW. It's always refreshing to see good software development practices in crypto.
@gchaincl My appologies, I read clients! haha.
Server generating is on the cards for sure, but its a little bit more nuanced than client generation, since the implementation of the server would be left open - it presents a very different developer workflow. We are working on patterns for making this nice to use, but haven't quite landed on anything yet.
There are existing libraries that can do client/server generation natively in golang, its currently used for hyperledger burrow, take a look, might fit your needs:
@BelfordZ appreciate it! Glad you're seeing some good practices -- we certainly try.
Appreciate the issue. Once we clear up some higher-priority tasks we have in the pipeline we'll circle back to this. I've wanted to try out OpenRPC for some time. :)
There are existing libraries that can do client/server generation natively in golang, its currently used for hyperledger burrow, take a look, might fit your needs:
Thanks for sharing, I'll have a look
Using OpenRPC you can describe your JSON-RPC interface, and generate clients accordingly. You can see how we did it for ethereum here: https://github.com/etclabscore/ethereum-json-rpc-specification
Specifically you may want to look at the openrpc.json file in the root.