waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
166 stars 42 forks source link

chore: protocol implementations in `@waku/core` should be as unopinionated as possible #1886

Closed danisharora099 closed 4 months ago

danisharora099 commented 6 months ago

This is a change request

Problem

Our protocol implementations exist is @waku/core, and offer opinions on the usage such as:

These opinions are assumptions we have made, and they sit close with the code for the protocol's purest implementation. Problems with having a general SDK-like functionalities with protocol implementation:

Proposed Solutions

It would be a better approach to decouple opinions as much as possible from the protocol implementation, thus keeping it as close to pure, while introducing opinions within @waku/sdk.

This also allows us flexibility in terms of the different APIs we can provide for each protocol.

Acceptance Criteria

Notes