A JavaScript/TypeScript library for migrating data from Ocean Protocol v3 to v4. Current stable version is 0.0.2, with no regular release cadence yet. It provides functions to fetch and transform metadata, pricing, and datatoken information from Ocean Protocol's v3 contracts and Aquarius metadata cache. Key differentiators: it specifically handles the breaking changes between Ocean Protocol v3 and v4, including the switch from DDO v3 to DDO v4 schemas. The library is ESM-only and ships TypeScript types. It is intended to be used in Node.js environments and requires a connection to an Aquarius instance.
npm install v4-migration-lib-testNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates converting a v3 DDO to v4 format and performing full asset migration using Web3 and Aquarius.
Use import syntax or set { type: 'module' } in package.json.Use getV3Data only with Aquarius v3 endpoints; migrate to v4 endpoints.
Always use await or .then() when calling library functions.
Set METADATACACHE_URI environment variable or pass a fallback URL.
Use import syntax or set { type: 'module' } in package.json and rename file to .mjs.Use import { convertDDO } from 'v4-migration-lib'.Install web3: npm install web3