helia
    Preparing search index...

    Module light

    Exports a createHeliaLight function that returns a minimally configured object that implements the Helia API.

    Unlike the main helia entry point, importing helia/light does not load @helia/libp2p or @helia/bitswap, so use it when you want a node without libp2p (or with your own libp2p config) and the smallest possible bundle.

    To add your own libp2p config without loading the default transports, pair it with withLibp2pLight from @helia/libp2p/light.

    import { createHeliaLight } from 'helia/light'
    import { withHTTP } from '@helia/http'
    import { unixfs } from '@helia/unixfs'
    import { CID } from 'multiformats/cid'

    const helia = await withHTTP(createHeliaLight()).start()
    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)
    }
    createHeliaLight
    HeliaInit → HeliaInit