0.0.5 • Published 6 months ago

@eulerstream/euler-websocket-sdk v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

EulerStream WebSocket SDK

This is an SDK for the Euler Stream WebSocket API written in TypeScript.

LinkedIn Patrons Connections Stars Issues

Enterprise Solutions

Community

Join the EulerStream discord for questions, concerns, or just a good chat.

Installation

npm i EulerStream/Euler-WebSocket-SDK

What You Get

  1. Provides importable TypeScript types for all NodeJS library schemas
  2. Provides createWebSocketURL for creating a WebSocket URL for a given account
  3. Provides utility functions for encoding & decoding protobuf messages
  4. Close codes for WebSocket connections

WebSocket Close Codes

export enum ClientCloseCode {

  // Standard Codes
  INTERNAL_SERVER_ERROR = 1011,
  NORMAL = 1000,

  // Custom Codes (Must be 4000 to 4999)
  TIKTOK_CLOSED_CONNECTION = 4500,
  TOO_MANY_CONNECTIONS = 4429,
  INVALID_OPTIONS = 4401,
  NOT_LIVE = 4404,
  STREAM_END = 4005
}