cennznet icon indicating copy to clipboard operation
cennznet copied to clipboard

Standardize RPC defintions

Open jordy25519 opened this issue 3 years ago • 0 comments

Move away from the getStorage/state rpc's and make some simply typed RPC interfaces which are easy to consume and support long term.
Things like api.query.genericAsset.freeBalance while they are powerful pushes lots of complexity onto sdks and is really just leaking implementation details like the storage codec, hashes and structure.

It should be easy to curl a balance, without requiring the SCALE codec at all for encoding or decoding, the client should handle this.

Ideas:

  • [x] Investigate generative approaches e.g. grpc + JSON
  • [ ] Document and implement 0-SCALE interfaces for common queries e.g. (get_block, get_balance, get_nft_attributes)

jordy25519 avatar Jun 28 '21 05:06 jordy25519