diff --git a/package.json b/package.json index 89305e4..b41bf47 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ipfs-block-service", "version": "0.5.0", "description": "JavaScript Implementation of BlockService", - "main": "src/index.js", + "main": "lib/index.js", "jsnext:main": "src/index.js", "scripts": { "lint": "aegir-lint", @@ -42,8 +42,8 @@ "chai": "^3.5.0", "fs-pull-blob-store": "^0.3.0", "idb-pull-blob-store": "^0.5.1", - "ipfs-block": "^0.3.0", - "ipfs-repo": "^0.9.0", + "ipfs-block": "^0.4.0", + "ipfs-repo": "^0.10.0", "lodash": "^4.15.0", "ncp": "^2.0.0", "pre-commit": "^1.1.3", @@ -51,6 +51,7 @@ "run-series": "^1.1.4" }, "dependencies": { + "cids": "^0.2.0", "pull-stream": "^3.4.5", "run-parallel-limit": "^1.0.3" }, diff --git a/test/block-service-test.js b/test/block-service-test.js index 0e54eb7..7e877a4 100644 --- a/test/block-service-test.js +++ b/test/block-service-test.js @@ -207,14 +207,17 @@ module.exports = (repo) => { const bitswap = { getStream (key) { return pull.values([ - new Block(key) + new Block('secret') ]) } } bs.goOnline(bitswap) - bs.get('secret', (err, block) => { + const block = new Block('secret') + const cid = new CID(block.key('sha2-256')) + + bs.get(cid, (err, block) => { expect(err).to.not.exist expect(block.data).to.be.eql(new Block('secret').data) done()