Skip to content

Commit 3ea5d31

Browse files
authored
remove testnets (#460)
1 parent 2b4a2d8 commit 3ea5d31

File tree

4 files changed

+5
-26
lines changed

4 files changed

+5
-26
lines changed

README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,38 +69,19 @@ const client = new OpenSeaStreamClient({
6969

7070
You can also optionally pass in:
7171

72-
- a `network` if you would like to access testnet networks.
73-
- The default value is `Network.MAINNET` for all mainnet chains
74-
- Can also select `Network.TESTNET` for all testnet chains
72+
- a `network` parameter (defaults to `Network.MAINNET`)
7573
- `apiUrl` if you would like to access another OpenSea Stream API endpoint. Not needed if you provide a network or use the default values.
7674
- an `onError` callback to handle errors. The default behavior is to `console.error` the error.
7775
- a `logLevel` to set the log level. The default is `LogLevel.INFO`.
7876

7977
## Available Networks
8078

81-
The OpenSea Stream API is available on the following networks:
79+
The OpenSea Stream API is available on mainnet:
8280

8381
### Mainnet
8482

8583
`wss://stream.openseabeta.com/socket`
8684

87-
### Testnet
88-
89-
`wss://testnets-stream.openseabeta.com/socket`
90-
91-
To create testnet instance of the client, you can create it with the following arguments:
92-
93-
```typescript
94-
import { OpenSeaStreamClient, Network } from '@opensea/stream-js';
95-
96-
const client = new OpenSeaStreamClient({
97-
network: Network.TESTNET,
98-
token: 'YOUR_OPENSEA_API_KEY'
99-
});
100-
```
101-
102-
An API key is not needed for testnets, so any value is okay for `token` when network is `Network.TESTNET`.
103-
10485
## Manually connecting to the socket (optional)
10586

10687
The client will automatically connect to the socket as soon as you subscribe to the first channel.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensea/stream-js",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"description": "A TypeScript SDK to receive pushed updates from OpenSea over websocket",
55
"license": "MIT",
66
"author": "OpenSea Developers",

src/constants.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Network } from './types.js';
22

33
export const ENDPOINTS = {
4-
[Network.MAINNET]: 'wss://stream.openseabeta.com/socket',
5-
[Network.TESTNET]: 'wss://testnets-stream.openseabeta.com/socket'
4+
[Network.MAINNET]: 'wss://stream.openseabeta.com/socket'
65
};

src/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ export type ClientConfig = {
2727
};
2828

2929
export enum Network {
30-
MAINNET = 'mainnet',
31-
TESTNET = 'testnet'
30+
MAINNET = 'mainnet'
3231
}
3332

3433
export enum EventType {

0 commit comments

Comments
 (0)