Wait for a remote peer to be ready given the passed protocols.
Must be used after attempting to connect to nodes, using
index.waku.WakuNode.dial or a bootstrap method with
lib/create_waku.createLightNode.
If the passed protocols is a GossipSub protocol, then it resolves only once
a peer is in a mesh, to help ensure that other peers will send and receive
message to us.
Returns
A promise that resolves if all desired protocols are fulfilled by
remote nodes, rejects if the timeoutMs is reached.
Throws
If passing a protocol that is not mounted
Default
Wait for remote peers with protocols enabled locally and no time out is applied.
Parameters
waku: Waku
The Waku Node
Optional protocols: Protocols[]
The protocols that need to be enabled by remote peers.
Wait for a remote peer to be ready given the passed protocols. Must be used after attempting to connect to nodes, using index.waku.WakuNode.dial or a bootstrap method with lib/create_waku.createLightNode.
If the passed protocols is a GossipSub protocol, then it resolves only once a peer is in a mesh, to help ensure that other peers will send and receive message to us.
Returns
A promise that resolves if all desired protocols are fulfilled by remote nodes, rejects if the timeoutMs is reached.
Throws
If passing a protocol that is not mounted
Default
Wait for remote peers with protocols enabled locally and no time out is applied.