@Test public void removeWatchedAddresses() { List<Address> addressesForRemoval = new ArrayList<>(); for (int i = 0; i < 10; i++) { Address watchedAddress = LegacyAddress.fromKey(UNITTEST, new ECKey()); addressesForRemoval.add(watchedAddress); wallet.addWatchedAddress(watchedAddress); } wallet.removeWatchedAddresses(addressesForRemoval); for (Address addr : addressesForRemoval) assertFalse(wallet.isAddressWatched(addr)); }
public boolean removeWatchedAddresses(final List<Address> addresses) { List<Script> scripts = new ArrayList<>(); for (Address address : addresses) { Script script = ScriptBuilder.createOutputScript(address); scripts.add(script); } return removeWatchedScripts(scripts); }
Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener { public boolean removeWatchedAddresses(final List<Address> addresses) { List<Script> scripts = new ArrayList<>(); for (Address address : addresses) { Script script = ScriptBuilder.createOutputScript(address); scripts.add(script); } return removeWatchedScripts(scripts); } }
Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener { public boolean removeWatchedAddresses(final List<Address> addresses) { List<Script> scripts = new ArrayList<>(); for (Address address : addresses) { Script script = ScriptBuilder.createOutputScript(address); scripts.add(script); } return removeWatchedScripts(scripts); } @Deprecated @VisibleForTesting protected  Wallet(Context context);  Wallet(NetworkParameters params, KeyChainGroup keyChainGroup); private  Wallet(Context context, KeyChainGroup keyChainGroup); }
Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener { public boolean removeWatchedAddresses(final List<Address> addresses) { List<Script> scripts = new ArrayList<>(); for (Address address : addresses) { Script script = ScriptBuilder.createOutputScript(address); scripts.add(script); } return removeWatchedScripts(scripts); } @Deprecated @VisibleForTesting protected  Wallet(Context context);  Wallet(NetworkParameters params, KeyChainGroup keyChainGroup); private  Wallet(Context context, KeyChainGroup keyChainGroup); static Wallet createDeterministic(NetworkParameters params, Script.ScriptType outputScriptType); static Wallet createDeterministic(Context context, Script.ScriptType outputScriptType); static Wallet createBasic(NetworkParameters params); static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed,
            Script.ScriptType outputScriptType); static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed, Script.ScriptType outputScriptType,
            KeyChainGroupStructure structure); @Deprecated static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed); static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed, Script.ScriptType outputScriptType,
            List<ChildNumber> accountPath); @Deprecated static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed, List<ChildNumber> accountPath); static Wallet fromWatchingKey(NetworkParameters params, DeterministicKey watchKey,
            Script.ScriptType outputScriptType); @Deprecated static Wallet fromWatchingKey(NetworkParameters params, DeterministicKey watchKey); static Wallet fromWatchingKeyB58(NetworkParameters params, String watchKeyB58, long creationTimeSeconds); static Wallet fromSpendingKey(NetworkParameters params, DeterministicKey spendKey,
            Script.ScriptType outputScriptType); @Deprecated static Wallet fromSpendingKey(NetworkParameters params, DeterministicKey spendKey); static Wallet fromSpendingKeyB58(NetworkParameters params, String spendingKeyB58, long creationTimeSeconds); static Wallet fromMasterKey(NetworkParameters params, DeterministicKey masterKey,
            Script.ScriptType outputScriptType, ChildNumber accountNumber); @Deprecated static Wallet fromKeys(NetworkParameters params, List<ECKey> keys); NetworkParameters getNetworkParameters(); List<DeterministicKeyChain> getActiveKeyChains(); DeterministicKeyChain getActiveKeyChain(); final void addTransactionSigner(TransactionSigner signer); List<TransactionSigner> getTransactionSigners(); DeterministicKey currentKey(KeyChain.KeyPurpose purpose); DeterministicKey currentReceiveKey(); Address currentAddress(KeyChain.KeyPurpose purpose); Address currentReceiveAddress(); DeterministicKey freshKey(KeyChain.KeyPurpose purpose); List<DeterministicKey> freshKeys(KeyChain.KeyPurpose purpose, int numberOfKeys); DeterministicKey freshReceiveKey(); Address freshAddress(KeyChain.KeyPurpose purpose); Address freshReceiveAddress(); Address freshReceiveAddress(Script.ScriptType scriptType); List<ECKey> getIssuedReceiveKeys(); List<Address> getIssuedReceiveAddresses(); @Deprecated void upgradeToDeterministic(@Nullable KeyParameter aesKey); void upgradeToDeterministic(Script.ScriptType outputScriptType, @Nullable KeyParameter aesKey); void upgradeToDeterministic(Script.ScriptType outputScriptType, KeyChainGroupStructure structure,
            @Nullable KeyParameter aesKey); @Deprecated boolean isDeterministicUpgradeRequired(); boolean isDeterministicUpgradeRequired(Script.ScriptType outputScriptType); List<Script> getWatchedScripts(); boolean removeKey(ECKey key); int getKeyChainGroupSize(); @VisibleForTesting int getKeyChainGroupCombinedKeyLookaheadEpochs(); List<ECKey> getImportedKeys(); Address currentChangeAddress(); boolean importKey(ECKey key); int importKeys(final List<ECKey> keys); int importKeysAndEncrypt(final List<ECKey> keys, CharSequence password); int importKeysAndEncrypt(final List<ECKey> keys, KeyParameter aesKey); void addAndActivateHDChain(DeterministicKeyChain chain); int getKeyChainGroupLookaheadSize(); int getKeyChainGroupLookaheadThreshold(); DeterministicKey getWatchingKey(); boolean isWatching(); boolean isAddressWatched(Address address); boolean addWatchedAddress(final Address address); boolean addWatchedAddress(final Address address, long creationTime); int addWatchedAddresses(final List<Address> addresses, long creationTime); int addWatchedScripts(final List<Script> scripts); boolean removeWatchedAddress(final Address address); boolean removeWatchedAddresses(final List<Address> addresses); boolean removeWatchedScripts(final List<Script> scripts); List<Address> getWatchedAddresses(); @Deprecated ECKey findKeyFromPubHash(byte[] pubKeyHash); @Override @Nullable ECKey findKeyFromPubKeyHash(byte[] pubKeyHash, @Nullable Script.ScriptType scriptType); boolean hasKey(ECKey key); boolean isAddressMine(Address address); @Deprecated boolean isPubKeyHashMine(byte[] pubKeyHash); @Override boolean isPubKeyHashMine(byte[] pubKeyHash, @Nullable Script.ScriptType scriptType); @Override boolean isWatchedScript(Script script); ECKey findKeyFromAddress(Address address); @Override @Nullable ECKey findKeyFromPubKey(byte[] pubKey); @Override boolean isPubKeyMine(byte[] pubKey); @Nullable @Override RedeemData findRedeemDataFromScriptHash(byte[] payToScriptHash); @Override boolean isPayToScriptHashMine(byte[] payToScriptHash); DeterministicSeed getKeyChainSeed(); DeterministicKey getKeyByPath(List<ChildNumber> path); void encrypt(CharSequence password); void encrypt(KeyCrypter keyCrypter, KeyParameter aesKey); void decrypt(CharSequence password); void decrypt(KeyParameter aesKey); boolean checkPassword(CharSequence password); boolean checkAESKey(KeyParameter aesKey); @Nullable KeyCrypter getKeyCrypter(); EncryptionType getEncryptionType(); boolean isEncrypted(); void changeEncryptionPassword(CharSequence currentPassword, CharSequence newPassword); void changeEncryptionKey(KeyCrypter keyCrypter, KeyParameter currentAesKey, KeyParameter newAesKey); List<Protos.Key> serializeKeyChainGroupToProtobuf(); void saveToFile(File temp, File destFile); void saveToFile(File f); void setAcceptRiskyTransactions(boolean acceptRiskyTransactions); boolean isAcceptRiskyTransactions(); void setRiskAnalyzer(RiskAnalysis.Analyzer analyzer); RiskAnalysis.Analyzer getRiskAnalyzer(); WalletFiles autosaveToFile(File f, long delayTime, TimeUnit timeUnit,
                                      @Nullable WalletFiles.Listener eventListener); void shutdownAutosaveAndWait(); void saveToFileStream(OutputStream f); NetworkParameters getParams(); Context getContext(); static Wallet loadFromFile(File file, @Nullable WalletExtension... walletExtensions); boolean isConsistent(); void isConsistentOrThrow(); static Wallet loadFromFileStream(InputStream stream, @Nullable WalletExtension... walletExtensions); @Override boolean notifyTransactionIsInBlock(Sha256Hash txHash, StoredBlock block,
                                              BlockChain.NewBlockType blockType,
                                              int relativityOffset); void receivePending(Transaction tx, @Nullable List<Transaction> dependencies, boolean overrideIsRelevant); boolean isTransactionRisky(Transaction tx, @Nullable List<Transaction> dependencies); void receivePending(Transaction tx, @Nullable List<Transaction> dependencies); boolean isPendingTransactionRelevant(Transaction tx); boolean isTransactionRelevant(Transaction tx); @Override void receiveFromBlock(Transaction tx, StoredBlock block,
                                 BlockChain.NewBlockType blockType,
                                 int relativityOffset); @Override void notifyNewBestBlock(StoredBlock block); boolean maybeCommitTx(Transaction tx); void commitTx(Transaction tx); void addChangeEventListener(WalletChangeEventListener listener); void addChangeEventListener(Executor executor, WalletChangeEventListener listener); void addCoinsReceivedEventListener(WalletCoinsReceivedEventListener listener); void addCoinsReceivedEventListener(Executor executor, WalletCoinsReceivedEventListener listener); void addCoinsSentEventListener(WalletCoinsSentEventListener listener); void addCoinsSentEventListener(Executor executor, WalletCoinsSentEventListener listener); void addKeyChainEventListener(KeyChainEventListener listener); void addKeyChainEventListener(Executor executor, KeyChainEventListener listener); void addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener); void addCurrentKeyChangeEventListener(Executor executor, CurrentKeyChangeEventListener listener); void addReorganizeEventListener(WalletReorganizeEventListener listener); void addReorganizeEventListener(Executor executor, WalletReorganizeEventListener listener); void addScriptsChangeEventListener(ScriptsChangeEventListener listener); void addScriptsChangeEventListener(Executor executor, ScriptsChangeEventListener listener); void addTransactionConfidenceEventListener(TransactionConfidenceEventListener listener); void addTransactionConfidenceEventListener(Executor executor, TransactionConfidenceEventListener listener); boolean removeChangeEventListener(WalletChangeEventListener listener); boolean removeCoinsReceivedEventListener(WalletCoinsReceivedEventListener listener); boolean removeCoinsSentEventListener(WalletCoinsSentEventListener listener); boolean removeKeyChainEventListener(KeyChainEventListener listener); boolean removeCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener); boolean removeReorganizeEventListener(WalletReorganizeEventListener listener); boolean removeScriptsChangeEventListener(ScriptsChangeEventListener listener); boolean removeTransactionConfidenceEventListener(TransactionConfidenceEventListener listener); Set<Transaction> getTransactions(boolean includeDead); Iterable<WalletTransaction> getWalletTransactions(); void addWalletTransaction(WalletTransaction wtx); List<Transaction> getTransactionsByTime(); List<Transaction> getRecentTransactions(int numTransactions, boolean includeDead); @Nullable Transaction getTransaction(Sha256Hash hash); @Override Map<Sha256Hash, Transaction> getTransactionPool(Pool pool); void reset(); void clearTransactions(int fromHeight); List<TransactionOutput> getWatchedOutputs(boolean excludeImmatureCoinbases); void cleanup(); @VisibleForTesting int getPoolSize(WalletTransaction.Pool pool); @VisibleForTesting boolean poolContainsTxHash(final WalletTransaction.Pool pool, final Sha256Hash txHash); List<TransactionOutput> getUnspents(); @Override String toString(); @Deprecated String toString(boolean includePrivateKeys, boolean includeTransactions, boolean includeExtensions,
            @Nullable AbstractBlockChain chain); @Deprecated String toString(boolean includePrivateKeys, @Nullable KeyParameter aesKey, boolean includeTransactions,
            boolean includeExtensions, @Nullable AbstractBlockChain chain); String toString(boolean includeLookahead, boolean includePrivateKeys, @Nullable KeyParameter aesKey,
            boolean includeTransactions, boolean includeExtensions, @Nullable AbstractBlockChain chain); Collection<Transaction> getPendingTransactions(); @Override long getEarliestKeyCreationTime(); @Nullable Sha256Hash getLastBlockSeenHash(); void setLastBlockSeenHash(@Nullable Sha256Hash lastBlockSeenHash); void setLastBlockSeenHeight(int lastBlockSeenHeight); void setLastBlockSeenTimeSecs(long timeSecs); long getLastBlockSeenTimeSecs(); @Nullable Date getLastBlockSeenTime(); int getLastBlockSeenHeight(); int getVersion(); void setVersion(int version); void setDescription(String description); String getDescription(); Coin getBalance(); Coin getBalance(BalanceType balanceType); Coin getBalance(CoinSelector selector); ListenableFuture<Coin> getBalanceFuture(final Coin value, final BalanceType type); Coin getTotalReceived(); Coin getTotalSent(); Transaction createSend(Address address, Coin value); Transaction createSend(Address address, Coin value, boolean allowUnconfirmed); Transaction sendCoinsOffline(SendRequest request); SendResult sendCoins(TransactionBroadcaster broadcaster, Address to, Coin value); SendResult sendCoins(TransactionBroadcaster broadcaster, SendRequest request); SendResult sendCoins(SendRequest request); Transaction sendCoins(Peer peer, SendRequest request); void completeTx(SendRequest req); void signTransaction(SendRequest req); List<TransactionOutput> calculateAllSpendCandidates(); List<TransactionOutput> calculateAllSpendCandidates(boolean excludeImmatureCoinbases, boolean excludeUnsignable); boolean canSignFor(Script script); CoinSelector getCoinSelector(); @Nullable UTXOProvider getUTXOProvider(); void setUTXOProvider(@Nullable UTXOProvider provider); @Override void reorganize(StoredBlock splitPoint, List<StoredBlock> oldBlocks, List<StoredBlock> newBlocks); @Override void beginBloomFilterCalculation(); @Override @GuardedBy("keyChainGroupLock") void endBloomFilterCalculation(); @Override int getBloomFilterElementCount(); BloomFilter getBloomFilter(double falsePositiveRate); @Override @GuardedBy("keyChainGroupLock") BloomFilter getBloomFilter(int size, double falsePositiveRate, long nTweak); boolean checkForFilterExhaustion(FilteredBlock block); void addExtension(WalletExtension extension); WalletExtension addOrGetExistingExtension(WalletExtension extension); void addOrUpdateExtension(WalletExtension extension); Map<String, WalletExtension> getExtensions(); void deserializeExtension(WalletExtension extension, byte[] data); @Override void setTag(String tag, ByteString value); void setTransactionBroadcaster(@Nullable org.bitcoinj.core.TransactionBroadcaster broadcaster); void setKeyRotationTime(@Nullable Date time); void setKeyRotationTime(long unixTimeSeconds); @Nullable Date getKeyRotationTime(); boolean isKeyRotating(ECKey key); ListenableFuture<List<Transaction>> doMaintenance(@Nullable KeyParameter aesKey, boolean signAndSend); ListenableFuture<List<Transaction>> doMaintenance(KeyChainGroupStructure structure,
            @Nullable KeyParameter aesKey, boolean signAndSend); }
