alanshaw / alanshaw/ipfs-only-hash

hashAlg not set

Aperta
#24 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
139
Fork
27
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

e.g., passing in `hashAlg` has no effect,
```
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.

Should I be using [`js-multiformats`](https://github.com/multiformats/js-multiformats) instead?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.