Documentation
    Preparing search index...
    • Replace the host of a multiaddr with the relay's public IP, preserving the rest of the address — including the WebRTC Direct certhash, which libp2p generates at start and is therefore only known at runtime.

      Used to announce a NAT'd relay's dialable address: the relay binds locally but advertises its public IP.

      Parameters

      • addr: string

        A multiaddr string beginning with /ip4/<host> or /ip6/<host>.

      • publicIp: string

        The relay's externally-reachable IP address.

      Returns string