File tree Expand file tree Collapse file tree 4 files changed +5
-26
lines changed
Expand file tree Collapse file tree 4 files changed +5
-26
lines changed Original file line number Diff line number Diff line change @@ -69,38 +69,19 @@ const client = new OpenSeaStreamClient({
6969
7070You 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
10687The client will automatically connect to the socket as soon as you subscribe to the first channel.
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 11import { Network } from './types.js' ;
22
33export 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} ;
Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ export type ClientConfig = {
2727} ;
2828
2929export enum Network {
30- MAINNET = 'mainnet' ,
31- TESTNET = 'testnet'
30+ MAINNET = 'mainnet'
3231}
3332
3433export enum EventType {
You can’t perform that action at this time.
0 commit comments