@Test void getBalance() { bitcoinUtilExtend.getBalance("mfovHNgwxDmbYsUhDao4JWLKbzHsCDuizx"); }
public BigDecimal getBalance(String address) { List<UTXO> unspent = this.getUnspent(Arrays.asList(address)); Long balance = 0L; for (UTXO utxo : unspent) { balance = balance + utxo.getValue().value; } logger.info(unspent.toString()); return new BigDecimal(balance / 100000000.0).setScale(8, BigDecimal.ROUND_DOWN); }
BitcoinUtilExtend extends BitcoinUtil { public BigDecimal getBalance(String address) { List<UTXO> unspent = this.getUnspent(Arrays.asList(address)); Long balance = 0L; for (UTXO utxo : unspent) { balance = balance + utxo.getValue().value; } logger.info(unspent.toString()); return new BigDecimal(balance / 100000000.0).setScale(8, BigDecimal.ROUND_DOWN); } }
BitcoinUtilExtend extends BitcoinUtil { public BigDecimal getBalance(String address) { List<UTXO> unspent = this.getUnspent(Arrays.asList(address)); Long balance = 0L; for (UTXO utxo : unspent) { balance = balance + utxo.getValue().value; } logger.info(unspent.toString()); return new BigDecimal(balance / 100000000.0).setScale(8, BigDecimal.ROUND_DOWN); }  }
BitcoinUtilExtend extends BitcoinUtil { public BigDecimal getBalance(String address) { List<UTXO> unspent = this.getUnspent(Arrays.asList(address)); Long balance = 0L; for (UTXO utxo : unspent) { balance = balance + utxo.getValue().value; } logger.info(unspent.toString()); return new BigDecimal(balance / 100000000.0).setScale(8, BigDecimal.ROUND_DOWN); }  String sendSignTransaction(String toAddress, BigDecimal amount, BigDecimal fee, Boolean sync, String withdrawId); String sendSignTransaction(Map<String, BigDecimal> targetAddressesMap); String sendSignTransaction(List<String> fromAddresses, Map<String, BigDecimal> targetAddressesMap, BigDecimal fee); Transaction signTx(String changeAddress, Map<String, BigDecimal> targetAddressesMap, Map<String, ECKey> keyMap,
                              List<UTXO> utxos, BigDecimal fee); BigDecimal getBalance(String address); List<UTXO> getUnspent(List<String> addresses); BigDecimal getFeeRate(); void syncAddressBalance(String address); Object importAddress(String address); }
BitcoinUtilExtend extends BitcoinUtil { public BigDecimal getBalance(String address) { List<UTXO> unspent = this.getUnspent(Arrays.asList(address)); Long balance = 0L; for (UTXO utxo : unspent) { balance = balance + utxo.getValue().value; } logger.info(unspent.toString()); return new BigDecimal(balance / 100000000.0).setScale(8, BigDecimal.ROUND_DOWN); }  String sendSignTransaction(String toAddress, BigDecimal amount, BigDecimal fee, Boolean sync, String withdrawId); String sendSignTransaction(Map<String, BigDecimal> targetAddressesMap); String sendSignTransaction(List<String> fromAddresses, Map<String, BigDecimal> targetAddressesMap, BigDecimal fee); Transaction signTx(String changeAddress, Map<String, BigDecimal> targetAddressesMap, Map<String, ECKey> keyMap,
                              List<UTXO> utxos, BigDecimal fee); BigDecimal getBalance(String address); List<UTXO> getUnspent(List<String> addresses); BigDecimal getFeeRate(); void syncAddressBalance(String address); Object importAddress(String address);  }