Franck Royer
e0a23bad44
Sort out createWaku and waitForRemotePeer
2022-07-20 12:43:42 +10:00
Franck Royer
8e5318dc4a
Upgrade libp2p-gossipsub
2022-07-20 12:42:24 +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
6c30e8d400
Use PeerId.toString() instead of toB58String()
...
New version of `PeerId` will only support `toString`
2022-07-20 11:55:43 +10:00
Franck Royer
5ca3957b39
fix: options can be undefined
2022-06-20 14:32:21 +10:00
Franck Royer
9ffedd1fbf
Remove circular dependencies
2022-06-01 12:14:47 +10:00
Franck R
64657a250f
Replace rlp with ethers' rlp ( #526 )
2022-02-16 14:08:48 +11:00
Franck R
cfc5eee4ff
Reduce buffer usage ( #521 )
2022-02-14 10:50:02 +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 R
47c5565371
Wait for heartbeat before considering relay peer ready ( #472 )
2022-01-31 15:30:49 +11:00
Franck R
03491a892b
Fix waitForRemotePeer & test behaviour ( #471 )
2022-01-31 10:30:25 +11:00
Franck R
96cf24d34e
Allow specifying decryption methods and content topic ( #409 )
2022-01-17 14:11:05 +11:00
Franck Royer
ca09c34ac6
Upgrade libp2p libraries
2021-09-03 16:02:22 +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
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
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
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
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
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
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
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
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
Franck Royer
71a5b23bd2
Add observer interface that directly pass waku messages
2021-05-10 12:38:44 +10:00
Franck Royer
cbe9559096
Clarify what methods should be used
2021-05-10 12:38:44 +10:00
Franck Royer
9e30627e2b
Force return types to be specified
...
Makes it easier to use the library. Best to enforce this early on.
2021-05-04 11:12:32 +10:00
Franck Royer
0ff0e6ee7b
Clean up WakuMessage API
2021-05-03 16:26:02 +10:00
Franck Royer
2c66f86e91
Upgrade libp2p packages
2021-04-29 12:06:38 +10:00
Franck Royer
69a3f73ee6
Self emit to see own messages
2021-04-22 14:47:43 +10:00
Franck Royer
e0debac165
Subscribe to default topic when starting, Remove dual Waku relay classes
2021-04-16 11:25:08 +10:00
Franck Royer
896462340a
Simplify API
...
At this stage, if waku relay is mounted then we always want to subscribe
to default topic.
We can re-introduce the flexibility once we know what matters to the user.
Resolves #17 .
2021-04-15 14:45:14 +10:00
Franck Royer
b38634fd14
Remove warnings
2021-04-13 15:25:00 +10:00
Franck Royer
ff8e96b60c
Clean up imports
2021-04-01 18:27:15 +11:00
Franck Royer
ff9bfa7f0a
Override gossipsub function that checked for gossipsub peers
...
Instead, we need to check for waku relay peers.
2021-04-01 16:58:26 +11:00