helia
    Preparing search index...

    Function createHeliaLight

    • Create and return a Helia node without and routing or block broker config.

      The only supported codecs are dag-pb and raw, and the only supported hashes are sha2-256 and identity.

      This allows more flexible customization and the smallest possible bundle size in web browsers.

      Parameters

      Returns Helia

      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)
      }