61 Commits

Author SHA1 Message Date
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
507413665a
Use js-waku from npmjs.com instead of local build 2022-05-03 10:47:13 +10:00
Franck R
ed23332965
Allow passing multiaddr to bootstrap.peers (#608) 2022-03-09 18:38:28 +11:00
Franck Royer
067ebebdf0
Remove unnecessary log
As it is unlikely to decode as utf-8.
2022-03-01 16:58:15 +11:00
Franck Royer
e6d3c2f595
Improve count of relay peers
Active relay peers are peer which are part of the gossip mesh.
Which means that it's not just a peer we are connect to but a peer on
subscribed to the same pubsub topic, with a good score, part of the
mesh, etc.

Mesh maintenance is done during the gossipsub hearbeat so it's the best
time to review the count.

A store peer is any peer we are connected to that support the store
protocol, so it can be counted when a new peer is added to the store.

This does not cater for store peers that disconnect, but we are not
handling those just yet.
2022-02-28 17:23:30 +11:00
Franck R
146c67e43e
Predefine bootstrap node (#528) 2022-02-16 11:43:57 +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
d9248dbc56
Replace waitForConnectedPeer with waitForRemotePeer (#469) 2022-01-30 21:56:21 +11:00
Franck Royer
284644b822
Fix-up new bootstrap API 2022-01-13 16:39:52 +11:00
Franck Royer
6a372cd27f
Update other deps 2022-01-06 17:42:16 +11:00
Franck Royer
cd7a8784d3
Upgrade few dependencies 2022-01-06 17:39:08 +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
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
5c1cda8b2a
Demonstrate usage of history time filter in web chat 2021-08-26 11:50:20 +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
eb04acd1a0
Fix format 2021-08-09 14:40:57 +10:00
Franck Royer
be771d6619
This would have failed if the first node we connect to is NOT store 2021-08-09 12:36:53 +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
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
d307342f7e
Simplify message handling to avoid re-rendering
Only retrieve historical messages when starting the app.

This allows avoid re-rendering issues. This is an example dApp. No need
to waste time on React optimisation.
2021-07-29 17:23:03 +10:00
Franck Royer
9aaac20981
Examples: Content Topic moved out of options parameter 2021-07-28 12:03:51 +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
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
4f50ca1732
Align examples 2021-07-09 15:50:16 +10:00
Franck Royer
2266f31d30
Move optional parameters to a single Options object. 2021-07-09 15:50:15 +10:00
Franck Royer
c293e268e8
Do not send message if a modifier is pressed to enable multiline msgs 2021-06-11 14:38:31 +10:00
Franck Royer
8073021d82
Do not fail if a chat message is malformed 2021-06-11 14:38:22 +10:00
Franck Royer
f17a008278
Separate the libp2p create options from Waku's 2021-06-09 15:00:02 +10:00
Franck Royer
0d00328715
Split useEffect calls
Better React practice.
2021-06-04 15:25:53 +10:00
Franck Royer
6b48c55266
Persist nick 2021-06-04 15:15:07 +10:00
Franck Royer
b90b66c5f6
Add comment 2021-06-04 14:59:40 +10:00
Franck Royer
03febcc276
Update toy-chat content topic
As per https://github.com/status-im/nim-waku/pull/583
2021-06-03 17:54:46 +10:00
Franck Royer
553c0154d9
Use waku message timestamp as better unique key 2021-05-28 22:38:00 +10:00
Franck Royer
ca74f7f87a
Update chat content topic to new testnet value
Resolves #180
2021-05-28 14:32:05 +10:00
Franck Royer
f23310aaf5
Remove outdated comment 2021-05-19 12:29:30 +10:00
Franck Royer
a69c483c46
Connect to prod fleet by default, test fleet for local development 2021-05-18 13:51:11 +10:00
Franck Royer
3f5484f6ed
Use callback option in web-chat 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
Franck Royer
79bef35460
Add and use getStatusFleetNodes to connect to Status' wakunodes 2021-05-15 19:52:05 +10:00
Franck Royer
0dc2ee8d40
Use status fleet instead of jdev 2021-05-14 15:49:35 +10:00
Franck Royer
89b35eb4df
Disable send button if no peer available
Yet keep it enabled if user tries to send a command.

Resolves #136
2021-05-13 20:48:33 +10:00
Franck Royer
065593b0cf
Revert naming to js-waku
To align with go-waku and nim-waku and keep bors working.
2021-05-13 20:27:38 +10:00