From 305b8659ff088ae49e96b6c729dba3351f9dde63 Mon Sep 17 00:00:00 2001 From: Ryan Ghods Date: Thu, 24 Jul 2025 19:51:57 -0700 Subject: [PATCH] remove testnets --- README.md | 23 ++--------------------- package.json | 2 +- src/constants.ts | 3 +-- src/types.ts | 3 +-- 4 files changed, 5 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 67862728..15af5d6d 100644 --- a/README.md +++ b/README.md @@ -69,38 +69,19 @@ const client = new OpenSeaStreamClient({ You can also optionally pass in: -- a `network` if you would like to access testnet networks. - - The default value is `Network.MAINNET` for all mainnet chains - - Can also select `Network.TESTNET` for all testnet chains +- a `network` parameter (defaults to `Network.MAINNET`) - `apiUrl` if you would like to access another OpenSea Stream API endpoint. Not needed if you provide a network or use the default values. - an `onError` callback to handle errors. The default behavior is to `console.error` the error. - a `logLevel` to set the log level. The default is `LogLevel.INFO`. ## Available Networks -The OpenSea Stream API is available on the following networks: +The OpenSea Stream API is available on mainnet: ### Mainnet `wss://stream.openseabeta.com/socket` -### Testnet - -`wss://testnets-stream.openseabeta.com/socket` - -To create testnet instance of the client, you can create it with the following arguments: - -```typescript -import { OpenSeaStreamClient, Network } from '@opensea/stream-js'; - -const client = new OpenSeaStreamClient({ - network: Network.TESTNET, - token: 'YOUR_OPENSEA_API_KEY' -}); -``` - -An API key is not needed for testnets, so any value is okay for `token` when network is `Network.TESTNET`. - ## Manually connecting to the socket (optional) The client will automatically connect to the socket as soon as you subscribe to the first channel. diff --git a/package.json b/package.json index 87f9516c..0db3ec14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opensea/stream-js", - "version": "0.1.3", + "version": "0.2.0", "description": "A TypeScript SDK to receive pushed updates from OpenSea over websocket", "license": "MIT", "author": "OpenSea Developers", diff --git a/src/constants.ts b/src/constants.ts index db5f724f..826126c6 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,6 +1,5 @@ import { Network } from './types.js'; export const ENDPOINTS = { - [Network.MAINNET]: 'wss://stream.openseabeta.com/socket', - [Network.TESTNET]: 'wss://testnets-stream.openseabeta.com/socket' + [Network.MAINNET]: 'wss://stream.openseabeta.com/socket' }; diff --git a/src/types.ts b/src/types.ts index 0fd94e52..dcdd92c1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -27,8 +27,7 @@ export type ClientConfig = { }; export enum Network { - MAINNET = 'mainnet', - TESTNET = 'testnet' + MAINNET = 'mainnet' } export enum EventType {