export { ClientKind };
var ClientKind;
(function (ClientKind) {
    ClientKind["Lighthouse"] = "Lighthouse";
    ClientKind["Nimbus"] = "Nimbus";
    ClientKind["Teku"] = "Teku";
    ClientKind["Prysm"] = "Prysm";
    ClientKind["Lodestar"] = "Lodestar";
    ClientKind["Grandine"] = "Grandine";
    ClientKind["Unknown"] = "Unknown";
})(ClientKind || (ClientKind = {}));
/**
 * Get known client from agent version.
 * If client is not known, don't return ClientKind.Unknown here.
 * For metrics it'll have fallback logic to use ClientKind.Unknown
 * For logs, we want to print out agentVersion instead for debugging purposes.
 */
export function getKnownClientFromAgentVersion(agentVersion) {
    const slashIndex = agentVersion.indexOf("/");
    const agent = slashIndex >= 0 ? agentVersion.slice(0, slashIndex) : agentVersion;
    const agentLC = agent.toLowerCase();
    if (agentLC === "lighthouse")
        return ClientKind.Lighthouse;
    if (agentLC === "teku")
        return ClientKind.Teku;
    if (agentLC === "prysm")
        return ClientKind.Prysm;
    if (agentLC === "nimbus")
        return ClientKind.Nimbus;
    if (agentLC === "grandine")
        return ClientKind.Grandine;
    if (agentLC === "lodestar" || agentLC === "js-libp2p")
        return ClientKind.Lodestar;
    return null;
}
//# sourceMappingURL=client.js.map