Commit Graph

2874 Commits

Author SHA1 Message Date
Franck Royer 9aaac20981
Examples: Content Topic moved out of options parameter 2021-07-28 12:03:51 +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 5e056d8b81
Shorten imports, remove warning 2021-07-28 11:58:05 +10:00
Franck Royer 53ef23362c
Remove faulty fleet feature
It does not work as it can lead to infinite loops due to the handling of
the Waku instance. It should disconnect and reconnect to peers instead
of starting a new waku instance.
2021-07-28 11:58:02 +10:00
Franck Royer b61e7311af
Merge pull request #243 from status-im/185-idle-stream-abort 2021-07-27 16:42:02 +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 ea33b9cd8a
Rename `keepAlive` option to `pingKeepAlive`
In preparation for introducing a relay keep alive feature.
2021-07-27 16:06:57 +10:00
Franck Royer 664e5f56a1
Merge pull request #241 from status-im/upgrade-libp2p
Upgrade to libp2p 0.32.0
2021-07-27 14:50:34 +10:00
Franck Royer 36a5a51aa8
Upgrade to libp2p 0.32.0 2021-07-27 14:31:06 +10:00
Franck Royer 5a6e4adf35
Merge pull request #242 from status-im/release/0.9.0
Release 0.9.0
2021-07-26 20:22:45 +10:00
Franck Royer c35fe74dad
Release 0.9.0
### Changed
- **Breaking**: Store Response Protobuf changed to align with
  nim-waku v0.5
  ([nim-waku#676](https://github.com/status-im/nim-waku/pull/676)).
2021-07-26 16:49:30 +10:00
Franck Royer 4a85e62c80
Merge pull request #237 from status-im/nim-waku-v0.5 2021-07-26 14:30:51 +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 5f7eee394b
Store Response Protobuf change to align with nim-waku
status-im/nim-waku#676
2021-07-26 11:35:08 +10:00
Franck Royer 6817a2f6b2
Pass timestamp to RPC call 2021-07-26 11:32:50 +10:00
Franck Royer c944a802a5
Upgrade nim-waku submodule to v0.5 2021-07-26 11:32:50 +10:00
Franck Royer 1f0569580f
Merge pull request #240 from status-im/238-multiple-protocols 2021-07-22 10:40:08 +10:00
Franck Royer be007f4839
Ensure there is no infinite loop on error 2021-07-21 15:44:00 +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 4e6848bb1c
Merge pull request #236 from status-im/doc 2021-07-21 14:59:32 +10:00
Franck Royer 3bff44432a
Remove some vulnerable packages
Thanks to `npm audit`.
2021-07-20 15:30:15 +10:00
Franck Royer aea70dcea6
Fix title hierarchy 2021-07-20 15:30:14 +10:00
Franck Royer 29b726629d
Merge pull request #235 from status-im/release/0.8.1
Release 0.8.1
2021-07-16 12:14:20 +10:00
Franck Royer 0753184079
Release 0.8.1
### Added
- Examples (web-chat): New `/fleet` command to switch connection between
  Status prod and test fleets.
- Export `generatePrivateKey` and `getPublicKey` directly from the root.
- Usage of the encryption and signature APIs to the readme.

### Changed
- **Breaking**: Renamed `WakuRelay.(add|delete)PrivateDecryptionKey` to
  `WakuRelay.(add|delete)DecryptionKey` to make it clearer that it
  accepts both symmetric keys and asymmetric private keys.

### Fix
- Align `WakuMessage` readme example with actual code behaviour.
2021-07-16 12:00:43 +10:00
Franck Royer 228cdab89b
Merge pull request #234 from status-im/fix-doc 2021-07-16 11:58:01 +10:00
Franck Royer 7a641ec4a9
Fix typos 2021-07-16 11:26:37 +10:00
Franck Royer dd79e0899f
Reword crypto libs 2021-07-16 11:22:48 +10:00
Franck Royer 4f796ab920
Add encryption/signature documentation 2021-07-16 11:19:38 +10:00
Franck Royer 455b568cde
Revamp documentation
Introduce sections, add some explanations.
2021-07-16 11:11:29 +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 07cba4f8ca
Update changelog for readme changes 2021-07-16 09:51:59 +10:00
Franck Royer a3c4eed656
Update changelog for fleet command 2021-07-16 09:50:44 +10:00
Franck Royer addf9543a2
Export `generatePrivateKey` and `getPublicKey` directly from the root 2021-07-16 09:43:10 +10:00
Franck Royer db3403d88f
Update Waku Message examples 2021-07-15 15:02:16 +10:00
Franck Royer 5c790a41c9
Add network info in toolbar 2021-07-15 14:37:30 +10:00
Franck Royer 53412e2fb4
New `/fleet` command to change target Status fleet 2021-07-15 14:25:59 +10:00
Franck Royer 9ffb33cdde
Make fleet environment part of the state 2021-07-15 14:14:45 +10:00
Franck Royer bc3b00b13e
Use `const` as setter should be used to change values 2021-07-15 14:11:00 +10:00
Franck Royer a8e2b908ba
Cleanup observers
And name function to avoid commenting.
2021-07-15 14:09:58 +10:00
Franck Royer 6e22897f74
Rename `stateWaku` to `waku`
There should only be one.
2021-07-15 14:08:07 +10:00
Franck Royer f3738b1eac
doc: Fix keep alive default value 2021-07-15 14:00:24 +10:00
Franck Royer 383dd04911
Merge pull request #232 from status-im/release/0.8.0
Release 0.8.0
2021-07-15 13:54:55 +10:00
Franck Royer 3a3e718749
Release 0.8.0
### Added
- `WakuRelay.deleteObserver` to allow removal of observers, useful when
  a React component add observers when mounting and needs to delete it
  when unmounting.
- Keep alive feature that pings host regularly, reducing the chance of
  connections being dropped due to idle.
  Can be disabled or default frequency (10s) can be changed when calling
  `Waku.create`.
- New `lib/utils` module for easy, dependency-less hex/bytes
  conversions.
- New `peers` and `randomPeer` methods on `WakuStore` and
  `WakuLightPush` to have a better idea of available peers;
  Note that it does not check whether Waku node is currently connected
  to said peers.
- Enable passing decryption private keys to `WakuStore.queryHistory`.
- Test: Introduce testing in browser environment (Chrome) using Karma.
- Add support for Waku Message version 1: Asymmetric encryption,
  symmetric encryption, and signature of the data.

### Changed
- **Breaking**: Auto select peer if none provided for store and light
  push protocols.
- Upgrade to `libp2p@0.31.7` and `libp2p-gossipsub@0.10.0` to avoid
  `TextEncoder` errors in ReactJS tests.
- Disable keep alive by default as latest nim-waku release does not
  support ping protocol.
- **Breaking**: Optional parameters for `WakuMessage.fromBytes` and
  `WakuMessage.fromUtf8String` are now passed in a single `Options`
   object.
- **Breaking**: `WakuMessage` static functions are now async to allow
  for encryption and decryption.
- **Breaking**: `WakuMessage` constructor is now private, `from*` and
  `decode*` function should be used.
- `WakuMessage` version 1 is partially supported, enabling asymmetrical
  encryption and signature of messages;
  this can be done by passing keys to `WakuMessage.from*` and
  `WakuMessage.decode*` methods.
- Examples (eth-dm): Use Waku Message version 1 encryption scheme
  instead of `eth-crypto`.
- Examples (eth-dm): Use Protobuf for direct messages instead of JSON
  ([#214](https://github.com/status-im/js-waku/issues/214)).

### Fixed
- Disable `keepAlive` if set to `0`.
2021-07-15 12:48:47 +10:00
Franck Royer 6bd93eef55
Merge pull request #231 from status-im/179-symmetric-encryption-store-relay 2021-07-15 12:40:22 +10:00
Franck Royer 0b3f1a33c2
test: Symmetric encryption with waku store 2021-07-15 12:26:05 +10:00
Franck Royer 44efd28ac1
Update terminology and docs to cater for both sym and asym encryption 2021-07-15 12:25:47 +10:00
Franck Royer b74acd73dc
Remove unknown type 2021-07-15 12:16:21 +10:00
Franck Royer 75d1b3834c
Simplify expression 2021-07-15 12:16:03 +10:00
Franck Royer 13c8a0527b
Test symmetric encryption with nim-waku using relay 2021-07-15 12:12:43 +10:00