Skip to content

Commit 73a6726

Browse files
feat: store blocks by multihash instead of CID (#3124)
Updates the `ipfs-repo` dep to a version that stores blocks by multihash instead of CID to support CIDv1 and CIDv0 access to the same block. New features: - Adds a `--multihash` argument to the cli command `ipfs refs local` which prints the base32 encoded multihash of each block BREAKING CHANGES: - `ipfs.refs.local` now returns a v1 CID with the raw codec for every block and not the original CID by which it was added to the blockstore Co-authored-by: Hugo Dias <[email protected]>
1 parent 02a3f0b commit 73a6726

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
"merge-options": "^2.0.0",
6060
"multiaddr": "^7.4.3",
6161
"multiaddr-to-uri": "^5.1.0",
62-
"multibase": "^0.7.0",
62+
"multibase": "^1.0.1",
6363
"multicodec": "^1.0.0",
6464
"multihashes": "^1.0.1",
6565
"nanoid": "^3.0.2",
6666
"node-fetch": "^2.6.0",
67-
"parse-duration": "^0.1.2",
67+
"parse-duration": "^0.4.4",
6868
"stream-to-it": "^0.2.0"
6969
},
7070
"devDependencies": {
71-
"aegir": "^22.1.0",
71+
"aegir": "^23.0.0",
7272
"cross-env": "^7.0.0",
7373
"go-ipfs-dep": "^0.5.1",
7474
"interface-ipfs-core": "^0.137.0",

src/lib/core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const Multiaddr = require('multiaddr')
44
const toUri = require('multiaddr-to-uri')
55
const { isBrowser, isWebWorker } = require('ipfs-utils/src/env')
66
const { URL } = require('iso-url')
7-
const parseDuration = require('parse-duration')
7+
const parseDuration = require('parse-duration').default
88
const log = require('debug')('ipfs-http-client:lib:error-handler')
99
const HTTP = require('ipfs-utils/src/http')
1010
const merge = require('merge-options')

0 commit comments

Comments
 (0)