Comments (4)
we already got an issue for that paritytech/jsonrpsee#737 but just a matter to get someone working on it :)
from capi.
It's really tricky because these rpc's can be defined in so many places in substrate, frame, runtime APIs, RPC extensions and similar.
Ideally, I would want to have a method e.g. "rpc_methods/rpc.discover"
to have all information from a node which RPC methods it exposes to generate the RPC API with parameters and return types.
There is this https://spec.open-rpc.org/#openrpc-document which is a standard how to this in JSON-RPC v2 which looks cool
but we haven't looked into it and how well it works with all the generics stuff in substrate.
from capi.
There is this https://spec.open-rpc.org/#openrpc-document which is a standard how to this in JSON-RPC v2 which looks cool
This spec looks fantastic; in fact, it seems trpcββa popular TS dev toolββcomplies with the OpenRPC specification. Very promising.
As we build out more libraries, utilizing a single source of truth for RPC types (and devising an approach to handle variation across chains) will become a necessity. The rpc.discover
method would address this need quite well; it would even enable the generation of narrow typings for errors of each method.
I can imagine that this would entail a non-trivial amount of work. Perhaps a first pass could omit the method result content descriptors / reference objects. Meanwhile, params are usually just numbers / hex-encoded strings; these would be simpler to represent than the complex generic types of Substrate.
^ might not be helpful, just hoping to get the ball rolling. Let me know if I should transfer this issue to one of your repos. Might make for a good backlog item.
from capi.
We'll be using state_call
, so we won't need these types.
from capi.
Related Issues (20)
- inform users of node <20.3.1 of required shim HOT 3
- typescript diagonostic codes not properly thrown during `capi sync` HOT 1
- rococo error on intel mac HOT 1
- include reason for skip in examples .eg.ts @test_skip
- confusion re why the blockHash method call proceeds the block call
- justify handle/unhandle/rehandle + more concrete examples
- provide instructions on local codegen server + make capi.dev FAQ more visible
- passing dynamic data to codegened API methods
- some example ideas from the community
- use workflow for syncing labels to other Capi repos
- revise github issue templates to reflect new issue handling
- add other repos to project & add automation HOT 3
- use one repo for `capi-starter-projects` HOT 1
- delete add-to-project workflow HOT 1
- Two calls in succession, inBlockEvents "cannot regress" error HOT 1
- add descriptions to labels
- cannot install local capi tarball without running capi serve locally
- unable to capi sync with local tarball installation
- `capi serve --target dev` invalid transactions HOT 2
- Duplicate transactions with transactionStatuses HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capi.