我想基于私钥获得比特币钱包的余额。我的钱包包含0.0000155 BTC。但是下面的代码总是返回“你有0比特币”。我的代码出了什么问题?
final WalletAppKit kit
= new WalletAppKit(MainNetParams.get(), new File("."), "test");
kit.startAsync();
kit.awaitRunning();
byte[] key = Base58.decode("MY0PRIVATE0KEY0DUMMYwz8ntrXngmQrhpPig9jj9hHwsLdoej");
kit.wallet().importKey(ECKey.fromPrivate(key));
System.out.println("You have : " + kit.wallet().getBalance() + " bitcoins");