diff --git a/README.md b/README.md index ba4a2c4b..8973e375 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ +> [!IMPORTANT] +> ## This package has moved to `@opensea/sdk` +> +> `@opensea/stream-js` is deprecated and no longer maintained. Its last published version is `0.4.0`. The Stream client now ships inside the OpenSea SDK at the `@opensea/sdk/stream` subpath, where it is actively maintained. +> +> ```bash +> npm uninstall @opensea/stream-js ws node-localstorage +> npm install @opensea/sdk +> ``` +> +> ```diff +> -import { OpenSeaStreamClient } from "@opensea/stream-js"; +> +import { OpenSeaStreamClient } from "@opensea/sdk/stream"; +> +> -const client = new OpenSeaStreamClient({ token: "YOUR_API_KEY" }); +> +const client = new OpenSeaStreamClient({ apiKey: "YOUR_API_KEY" }); +> ``` +> +> Every event type, payload, and `on*` method is unchanged. There are a few small breaking changes, all covered in the [migration guide](https://github.com/ProjectOpenSea/opensea-sdk/blob/main/developerDocs/stream-migration.md): +> +> - Node no longer needs `ws` or `node-localstorage`. Node 22+ and browsers supply a global `WebSocket`, and `sessionStorage` was only read by an unused long-poll fallback. +> - `apiKey` replaces `token`, which still works but is deprecated. +> - Unsubscribing removes one handler instead of leaving the whole collection channel. +> - Node 22 is the minimum, since Node 20 reached end of life in April 2026. +> +> The client no longer depends on `phoenix`, so importing `@opensea/sdk/stream` pulls in no third-party runtime code. +> +> Repository: [ProjectOpenSea/opensea-sdk](https://github.com/ProjectOpenSea/opensea-sdk) | Documentation: [docs.opensea.io/reference/stream-api](https://docs.opensea.io/reference/stream-api) +