With no routers or block brokers the node can only read blocks that are already in its blockstore.
import { createHeliaLight } from 'helia/light'
import { unixfs } from '@helia/unixfs'
const helia = await createHeliaLight().start()
const fs = unixfs(helia)
const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
for await (const buf of fs.cat(cid)) {
console.info(buf)
}
Create and return a Helia node without any routing or block broker config.
By default the only supported codecs are
dag-pbandraw, and the only supported hashes aresha2-256andidentity. Passcodecsandhashers(orloadCodecandloadHasher) to support more.This allows more flexible customization and the smallest possible bundle size in web browsers.