diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/com/google/bitcoin/core/Wallet.java index 4f733d2f..55470b03 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/com/google/bitcoin/core/Wallet.java @@ -2219,6 +2219,9 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * @return either the created Transaction or null if there are insufficient coins. * coins as spent until commitTx is called on the result. * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. + * @throws DustySendRequested if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile) + * @throws CouldNotAdjustDownwards if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule. + * @throws ExceededMaxTransactionSize if the resultant transaction is too big for Bitcoin to process (try breaking up the amounts of value) */ public Transaction createSend(Address address, Coin value) throws InsufficientMoneyException { SendRequest req = SendRequest.to(address, value); @@ -2236,6 +2239,10 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * * @return the Transaction that was created * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. + * @throws IllegalArgumentException if you try and complete the same SendRequest twice + * @throws DustySendRequested if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile) + * @throws CouldNotAdjustDownwards if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule. + * @throws ExceededMaxTransactionSize if the resultant transaction is too big for Bitcoin to process (try breaking up the amounts of value) */ public Transaction sendCoinsOffline(SendRequest request) throws InsufficientMoneyException { lock.lock(); @@ -2269,6 +2276,9 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * @param value How much value to send. * @return An object containing the transaction that was created, and a future for the broadcast of it. * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. + * @throws DustySendRequested if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile) + * @throws CouldNotAdjustDownwards if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule. + * @throws ExceededMaxTransactionSize if the resultant transaction is too big for Bitcoin to process (try breaking up the amounts of value) */ public SendResult sendCoins(TransactionBroadcaster broadcaster, Address to, Coin value) throws InsufficientMoneyException { SendRequest request = SendRequest.to(to, value); @@ -2290,6 +2300,10 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * @param request the SendRequest that describes what to do, get one using static methods on SendRequest itself. * @return An object containing the transaction that was created, and a future for the broadcast of it. * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. + * @throws IllegalArgumentException if you try and complete the same SendRequest twice + * @throws DustySendRequested if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile) + * @throws CouldNotAdjustDownwards if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule. + * @throws ExceededMaxTransactionSize if the resultant transaction is too big for Bitcoin to process (try breaking up the amounts of value) */ public SendResult sendCoins(TransactionBroadcaster broadcaster, SendRequest request) throws InsufficientMoneyException { // Should not be locked here, as we're going to call into the broadcaster and that might want to hold its @@ -2318,6 +2332,10 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * @return An object containing the transaction that was created, and a future for the broadcast of it. * @throws IllegalStateException if no transaction broadcaster has been configured. * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. + * @throws IllegalArgumentException if you try and complete the same SendRequest twice + * @throws DustySendRequested if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile) + * @throws CouldNotAdjustDownwards if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule. + * @throws ExceededMaxTransactionSize if the resultant transaction is too big for Bitcoin to process (try breaking up the amounts of value) */ public SendResult sendCoins(SendRequest request) throws InsufficientMoneyException { TransactionBroadcaster broadcaster = vTransactionBroadcaster; @@ -2333,6 +2351,10 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * * @return The {@link Transaction} that was created or null if there was insufficient balance to send the coins. * @throws InsufficientMoneyException if the request could not be completed due to not enough balance. + * @throws IllegalArgumentException if you try and complete the same SendRequest twice + * @throws DustySendRequested if the resultant transaction would violate the dust rules (an output that's too small to be worthwhile) + * @throws CouldNotAdjustDownwards if emptying the wallet was requested and the output can't be shrunk for fees without violating a protocol rule. + * @throws ExceededMaxTransactionSize if the resultant transaction is too big for Bitcoin to process (try breaking up the amounts of value) */ public Transaction sendCoins(Peer peer, SendRequest request) throws InsufficientMoneyException { Transaction tx = sendCoinsOffline(request);