/** * Sends BTC from an address to the destinations, whereby no new change address is created, and any leftover is * returned to the sending address. * * @param fromAddress The source to spent from * @param outputs The destinations and amounts to transfer * @return The transaction hash */ public Sha256Hash sendBitcoin(Address fromAddress, Map<Address, Coin> outputs) throws JsonRpcStatusException, IOException { String unsignedTxHex = createRawTransaction(fromAddress, outputs); SignedRawTransaction signingResult = signRawTransaction(unsignedTxHex); Boolean complete = signingResult.isComplete(); assert complete; String signedTxHex = signingResult.getHex(); Sha256Hash txid = sendRawTransaction(signedTxHex); return txid; }
SignedRawTransaction signingResult = client.signRawTransaction(unsignedTxHex); Boolean complete = signingResult.isComplete(); assert complete; String signedTxHex = signingResult.getHex(); Object txid = client.sendRawTransaction(signedTxHex, true);
SignedRawTransaction signingResult = client.signRawTransaction(unsignedTxHex); assert signingResult.isComplete(); String signedTxHex = signingResult.getHex(); Sha256Hash txid = client.sendRawTransaction(signedTxHex, true);