* fix comment of default number of peers
* export default number of peers from base protocol sdk
* rename to light_push, move class to separate file
* move waitForRemotePeer to sdk package
* add todo to move waitForGossipSubPeerInMesh into @waku/relay
* clean up waitForRemotePeer, split metadata await from event and optimise, decouple from protocol implementations
* simplify and rename ILightPush interface
* use only connected peers in light push based on connections instead of peer renewal mechanism
* improve readability of result processing in light push
* fix check & update tests
* address tests, add new test cases, fix racing condition in StreamManager
* use libp2p.getPeers
* feat: confirm metadata and protocols needed in waitForRemotePeer
* rely on passed protocols and fallback to mounted
* add I prefix to Waku interface
* implement waku.connect method
* add docs to IWaku interface
* remove export and usage of waitForRemotePeer
* move wait for remote peer related to Realy out of @waku/sdk
* change tests to use new API
* fix linting
* update size limit
* rename .connect to .waitForPeer
* export waitForRemotePeer and mark as deprecated
* feat: add mocha tests to @waku/sdk and cover waitForRemotePeer (#2163)
* feat: add mocha tests to @waku/sdk and cover waitForRemotePeer
* add waitForRemote UTs
* remove junk
* feat: expose peerId and protocols from WakuNode (#2166)
* chore: expose peerId and protocols from WakuNode
* remove unused method
* move to private method
* rename to waitForPeers
* up test
* refactor the Store protocol into Core and SDK, simplify `queryGenerator()`
* update imports & types
* chore: `@noble/hashes` moves to `sdk`
* chore: update tests
* chore: update size-limit import path
* fix: cursor tests, use `Cursor` type from `proto.Index` instead of redefining
* export wakuStore from sdk
* fix: imports
* chore: use specific version for package
* chore: handle error for peer access
* use type instead of interface
* rm: comment
* add TODO
* chore!: remove deprecated function definition
* chore: improve logging
* rm: v1
* fix v2 imports
* remove tests for filter v1
* set filter v1 as default and rm v2 completely
* change import name for filter v2
* rename FilterV2 to Filter completely
* fix run check
* implement proto
* implement filter v2
* add tests
* minor improvements
- make unsubscribe functions private in
filter
- enable all tests
* enable all tests
* readd multiaddrinput
* address comment removals
* unsubscribe based on contentFilters passed
* update unsubscribe function parameters in test
* reset interfaces & filter v1
* refactor filterv2 into 2 classes
- removes generics from types on filter which means
manual typecasting to filter version is required on
consumer side
- defaults to filterv2
- splits filterv2 into 2 classes:
- one to create the subscription object with a
peer which returns the second class
- the other to manage all subscription functions
* updates filter tests for the new API
- also fixes an interface import
* update `toAsyncIterator` test for Filter V1
* implement IReceiver on FilterV2
* remove return values from subscription functions
* update `to_async_iterator`
* address variable naming
* add tsdoc comments for hidden function
* address minor comments
* update docs to default to filter v2
* address comments
* rename `wakuFilter` to `wakuFilterV1`
* chore: Remove static variables (#1371)
* chore: Remove static variables
- Remove internal types from `@core/interfaces`
- Remove data being redundantly stored (pubsub topic)
- Remove usage of static variables
- Clean up callbacks and decoders when using `unsubscribe`
- Clean up callbacks and decoders when using `unsubscribeAll`
* fix setting activeSubscription
---------
Co-authored-by: danisharora099 <danisharora099@gmail.com>
* make activeSub getter and setter private
* update size-limit
---------
Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
* move constants & core's func to @waku/utils
* setup @waku/relay
* use @waku/relay for create
* address: principal review
* fix: size-limit
* move all constants to @waku/core
* move TopicOnlyDecoder to relay
* merge: master
* fix: tests
* Move constants out of core (#1340)
* update package.lock
* change constants folder into a ts file
* use dependency version as * instead of version number
* add constants import from @waku/core
* add empty changelog file for relay
---------
Co-authored-by: fryorcraken.eth <110212804+fryorcraken@users.noreply.github.com>
This module will just consume a generate Waku and Waku Relay interfaces
so we already we want to extract it.
It is also one opinionated to handle connection management, other ways
might come with https://github.com/status-im/js-waku/issues/914.