
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
@multiformats/multiaddr-to-uri
Advanced tools
Convert a Multiaddr to a URI
This module allows easy conversion of Multiaddrs to string URIs.
import { multiaddrToUri } from '@multiformats/multiaddr-to-uri'
console.log(multiaddrToUri('/dnsaddr/protocol.ai/https'))
// -> https://protocol.ai
console.log(multiaddrToUri('/ip4/127.0.0.1/tcp/8080'))
// -> http://127.0.0.1:8080
console.log(multiaddrToUri('/ip4/127.0.0.1/tcp/8080', { assumeHttp: false }))
// -> tcp://127.0.0.1:8080
Note:
/tcp is the last (terminating) protocol HTTP is assumed by default (implicit assumeHttp: true)
http:// instead of tcp://{ assumeHttp: false } disables this behavior$ npm i @multiformats/multiaddr-to-uri
<script> tagLoading this module through a script tag will make it's exports available as MultiformatsMultiaddrToUri in the global namespace.
<script src="https://unpkg.com/@multiformats/multiaddr-to-uri/dist/index.min.js"></script>
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
Convert a Multiaddr to a URI
The npm package @multiformats/multiaddr-to-uri receives a total of 72,013 weekly downloads. As such, @multiformats/multiaddr-to-uri popularity was classified as popular.
We found that @multiformats/multiaddr-to-uri demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.