const logos = {
    Ethereum: "https://s2.coinmarketcap.com/static/img/coins/64x64/1027.png",
    Solana: "https://s2.coinmarketcap.com/static/img/coins/64x64/5426.png",
    SolanaDevnet: "https://s2.coinmarketcap.com/static/img/coins/64x64/5426.png",
    Arbitrum: "https://s2.coinmarketcap.com/static/img/coins/64x64/11841.png",
    Optimism: "https://s2.coinmarketcap.com/static/img/coins/64x64/11840.png",
    Base: "https://icons.llamao.fi/icons/chains/rsz_base.jpg",
    Linea: "https://icons.llamao.fi/icons/chains/rsz_linea.jpg",
    Sepolia: "https://s2.coinmarketcap.com/static/img/coins/64x64/1027.png",
    ArbitrumSepolia: "https://s2.coinmarketcap.com/static/img/coins/64x64/11841.png",
    HyperEVM: "https://storage.googleapis.com/zapper-fi-assets/networks/hyperevm-icon.png",
    BinanceSmartChain: "https://s2.coinmarketcap.com/static/img/coins/64x64/1839.png",
    Mantra: "https://s2.coinmarketcap.com/static/img/coins/64x64/6536.png",
    Plasma: "https://s2.coinmarketcap.com/static/img/coins/64x64/36645.png",
};
const defaultRpcs = {
    Ethereum: "https://eth.llamarpc.com",
    Solana: "https://solana.drpc.org",
    Arbitrum: "https://arbitrum.gateway.tenderly.co",
    Optimism: "https://optimism.gateway.tenderly.co",
    Base: "https://base.gateway.tenderly.co",
    Linea: "https://rpc.linea.build",
    SolanaDevnet: "",
    Sepolia: "https://sepolia.therpc.io",
    ArbitrumSepolia: "https://arbitrum-sepolia.therpc.io",
    HyperEVM: "https://rpc.hypurrscan.io",
    BinanceSmartChain: "https://binance.llamarpc.com",
    Mantra: "https://evm.mantrachain.io",
    Plasma: "https://rpc.plasma.to",
};
export const getChainsFromAssets = (assets) => {
    return assets
        .map((asset) => asset.chain)
        .filter((value, index, self) => self.indexOf(value) === index)
        .map((chain) => ({
        name: chain.replace(/([a-z])([A-Z])/g, "$1 $2"), // Add space between lowercase and uppercase
        id: chain,
        logo: logos[chain],
        runtime: assets.find((a) => a.chain === chain).runtime,
    }));
};
export const getRPC = (chain, overrides) => {
    const rpcs = {
        ...Object.fromEntries(Object.entries(defaultRpcs).map(([k, v]) => [k.toLowerCase(), v])),
        ...Object.fromEntries(Object.entries(overrides).map(([k, v]) => [k.toLowerCase(), v])),
    };
    return rpcs[chain.toLowerCase()];
};
//# sourceMappingURL=chains.js.map
