import { createHeliaLight } from 'helia'
import { unixfs } from '@helia/unixfs'
import { CID } from 'multiformats/cid'
const helia = await createHeliaLight()
const fs = unixfs(helia)
const cid = CID.parse('QmFoo...')
for await (const buf of fs.cat(cid, {
signal: AbortSignal.timeout(5_000)
})) {
console.info(buf)
}
Create and return a Helia node without and routing or block broker config.
The only supported codecs are
dag-pbandraw, and the only supported hashes aresha2-256andidentity.This allows more flexible customization and the smallest possible bundle size in web browsers.