helia
    Preparing search index...

    Module light

    Exports withLibp2pLight, which adds a libp2p node to Helia using only the config you pass to it.

    Unlike the main @helia/libp2p entry point, importing @helia/libp2p/light does not load the default libp2p config, so none of the default transports, services or their dependencies (including the native node-datachannel module used by @libp2p/webrtc) are loaded.

    import { createHeliaLight } from 'helia/light'
    import { withLibp2pLight } from '@helia/libp2p/light'
    import { tcp } from '@libp2p/tcp'
    import { noise } from '@libp2p/noise'
    import { yamux } from '@libp2p/yamux'

    const node = await withLibp2pLight(createHeliaLight(), {
    transports: [tcp()],
    connectionEncrypters: [noise()],
    streamMuxers: [yamux()]
    }).start()

    console.info(node.libp2p.peerId) // 12D3Koo...
    CreateLibp2pOptions
    HeliaWithLibp2p
    withLibp2pLight
    libp2pRouting → libp2pRouting