UNPKG

kucoin-universal-sdk

Version:
106 lines 2.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClientOptionBuilder = void 0; /** * ClientOptionBuilder is the builder for ClientOption */ class ClientOptionBuilder { constructor() { this.clientOption = { key: '', secret: '', passphrase: '', brokerName: '', brokerPartner: '', brokerKey: '', spotEndpoint: '', futuresEndpoint: '', brokerEndpoint: '', }; } /** * setKey sets the authentication key */ setKey(key) { this.clientOption.key = key; return this; } /** * setSecret sets the authentication secret */ setSecret(secret) { this.clientOption.secret = secret; return this; } /** * setPassphrase sets the authentication passphrase */ setPassphrase(passphrase) { this.clientOption.passphrase = passphrase; return this; } /** * setBrokerName sets the broker name */ setBrokerName(brokerName) { this.clientOption.brokerName = brokerName; return this; } /** * setBrokerPartner sets the broker partner */ setBrokerPartner(brokerPartner) { this.clientOption.brokerPartner = brokerPartner; return this; } /** * setBrokerKey sets the broker key */ setBrokerKey(brokerKey) { this.clientOption.brokerKey = brokerKey; return this; } /** * setSpotEndpoint sets the spot market API endpoint */ setSpotEndpoint(endpoint) { this.clientOption.spotEndpoint = endpoint; return this; } /** * setFuturesEndpoint sets the futures market API endpoint */ setFuturesEndpoint(endpoint) { this.clientOption.futuresEndpoint = endpoint; return this; } /** * setBrokerEndpoint sets the broker API endpoint */ setBrokerEndpoint(endpoint) { this.clientOption.brokerEndpoint = endpoint; return this; } /** * setTransportOption sets the HTTP transport options */ setTransportOption(option) { this.clientOption.transportOption = option; return this; } /** * setWebSocketClientOption sets the WebSocket client options */ setWebSocketClientOption(option) { this.clientOption.webSocketClientOption = option; return this; } /** * Build builds and returns the ClientOption */ build() { return this.clientOption; } } exports.ClientOptionBuilder = ClientOptionBuilder; //# sourceMappingURL=client_option.js.map