"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChainHost = getChainHost;
exports.getUrlHost = getUrlHost;
function getChainHost(chainId) {
    const defaultHost = 'explorer.arcblockio.cn';
    if (!chainId)
        return defaultHost;
    const chainMap = {
        beta: 'beta.abtnetwork.io',
        main: 'main.abtnetwork.io',
    };
    const chainHost = chainMap[chainId] || defaultHost;
    return chainHost;
}
function getUrlHost(url) {
    try {
        return new URL(url).host;
    }
    catch (_a) {
        return url;
    }
}
