public void sendCoinsFromAccount( int acctnum, String address, long amount, long fee, boolean spendUnconfirmed) throws RuntimeException { if (mHDWallet == null) return; try { Address dest = new Address(mParams, address); mLogger.info( String.format( "send coins: acct=%d, dest=%s, val=%d, fee=%d", acctnum, address, amount, fee)); mHDWallet.sendAccountCoins(mKit.wallet(), acctnum, dest, amount, fee, spendUnconfirmed); } catch (WrongNetworkException ex) { String msg = "Address for wrong network: " + ex.getMessage(); throw new RuntimeException(msg); } catch (AddressFormatException ex) { String msg = "Malformed bitcoin address: " + ex.getMessage(); throw new RuntimeException(msg); } }