diff --git a/src/index.js b/src/index.js index a15e4ef..b6a4914 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,7 @@ const CID = require('cids') module.exports = { resolver: { multicodec: 'raw', + defaultHashAlg: 'sha2-256', resolve: (binaryBlob, path, callback) => { callback(null, { value: binaryBlob, diff --git a/test/index.spec.js b/test/index.spec.js index a1ac1de..b56157c 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -24,6 +24,10 @@ describe('raw codec', () => { expect(resolver.multicodec).to.equal('raw') }) + it('defaultHashAlg is sha2-256', () => { + expect(resolver.defaultHashAlg).to.equal('sha2-256') + }) + it('resolver.resolve', () => { resolver.resolve(testBlob, 'a/b/c/d', (err, result) => { expect(err).to.not.exist()