import { ethers } from 'ethers'
import { BASE_NETWORK, ETH_NETWORK, getBalance } from 'privacycash-evm'
const network = ETH_NETWORK // or BASE_NETWORK
const SIGN_MESSAGE = 'Privacy Money account sign in'
const provider = new ethers.providers.JsonRpcProvider(network.rpcUrl, {
name: network.chainKey,
chainId: network.chainId,
})
const signer = new ethers.Wallet(process.env.PRIVATE_KEY!, provider)
const signature = await signer.signMessage(SIGN_MESSAGE)
const address = await signer.getAddress()
const result = await getBalance({ signature, address, token: 'eth', network })
console.log('Private ETH balance:', result.balance, 'ETH')