Open robinsonkwame opened 2 years ago
e.g., passing in hashAlg has no effect,
hashAlg
const Hash = await require('pure-ipfs-only-hash') const data = Buffer.from('hello world\n') hashAlg = 'sha2-256' cidVersion = 0 await Hash.of(data, {cidVersion, hashAlg}) # 'QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o' # ... but hashAlg = 'blake2b-8' await Hash.of(data, {cidVersion, hashAlg}) # 'QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o'
even though the options object of ipfs-unixfs-importer is supported. For example, setting cidVersion = 1 works as expected.
ipfs-unixfs-importer
cidVersion = 1
Should I be using js-multiformats instead?
js-multiformats
e.g., passing in
hashAlg
has no effect,even though the options object of
ipfs-unixfs-importer
is supported. For example, settingcidVersion = 1
works as expected.Should I be using
js-multiformats
instead?