multiformats / js-multiaddr

JavaScript implementation of multiaddr
http://multiformats.github.io/js-multiaddr
Other
109 stars 64 forks source link

fix: make getPeerId return the target peer id from relay addrs #325

Closed achingbrain closed 1 year ago

achingbrain commented 1 year ago

If a p2p-circuit address doesn't contain the /p2p/QmFoo tuple for the target peer, getPeerId returns the peer id of the relay which is not what you'd expect.

The fix here is for relay addresses, to return the peer id of the target and never the relay.

Fixes #319

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 12.1.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: