"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseNodeProvider = void 0;
class BaseNodeProvider {
    uniqName;
    _httpClient;
    _wsClient;
    rateLimits;
    _hasWebSocketUrl = false;
    _isWebSocketConnected = false;
    constructor({ uniqName, rateLimits }) {
        this.uniqName = uniqName;
        this.rateLimits = rateLimits;
    }
    get httpClient() {
        return this._httpClient;
    }
    get wsClient() {
        return this._wsClient;
    }
    get hasWebSocketSupport() {
        return this._hasWebSocketUrl;
    }
    get isWebSocketConnected() {
        return this._hasWebSocketUrl && this._isWebSocketConnected;
    }
    healthcheckWebSocket() {
        if (!this._hasWebSocketUrl)
            return false;
        return this._isWebSocketConnected;
    }
}
exports.BaseNodeProvider = BaseNodeProvider;
