js-kubo-rpc-client icon indicating copy to clipboard operation
js-kubo-rpc-client copied to clipboard

swarm.connect not happy with PeerId argument

Open Hugo-Trentesaux opened this issue 1 year ago • 0 comments

The swarm.connect function should take an argument multiaddrOrPeerId that can be Multiaddr | PeerId. However, it complains when receiving a PeerId: HTTPError: failed to parse multiaddr "12D3KooWBusr11HGqzKu6C789vFWibV4DoTBiwZi7N5Gtkepsp9v": must begin with /.

I guess the problem comes from the createConnect function which is missing conversion from peerid to multiaddr.

Hugo-Trentesaux avatar Apr 25 '24 14:04 Hugo-Trentesaux