helia
    Preparing search index...

    Function heliaDefaults

    • Create and return the default options used to create a Helia node

      Type Parameters

      Parameters

      Returns Promise<Omit<HeliaInit<T>, "libp2p"> & { libp2p: T }>

      import { myService } from '@example/my-service'
      import { createHelia, heliaDefaults } from 'helia'

      // get a copy of the default libp2p config
      const init = heliaDefaults()

      // add the custom service to the service map
      init.libp2p.services.myService = myService()

      // create a Helia node with the custom config
      const helia = await createHelia(init)

      //... use service
      helia.libp2p.services.myService.serviceMethod()