84 Commits

Author SHA1 Message Date
Franck R
03491a892b
Fix waitForRemotePeer & test behaviour (#471) 2022-01-31 10:30:25 +11:00
Franck R
d9248dbc56
Replace waitForConnectedPeer with waitForRemotePeer (#469) 2022-01-30 21:56:21 +11:00
Franck R
34e4cbba73
Use websocket instead of tcp in interop tests (#418) 2022-01-20 13:00:58 +11:00
Franck R
cba5212872
Upgrade nim-waku to v0.7 (#417) 2022-01-19 15:43:45 +11:00
Franck R
96cf24d34e
Allow specifying decryption methods and content topic (#409) 2022-01-17 14:11:05 +11:00
Franck Royer
c990660fb9
Rename node only suites 2021-09-24 17:15:46 +10:00
Franck Royer
d900945b6d
Add 'node' in test file names that only run on node 2021-09-24 17:09:34 +10:00
Franck Royer
d875994908
Fix hearbeat tick handler rounding issue
807bf282c5
2021-09-24 10:36:19 +10:00
Franck Royer
ca09c34ac6
Upgrade libp2p libraries 2021-09-03 16:02:22 +10:00
Franck Royer
50fb533e44
test: Increase timeouts + add debug logs 2021-09-02 15:20:43 +10:00
Franck Royer
f4cae60ef8
Fix documentation 2021-09-02 15:15:43 +10:00
Franck Royer
931a414a3c
Allow passing decryption keys in hex string format 2021-09-02 15:13:50 +10: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
80cfa3c87a
Increase timeout to shutdown node 2021-08-09 12:09:21 +10:00
Franck Royer
0cfdd34284
Removed DefaultContentTopic
As developers must choose a content topic for their app.
The`WakuMessage` APIs have been changed to move `contentTopic` out of
the optional parameters. Recommendations for content topic can be found
at https://rfc.vac.dev/spec/23/.
2021-07-28 12:03:51 +10:00
Franck Royer
9638f6db10
Introduced new relayKeepAlive option
..on `Waku` with a default to 5min to send ping messages over relay
to ensure the relay stream stays open.

This is a workaround until
[js-libp2p#744](https://github.com/libp2p/js-libp2p/issues/744) is done
as there are issues when TCP(?) timeouts and the stream gets closed.
2021-07-27 16:24:04 +10:00
Franck Royer
c4d0501c6a
nim-waku v0.5 uses new waku relay protocol id 2021-07-26 11:35:08 +10:00
Franck Royer
92a76b3be0
Support multiple protocol id for relay
Support id of latest nim-waku release 0.4 and current master.
2021-07-21 15:43:30 +10:00
Franck Royer
6135127e5d
Correct name 2021-07-21 15:02:38 +10:00
Franck Royer
1d4137e2c4
Rename so that it does make dev thinks it's for asymmetric enc only 2021-07-16 10:24:29 +10:00
Franck Royer
b74acd73dc
Remove unknown type 2021-07-15 12:16:21 +10:00
Franck Royer
13c8a0527b
Test symmetric encryption with nim-waku using relay 2021-07-15 12:12:43 +10:00
Franck Royer
e443237a81
Remove local type definitions for Karma to not return "not found" 2021-07-14 12:25:23 +10:00
Franck Royer
f95d9aec3c
Add version 1 support to waku relay, test decryption against nim-waku 2021-07-09 15:50:16 +10:00
Franck Royer
acdc032253
Simplify code 2021-07-09 15:50:16 +10:00
Franck Royer
34e6ac5247
Add version 1 support to WakuMessage 2021-07-09 15:50:15 +10:00
Franck Royer
2266f31d30
Move optional parameters to a single Options object. 2021-07-09 15:50:15 +10:00
Franck Royer
c3b726cb99
Remove deprecated call 2021-07-09 14:49:08 +10:00
Franck Royer
354dcd66a5
Constructor is more appropriate when comparing function signatures 2021-07-02 13:52:50 +10:00
Franck Royer
8cecfc205b
Use plain websocket in tests
Thanks to the libp2p upgrade, waku actually tries to listen to a
secure websocket. Using plain websocket for now, testing secure
websocket is tracked with #50.
2021-06-22 14:11:38 +10:00
Franck Royer
6cb92dd4b9
Upgrade to latest libp2p versions
And few other packages
2021-06-22 13:21:23 +10:00
Franck Royer
dbab0cc582
Unnecessary and create conflicts due to disparity of version
Between libp2p-interfaces from libp2p and libp2p-gossipsub.
2021-06-22 10:08:02 +10:00
Franck Royer
60eb473047
Add WakuRelay.deleteObserver to allow removal of observers
Useful when a React component add observers when mounting and needs to
delete it when unmounting.
2021-06-16 16:37:04 +10:00
Franck Royer
af1e97fafe
Use Set to facilitate removal of observers 2021-06-16 16:37:04 +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
eb521b4dbd
Extract subscription logic from start method 2021-06-09 15:00:02 +10:00
Franck Royer
d8629b7fbc
Define type for WakuRelay create options 2021-06-09 15:00:02 +10:00
Franck Royer
f17a008278
Separate the libp2p create options from Waku's 2021-06-09 15:00:02 +10:00
Franck Royer
9e64eec2a6
Enable test encoding and decoding of WakuMessage.timestamp 2021-05-28 22:35:59 +10:00
Franck Royer
b13ecdd45f
Do not inherit doc for Waku Relay
As it clutters the documentation and at this stage we do not expect
users to use inherited methods.
2021-05-21 11:47:17 +10:00
Franck Royer
c347ec28b4
Ensure that no unnecessary js node are started for interop tests
Indeed, the beforeEach/afterEach methods are called for all tests in the
block, including interop tests.
2021-05-20 15:49:13 +10:00
Franck Royer
ed69122ac3
Remove warning 2021-05-19 12:55:39 +10:00
Franck Royer
a8d4d494f8
Add getPeers method
To know if relay messages would be published.
2021-05-13 20:48:33 +10:00
Franck Royer
eb9955314c
Align terminology with specs
In specs, this is referenced as a `pubsubTopic`.
2021-05-13 20:48:30 +10:00
Franck Royer
7c6730b4a3
Remove declare keyword which removes the values from generated JS 2021-05-11 14:05:13 +10:00
Franck Royer
40fd7ff365
Use Typedoc comment style 2021-05-11 09:06:22 +10:00
Franck Royer
50eaa39fec
Add debug statement in tests
Also enable debug logs in CI.
2021-05-10 20:18:26 +10:00
Franck Royer
3663ce260d
Rework exports for an easy use of the library 2021-05-10 16:41:58 +10:00
Franck Royer
ba6b67cc53
Enable observers to filter by contentTopic 2021-05-10 14:54:08 +10:00