Preparing search index...
The search index is not available
Documentation
Documentation
@waku/sdk
IPeerExchange
Interface IPeerExchange
interface
IPeerExchange
{
addLibp2pEventListener
:
(
<
K
>
(
type
,
listener
,
options
?
)
=>
void
)
;
allPeers
:
(
(
)
=>
Promise
<
Peer
[]
>
)
;
connectedPeers
:
(
(
)
=>
Promise
<
Peer
[]
>
)
;
multicodec
:
string
;
peerStore
:
PeerStore
;
removeLibp2pEventListener
:
{
<
K
>
(
type
,
listener
?
,
options
?
)
:
void
;
(
type
,
listener
?
,
options
?
)
:
void
;
}
;
shardInfo
?:
ShardInfo
;
query
(
params
)
:
Promise
<
undefined
|
PeerInfo
[]
>
;
}
Hierarchy (
view full
)
IBaseProtocol
IPeerExchange
Index
Properties
add
Libp2p
Event
Listener
all
Peers
connected
Peers
multicodec
peer
Store
remove
Libp2p
Event
Listener
shard
Info?
Methods
query
Properties
add
Libp2p
Event
Listener
add
Libp2p
Event
Listener
:
(
<
K
>
(
type
,
listener
,
options
?
)
=>
void
)
Type declaration
<
K
>
(
type
,
listener
,
options
?
)
:
void
Type Parameters
K
extends
keyof
Libp2pEvents
<
ServiceMap
>
Parameters
type
:
K
listener
:
null
|
EventHandler
<
Libp2pEvents
<
ServiceMap
>
[
K
]
>
Optional
options
:
boolean
|
AddEventListenerOptions
Returns
void
all
Peers
all
Peers
:
(
(
)
=>
Promise
<
Peer
[]
>
)
Type declaration
(
)
:
Promise
<
Peer
[]
>
Returns
Promise
<
Peer
[]
>
connected
Peers
connected
Peers
:
(
(
)
=>
Promise
<
Peer
[]
>
)
Type declaration
(
)
:
Promise
<
Peer
[]
>
Returns
Promise
<
Peer
[]
>
multicodec
multicodec
:
string
peer
Store
peer
Store
:
PeerStore
remove
Libp2p
Event
Listener
remove
Libp2p
Event
Listener
:
{
<
K
>
(
type
,
listener
?
,
options
?
)
:
void
;
(
type
,
listener
?
,
options
?
)
:
void
;
}
Type declaration
<
K
>
(
type
,
listener
?
,
options
?
)
:
void
Type Parameters
K
extends
keyof
Libp2pEvents
<
ServiceMap
>
Parameters
type
:
K
Optional
listener
:
null
|
EventHandler
<
Libp2pEvents
<
ServiceMap
>
[
K
]
>
Optional
options
:
boolean
|
EventListenerOptions
Returns
void
(
type
,
listener
?
,
options
?
)
:
void
Parameters
type
:
string
Optional
listener
:
EventHandler
<
Event
>
Optional
options
:
boolean
|
EventListenerOptions
Returns
void
Optional
shard
Info
shard
Info
?:
ShardInfo
Methods
query
query
(
params
)
:
Promise
<
undefined
|
PeerInfo
[]
>
Parameters
params
:
PeerExchangeQueryParams
Returns
Promise
<
undefined
|
PeerInfo
[]
>
Settings
Member Visibility
Protected
Private
Inherited
Theme
OS
Light
Dark
On This Page
add
Libp2p
Event
Listener
all
Peers
connected
Peers
multicodec
peer
Store
remove
Libp2p
Event
Listener
shard
Info
query
Documentation
@waku
interfaces
utils
message-hash
proto
enr
core
relay
peer-exchange
dns-discovery
local-discovery
message-encryption
sdk
browser-tests
Generated using
TypeDoc