helia
    Preparing search index...

    Module @helia/libp2p

    Adds libp2p functionality to Helia

    import { createHelia } from 'helia'
    import { withLibp2p } from '@helia/libp2p'

    const node = await withLibp2p(createHelia()).start()

    console.info(node.libp2p.peerId) // 12D3Koo...

    By default withLibp2p configures a libp2p node for the current environment.

    Any options passed will be merged with the default config.

    For full control over your node (and the bundle size), use withLibp2pLight:

    import { createHelia } from 'helia'
    import { withLibp2pLight } from '@helia/libp2p'

    const node = await withLibp2pLight(createHelia(), {
    //... libp2p config here
    }).start()

    console.info(node.libp2p.peerId) // 12D3Koo...
    CreateLibp2pOptions
    DefaultLibp2pServices
    HeliaWithLibp2p
    libp2pDefaults
    withLibp2p
    withLibp2pLight