Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
feat: add defaultHashAlg
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Jun 22, 2018
1 parent dec417a commit 424d2a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const util = require('./util')

exports = module.exports
exports.multicodec = 'dag-pb'
exports.defaultHashAlg = 'sha2-256'

/*
* resolve: receives a path and a binary blob and returns the value on path,
Expand Down
4 changes: 4 additions & 0 deletions test/resolver.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ describe('IPLD Format resolver (local)', () => {
expect(resolver.multicodec).to.equal('dag-pb')
})

it('defaultHashAlg is sha2-256', () => {
expect(resolver.defaultHashAlg).to.equal('sha2-256')
})

describe('empty node', () => {
describe('resolver.resolve', () => {
it('links path', (done) => {
Expand Down

0 comments on commit 424d2a1

Please sign in to comment.