Wallet extends BaseTaggableObject implements NewBestBlockListener, TransactionReceivedInBlockListener, PeerFilterProvider, KeyBag, TransactionBag, ReorganizeListener { public boolean removeWatchedAddresses(final List<Address> addresses) { List<Script> scripts = new ArrayList<>(); for (Address address : addresses) { Script script = ScriptBuilder.createOutputScript(address); scripts.add(script); } return removeWatchedScripts(scripts); } @Deprecated @VisibleForTesting protected  Wallet(Context context);  Wallet(NetworkParameters params, KeyChainGroup keyChainGroup); private  Wallet(Context context, KeyChainGroup keyChainGroup); static Wallet createDeterministic(NetworkParameters params, Script.ScriptType outputScriptType); static Wallet createDeterministic(Context context, Script.ScriptType outputScriptType); static Wallet createBasic(NetworkParameters params); static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed,
            Script.ScriptType outputScriptType); static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed, Script.ScriptType outputScriptType,
            KeyChainGroupStructure structure); @Deprecated static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed); static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed, Script.ScriptType outputScriptType,
            List<ChildNumber> accountPath); @Deprecated static Wallet fromSeed(NetworkParameters params, DeterministicSeed seed, List<ChildNumber> accountPath); static Wallet fromWatchingKey(NetworkParameters params, DeterministicKey watchKey,
            Script.ScriptType outputScriptType); @Deprecated static Wallet fromWatchingKey(NetworkParameters params, DeterministicKey watchKey); static Wallet fromWatchingKeyB58(NetworkParameters params, String watchKeyB58, long creationTimeSeconds); static Wallet fromSpendingKey(NetworkParameters params, DeterministicKey spendKey,
            Script.ScriptType outputScriptType); @Deprecated static Wallet fromSpendingKey(NetworkParameters params, DeterministicKey spendKey); static Wallet fromSpendingKeyB58(NetworkParameters params, String spendingKeyB58, long creationTimeSeconds); static Wallet fromMasterKey(NetworkParameters params, DeterministicKey masterKey,
            Script.ScriptType outputScriptType, ChildNumber accountNumber); @Deprecated static Wallet fromKeys(NetworkParameters params, List<ECKey> keys); NetworkParameters getNetworkParameters(); List<DeterministicKeyChain> getActiveKeyChains(); DeterministicKeyChain getActiveKeyChain(); final void addTransactionSigner(TransactionSigner signer); List<TransactionSigner> getTransactionSigners(); DeterministicKey currentKey(KeyChain.KeyPurpose purpose); DeterministicKey currentReceiveKey(); Address currentAddress(KeyChain.KeyPurpose purpose); Address currentReceiveAddress(); DeterministicKey freshKey(KeyChain.KeyPurpose purpose); List<DeterministicKey> freshKeys(KeyChain.KeyPurpose purpose, int numberOfKeys); DeterministicKey freshReceiveKey(); Address freshAddress(KeyChain.KeyPurpose purpose); Address freshReceiveAddress(); Address freshReceiveAddress(Script.ScriptType scriptType); List<ECKey> getIssuedReceiveKeys(); List<Address> getIssuedReceiveAddresses(); @Deprecated void upgradeToDeterministic(@Nullable KeyParameter aesKey); void upgradeToDeterministic(Script.ScriptType outputScriptType, @Nullable KeyParameter aesKey); void upgradeToDeterministic(Script.ScriptType outputScriptType, KeyChainGroupStructure structure,
            @Nullable KeyParameter aesKey); @Deprecated boolean isDeterministicUpgradeRequired(); boolean isDeterministicUpgradeRequired(Script.ScriptType outputScriptType); List<Script> getWatchedScripts(); boolean removeKey(ECKey key); int getKeyChainGroupSize(); @VisibleForTesting int getKeyChainGroupCombinedKeyLookaheadEpochs(); List<ECKey> getImportedKeys(); Address currentChangeAddress(); boolean importKey(ECKey key); int importKeys(final List<ECKey> keys); int importKeysAndEncrypt(final List<ECKey> keys, CharSequence password); int importKeysAndEncrypt(final List<ECKey> keys, KeyParameter aesKey); void addAndActivateHDChain(DeterministicKeyChain chain); int getKeyChainGroupLookaheadSize(); int getKeyChainGroupLookaheadThreshold(); DeterministicKey getWatchingKey(); boolean isWatching(); boolean isAddressWatched(Address address); boolean addWatchedAddress(final Address address); boolean addWatchedAddress(final Address address, long creationTime); int addWatchedAddresses(final List<Address> addresses, long creationTime); int addWatchedScripts(final List<Script> scripts); boolean removeWatchedAddress(final Address address); boolean removeWatchedAddresses(final List<Address> addresses); boolean removeWatchedScripts(final List<Script> scripts); List<Address> getWatchedAddresses(); @Deprecated ECKey findKeyFromPubHash(byte[] pubKeyHash); @Override @Nullable ECKey findKeyFromPubKeyHash(byte[] pubKeyHash, @Nullable Script.ScriptType scriptType); boolean hasKey(ECKey key); boolean isAddressMine(Address address); @Deprecated boolean isPubKeyHashMine(byte[] pubKeyHash); @Override boolean isPubKeyHashMine(byte[] pubKeyHash, @Nullable Script.ScriptType scriptType); @Override boolean isWatchedScript(Script script); ECKey findKeyFromAddress(Address address); @Override @Nullable ECKey findKeyFromPubKey(byte[] pubKey); @Override boolean isPubKeyMine(byte[] pubKey); @Nullable @Override RedeemData findRedeemDataFromScriptHash(byte[] payToScriptHash); @Override boolean isPayToScriptHashMine(byte[] payToScriptHash); DeterministicSeed getKeyChainSeed(); DeterministicKey getKeyByPath(List<ChildNumber> path); void encrypt(CharSequence password); void encrypt(KeyCrypter keyCrypter, KeyParameter aesKey); void decrypt(CharSequence password); void decrypt(KeyParameter aesKey); boolean checkPassword(CharSequence password); boolean checkAESKey(KeyParameter aesKey); @Nullable KeyCrypter getKeyCrypter(); EncryptionType getEncryptionType(); boolean isEncrypted(); void changeEncryptionPassword(CharSequence currentPassword, CharSequence newPassword); void changeEncryptionKey(KeyCrypter keyCrypter, KeyParameter currentAesKey, KeyParameter newAesKey); List<Protos.Key> serializeKeyChainGroupToProtobuf(); void saveToFile(File temp, File destFile); void saveToFile(File f); void setAcceptRiskyTransactions(boolean acceptRiskyTransactions); boolean isAcceptRiskyTransactions(); void setRiskAnalyzer(RiskAnalysis.Analyzer analyzer); RiskAnalysis.Analyzer getRiskAnalyzer(); WalletFiles autosaveToFile(File f, long delayTime, TimeUnit timeUnit,
                                      @Nullable WalletFiles.Listener eventListener); void shutdownAutosaveAndWait(); void saveToFileStream(OutputStream f); NetworkParameters getParams(); Context getContext(); static Wallet loadFromFile(File file, @Nullable WalletExtension... walletExtensions); boolean isConsistent(); void isConsistentOrThrow(); static Wallet loadFromFileStream(InputStream stream, @Nullable WalletExtension... walletExtensions); @Override boolean notifyTransactionIsInBlock(Sha256Hash txHash, StoredBlock block,
                                              BlockChain.NewBlockType blockType,
                                              int relativityOffset); void receivePending(Transaction tx, @Nullable List<Transaction> dependencies, boolean overrideIsRelevant); boolean isTransactionRisky(Transaction tx, @Nullable List<Transaction> dependencies); void receivePending(Transaction tx, @Nullable List<Transaction> dependencies); boolean isPendingTransactionRelevant(Transaction tx); boolean isTransactionRelevant(Transaction tx); @Override void receiveFromBlock(Transaction tx, StoredBlock block,
                                 BlockChain.NewBlockType blockType,
                                 int relativityOffset); @Override void notifyNewBestBlock(StoredBlock block); boolean maybeCommitTx(Transaction tx); void commitTx(Transaction tx); void addChangeEventListener(WalletChangeEventListener listener); void addChangeEventListener(Executor executor, WalletChangeEventListener listener); void addCoinsReceivedEventListener(WalletCoinsReceivedEventListener listener); void addCoinsReceivedEventListener(Executor executor, WalletCoinsReceivedEventListener listener); void addCoinsSentEventListener(WalletCoinsSentEventListener listener); void addCoinsSentEventListener(Executor executor, WalletCoinsSentEventListener listener); void addKeyChainEventListener(KeyChainEventListener listener); void addKeyChainEventListener(Executor executor, KeyChainEventListener listener); void addCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener); void addCurrentKeyChangeEventListener(Executor executor, CurrentKeyChangeEventListener listener); void addReorganizeEventListener(WalletReorganizeEventListener listener); void addReorganizeEventListener(Executor executor, WalletReorganizeEventListener listener); void addScriptsChangeEventListener(ScriptsChangeEventListener listener); void addScriptsChangeEventListener(Executor executor, ScriptsChangeEventListener listener); void addTransactionConfidenceEventListener(TransactionConfidenceEventListener listener); void addTransactionConfidenceEventListener(Executor executor, TransactionConfidenceEventListener listener); boolean removeChangeEventListener(WalletChangeEventListener listener); boolean removeCoinsReceivedEventListener(WalletCoinsReceivedEventListener listener); boolean removeCoinsSentEventListener(WalletCoinsSentEventListener listener); boolean removeKeyChainEventListener(KeyChainEventListener listener); boolean removeCurrentKeyChangeEventListener(CurrentKeyChangeEventListener listener); boolean removeReorganizeEventListener(WalletReorganizeEventListener listener); boolean removeScriptsChangeEventListener(ScriptsChangeEventListener listener); boolean removeTransactionConfidenceEventListener(TransactionConfidenceEventListener listener); Set<Transaction> getTransactions(boolean includeDead); Iterable<WalletTransaction> getWalletTransactions(); void addWalletTransaction(WalletTransaction wtx); List<Transaction> getTransactionsByTime(); List<Transaction> getRecentTransactions(int numTransactions, boolean includeDead); @Nullable Transaction getTransaction(Sha256Hash hash); @Override Map<Sha256Hash, Transaction> getTransactionPool(Pool pool); void reset(); void clearTransactions(int fromHeight); List<TransactionOutput> getWatchedOutputs(boolean excludeImmatureCoinbases); void cleanup(); @VisibleForTesting int getPoolSize(WalletTransaction.Pool pool); @VisibleForTesting boolean poolContainsTxHash(final WalletTransaction.Pool pool, final Sha256Hash txHash); List<TransactionOutput> getUnspents(); @Override String toString(); @Deprecated String toString(boolean includePrivateKeys, boolean includeTransactions, boolean includeExtensions,
            @Nullable AbstractBlockChain chain); @Deprecated String toString(boolean includePrivateKeys, @Nullable KeyParameter aesKey, boolean includeTransactions,
            boolean includeExtensions, @Nullable AbstractBlockChain chain); String toString(boolean includeLookahead, boolean includePrivateKeys, @Nullable KeyParameter aesKey,
            boolean includeTransactions, boolean includeExtensions, @Nullable AbstractBlockChain chain); Collection<Transaction> getPendingTransactions(); @Override long getEarliestKeyCreationTime(); @Nullable Sha256Hash getLastBlockSeenHash(); void setLastBlockSeenHash(@Nullable Sha256Hash lastBlockSeenHash); void setLastBlockSeenHeight(int lastBlockSeenHeight); void setLastBlockSeenTimeSecs(long timeSecs); long getLastBlockSeenTimeSecs(); @Nullable Date getLastBlockSeenTime(); int getLastBlockSeenHeight(); int getVersion(); void setVersion(int version); void setDescription(String description); String getDescription(); Coin getBalance(); Coin getBalance(BalanceType balanceType); Coin getBalance(CoinSelector selector); ListenableFuture<Coin> getBalanceFuture(final Coin value, final BalanceType type); Coin getTotalReceived(); Coin getTotalSent(); Transaction createSend(Address address, Coin value); Transaction createSend(Address address, Coin value, boolean allowUnconfirmed); Transaction sendCoinsOffline(SendRequest request); SendResult sendCoins(TransactionBroadcaster broadcaster, Address to, Coin value); SendResult sendCoins(TransactionBroadcaster broadcaster, SendRequest request); SendResult sendCoins(SendRequest request); Transaction sendCoins(Peer peer, SendRequest request); void completeTx(SendRequest req); void signTransaction(SendRequest req); List<TransactionOutput> calculateAllSpendCandidates(); List<TransactionOutput> calculateAllSpendCandidates(boolean excludeImmatureCoinbases, boolean excludeUnsignable); boolean canSignFor(Script script); CoinSelector getCoinSelector(); @Nullable UTXOProvider getUTXOProvider(); void setUTXOProvider(@Nullable UTXOProvider provider); @Override void reorganize(StoredBlock splitPoint, List<StoredBlock> oldBlocks, List<StoredBlock> newBlocks); @Override void beginBloomFilterCalculation(); @Override @GuardedBy("keyChainGroupLock") void endBloomFilterCalculation(); @Override int getBloomFilterElementCount(); BloomFilter getBloomFilter(double falsePositiveRate); @Override @GuardedBy("keyChainGroupLock") BloomFilter getBloomFilter(int size, double falsePositiveRate, long nTweak); boolean checkForFilterExhaustion(FilteredBlock block); void addExtension(WalletExtension extension); WalletExtension addOrGetExistingExtension(WalletExtension extension); void addOrUpdateExtension(WalletExtension extension); Map<String, WalletExtension> getExtensions(); void deserializeExtension(WalletExtension extension, byte[] data); @Override void setTag(String tag, ByteString value); void setTransactionBroadcaster(@Nullable org.bitcoinj.core.TransactionBroadcaster broadcaster); void setKeyRotationTime(@Nullable Date time); void setKeyRotationTime(long unixTimeSeconds); @Nullable Date getKeyRotationTime(); boolean isKeyRotating(ECKey key); ListenableFuture<List<Transaction>> doMaintenance(@Nullable KeyParameter aesKey, boolean signAndSend); ListenableFuture<List<Transaction>> doMaintenance(KeyChainGroupStructure structure,
            @Nullable KeyParameter aesKey, boolean signAndSend);  }