UNPKG

kucoin-universal-sdk

Version:
107 lines (106 loc) 3.14 kB
import { TransportOption } from './transport_option'; import { WebSocketClientOption } from './websocket_option'; /** * ClientOption holds the configuration details for a client including authentication keys, API endpoints, and transport options. */ export interface ClientOption { /** * Key is the authentication key for the client */ key?: string; /** * Secret is the authentication secret for the client */ secret?: string; /** * Passphrase is the authentication passphrase for the client */ passphrase?: string; /** * BrokerName The name of the broker */ brokerName?: string; /** * BrokerPartner The partner associated with the broker */ brokerPartner?: string; /** * BrokerKey The secret key for the broker */ brokerKey?: string; /** * SpotEndpoint is the spot market API endpoint for the client */ spotEndpoint?: string; /** * FuturesEndpoint is the futures market API endpoint for the client */ futuresEndpoint?: string; /** * BrokerEndpoint is the broker API endpoint for the client */ brokerEndpoint?: string; /** * TransportOption is an optional configuration for HTTP network transport */ transportOption?: TransportOption; /** * WebSocketClientOption is an optional configuration for websocket transport */ webSocketClientOption?: WebSocketClientOption; } /** * ClientOptionBuilder is the builder for ClientOption */ export declare class ClientOptionBuilder { private clientOption; constructor(); /** * setKey sets the authentication key */ setKey(key: string): ClientOptionBuilder; /** * setSecret sets the authentication secret */ setSecret(secret: string): ClientOptionBuilder; /** * setPassphrase sets the authentication passphrase */ setPassphrase(passphrase: string): ClientOptionBuilder; /** * setBrokerName sets the broker name */ setBrokerName(brokerName: string): ClientOptionBuilder; /** * setBrokerPartner sets the broker partner */ setBrokerPartner(brokerPartner: string): ClientOptionBuilder; /** * setBrokerKey sets the broker key */ setBrokerKey(brokerKey: string): ClientOptionBuilder; /** * setSpotEndpoint sets the spot market API endpoint */ setSpotEndpoint(endpoint: string): ClientOptionBuilder; /** * setFuturesEndpoint sets the futures market API endpoint */ setFuturesEndpoint(endpoint: string): ClientOptionBuilder; /** * setBrokerEndpoint sets the broker API endpoint */ setBrokerEndpoint(endpoint: string): ClientOptionBuilder; /** * setTransportOption sets the HTTP transport options */ setTransportOption(option: TransportOption): ClientOptionBuilder; /** * setWebSocketClientOption sets the WebSocket client options */ setWebSocketClientOption(option: WebSocketClientOption): ClientOptionBuilder; /** * Build builds and returns the ClientOption */ build(): ClientOption; }