/**
 * Network configuration for ChainID 138 (DeFi Oracle Meta Mainnet)
 */

export const CHAIN_ID = 138;
export const CHAIN_ID_HEX = '0x8a';
export const CHAIN_NAME = 'DeFi Oracle Meta Mainnet';
export const CHAIN_SHORT_NAME = 'defi-oracle';

/**
 * RPC endpoints
 * Domain: d-bis.org (Cloudflare DNS/SSL)
 */
export const RPC_URLS = {
  primary: 'https://rpc.d-bis.org',
  secondary: 'https://rpc2.d-bis.org',
  websocket: 'wss://rpc.d-bis.org',
};

/**
 * Block explorer
 */
export const BLOCK_EXPLORER_URL = 'https://explorer.d-bis.org';

/**
 * Network metadata for wallet_addEthereumChain
 */
export const NETWORK_METADATA = {
  chainId: CHAIN_ID_HEX,
  chainName: CHAIN_NAME,
  nativeCurrency: {
    name: 'Ether',
    symbol: 'ETH',
    decimals: 18,
  },
  rpcUrls: [RPC_URLS.primary, RPC_URLS.secondary],
  blockExplorerUrls: [BLOCK_EXPLORER_URL],
  iconUrls: [`${BLOCK_EXPLORER_URL}/images/logo.png`],
} as const;

/**
 * CAIP-2 identifier for ChainID 138
 */
export const CAIP2_IDENTIFIER = `eip155:${CHAIN_ID}`;

