multiformats / multiformats/js-multiformats
Replace CID class with a CID interface
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 268
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
Most of ipfs / libp2p stack depends on CID class which introduces large number of dependencies, it is made worth by the fact that typescript forces all of them to agree on the same exact package to type check.
We should instead introduce CID interface and type our APIs so they take / produce value compatible with that interface. That way they become implementation agnostic allowing us to swap / upgrade implementation without coordinating these changes across the board.
CID Implementation in this library will just become a an implementation of that interface.
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 by locating the CID class and every public API that depends on its concrete type. The work is done when those APIs accept and produce compatible CID interface values, while the library's CID implementation remains usable as one implementation of that interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100