v51

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-01141816.7 KB
Node

Connect to a peer

If addrs param is supplied, it will be used to dial the peer, otherwise the peerId is used to invoke peer discovery, if it succeeds the returned addresses will be used to dial.

get/connect/{peerId}

Path parameters

peerIdstring required

Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/

Example:QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N

Peer that should be dialed.

Query parameters

addrsMultiAddress[] nullable

If supplied, it will be used to dial the peer. The address has to target the listening address of the peer, which is /ip4/<listen-ip>/tcp/<listen-port>, where listen-port is specified with the --listen-port CLI flag and listen-ip with the --listen-ip CLI flag.

[
  "/ip4/127.0.0.1/tcp/8080"
]

Response

Successfully connected to peer

All 14 operations