import { createHelia } from 'helia'
import { unixfs } from '@helia/unixfs'
import { CID } from 'multiformats/cid'
const helia = await createHelia()
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 using the default configuration including libp2p and HTTP routing.
For full control, and smaller bundle sizes use
createHeliaLight.