Commit Graph

271 Commits

Author SHA1 Message Date
Franck Royer 8d469ff842
Enable caller to abort store query
If the `callback` function passed to`WakuStore.queryHistory` returns
`true`, then no further pages are retrieved from the store.
2021-10-07 15:33:00 +11:00
Franck Royer 6f4d765e30
Remove useless log 2021-10-05 13:36:04 +11:00
Franck Royer 62b30b3f33
Log queried store peer info 2021-10-05 13:36:04 +11:00
Franck Royer 92ee5b060c
doc: Move comments to ensure they appear in generated documentation 2021-10-05 13:36:03 +11:00
Franck Royer f5a0416efd
Rename to page direction
As the direction only affects the page ordering,
not the message ordering in the pages.
2021-10-05 13:36:03 +11:00
Franck Royer c990660fb9
Rename node only suites 2021-09-24 17:15:46 +10:00
Franck Royer 928d888ad8
Remove 'browser' from test filename
These tests are run both on node and in browser.
2021-09-24 17:09:34 +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 2eb88068ae
Test default discovery as part of the CI 2021-09-21 14:47:45 +10:00
Franck Royer 640a672257
Do not setup libp2p discovery module if we fail to retrieve node addrs 2021-09-21 14:47:45 +10:00
Franck Royer a95315eeb5
Ensure node address is returned for Object type responses 2021-09-21 14:47:45 +10:00
Franck Royer 6504106a9e
Connects to a limited number of bootstrap nodes, defaults to 1 2021-09-16 10:38:01 +10:00
Franck Royer ca09c34ac6
Upgrade libp2p libraries 2021-09-03 16:02:22 +10:00
Franck Royer a21d641280
Added `Waku.waitForConnectedPeer` helper
To ensure that we are connected to Waku peers when using the bootstrap
option.
2021-09-02 15:46:23 +10:00
Franck Royer 75f605a676
Improve error text
To make it clearer what the issue is.
2021-09-02 15:20:44 +10:00
Franck Royer 50fb533e44
test: Increase timeouts + add debug logs 2021-09-02 15:20:43 +10:00
Franck Royer cfb97b6bde
Allow passing decryption keys to `Waku` instance
Keys can be set at creation or at run time.
They are passed to `WakuStore` and `WakuRelay` instances.
2021-09-02 15:20:43 +10:00
Franck Royer 911ce5bab7
Allow passing decryption keys to `WakuStore` instance
To avoid having to pass them at every `queryHistory` call.
2021-09-02 15:17:40 +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 75352abcac
Promote dedicated symmetric key generation API
Using the private key API for symmetric key is confusing.
2021-09-02 15:09:31 +10:00
Franck Royer 398f34b57f
Fixed Buffer.concat error when using symmetric encryption in the browser 2021-08-26 16:12:53 +10:00
Franck Royer 5b34da6b5f
Both or neither time parameters must be passed
The protocol does not support open-ended time filtering windows. See
https://github.com/status-im/nim-waku/issues/706
2021-08-25 12:14:53 +10:00
Franck Royer b7693853d2
Added support for `startTime` and `endTime` in Store queries 2021-08-20 10:37:58 +10:00
Franck Royer 1d48dc4372
Rename all `pubsubTopic` occurrences to `pubSubTopic` 2021-08-20 10:13:02 +10:00
Franck Royer 026aaaf67e
Remove default value
Default value is handled one layer above.
2021-08-20 10:12:56 +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 3f95934250
Replace deprecated package for libp2p-noise 2021-08-19 11:26:34 +10:00
Franck Royer 6d42c39298
export values so they are included in the documentation 2021-08-13 16:18:03 +10:00
Franck Royer bac26ea3da
fixup 2021-08-13 16:18:02 +10:00
Franck Royer 140791cc91
Provide easy way to bootstrap when creating Waku node 2021-08-13 16:18:00 +10:00
Franck Royer c3855112d7
Rename `getStatusFleetNodes`
To make it more generic to allow retrieval of bootstrap nodes from
other sources.
2021-08-13 16:17:15 +10:00
Franck Royer 319f44a0b1
`WakuStore.queryHistory` throws when encountering an error
Instead of returning a `null` value.
2021-08-09 12:36:24 +10:00
Franck Royer b422c9a10b
Move `contentTopics` out the `WakuStore.queryHistory`'s optional params 2021-08-09 12:36:12 +10:00
Franck Royer 355b8414d8
Separate shutdown process to pinpoint CI failure 2021-08-09 12:27:52 +10:00
Franck Royer dcdab3203d
Replace nim-waku log grep with new pattern 2021-08-09 12:27:22 +10:00
Franck Royer 80cfa3c87a
Increase timeout to shutdown node 2021-08-09 12:09:21 +10:00
Franck Royer c14951cb0e
Increase timeout for nim-waku starts
Took 5 seconds in CI run.
2021-08-09 11:58:58 +10:00
Franck Royer ad9d629daa
`ChatMessage` has been moved from js-waku to web-chat example
It is a type used for the [TOY-CHAT](https://rfc.vac.dev/spec/22/)
 protocol;
js-waku users should not build on top if this toy protocol and instead
design message data structures appropriate to their use case.
2021-08-06 17:25:12 +10:00
Franck Royer d035359616
Workaround the fact that ni-waku does not accept integers as timestamp 2021-08-05 13:32:37 +10:00
Franck Royer 45dc8f81c9
Fixed `ChatMessage.payloadAsUtf8` returning garbage on utf-8 non-ascii 2021-08-02 10:36:50 +10:00
Franck Royer 1f692f1683
Fixed `payloadAsUtf8` returning garbage on utf-8 non-ascii characters 2021-08-02 09:51:37 +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 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 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