Skip to content

Upgrade guide from Helia 6.0.0 to Helia 7.0.0

Alex Potsides edited this page Jun 30, 2026 · 7 revisions

New features and bug fixes

Please see the release notes for the full run-down of all the new features and bug fixes in helia@7.x.x.

Migration guide

Node creation is now synchronous

The createHelia function used to return a promise of a running node, now it returns the node in a stopped state and the user must await the result of the .start() method.

This gives greater control of the node's lifecycle.

Before

import { createHelia } from 'helia'

const helia = await createHelia()

// do Helia things

After

import { createHelia } from 'helia'

const helia = await createHelia().start()

// do Helia things

secp256k1 support has been removed

secp256k1 is a style of PeerId used by the Ethereum network. It is not used by IPFS so it has been removed from the default config.

If you require secp256k1 it can be loaded at run time by specifying a cryptoLoader function:

import { createHelia } from 'helia'
import type { Crypto } from '@helia/interface'
import secp256k1Impl from 'my-secp256k1-module'

const node = await createHelia({
  loadCrypto: (codeOrName: number | string, options?: AbortOptions): Crypto {
    if (codeOrName === 'secp256k1' || codeOrName === 2) {
      return secp256k1Impl
    }
    
    throw new Error(`Unknown crypto scheme ${codeOrName}`)
  }
})

@helia/http now configured http routers/block brokers

The @helia/http module used to export a factory function that could be used to create a Helia node that used HTTP routers/block brokers.

Now it exports a function that can configure an existing node with the same functionality.

Before

import { createHeliaHTTP } from '@helia/http'

const helia = await createHeliaHTTP()

// do Helia things

After

import { createHelia } from 'helia'
import { withHTTP } from '@helia/http'

const helia = await withHTTP(createHelia()).start()

// do Helia things

libp2p is now optional

It's now possible to configure a Helia node that does not use libp2p at all, instead using HTTP routers/block brokers exclusively.

Previously a minimal libp2p node would still be present to satisfy the API requirements and provide a keychain for use with IPNS, etc, but these have now been removed.

A Helia-specific keychain is now present that works with WebCrypto based RSA/Ed25519 keys, but heavyweight libp2p dependencies are no longer used for this.

Libp2p-related types and default values have moved to the @helia/libp2p module:

Before

import { libp2pDefaults } from 'helia'
import type { DefaultLibp2pServices } from 'helia'

After

import { libp2pDefaults } from '@helia/libp2p'
import type { DefaultLibp2pServices } from '@helia/libp2p'

The libp2p init option has been removed from helia

Instead pass it to the withLibp2p function:

Before

import { createHelia } from 'helia'

const node = await createHelia({
  libp2p: {
    // ...libp2p args
  }
})

After

Note that we switch to createHeliaLight to pass libp2p args, createHelia will supply the default libp2p config.

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

const node = await withLibp2p(createHeliaLight(), {
  // ...libp2p args
}).start()

Where PeerIds were passed, use CIDs instead

Instead of using PeerId instances, use CIDs with the libp2p-key codec instead.

Clone this wiki locally