Java 显示Aion帐户的余额

Java 显示Aion帐户的余额,java,blockchain,aion,Java,Blockchain,Aion,我正在尝试使用JavaAPI获取Aion中帐户的余额。无论我做什么,我都无法从帐户变量中获取值 account = "a06f02e986965ddd3398c4de87e3708072ad58d96e9c53e87c31c8c970b211e5"; BigInteger account_balance = api.getChain().getBalance(account).getObject(); System.out.format("%n%s balance is = %d nAmp (

我正在尝试使用JavaAPI获取Aion中帐户的余额。无论我做什么,我都无法从
帐户
变量中获取值

account = "a06f02e986965ddd3398c4de87e3708072ad58d96e9c53e87c31c8c970b211e5";
BigInteger account_balance = api.getChain().getBalance(account).getObject();

System.out.format("%n%s balance is = %d nAmp (over %d AION)%n", 
    account, 
    account_balance, 
    account_balance.divide(BigInteger.TEN.pow(18)));

有人有什么想法吗?

您需要在
地址中包装您的帐户地址。包装

account = Address.wrap("a06f02e9...");

您还可以尝试使用JSON请求进行调用:
{“jsonrpc”:“2.0”,“method”:“eth_getBalance”,“params”:[“0x0”,“latest”],“id”:32}

就是这样!非常感谢。