import { JsonRpcProvider } from 'ethers';
export async function getBalance(params) {
    const rpcUrl = params.rpcUrl ?? 'https://eth.llamarpc.com';
    const provider = new JsonRpcProvider(rpcUrl);
    const balance = await provider.getBalance(params.address);
    const balanceEth = Number(balance) / 1e18;
    return {
        address: params.address,
        balance: balance.toString(),
        balanceEth: balanceEth.toFixed(6),
        symbol: 'ETH',
    };
}
