import { DEFAULT_API_TIMEOUT } from './constants';
import AccountClient from './modules/account';
import MarketsClient from './modules/markets';
import UtilityClient from './modules/utility';
import VaultClient from './modules/vault';
/**
 * @description Client for Indexer
 */
export class IndexerClient {
    constructor(config, apiTimeout) {
        this.config = config;
        this.apiTimeout = apiTimeout !== null && apiTimeout !== void 0 ? apiTimeout : DEFAULT_API_TIMEOUT;
        this._markets = new MarketsClient(config.restEndpoint, apiTimeout, config.proxy);
        this._account = new AccountClient(config.restEndpoint, apiTimeout, config.proxy);
        this._utility = new UtilityClient(config.restEndpoint, apiTimeout, config.proxy);
        this._vault = new VaultClient(config.restEndpoint, apiTimeout, config.proxy);
    }
    /**
     * @description Get the public module, used for interacting with public endpoints.
     *
     * @returns The public module
     */
    get markets() {
        return this._markets;
    }
    /**
     * @description Get the private module, used for interacting with private endpoints.
     *
     * @returns The private module
     */
    get account() {
        return this._account;
    }
    /**
     * @description Get the utility module, used for interacting with non-market public endpoints.
     */
    get utility() {
        return this._utility;
    }
    /**
     * @description Get the vault module, used for interacting with vault endpoints.
     *
     * @returns The vault module
     */
    get vault() {
        return this._vault;
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXhlci1jbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY2xpZW50cy9pbmRleGVyLWNsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWlCLG1CQUFtQixFQUFFLE1BQU0sYUFBYSxDQUFDO0FBQ2pFLE9BQU8sYUFBYSxNQUFNLG1CQUFtQixDQUFDO0FBQzlDLE9BQU8sYUFBYSxNQUFNLG1CQUFtQixDQUFDO0FBQzlDLE9BQU8sYUFBYSxNQUFNLG1CQUFtQixDQUFDO0FBQzlDLE9BQU8sV0FBVyxNQUFNLGlCQUFpQixDQUFDO0FBRTFDOztHQUVHO0FBQ0gsTUFB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