Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

CID constructor throws when multihash uses "identity" algortihm #92

Closed
Gozala opened this issue Aug 8, 2019 · 0 comments · Fixed by #93
Closed

CID constructor throws when multihash uses "identity" algortihm #92

Gozala opened this issue Aug 8, 2019 · 0 comments · Fixed by #93

Comments

@Gozala
Copy link
Contributor

Gozala commented Aug 8, 2019

Following code throws exception:

const mh = multihash.encode(Buffer.from('abc'), 'identity')
const cid = new CID(0, 'dag-pb', mh)
// Uncaught Error: multihash unknown function code: 0x0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant