mirror of
https://github.com/fluencelabs/js-multiaddr-to-uri
synced 2024-12-04 20:20:36 +00:00
3021c00543
The upgrade to multiaddr 7 brings with it a change that means multiaddrs with libp2p peer ID keys like `/ipfs/QmXXX` will be transformed to `/p 2p/QmXXX` when converted from a string, to a multiaddr instance and back to a string. This is because `p2p` and `ipfs` are name aliases for the same codec. `p2p` has now become the default and older `ipfs` names do not round trip(they are converted to `p2p` - as stated above). This change allows us to use the new multiaddr 7 lib but retain backward compatibility by ensuring the protocol specified in a string multiaddr is the protocol used in the resulting URI.
35 lines
863 B
JSON
35 lines
863 B
JSON
{
|
|
"name": "multiaddr-to-uri",
|
|
"version": "5.0.0",
|
|
"description": "Convert a Multiaddr to a URI /dnsaddr/ipfs.io/http -> http://ipfs.io",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"test": "npm run lint && npm run test:coverage",
|
|
"test:coverage": "nyc --reporter=lcov --reporter=text ava",
|
|
"lint": "standard"
|
|
},
|
|
"keywords": [
|
|
"multiaddr",
|
|
"toString",
|
|
"URL"
|
|
],
|
|
"author": "Alan Shaw",
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"ava": "^2.4.0",
|
|
"nyc": "^15.0.0",
|
|
"standard": "^14.3.1"
|
|
},
|
|
"dependencies": {
|
|
"multiaddr": "^7.2.1"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/multiformats/js-multiaddr-to-uri.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/multiformats/js-multiaddr-to-uri/issues"
|
|
},
|
|
"homepage": "https://github.com/multiformats/js-multiaddr-to-uri#readme"
|
|
}
|