const MULTI_CHAIN_WALLET_CONFIG = Object.freeze({
  bsc: Object.freeze({
    networkName: 'BNB Smart Chain',
    chainId: 56,
    rpcUrl: process.env.PLAIS_BSC_RPC_URL || 'https://bsc-dataseed.bnbchain.org',
    explorerUrl: process.env.PLAIS_BSC_EXPLORER_URL || 'https://bscscan.com',
    nativeSymbol: 'BNB',
    decimals: 18,
    minimumTransferAmount: process.env.PLAIS_BNB_MIN_TRANSFER || '0.000001'
  }),
  babyDoge: Object.freeze({
    symbol: 'BABYDOGE',
    name: 'Baby Doge Coin',
    contractAddress: process.env.PLAIS_BABYDOGE_CONTRACT || '0xc748673057861a797275cd8a068abb95a902e8de',
    decimals: 9,
    minimumTransferAmount: process.env.PLAIS_BABYDOGE_MIN_TRANSFER || '1'
  }),
  tron: Object.freeze({
    networkName: 'TRON Mainnet',
    apiBase: (process.env.PLAI_TRON_API_BASE || 'https://api.trongrid.io').replace(/\/+$/, ''),
    apiKey: process.env.PLAI_TRON_API_KEY || '',
    explorerUrl: process.env.PLAIS_TRON_EXPLORER_URL || 'https://tronscan.org',
    nativeSymbol: 'TRX',
    decimals: 6,
    minimumTransferAmount: process.env.PLAIS_TRX_MIN_TRANSFER || '0.000001'
  }),
  transfersEnabled: process.env.PLAIS_MULTICHAIN_TRANSFERS_ENABLED === '1',
  historyLimit: Math.max(10, Math.min(100, Number(process.env.PLAIS_MULTICHAIN_HISTORY_LIMIT || 30))),
  bscHistoryBlocks: Math.max(2000, Number(process.env.PLAIS_BSC_HISTORY_BLOCKS || 20000)),
  historyCacheMs: Math.max(5000, Number(process.env.PLAIS_MULTICHAIN_HISTORY_CACHE_MS || 30000)),
  requestTimeoutMs: Math.max(3000, Number(process.env.PLAIS_MULTICHAIN_TIMEOUT_MS || 10000))
});

module.exports = { MULTI_CHAIN_WALLET_CONFIG };
