oasisprotocol / oasisprotocol/oasis-sdk

ts-web/core: move gRPC modules' methods into separate clients?

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

c:client-sdk/typescript
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.