oasisprotocol / oasisprotocol/oasis-sdk
ts-web/core: move gRPC modules' methods into separate clients?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 90
- Forks
- 35
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 5
Description
We could also split these into multiple classes so instead of nic.beaconGetBaseEpoch() you would do nic.beacon.getBaseEpoch()?
Originally posted by @kostko in https://github.com/oasisprotocol/oasis-sdk/pull/36#discussion_r592991642
Currently they're all methods in a single "node internal" client class. I hadn't split this up the way runtime modules have wrappers separated into modules because oasis-node is not mix-and-match in the way runtime modules are.
This might become more appealing when we encounter any of the following:
- if the current naming scheme of concatenating the module name and method name starts to become ambiguous
- if we want to pass a single module's set of methods around as an object
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ts-web/core by examining the single node-internal client and its gRPC methods. Compare the current concatenated method naming with the proposed module-specific client shape, then establish whether the refactor is warranted and what the completed client organization should be.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, typescript
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100