@hubbleprotocol/hubble-config
Version:
Hubble Protocol configuration
24 lines • 778 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAllConfigs = exports.getConfigByCluster = void 0;
const configs_1 = require("./constants/configs");
/**
* Get Hubble configuration for specific Solana cluster.
* @param cluster - Solana cluster name
*/
const getConfigByCluster = (cluster) => {
const config = configs_1.HUBBLE_CONFIGS.find((x) => x.cluster == cluster);
if (config) {
return config;
}
throw Error(`Could not find Hubble config for Solana cluster: ${cluster}`);
};
exports.getConfigByCluster = getConfigByCluster;
/**
* Get all Hubble configurations.
*/
const getAllConfigs = () => {
return configs_1.HUBBLE_CONFIGS;
};
exports.getAllConfigs = getAllConfigs;
//# sourceMappingURL=config.js.map
;