25 Commits

Author SHA1 Message Date
fryorcraken.eth
b2c7e4185f
feat: make message encoding more generic 2022-09-20 12:23:01 +10:00
fryorcraken.eth
930c7beaef
refactor: extract peer selection logic 2022-09-14 22:55:03 +10:00
fryorcraken.eth
3b05bfe988
refact: getPeersForProtocol only needs the peer store 2022-09-14 22:55:02 +10:00
fryorcraken.eth
c5e1f50cc8
refactor: remove console.log usage 2022-09-08 13:18:07 +10:00
fryorcraken.eth
ac48792e0e
feat: implement a simple connection management 2022-09-06 12:29:13 +10:00
fryorcraken.eth
bfeaf6c14e
fix: it-length-prefixed now returns Uint8ArrayList 2022-09-05 15:02:23 +10:00
fryorcraken.eth
863f8ee7a4
fix: do not use uint8arrays/concat as it returns Buffer in NodeJS
`Buffer` does not have the same behaviour as `Uint8Array` when creating
a `DataView`. This is a problem when manipulating byte for encoding and
decoding purposes.
2022-08-24 18:42:48 +10:00
Franck Royer
4a193e49e0
style: use nullish coalescing instead of if/then 2022-08-03 09:30:38 +10:00
Franck Royer
4eeca93d47
chore: bump libp2p to next (0.38.0 rc) 2022-08-03 09:30:36 +10:00
Franck Royer
f768686e51
fix: fix pipe usage 2022-08-03 09:30:33 +10:00
Franck Royer
51d5bc19a2
fix: removed usage of buffer in streams 2022-07-20 12:45:14 +10:00
Franck Royer
98c93c8283
Upgrade libp2p, peer-id, multiaddr
Use new packages and fix most compilation errors.
Remaining error to be dealt with in waku.ts.
2022-07-20 12:40:37 +10:00
Franck Royer
82aba32f9e
Migrate from ts-proto to protons
The latter does not bring Buffer/Long and is ESM compatible.
2022-06-20 14:32:20 +10:00
Franck Royer
9ffedd1fbf
Remove circular dependencies 2022-06-01 12:14:47 +10:00
Franck Royer
f953a41546
Declare it-pipe dependency, properly import
As it was implicitly using it-pipe@1.0.0 that has a different import
format.
2022-04-06 13:41:15 +10:00
Franck R
a488988f37
Implement Waku Store 2.0.0-beta4 (#566) 2022-02-24 16:25:58 +11:00
Franck R
4c80f7f0df
Remove odd prettier config (#500) 2022-02-04 14:12:00 +11:00
Franck R
69f0005445
Bump libp2p from 0.32.4 to 0.36.2, libp2p-gossipsub from 0.12.1 to 0.13.0 (#470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 15:12:08 +11:00
Franck Royer
1d48dc4372
Rename all pubsubTopic occurrences to pubSubTopic 2021-08-20 10:13:02 +10:00
Franck Royer
60290e8d84
Moved DefaultPubSubTopic to waku.ts and fixed the casing
The pubsub topic is used by several protocol, not just relay.
2021-08-20 10:12:55 +10:00
Franck Royer
d68ee3fb74
New peers and randomPeer methods to return available peers 2021-07-12 13:15:19 +10:00
Franck Royer
939b5fb20a
Auto select peer if none provided for store and light push protocols 2021-06-16 23:51:20 +10:00
Franck Royer
bc544c8e0b
Update Light Push protocol string to match nim-waku v0.4 2021-06-11 14:38:08 +10:00
Franck Royer
5ce0717f05
Enable passing a custom pubsub topic
Note that we currently only support one, and only one, pubsub topic for
a given instance across the codebase. The PubSub topic needs to be set
when instantiating the Waku* classes.

At this stage, we believe that most DApp will use, and only use, the
default PubSub topic. Some application want to use an alternative topic
but not use the default one so this behaviour should be fine. See #174
for details.
2021-06-09 15:00:03 +10:00
Franck Royer
de3aea626a
Implement Light Push protocol 2021-05-19 12:29:29 +10:00