Commit 1e66b9a8 authored by Andreas Schildbach's avatar Andreas Schildbach

Finish moving wallet related classes to .wallet package.

These classes are moved to .wallet:
- Wallet + WalletTest
- WalletExtension + WalletExtensionsTest
- WalletProtobufSerializer
- UnreadableWalletException

These classes are moved to .wallet.listeners:
- WalletEventListener
- WalletChangeEventListener
- WalletCoinsReceivedEventListener
- WalletCoinsSentEventListener
- WalletReorganizeEventListener
- ScriptsChangeEventListener
- AbstractWalletEventListener
- KeyChainEventListener
- AbstractKeyChainEventListener
parent e48ced6d
......@@ -23,6 +23,7 @@ import com.google.common.util.concurrent.*;
import org.bitcoinj.core.listeners.*;
import org.bitcoinj.store.*;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.*;
import javax.annotation.*;
......
......@@ -21,6 +21,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.wallet.Wallet;
import java.util.ArrayList;
import java.util.List;
......
......@@ -14,7 +14,6 @@
package org.bitcoinj.core;
import org.bitcoinj.core.Wallet.SendRequest;
import org.slf4j.*;
import static com.google.common.base.Preconditions.*;
......
......@@ -29,6 +29,7 @@ import org.bitcoin.NativeSecp256k1;
import org.bitcoin.NativeSecp256k1Util;
import org.bitcoin.Secp256k1Context;
import org.bitcoinj.wallet.Protos;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.asn1.*;
......
......@@ -22,6 +22,7 @@ import org.bitcoinj.script.Script.VerifyFlag;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.store.FullPrunedBlockStore;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -24,6 +24,8 @@ import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.utils.ListenerRegistration;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
......
......@@ -33,6 +33,10 @@ import org.bitcoinj.net.discovery.*;
import org.bitcoinj.script.*;
import org.bitcoinj.utils.*;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import org.bitcoinj.wallet.listeners.ScriptsChangeEventListener;
import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener;
import org.slf4j.*;
import javax.annotation.*;
......@@ -43,7 +47,6 @@ import java.util.concurrent.*;
import java.util.concurrent.locks.*;
import static com.google.common.base.Preconditions.*;
import org.bitcoinj.wallet.KeyChainEventListener;
/**
* <p>Runs a set of connections to the P2P network, brings up connections to replace disconnected nodes and manages
......
......@@ -23,6 +23,7 @@ import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.script.ScriptOpCodes;
import org.bitcoinj.utils.ExchangeRate;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.WalletTransaction.Pool;
import com.google.common.collect.ImmutableMap;
......
......@@ -22,7 +22,7 @@ import org.bitcoinj.wallet.WalletTransaction;
import java.util.Map;
/**
* This interface is used to abstract the {@link org.bitcoinj.core.Wallet} and the {@link org.bitcoinj.core.Transaction}
* This interface is used to abstract the {@link org.bitcoinj.wallet.Wallet} and the {@link org.bitcoinj.core.Transaction}
*/
public interface TransactionBag {
/** Returns true if this wallet contains a public key which hashes to the given hash. */
......
......@@ -20,6 +20,7 @@ import com.google.common.annotations.*;
import com.google.common.base.*;
import com.google.common.util.concurrent.*;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.*;
import javax.annotation.*;
......
......@@ -20,6 +20,7 @@ package org.bitcoinj.core;
import com.google.common.collect.*;
import com.google.common.util.concurrent.*;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.Wallet;
import javax.annotation.*;
import java.util.*;
......
......@@ -19,6 +19,7 @@ package org.bitcoinj.core;
import com.google.common.base.Objects;
import org.bitcoinj.script.*;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.*;
import javax.annotation.*;
......
......@@ -17,7 +17,7 @@
package org.bitcoinj.core.listeners;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.wallet.Wallet;
/**
* <p>Implementors are called when confidence of a transaction changes.</p>
......
......@@ -15,7 +15,7 @@
/**
* The core package contains classes for network messages like {@link org.bitcoinj.core.Block} and
* {@link org.bitcoinj.core.Transaction}, peer connectivity via {@link org.bitcoinj.core.PeerGroup},
* block chain management and the {@link org.bitcoinj.core.Wallet} class.
* and block chain management.
* If what you're doing can be described as basic bitcoin tasks, the code is probably found here.
* To learn more please consult the documentation on the website.
*/
......
......@@ -16,8 +16,8 @@
package org.bitcoinj.jni;
import org.bitcoinj.wallet.KeyChainEventListener;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import java.util.List;
......
......@@ -16,9 +16,9 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.ScriptsChangeEventListener;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.script.Script;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.ScriptsChangeEventListener;
import java.util.List;
......
......@@ -17,8 +17,8 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.TransactionConfidenceEventListener;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Wallet;
/**
* An event listener that relays events to a native C++ object. A pointer to that object is stored in
......
......@@ -16,8 +16,8 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.WalletChangeEventListener;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.WalletChangeEventListener;
/**
* An event listener that relays events to a native C++ object. A pointer to that object is stored in
......
......@@ -16,10 +16,10 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.WalletCoinsReceivedEventListener;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Wallet;
/**
* An event listener that relays events to a native C++ object. A pointer to that object is stored in
......
......@@ -16,10 +16,10 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.WalletCoinsSentEventListener;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Wallet;
/**
* An event listener that relays events to a native C++ object. A pointer to that object is stored in
......
......@@ -16,12 +16,12 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.WalletEventListener;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.script.Script;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.WalletEventListener;
import java.util.List;
......
......@@ -16,8 +16,8 @@
package org.bitcoinj.jni;
import org.bitcoinj.core.listeners.WalletReorganizeEventListener;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.WalletReorganizeEventListener;
/**
* An event listener that relays events to a native C++ object. A pointer to that object is stored in
......
......@@ -20,6 +20,8 @@ package org.bitcoinj.protocols.channels;
import org.bitcoinj.core.*;
import org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
......
......@@ -21,9 +21,10 @@ import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.Sha256Hash;
import org.bitcoinj.core.Utils;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.net.NioClient;
import org.bitcoinj.net.ProtobufConnection;
import org.bitcoinj.wallet.Wallet;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
......
......@@ -26,6 +26,8 @@ import org.bitcoinj.core.*;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.crypto.params.KeyParameter;
......@@ -33,7 +35,6 @@ import org.spongycastle.crypto.params.KeyParameter;
import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.*;
import org.bitcoinj.core.listeners.WalletCoinsReceivedEventListener;
/**
* <p>A payment channel is a method of sending money to someone such that the amount of money you send can be adjusted
......@@ -209,7 +210,7 @@ public abstract class PaymentChannelClientState {
* Creates the initial multisig contract and incomplete refund transaction which can be requested at the appropriate
* time using {@link PaymentChannelV1ClientState#getIncompleteRefundTransaction} and
* {@link PaymentChannelV1ClientState#getContract()}. The way the contract is crafted can be adjusted by
* overriding {@link PaymentChannelV1ClientState#editContractSendRequest(org.bitcoinj.core.Wallet.SendRequest)}.
* overriding {@link PaymentChannelV1ClientState#editContractSendRequest(org.bitcoinj.wallet.Wallet.SendRequest)}.
* By default unconfirmed coins are allowed to be used, as for micropayments the risk should be relatively low.
*
* @throws ValueOutOfRangeException if the value being used is too small to be accepted by the network
......@@ -223,7 +224,7 @@ public abstract class PaymentChannelClientState {
* Creates the initial multisig contract and incomplete refund transaction which can be requested at the appropriate
* time using {@link PaymentChannelV1ClientState#getIncompleteRefundTransaction} and
* {@link PaymentChannelV1ClientState#getContract()}. The way the contract is crafted can be adjusted by
* overriding {@link PaymentChannelV1ClientState#editContractSendRequest(org.bitcoinj.core.Wallet.SendRequest)}.
* overriding {@link PaymentChannelV1ClientState#editContractSendRequest(org.bitcoinj.wallet.Wallet.SendRequest)}.
* By default unconfirmed coins are allowed to be used, as for micropayments the risk should be relatively low.
* @param userKey Key derived from a user password, needed for any signing when the wallet is encrypted.
* The wallet KeyCrypter is assumed.
......
......@@ -20,6 +20,8 @@ import com.google.common.collect.ImmutableMap;
import org.bitcoinj.core.*;
import org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
......
......@@ -20,10 +20,10 @@ package org.bitcoinj.protocols.channels;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Sha256Hash;
import org.bitcoinj.core.TransactionBroadcaster;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.net.NioServer;
import org.bitcoinj.net.ProtobufConnection;
import org.bitcoinj.net.StreamConnectionFactory;
import org.bitcoinj.wallet.Wallet;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString;
......
......@@ -16,6 +16,8 @@
package org.bitcoinj.protocols.channels;
import org.bitcoinj.wallet.Wallet;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimap;
import com.google.common.util.concurrent.FutureCallback;
......
......@@ -23,6 +23,7 @@ import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.wallet.AllowUnconfirmedCoinSelector;
import org.bitcoinj.wallet.Wallet;
import org.spongycastle.crypto.params.KeyParameter;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
......
......@@ -21,6 +21,8 @@ import org.bitcoinj.core.*;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.wallet.Wallet;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
......
......@@ -24,6 +24,7 @@ import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.wallet.AllowUnconfirmedCoinSelector;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.crypto.params.KeyParameter;
......
......@@ -26,6 +26,7 @@ import org.bitcoinj.core.*;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......
......@@ -20,6 +20,9 @@ import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import org.bitcoinj.core.*;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.WalletExtension;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.HashMultimap;
import com.google.common.util.concurrent.SettableFuture;
......
......@@ -19,6 +19,9 @@ package org.bitcoinj.protocols.channels;
import com.google.common.collect.ImmutableMap;
import org.bitcoinj.core.*;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.WalletExtension;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.util.concurrent.SettableFuture;
import com.google.protobuf.ByteString;
......
......@@ -17,6 +17,7 @@
package org.bitcoinj.protocols.channels;
import org.bitcoinj.core.*;
import org.bitcoinj.wallet.Wallet;
import javax.annotation.Nullable;
import java.util.Date;
......
......@@ -20,6 +20,8 @@ import org.bitcoinj.params.MainNetParams;
import org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData;
import org.bitcoinj.uri.BitcoinURI;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListeningExecutorService;
......
......@@ -18,16 +18,16 @@ package org.bitcoinj.signers;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.TransactionInput;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptChunk;
import org.bitcoinj.wallet.KeyBag;
import org.bitcoinj.wallet.Wallet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This transaction signer resolves missing signatures in accordance with the given {@link org.bitcoinj.core.Wallet.MissingSigsMode}.
* This transaction signer resolves missing signatures in accordance with the given {@link org.bitcoinj.wallet.Wallet.MissingSigsMode}.
* If missingSigsMode is USE_OP_ZERO this signer does nothing assuming missing signatures are already presented in
* scriptSigs as OP_0.
* In MissingSigsMode.THROW mode this signer will throw an exception. It would be MissingSignatureException
......
......@@ -29,7 +29,7 @@ import java.util.Map;
* <p>Implementations of this interface are intended to sign inputs of the given transaction. Given transaction may already
* be partially signed or somehow altered by other signers.</p>
* <p>To make use of the signer, you need to add it into the wallet by
* calling {@link org.bitcoinj.core.Wallet#addTransactionSigner(TransactionSigner)}. Signer will be serialized
* calling {@link org.bitcoinj.wallet.Wallet#addTransactionSigner(TransactionSigner)}. Signer will be serialized
* along with the wallet data. In order for a wallet to recreate signer after deserialization, each signer
* should have no-args constructor</p>
*/
......
......@@ -14,7 +14,7 @@
/**
* Transaction signers know how to calculate signatures over transactions in different contexts, for example, using
* local private keys or fetching them from remote servers. The {@link org.bitcoinj.core.Wallet} class uses these
* local private keys or fetching them from remote servers. The {@link org.bitcoinj.wallet.Wallet} class uses these
* when sending money.
*/
package org.bitcoinj.signers;
\ No newline at end of file
......@@ -19,9 +19,10 @@ package org.bitcoinj.wallet;
import org.bitcoinj.core.BloomFilter;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.crypto.*;
import org.bitcoinj.store.UnreadableWalletException;
import org.bitcoinj.utils.ListenerRegistration;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.protobuf.ByteString;
......@@ -348,8 +349,8 @@ public class BasicKeyChain implements EncryptableKeyChain {
/**
* Returns a new BasicKeyChain that contains all basic, ORIGINAL type keys and also any encrypted keys extracted
* from the list. Unrecognised key types are ignored.
* @throws org.bitcoinj.store.UnreadableWalletException.BadPassword if the password doesn't seem to match
* @throws org.bitcoinj.store.UnreadableWalletException if the data structures are corrupted/inconsistent
* @throws org.bitcoinj.wallet.UnreadableWalletException.BadPassword if the password doesn't seem to match
* @throws org.bitcoinj.wallet.UnreadableWalletException if the data structures are corrupted/inconsistent
*/
public static BasicKeyChain fromProtobufEncrypted(List<Protos.Key> keys, KeyCrypter crypter) throws UnreadableWalletException {
BasicKeyChain chain = new BasicKeyChain(checkNotNull(crypter));
......
......@@ -17,7 +17,6 @@
package org.bitcoinj.wallet;
import org.bitcoinj.crypto.*;
import org.bitcoinj.store.UnreadableWalletException;
/**
* Default factory for creating keychains while de-serializing.
......
......@@ -25,7 +25,6 @@ import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.core.TransactionInput;
import org.bitcoinj.core.TransactionOutput;
import org.bitcoinj.core.Wallet;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.ScriptChunk;
import org.slf4j.Logger;
......
......@@ -23,8 +23,8 @@ import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Utils;
import org.bitcoinj.crypto.*;
import org.bitcoinj.script.Script;
import org.bitcoinj.store.UnreadableWalletException;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import com.google.common.base.Stopwatch;
import com.google.common.collect.ImmutableList;
......
......@@ -19,7 +19,7 @@ package org.bitcoinj.wallet;
import org.bitcoinj.core.Utils;
import org.bitcoinj.crypto.*;
import org.bitcoinj.store.UnreadableWalletException;
import com.google.common.base.Charsets;
import com.google.common.base.Objects;
import com.google.common.base.Splitter;
......
......@@ -50,7 +50,7 @@ public interface EncryptableKeyChain extends KeyChain {
/**
* Decrypt the key chain with the given AES key and whatever {@link KeyCrypter} is already set. Note that if you
* just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the
* {@link org.bitcoinj.core.Wallet.SendRequest#aesKey} field before asking the wallet to build the send.
* {@link org.bitcoinj.wallet.Wallet.SendRequest#aesKey} field before asking the wallet to build the send.
*
* @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to
* create from a password)
......
......@@ -18,12 +18,13 @@ package org.bitcoinj.wallet;
import org.bitcoinj.core.BloomFilter;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import java.util.List;
import java.util.concurrent.Executor;
/**
* <p>A KeyChain is a class that stores a collection of keys for a {@link org.bitcoinj.core.Wallet}. Key chains
* <p>A KeyChain is a class that stores a collection of keys for a {@link org.bitcoinj.wallet.Wallet}. Key chains
* are expected to be able to look up keys given a hash (i.e. address) or pubkey bytes, and provide keys on request
* for a given purpose. They can inform event listeners about new keys being added.</p>
*
......
......@@ -18,7 +18,6 @@ package org.bitcoinj.wallet;
import org.bitcoinj.crypto.DeterministicKey;
import org.bitcoinj.crypto.KeyCrypter;
import org.bitcoinj.store.UnreadableWalletException;
/**
* Factory interface for creation keychains while de-serializing a wallet.
......
......@@ -22,8 +22,8 @@ import com.google.protobuf.*;
import org.bitcoinj.core.*;
import org.bitcoinj.crypto.*;
import org.bitcoinj.script.*;
import org.bitcoinj.store.*;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import org.slf4j.*;
import org.spongycastle.crypto.params.*;
......@@ -35,7 +35,7 @@ import java.util.concurrent.*;
import static com.google.common.base.Preconditions.*;
/**
* <p>A KeyChainGroup is used by the {@link org.bitcoinj.core.Wallet} and
* <p>A KeyChainGroup is used by the {@link org.bitcoinj.wallet.Wallet} and
* manages: a {@link BasicKeyChain} object (which will normally be empty), and zero or more
* {@link DeterministicKeyChain}s. A deterministic key chain will be created lazily/on demand
* when a fresh or current key is requested, possibly being initialized from the private key bytes of the earliest non
......
......@@ -17,7 +17,6 @@
package org.bitcoinj.wallet;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.Wallet;
import java.util.List;
......
......@@ -12,7 +12,7 @@
* limitations under the License.
*/
package org.bitcoinj.store;
package org.bitcoinj.wallet;
/**
* Thrown by the {@link WalletProtobufSerializer} when the serialized protocol buffer is either corrupted,
......
......@@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.bitcoinj.core;
package org.bitcoinj.wallet;
import com.google.common.annotations.*;
import com.google.common.base.*;
......@@ -26,16 +26,52 @@ import com.google.protobuf.*;
import net.jcip.annotations.*;
import org.bitcoin.protocols.payments.Protos.*;
import org.bitcoinj.core.listeners.*;
import org.bitcoinj.core.AbstractBlockChain;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.BloomFilter;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Context;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.FilteredBlock;
import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.Message;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerFilterProvider;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.core.ScriptException;
import org.bitcoinj.core.Sha256Hash;
import org.bitcoinj.core.StoredBlock;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionBag;
import org.bitcoinj.core.TransactionBroadcast;
import org.bitcoinj.core.TransactionBroadcaster;
import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.core.TransactionInput;
import org.bitcoinj.core.TransactionOutPoint;
import org.bitcoinj.core.TransactionOutput;
import org.bitcoinj.core.UTXO;
import org.bitcoinj.core.UTXOProvider;
import org.bitcoinj.core.UTXOProviderException;
import org.bitcoinj.core.Utils;
import org.bitcoinj.core.VarInt;
import org.bitcoinj.core.VerificationException;
import org.bitcoinj.core.TransactionConfidence.*;
import org.bitcoinj.crypto.*;
import org.bitcoinj.script.*;
import org.bitcoinj.signers.*;
import org.bitcoinj.store.*;
import org.bitcoinj.utils.*;
import org.bitcoinj.wallet.*;
import org.bitcoinj.wallet.KeyChain.KeyPurpose;
import org.bitcoinj.wallet.Protos.Wallet.*;
import org.bitcoinj.wallet.WalletTransaction.*;
import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import org.bitcoinj.wallet.listeners.ScriptsChangeEventListener;
import org.bitcoinj.wallet.listeners.WalletChangeEventListener;
import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener;
import org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener;
import org.bitcoinj.wallet.listeners.WalletEventListener;
import org.bitcoinj.wallet.listeners.WalletReorganizeEventListener;
import org.slf4j.*;
import org.spongycastle.crypto.params.*;
......@@ -3697,7 +3733,7 @@ public class Wallet extends BaseTaggableObject
/**
* When emptyWallet is set, all coins selected by the coin selector are sent to the first output in tx
* (its value is ignored and set to {@link org.bitcoinj.core.Wallet#getBalance()} - the fees required
* (its value is ignored and set to {@link org.bitcoinj.wallet.Wallet#getBalance()} - the fees required
* for the transaction). Any additional outputs are removed.
*/
public boolean emptyWallet = false;
......