-
Notifications
You must be signed in to change notification settings - Fork 105
Upgrade guide from Helia 2.0.0 to Helia 3.0.0
Alex Potsides edited this page Jan 7, 2024
·
1 revision
Please see the release notes for the full run-down of all the new features and bug fixes in [email protected].
[email protected] ships with [email protected] which has breaking changes around service configuration and general API cleanup.
Please see the libp2p 1.x.x migration guide for any changes you may need to make to your application, if any.
If you simply use the built-in libp2p instance that comes with Helia there's nothing to do!
The return type of the helia.pins.add
and helia.pins.rm
methods has changed to AsyncGenerator<CID>
. This gives users greater control over pinning performance, allowing users to start multiple pin operations simultaneously on the same DAG which should improve performance.
Before
const cid = CID.parse('QmFoo')
await helia.pin.add(cid)
After
const cid = CID.parse('QmFoo')
for await (const pinnedCid of helia.pin.add(cid)) {
// ...
}