Franck Royer
70058f0e36
Split browser and node tests
2021-07-14 11:56:48 +10:00
Franck Royer
a0d3a21762
Improve importing of Muxed Stream type
2021-07-14 11:38:59 +10:00
Franck Royer
c2cef05c2d
Use protobuf instead of JSON for direct messages
2021-07-12 17:29:52 +10:00
Franck Royer
48bdb0b3f2
Use WakuMessage version 1 instead of eth-crypto
2021-07-12 17:09:44 +10:00
Franck Royer
0e9c482a19
Enable decryption of messages retrieve via `WakuStore.queryHistory`
2021-07-12 13:15:19 +10:00
Franck Royer
d68ee3fb74
New `peers` and `randomPeer` methods to return available peers
2021-07-12 13:15:19 +10:00
Franck Royer
4fe0116039
Use ecies library that provide right ECIES parameters
2021-07-12 11:30:19 +10:00
Franck Royer
63923f4368
Prefer usage of utils
2021-07-09 16:06:49 +10:00
Franck Royer
b70f7c5a95
Use DOM random generator if available
2021-07-09 16:06:49 +10:00
Franck Royer
1f6ed9b525
Prefer secp256k1 lib over ecies
2021-07-09 15:50:17 +10:00
Franck Royer
2b1a6dafea
Skip nim-waku interop tests
...
ecies-parity does not provide the same ECIES that waku:
ecies-parity uses a shared hmac of `[0,0]` whereas waku uses `[]`.
Work is needed to find or create a new library.
2021-07-09 15:50:17 +10:00
Franck Royer
8cd5a52eba
Provide hex/bytes utils as part of js-waku
2021-07-09 15:50:17 +10:00
Franck Royer
22c716e0e6
Add API to generate keys
2021-07-09 15:50:16 +10:00
Franck Royer
f123cd7e62
Test asymmetric encryption against nim-waku
2021-07-09 15:50:16 +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
381333347e
Remove dupe code
2021-07-09 15:50:15 +10:00
Franck Royer
f2a2233c77
Add encrypt/decrypt asymmetric
2021-07-09 15:50:15 +10:00
Franck Royer
f97dc4de81
Implement Waku Message Version 1 encoding and signature
2021-07-09 14:49:09 +10:00
Franck Royer
7b5c8d6094
Move waku_message to dedicated folder
2021-07-09 14:49:09 +10:00
Franck Royer
c3b726cb99
Remove deprecated call
2021-07-09 14:49:08 +10:00
Franck Royer
aaf3b1867e
Disable keep alive by default as latest nim-waku release does not
...
support ping protocol.
2021-07-05 09:40:07 +10:00
Franck Royer
354dcd66a5
Constructor is more appropriate when comparing function signatures
2021-07-02 13:52:50 +10:00
Franck Royer
370a347ff2
Actually disable keep alive if set to 0
2021-07-02 10:51:58 +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
381fc8b82c
Add keep alive feature
...
Using libp2p ping protocol.
2021-06-21 09:46:41 +10:00
Franck Royer
e3b4a42822
Add keep alive feature
...
Using libp2p ping protocol.
2021-06-21 09:46:29 +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
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
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
f0f14f9995
Rename type before introducing CreateOptions
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
3055881c57
Proto message is expected, not the wrapping class
2021-05-28 15:59:57 +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
fb7e9f2b9e
Get messages from store in chronological order
2021-05-19 12:29:29 +10:00
Franck Royer
de3aea626a
Implement Light Push protocol
2021-05-19 12:29:29 +10:00
Franck Royer
537a2b73a7
Use prod nodes by default instead of test
2021-05-18 13:26:42 +10:00
Franck Royer
243b6629c3
Add callback option to store query
2021-05-17 16:32:34 +10:00
Franck Royer
4b6fe84392
Use one object as we are increasing the number of parameters
2021-05-17 16:32:33 +10:00