Preparing search index...
The search index is not available
Documentation
Documentation
@libp2p/daemon-client
DaemonClient
Interface DaemonClient
interface
DaemonClient
{
dht
:
DHTClient
;
pubsub
:
PubSubClient
;
connect
(
peerId
,
addrs
)
:
Promise
<
void
>
;
identify
(
)
:
Promise
<
IdentifyResult
>
;
listPeers
(
)
:
Promise
<
PeerId
[]
>
;
openStream
(
peerId
,
protocol
)
:
Promise
<
MultiaddrConnection
>
;
registerStreamHandler
(
protocol
,
handler
)
:
Promise
<
void
>
;
send
(
request
)
:
Promise
<
ProtobufStream
<
MultiaddrConnection
>
>
;
}
Index
Properties
dht
pubsub
Methods
connect
identify
list
Peers
open
Stream
register
Stream
Handler
send
Properties
dht
dht
:
DHTClient
pubsub
pubsub
:
PubSubClient
Methods
connect
connect
(
peerId
,
addrs
)
:
Promise
<
void
>
Parameters
peerId
:
PeerId
addrs
:
Multiaddr
[]
Returns
Promise
<
void
>
identify
identify
(
)
:
Promise
<
IdentifyResult
>
Returns
Promise
<
IdentifyResult
>
list
Peers
list
Peers
(
)
:
Promise
<
PeerId
[]
>
Returns
Promise
<
PeerId
[]
>
open
Stream
open
Stream
(
peerId
,
protocol
)
:
Promise
<
MultiaddrConnection
>
Parameters
peerId
:
PeerId
protocol
:
string
Returns
Promise
<
MultiaddrConnection
>
register
Stream
Handler
register
Stream
Handler
(
protocol
,
handler
)
:
Promise
<
void
>
Parameters
protocol
:
string
handler
:
StreamHandlerFunction
Returns
Promise
<
void
>
send
send
(
request
)
:
Promise
<
ProtobufStream
<
MultiaddrConnection
>
>
Parameters
request
:
Request
Returns
Promise
<
ProtobufStream
<
MultiaddrConnection
>
>
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
dht
pubsub
connect
identify
list
Peers
open
Stream
register
Stream
Handler
send
Documentation
Loading...