optimize imports

This commit is contained in:
Andreas Schildbach 2024-05-14 19:56:51 +02:00
parent e51f1630df
commit ba60554425
49 changed files with 317 additions and 268 deletions

View File

@ -18,10 +18,11 @@
package org.bitcoinj.base; package org.bitcoinj.base;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.exceptions.AddressFormatException; import org.bitcoinj.base.exceptions.AddressFormatException;
import org.bitcoinj.base.internal.ByteUtils; import org.bitcoinj.base.internal.ByteUtils;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.crypto.ECKey;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -31,8 +32,6 @@ import java.util.EnumSet;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.bitcoinj.base.BitcoinNetwork.*;
/** /**
* <p>A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key * <p>A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key
* plus a set of network parameters. Not to be confused with a {@link org.bitcoinj.core.PeerAddress} * plus a set of network parameters. Not to be confused with a {@link org.bitcoinj.core.PeerAddress}
@ -295,9 +294,9 @@ public class LegacyAddress implements Address {
* Address header of legacy P2PKH addresses for standard Bitcoin networks. * Address header of legacy P2PKH addresses for standard Bitcoin networks.
*/ */
public enum AddressHeader { public enum AddressHeader {
X0(0, MAINNET), X0(0, BitcoinNetwork.MAINNET),
X111(111, TESTNET, REGTEST), X111(111, BitcoinNetwork.TESTNET, BitcoinNetwork.REGTEST),
X6F(0x6f, SIGNET); X6F(0x6f, BitcoinNetwork.SIGNET);
private final int headerByte; private final int headerByte;
private final EnumSet<BitcoinNetwork> networks; private final EnumSet<BitcoinNetwork> networks;
@ -327,8 +326,8 @@ public class LegacyAddress implements Address {
* Address header of legacy P2SH addresses for standard Bitcoin networks. * Address header of legacy P2SH addresses for standard Bitcoin networks.
*/ */
public enum P2SHHeader { public enum P2SHHeader {
X5(5, MAINNET), X5(5, BitcoinNetwork.MAINNET),
X196(196, TESTNET, SIGNET, REGTEST); X196(196, BitcoinNetwork.TESTNET, BitcoinNetwork.SIGNET, BitcoinNetwork.REGTEST);
private final int headerByte; private final int headerByte;
private final EnumSet<BitcoinNetwork> networks; private final EnumSet<BitcoinNetwork> networks;

View File

@ -16,10 +16,11 @@
package org.bitcoinj.base; package org.bitcoinj.base;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.exceptions.AddressFormatException; import org.bitcoinj.base.exceptions.AddressFormatException;
import org.bitcoinj.base.internal.ByteUtils; import org.bitcoinj.base.internal.ByteUtils;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.crypto.ECKey;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -30,8 +31,6 @@ import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.bitcoinj.base.BitcoinNetwork.*;
/** /**
* <p>Implementation of native segwit addresses. They are composed of two parts:</p> * <p>Implementation of native segwit addresses. They are composed of two parts:</p>
* *
@ -64,9 +63,9 @@ public class SegwitAddress implements Address {
* <a href="https://github.com/bitcoin/bitcoin/issues/12314">Bitcoin Core Issue 1234 - discussion of {@code bcrt} HRP</a> for details. * <a href="https://github.com/bitcoin/bitcoin/issues/12314">Bitcoin Core Issue 1234 - discussion of {@code bcrt} HRP</a> for details.
*/ */
public enum SegwitHrp { public enum SegwitHrp {
BC(MAINNET), BC(BitcoinNetwork.MAINNET),
TB(TESTNET, SIGNET), TB(BitcoinNetwork.TESTNET, BitcoinNetwork.SIGNET),
BCRT(REGTEST); BCRT(BitcoinNetwork.REGTEST);
private final EnumSet<BitcoinNetwork> networks; private final EnumSet<BitcoinNetwork> networks;

View File

@ -26,7 +26,8 @@ import org.junit.runner.RunWith;
import java.time.Instant; import java.time.Instant;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@RunWith(JUnitParamsRunner.class) @RunWith(JUnitParamsRunner.class)
public class LockTimeTest { public class LockTimeTest {

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
import org.bitcoinj.base.BitcoinNetwork
import org.bitcoinj.base.Address import org.bitcoinj.base.Address
import org.bitcoinj.base.Coin
import org.bitcoinj.base.AddressParser import org.bitcoinj.base.AddressParser
import org.bitcoinj.base.BitcoinNetwork
import org.bitcoinj.base.Coin
import org.bitcoinj.core.Context import org.bitcoinj.core.Context
import org.bitcoinj.core.Transaction import org.bitcoinj.core.Transaction
import org.bitcoinj.core.TransactionBroadcast import org.bitcoinj.core.TransactionBroadcast

View File

@ -18,7 +18,8 @@ package org.bitcoinj.examples;
import org.bitcoinj.base.Address; import org.bitcoinj.base.Address;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.core.*; import org.bitcoinj.core.Peer;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.kits.WalletAppKit;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import org.bitcoinj.utils.Threading; import org.bitcoinj.utils.Threading;
@ -26,7 +27,9 @@ import org.bitcoinj.wallet.Wallet;
import java.io.File; import java.io.File;
import static org.bitcoinj.base.Coin.*; import static org.bitcoinj.base.Coin.CENT;
import static org.bitcoinj.base.Coin.COIN;
import static org.bitcoinj.base.Coin.SATOSHI;
/** /**
* This is a little test app that waits for a coin on a local regtest node, then generates two transactions that double * This is a little test app that waits for a coin on a local regtest node, then generates two transactions that double

View File

@ -16,10 +16,10 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import java.io.File;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
import java.io.File;
/** /**
* DumpWallet loads a serialized wallet and prints information about what it contains. * DumpWallet loads a serialized wallet and prints information about what it contains.
*/ */

View File

@ -20,14 +20,18 @@ package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.base.Sha256Hash; import org.bitcoinj.base.Sha256Hash;
import org.bitcoinj.core.*; import org.bitcoinj.core.Block;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.net.discovery.DnsDiscovery; import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.MemoryBlockStore; import org.bitcoinj.store.MemoryBlockStore;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import picocli.CommandLine; import picocli.CommandLine;
import java.net.InetAddress;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.Future; import java.util.concurrent.Future;

View File

@ -20,12 +20,16 @@ package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.base.Sha256Hash; import org.bitcoinj.base.Sha256Hash;
import org.bitcoinj.core.*; import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.MemoryBlockStore; import org.bitcoinj.store.MemoryBlockStore;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import java.net.InetAddress;
import java.util.List; import java.util.List;
import java.util.concurrent.Future; import java.util.concurrent.Future;

View File

@ -16,16 +16,15 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Address; import org.bitcoinj.base.Address;
import org.bitcoinj.base.Coin;
import org.bitcoinj.base.AddressParser; import org.bitcoinj.base.AddressParser;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.Context; import org.bitcoinj.core.Context;
import org.bitcoinj.core.Transaction; import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionBroadcast; import org.bitcoinj.core.TransactionBroadcast;
import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.kits.WalletAppKit;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import org.bitcoinj.wallet.CoinSelection;
import org.bitcoinj.wallet.CoinSelector; import org.bitcoinj.wallet.CoinSelector;
import org.bitcoinj.wallet.SendRequest; import org.bitcoinj.wallet.SendRequest;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
@ -36,9 +35,6 @@ import java.io.File;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toList;
/** /**
* ForwardingService demonstrates basic usage of bitcoinj. It creates an SPV Wallet, listens on the network * ForwardingService demonstrates basic usage of bitcoinj. It creates an SPV Wallet, listens on the network
* and when it receives coins, simply sends them onwards to the address given on the command line. * and when it receives coins, simply sends them onwards to the address given on the command line.

View File

@ -17,6 +17,27 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin;
import org.bitcoinj.base.Network;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.base.internal.ByteUtils;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionInput;
import org.bitcoinj.core.TransactionOutput;
import org.bitcoinj.core.VerificationException;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.crypto.SignatureDecodeException;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.script.ScriptChunk;
import org.bitcoinj.script.ScriptException;
import org.bitcoinj.signers.LocalTransactionSigner;
import org.bitcoinj.signers.TransactionSigner.ProposedTransaction;
import org.bitcoinj.wallet.KeyBag;
import org.bitcoinj.wallet.RedeemData;
import java.io.IOException; import java.io.IOException;
import java.math.BigInteger; import java.math.BigInteger;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
@ -24,28 +45,7 @@ import java.security.SecureRandom;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Objects; import java.util.Objects;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.base.internal.ByteUtils;
import org.bitcoinj.base.Coin;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.crypto.SignatureDecodeException;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionInput;
import org.bitcoinj.core.TransactionOutput;
import org.bitcoinj.core.VerificationException;
import org.bitcoinj.crypto.TransactionSignature;
import org.bitcoinj.script.Script;
import org.bitcoinj.script.ScriptBuilder;
import org.bitcoinj.script.ScriptChunk;
import org.bitcoinj.script.ScriptException;
import static org.bitcoinj.script.ScriptOpCodes.getOpCodeName; import static org.bitcoinj.script.ScriptOpCodes.getOpCodeName;
import org.bitcoinj.signers.LocalTransactionSigner;
import org.bitcoinj.signers.TransactionSigner.ProposedTransaction;
import org.bitcoinj.wallet.KeyBag;
import org.bitcoinj.wallet.RedeemData;
/** /**
* Test case generator for transactions with low-S and high-S signatures, to * Test case generator for transactions with low-S and high-S signatures, to

View File

@ -17,7 +17,7 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.core.*; import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.kits.WalletAppKit;
import java.io.File; import java.io.File;

View File

@ -18,20 +18,31 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.core.AddressMessage; import org.bitcoinj.core.AddressMessage;
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.Peer; import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress; import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.PeerGroup; import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.net.discovery.DnsDiscovery; import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import javax.swing.*; import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTable;
import javax.swing.SpinnerNumberModel;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import javax.swing.table.AbstractTableModel; import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumnModel; import javax.swing.table.TableColumnModel;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.event.WindowAdapter; import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.time.Duration; import java.time.Duration;

View File

@ -22,9 +22,9 @@ import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Peer; import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress; import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.VersionMessage; import org.bitcoinj.core.VersionMessage;
import org.bitcoinj.net.NioClientManager;
import org.bitcoinj.net.discovery.DnsDiscovery; import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.net.discovery.PeerDiscoveryException; import org.bitcoinj.net.discovery.PeerDiscoveryException;
import org.bitcoinj.net.NioClientManager;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import java.net.InetAddress; import java.net.InetAddress;

View File

@ -17,22 +17,21 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.Base58;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.base.ScriptType; import org.bitcoinj.base.ScriptType;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.Base58;
import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.BlockChain;
import org.bitcoinj.crypto.DumpedPrivateKey;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.PeerAddress; import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.PeerGroup; import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.crypto.DumpedPrivateKey;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.store.MemoryBlockStore; import org.bitcoinj.store.MemoryBlockStore;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
import java.math.BigInteger; import java.math.BigInteger;
import java.net.InetAddress;
/** /**
* This example shows how to solve the challenge Hal posted here:<p> * This example shows how to solve the challenge Hal posted here:<p>

View File

@ -20,7 +20,10 @@ package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin; import org.bitcoinj.base.Coin;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.core.*; import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.MemoryBlockStore; import org.bitcoinj.store.MemoryBlockStore;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;

View File

@ -19,12 +19,13 @@ package org.bitcoinj.examples;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.base.ScriptType; import org.bitcoinj.base.ScriptType;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.core.listeners.DownloadProgressTracker; import org.bitcoinj.core.listeners.DownloadProgressTracker;
import org.bitcoinj.core.*;
import org.bitcoinj.net.discovery.DnsDiscovery; import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.store.SPVBlockStore; import org.bitcoinj.store.SPVBlockStore;
import org.bitcoinj.wallet.DeterministicSeed; import org.bitcoinj.wallet.DeterministicSeed;
import org.bitcoinj.wallet.KeyChainGroupStructure;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
import java.io.File; import java.io.File;

View File

@ -19,7 +19,7 @@ package org.bitcoinj.examples;
import org.bitcoinj.base.Address; import org.bitcoinj.base.Address;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin; import org.bitcoinj.base.Coin;
import org.bitcoinj.core.*; import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.kits.WalletAppKit;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.Wallet.BalanceType; import org.bitcoinj.wallet.Wallet.BalanceType;

View File

@ -29,7 +29,6 @@ import org.bitcoinj.testing.InboundMessageQueuer;
import org.bitcoinj.testing.TestWithNetworkConnections; import org.bitcoinj.testing.TestWithNetworkConnections;
import org.bitcoinj.utils.Threading; import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
import org.checkerframework.checker.units.qual.A;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;

View File

@ -16,9 +16,9 @@
package org.bitcoinj.examples; package org.bitcoinj.examples;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.ScriptType; import org.bitcoinj.base.ScriptType;
import org.bitcoinj.base.Address;
import org.bitcoinj.core.Context; import org.bitcoinj.core.Context;
import org.bitcoinj.crypto.ECKey; import org.bitcoinj.crypto.ECKey;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;

View File

@ -17,10 +17,10 @@
package org.bitcoinj.testing; package org.bitcoinj.testing;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.base.Address; import org.bitcoinj.base.Address;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.base.Coin; import org.bitcoinj.base.Coin;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.Context; import org.bitcoinj.core.Context;
import org.bitcoinj.core.Message; import org.bitcoinj.core.Message;
import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.NetworkParameters;

View File

@ -16,12 +16,11 @@
package org.bitcoinj.wallet; package org.bitcoinj.wallet;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.base.ScriptType; import org.bitcoinj.base.ScriptType;
import org.bitcoinj.core.Context; import org.bitcoinj.core.Context;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.crypto.HDPath; import org.bitcoinj.crypto.HDPath;
import org.bitcoinj.base.BitcoinNetwork;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.ParameterizedTest;
@ -33,12 +32,12 @@ import java.io.IOException;
import java.time.Instant; import java.time.Instant;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.bitcoinj.base.ScriptType.P2PKH;
import static org.bitcoinj.base.ScriptType.P2WPKH;
import static org.bitcoinj.base.BitcoinNetwork.MAINNET; import static org.bitcoinj.base.BitcoinNetwork.MAINNET;
import static org.bitcoinj.base.BitcoinNetwork.TESTNET; import static org.bitcoinj.base.BitcoinNetwork.TESTNET;
import static org.bitcoinj.wallet.KeyChainGroupStructure.BIP43; import static org.bitcoinj.base.ScriptType.P2PKH;
import static org.bitcoinj.base.ScriptType.P2WPKH;
import static org.bitcoinj.wallet.KeyChainGroupStructure.BIP32; import static org.bitcoinj.wallet.KeyChainGroupStructure.BIP32;
import static org.bitcoinj.wallet.KeyChainGroupStructure.BIP43;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
/** /**

View File

@ -1,5 +1,4 @@
import org.gradle.util.GradleVersion import org.gradle.util.GradleVersion
import org.gradle.api.GradleScriptException
// Minimum Gradle version for build // Minimum Gradle version for build
def minGradleVersion = GradleVersion.version("4.4") def minGradleVersion = GradleVersion.version("4.4")

View File

@ -18,8 +18,19 @@ package org.bitcoinj.tools;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.core.*; import org.bitcoinj.core.AbstractBlockChain;
import org.bitcoinj.store.*; import org.bitcoinj.core.Block;
import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.FullPrunedBlockChain;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.PrunedException;
import org.bitcoinj.core.VerificationException;
import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.store.FullPrunedBlockStore;
import org.bitcoinj.store.MemoryBlockStore;
import org.bitcoinj.store.MemoryFullPrunedBlockStore;
import org.bitcoinj.store.SPVBlockStore;
import org.bitcoinj.utils.BlockFileLoader; import org.bitcoinj.utils.BlockFileLoader;
import java.io.File; import java.io.File;

View File

@ -18,9 +18,15 @@
package org.bitcoinj.tools; package org.bitcoinj.tools;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Sha256Hash;
import org.bitcoinj.base.internal.TimeUtils; import org.bitcoinj.base.internal.TimeUtils;
import org.bitcoinj.core.*; import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.CheckpointManager;
import org.bitcoinj.core.Context;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.core.StoredBlock;
import org.bitcoinj.net.discovery.DnsDiscovery; import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.MemoryBlockStore; import org.bitcoinj.store.MemoryBlockStore;
@ -28,7 +34,6 @@ import org.bitcoinj.utils.BriefLogFormatter;
import org.bitcoinj.utils.Threading; import org.bitcoinj.utils.Threading;
import picocli.CommandLine; import picocli.CommandLine;
import java.io.DataOutputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -41,8 +46,6 @@ import java.net.UnknownHostException;
import java.nio.Buffer; import java.nio.Buffer;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
import java.time.Instant; import java.time.Instant;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.List; import java.util.List;

View File

@ -18,12 +18,12 @@ package org.bitcoinj.tools;
import org.bitcoinj.base.internal.TimeUtils; import org.bitcoinj.base.internal.TimeUtils;
import org.bitcoinj.crypto.TrustStoreLoader; import org.bitcoinj.crypto.TrustStoreLoader;
import org.bitcoinj.protobuf.payments.Protos;
import org.bitcoinj.protocols.payments.PaymentProtocol; import org.bitcoinj.protocols.payments.PaymentProtocol;
import org.bitcoinj.protocols.payments.PaymentProtocolException; import org.bitcoinj.protocols.payments.PaymentProtocolException;
import org.bitcoinj.protocols.payments.PaymentSession; import org.bitcoinj.protocols.payments.PaymentSession;
import org.bitcoinj.uri.BitcoinURI; import org.bitcoinj.uri.BitcoinURI;
import org.bitcoinj.uri.BitcoinURIParseException; import org.bitcoinj.uri.BitcoinURIParseException;
import org.bitcoinj.protobuf.payments.Protos;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
@ -33,7 +33,6 @@ import java.net.URISyntaxException;
import java.security.KeyStoreException; import java.security.KeyStoreException;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import java.time.Instant; import java.time.Instant;
import java.util.Date;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import static java.lang.String.format; import static java.lang.String.format;

View File

@ -19,9 +19,8 @@ package org.bitcoinj.tools;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin; import org.bitcoinj.base.Coin;
import org.bitcoinj.base.ScriptType; import org.bitcoinj.base.ScriptType;
import org.bitcoinj.core.*; import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.listeners.PeerConnectedEventListener; import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.listeners.PeerDisconnectedEventListener;
import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.kits.WalletAppKit;
import org.bitcoinj.utils.BriefLogFormatter; import org.bitcoinj.utils.BriefLogFormatter;
import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.wallet.KeyChainGroupStructure;

View File

@ -17,18 +17,9 @@
package org.bitcoinj.tools; package org.bitcoinj.tools;
import java.time.Duration;
import java.time.Instant;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bitcoinj.base.BitcoinNetwork; import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network; import org.bitcoinj.base.Network;
import org.bitcoinj.base.internal.TimeUtils; import org.bitcoinj.base.internal.TimeUtils;
import org.bitcoinj.core.listeners.*;
import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerGroup; import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.core.Transaction; import org.bitcoinj.core.Transaction;
import org.bitcoinj.net.discovery.DnsDiscovery; import org.bitcoinj.net.discovery.DnsDiscovery;
@ -38,6 +29,13 @@ import org.bitcoinj.wallet.RiskAnalysis.Result;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.time.Duration;
import java.time.Instant;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WatchMempool { public class WatchMempool {
private static final Logger log = LoggerFactory.getLogger(WatchMempool.class); private static final Logger log = LoggerFactory.getLogger(WatchMempool.class);
private static final Network NETWORK = BitcoinNetwork.MAINNET; private static final Network NETWORK = BitcoinNetwork.MAINNET;

View File

@ -17,6 +17,7 @@
package org.bitcoinj.walletfx.application; package org.bitcoinj.walletfx.application;
import com.google.common.util.concurrent.Service; import com.google.common.util.concurrent.Service;
import jakarta.annotation.Nullable;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.scene.input.KeyCombination; import javafx.scene.input.KeyCombination;
import javafx.stage.Stage; import javafx.stage.Stage;
@ -34,7 +35,6 @@ import org.bitcoinj.wallet.KeyChainGroupStructure;
import org.bitcoinj.walletfx.utils.GuiUtils; import org.bitcoinj.walletfx.utils.GuiUtils;
import wallettemplate.WalletSetPasswordController; import wallettemplate.WalletSetPasswordController;
import jakarta.annotation.Nullable;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

View File

@ -16,11 +16,10 @@
package org.bitcoinj.walletfx.controls; package org.bitcoinj.walletfx.controls;
import org.bitcoinj.base.exceptions.AddressFormatException;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import org.bitcoinj.base.AddressParser; import org.bitcoinj.base.AddressParser;
import org.bitcoinj.base.exceptions.AddressFormatException;
import org.bitcoinj.walletfx.utils.TextFieldValidator; import org.bitcoinj.walletfx.utils.TextFieldValidator;
/** /**

View File

@ -16,10 +16,8 @@
package org.bitcoinj.walletfx.controls; package org.bitcoinj.walletfx.controls;
import java.awt.Desktop; import de.jensd.fx.fontawesome.AwesomeDude;
import java.io.IOException; import de.jensd.fx.fontawesome.AwesomeIcon;
import java.net.URI;
import javafx.beans.binding.StringExpression; import javafx.beans.binding.StringExpression;
import javafx.beans.property.ObjectProperty; import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleObjectProperty;
@ -38,17 +36,16 @@ import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import org.bitcoinj.base.Address; import org.bitcoinj.base.Address;
import org.bitcoinj.uri.BitcoinURI; import org.bitcoinj.uri.BitcoinURI;
import org.bitcoinj.walletfx.overlay.OverlayController; import org.bitcoinj.walletfx.overlay.OverlayController;
import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController; import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController;
import org.bitcoinj.walletfx.utils.GuiUtils; import org.bitcoinj.walletfx.utils.GuiUtils;
import org.bitcoinj.walletfx.utils.QRCodeImages; import org.bitcoinj.walletfx.utils.QRCodeImages;
import de.jensd.fx.fontawesome.AwesomeDude; import java.awt.Desktop;
import de.jensd.fx.fontawesome.AwesomeIcon; import java.io.IOException;
import java.net.URI;
import static javafx.beans.binding.Bindings.convert; import static javafx.beans.binding.Bindings.convert;

View File

@ -16,6 +16,7 @@
package org.bitcoinj.walletfx.controls; package org.bitcoinj.walletfx.controls;
import jakarta.annotation.Nullable;
import javafx.animation.Interpolator; import javafx.animation.Interpolator;
import javafx.animation.KeyFrame; import javafx.animation.KeyFrame;
import javafx.animation.KeyValue; import javafx.animation.KeyValue;
@ -36,8 +37,6 @@ import org.bitcoinj.walletfx.utils.GuiUtils;
import org.bitcoinj.walletfx.utils.easing.EasingMode; import org.bitcoinj.walletfx.utils.easing.EasingMode;
import org.bitcoinj.walletfx.utils.easing.ElasticInterpolator; import org.bitcoinj.walletfx.utils.easing.ElasticInterpolator;
import jakarta.annotation.Nullable;
/** /**
* Wraps the given Node in a BorderPane and allows a thin bar to slide in from the bottom or top, squeezing the content * Wraps the given Node in a BorderPane and allows a thin bar to slide in from the bottom or top, squeezing the content
* node. The API allows different "items" to be added/removed and they will be displayed one at a time, fading between * node. The API allows different "items" to be added/removed and they will be displayed one at a time, fading between

View File

@ -15,14 +15,13 @@
*/ */
package org.bitcoinj.walletfx.overlay; package org.bitcoinj.walletfx.overlay;
import jakarta.annotation.Nullable;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane; import javafx.scene.layout.StackPane;
import org.bitcoinj.walletfx.utils.GuiUtils; import org.bitcoinj.walletfx.utils.GuiUtils;
import jakarta.annotation.Nullable;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;

View File

@ -16,18 +16,17 @@
package org.bitcoinj.walletfx.utils; package org.bitcoinj.walletfx.utils;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.listeners.DownloadProgressTracker;
import org.bitcoinj.wallet.Wallet;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.beans.property.ReadOnlyDoubleProperty; import javafx.beans.property.ReadOnlyDoubleProperty;
import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleObjectProperty;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.listeners.DownloadProgressTracker;
import org.bitcoinj.wallet.Wallet;
import java.time.Instant; import java.time.Instant;
import java.util.Date;
/** /**
* A class that exposes relevant bitcoin stuff as JavaFX bindable properties. * A class that exposes relevant bitcoin stuff as JavaFX bindable properties.

View File

@ -16,7 +16,12 @@
package org.bitcoinj.walletfx.utils; package org.bitcoinj.walletfx.utils;
import javafx.animation.*; import javafx.animation.Animation;
import javafx.animation.FadeTransition;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.ScaleTransition;
import javafx.animation.Timeline;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Node; import javafx.scene.Node;

View File

@ -16,14 +16,14 @@
package org.bitcoinj.walletfx.utils; package org.bitcoinj.walletfx.utils;
import org.bitcoinj.crypto.AesKey; import jakarta.annotation.Nullable;
import org.bitcoinj.crypto.KeyCrypterScrypt;
import javafx.beans.property.ReadOnlyDoubleProperty; import javafx.beans.property.ReadOnlyDoubleProperty;
import javafx.concurrent.Task; import javafx.concurrent.Task;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.KeyCrypterScrypt;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import jakarta.annotation.Nullable;
import java.time.Duration; import java.time.Duration;
import static org.bitcoinj.walletfx.utils.GuiUtils.checkGuiThread; import static org.bitcoinj.walletfx.utils.GuiUtils.checkGuiThread;

View File

@ -16,30 +16,30 @@
package wallettemplate; package wallettemplate;
import javafx.beans.binding.Binding;
import javafx.beans.binding.Bindings;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.input.KeyCombination;
import javafx.scene.layout.Pane;
import org.bitcoinj.core.listeners.DownloadProgressTracker;
import org.bitcoinj.base.Coin;
import org.bitcoinj.base.utils.MonetaryFormat;
import javafx.animation.FadeTransition; import javafx.animation.FadeTransition;
import javafx.animation.ParallelTransition; import javafx.animation.ParallelTransition;
import javafx.animation.TranslateTransition; import javafx.animation.TranslateTransition;
import javafx.beans.binding.Binding;
import javafx.beans.binding.Bindings;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.input.KeyCombination;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.util.Duration; import javafx.util.Duration;
import org.bitcoinj.base.Coin;
import org.bitcoinj.base.utils.MonetaryFormat;
import org.bitcoinj.core.listeners.DownloadProgressTracker;
import org.bitcoinj.walletfx.application.MainWindowController; import org.bitcoinj.walletfx.application.MainWindowController;
import org.bitcoinj.walletfx.application.WalletApplication; import org.bitcoinj.walletfx.application.WalletApplication;
import org.bitcoinj.walletfx.utils.GuiUtils;
import org.bitcoinj.walletfx.utils.TextFieldValidator;
import org.bitcoinj.walletfx.controls.ClickableBitcoinAddress; import org.bitcoinj.walletfx.controls.ClickableBitcoinAddress;
import org.bitcoinj.walletfx.controls.NotificationBarPane; import org.bitcoinj.walletfx.controls.NotificationBarPane;
import org.bitcoinj.walletfx.utils.BitcoinUIModel; import org.bitcoinj.walletfx.utils.BitcoinUIModel;
import org.bitcoinj.walletfx.utils.GuiUtils;
import org.bitcoinj.walletfx.utils.TextFieldValidator;
import org.bitcoinj.walletfx.utils.easing.EasingMode; import org.bitcoinj.walletfx.utils.easing.EasingMode;
import org.bitcoinj.walletfx.utils.easing.ElasticInterpolator; import org.bitcoinj.walletfx.utils.easing.ElasticInterpolator;

View File

@ -17,28 +17,30 @@
package wallettemplate; package wallettemplate;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.scene.layout.HBox;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.Coin;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.core.*;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.wallet.SendRequest;
import org.bitcoinj.wallet.Wallet;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
import org.bitcoinj.base.Address;
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.core.TransactionConfidence;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.wallet.SendRequest;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.walletfx.application.WalletApplication; import org.bitcoinj.walletfx.application.WalletApplication;
import org.bitcoinj.walletfx.controls.BitcoinAddressValidator;
import org.bitcoinj.walletfx.overlay.OverlayController; import org.bitcoinj.walletfx.overlay.OverlayController;
import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController; import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController;
import org.bitcoinj.walletfx.controls.BitcoinAddressValidator;
import org.bitcoinj.walletfx.utils.TextFieldValidator; import org.bitcoinj.walletfx.utils.TextFieldValidator;
import org.bitcoinj.walletfx.utils.WTUtils; import org.bitcoinj.walletfx.utils.WTUtils;
import static org.bitcoinj.base.internal.Preconditions.checkState; import static org.bitcoinj.base.internal.Preconditions.checkState;
import static org.bitcoinj.walletfx.utils.GuiUtils.*; import static org.bitcoinj.walletfx.utils.GuiUtils.checkGuiThread;
import static org.bitcoinj.walletfx.utils.GuiUtils.crashAlert;
import static org.bitcoinj.walletfx.utils.GuiUtils.informationalAlert;
public class SendMoneyController implements OverlayController<SendMoneyController> { public class SendMoneyController implements OverlayController<SendMoneyController> {
public Button sendBtn; public Button sendBtn;

View File

@ -16,10 +16,8 @@
package wallettemplate; package wallettemplate;
import javafx.application.Platform;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.KeyCrypterScrypt;
import com.google.protobuf.ByteString; import com.google.protobuf.ByteString;
import javafx.application.Platform;
import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleObjectProperty;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
@ -30,18 +28,23 @@ import javafx.scene.control.ProgressIndicator;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.KeyCrypterScrypt;
import org.bitcoinj.walletfx.application.WalletApplication; import org.bitcoinj.walletfx.application.WalletApplication;
import org.bitcoinj.walletfx.overlay.OverlayController; import org.bitcoinj.walletfx.overlay.OverlayController;
import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController; import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController;
import org.bitcoinj.walletfx.utils.KeyDerivationTasks;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.bitcoinj.walletfx.utils.KeyDerivationTasks;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.time.Duration; import java.time.Duration;
import java.util.Objects; import java.util.Objects;
import static org.bitcoinj.walletfx.utils.GuiUtils.*; import static org.bitcoinj.walletfx.utils.GuiUtils.checkGuiThread;
import static org.bitcoinj.walletfx.utils.GuiUtils.fadeIn;
import static org.bitcoinj.walletfx.utils.GuiUtils.fadeOut;
import static org.bitcoinj.walletfx.utils.GuiUtils.informationalAlert;
/** /**
* User interface for entering a password on demand, e.g. to send money. Also used when encrypting a wallet. Shows a * User interface for entering a password on demand, e.g. to send money. Also used when encrypting a wallet. Shows a

View File

@ -16,25 +16,30 @@
package wallettemplate; package wallettemplate;
import javafx.event.*; import com.google.protobuf.ByteString;
import javafx.fxml.*; import javafx.event.ActionEvent;
import javafx.scene.control.*; import javafx.fxml.FXML;
import javafx.scene.layout.*; import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.layout.GridPane;
import org.bitcoinj.crypto.AesKey; import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.*; import org.bitcoinj.crypto.KeyCrypterScrypt;
import org.bitcoinj.protobuf.wallet.Protos; import org.bitcoinj.protobuf.wallet.Protos;
import org.bitcoinj.walletfx.application.WalletApplication; import org.bitcoinj.walletfx.application.WalletApplication;
import org.bitcoinj.walletfx.overlay.OverlayController; import org.bitcoinj.walletfx.overlay.OverlayController;
import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController; import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController;
import org.slf4j.*; import org.bitcoinj.walletfx.utils.KeyDerivationTasks;
import org.slf4j.Logger;
import com.google.protobuf.ByteString; import org.slf4j.LoggerFactory;
import java.time.Duration; import java.time.Duration;
import java.util.concurrent.*; import java.util.concurrent.CompletableFuture;
import org.bitcoinj.walletfx.utils.KeyDerivationTasks; import static org.bitcoinj.walletfx.utils.GuiUtils.fadeIn;
import static org.bitcoinj.walletfx.utils.GuiUtils.*; import static org.bitcoinj.walletfx.utils.GuiUtils.fadeOut;
import static org.bitcoinj.walletfx.utils.GuiUtils.informationalAlert;
public class WalletSetPasswordController implements OverlayController<WalletSetPasswordController> { public class WalletSetPasswordController implements OverlayController<WalletSetPasswordController> {
private static final Logger log = LoggerFactory.getLogger(WalletSetPasswordController.class); private static final Logger log = LoggerFactory.getLogger(WalletSetPasswordController.class);

View File

@ -16,11 +16,8 @@
package wallettemplate; package wallettemplate;
import org.bitcoinj.base.internal.InternalUtils;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.wallet.DeterministicSeed;
import com.google.common.util.concurrent.Service; import com.google.common.util.concurrent.Service;
import jakarta.annotation.Nullable;
import javafx.application.Platform; import javafx.application.Platform;
import javafx.beans.binding.BooleanBinding; import javafx.beans.binding.BooleanBinding;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
@ -28,14 +25,17 @@ import javafx.fxml.FXML;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.DatePicker; import javafx.scene.control.DatePicker;
import javafx.scene.control.TextArea; import javafx.scene.control.TextArea;
import org.bitcoinj.base.internal.InternalUtils;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.wallet.DeterministicSeed;
import org.bitcoinj.walletfx.application.WalletApplication; import org.bitcoinj.walletfx.application.WalletApplication;
import org.bitcoinj.walletfx.overlay.OverlayController; import org.bitcoinj.walletfx.overlay.OverlayController;
import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController; import org.bitcoinj.walletfx.overlay.OverlayableStackPaneController;
import org.bitcoinj.walletfx.utils.TextFieldValidator;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.bitcoinj.walletfx.utils.TextFieldValidator;
import jakarta.annotation.Nullable;
import java.time.Instant; import java.time.Instant;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId; import java.time.ZoneId;
@ -43,7 +43,10 @@ import java.time.ZoneOffset;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import static javafx.beans.binding.Bindings.*; import static javafx.beans.binding.Bindings.createBooleanBinding;
import static javafx.beans.binding.Bindings.equal;
import static javafx.beans.binding.Bindings.not;
import static javafx.beans.binding.Bindings.or;
import static org.bitcoinj.walletfx.utils.GuiUtils.checkGuiThread; import static org.bitcoinj.walletfx.utils.GuiUtils.checkGuiThread;
import static org.bitcoinj.walletfx.utils.GuiUtils.informationalAlert; import static org.bitcoinj.walletfx.utils.GuiUtils.informationalAlert;
import static org.bitcoinj.walletfx.utils.WTUtils.didThrow; import static org.bitcoinj.walletfx.utils.WTUtils.didThrow;

View File

@ -1,14 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?> <?import javafx.scene.control.ContextMenu?>
<?import java.util.*?> <?import javafx.scene.control.Label?>
<?import javafx.geometry.*?> <?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.*?> <?import javafx.scene.input.KeyCodeCombination?>
<?import javafx.scene.image.*?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.input.*?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<fx:root type="javafx.scene.layout.AnchorPane" prefWidth="441.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2"> <fx:root type="javafx.scene.layout.AnchorPane" prefWidth="441.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2">
<children> <children>
<HBox id="addressLabelBox" fx:id="box" alignment="CENTER_LEFT" layoutX="0.0" layoutY="0.0" prefHeight="21.0" prefWidth="391.0" spacing="10.0"> <HBox id="addressLabelBox" fx:id="box" alignment="CENTER_LEFT" layoutX="0.0" layoutY="0.0" prefHeight="21.0" prefWidth="391.0" spacing="10.0">

View File

@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?> <?import javafx.geometry.Insets?>
<?import java.util.*?> <?import javafx.scene.control.Button?>
<?import javafx.geometry.*?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.*?> <?import javafx.scene.image.Image?>
<?import javafx.scene.image.*?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.paint.*?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.text.*?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<GridPane hgap="14.0" maxHeight="+Infinity" maxWidth="+Infinity" minHeight="-Infinity" minWidth="-Infinity" vgap="20.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="org.bitcoinj.walletfx.utils.AlertWindowController"> <GridPane hgap="14.0" maxHeight="+Infinity" maxWidth="+Infinity" minHeight="-Infinity" minWidth="-Infinity" vgap="20.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="org.bitcoinj.walletfx.utils.AlertWindowController">
<children> <children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="TOP"> <ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true" GridPane.columnIndex="0" GridPane.halignment="CENTER" GridPane.rowIndex="0" GridPane.valignment="TOP">

View File

@ -2,18 +2,19 @@
<?scenebuilder-classpath-element ../../../../target/classes?> <?scenebuilder-classpath-element ../../../../target/classes?>
<?scenebuilder-classpath-element ../../../../../core/target/bitcoinj-0.12-SNAPSHOT.jar?> <?scenebuilder-classpath-element ../../../../../core/target/bitcoinj-0.12-SNAPSHOT.jar?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.input.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.text.*?>
<?import org.bitcoinj.walletfx.controls.*?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.effect.BoxBlur?>
<?import javafx.scene.effect.ColorAdjust?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.paint.Color?>
<?import javafx.scene.text.Font?>
<?import org.bitcoinj.walletfx.controls.ClickableBitcoinAddress?>
<AnchorPane maxHeight="Infinity" maxWidth="Infinity" minHeight="200.0" minWidth="300.0" prefHeight="451.0" prefWidth="800.0" styleClass="root-pane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.MainController"> <AnchorPane maxHeight="Infinity" maxWidth="Infinity" minHeight="200.0" minWidth="300.0" prefHeight="451.0" prefWidth="800.0" styleClass="root-pane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.MainController">
<children> <children>
<Label layoutX="14.0" layoutY="14.0" text="Balance"> <Label layoutX="14.0" layoutY="14.0" text="Balance">

View File

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?> <?import javafx.geometry.Insets?>
<?import javafx.geometry.*?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.Label?>
<?import javafx.scene.effect.*?> <?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.*?> <?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.text.*?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.SendMoneyController"> <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.SendMoneyController">
<children> <children>
<VBox alignment="CENTER_LEFT" layoutY="100.0" prefHeight="200.0" prefWidth="600.0" spacing="20.0" style="-fx-background-color: white;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"> <VBox alignment="CENTER_LEFT" layoutY="100.0" prefHeight="200.0" prefWidth="600.0" spacing="20.0" style="-fx-background-color: white;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">

View File

@ -1,15 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.*?> <?import javafx.geometry.Insets?>
<?import java.lang.*?> <?import javafx.scene.control.Button?>
<?import java.util.*?> <?import javafx.scene.control.Label?>
<?import javafx.geometry.*?> <?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.ProgressIndicator?>
<?import javafx.scene.effect.*?> <?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.layout.*?> <?import javafx.scene.image.Image?>
<?import javafx.scene.paint.*?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.text.*?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?>
<StackPane maxHeight="Infinity" maxWidth="Infinity" prefHeight="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.WalletPasswordController"> <StackPane maxHeight="Infinity" maxWidth="Infinity" prefHeight="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.WalletPasswordController">
<children> <children>
<AnchorPane maxHeight="400.0" maxWidth="600.0" styleClass="root-pane"> <AnchorPane maxHeight="400.0" maxWidth="600.0" styleClass="root-pane">

View File

@ -1,15 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.*?> <?import javafx.geometry.Insets?>
<?import java.lang.*?> <?import javafx.scene.control.Button?>
<?import java.util.*?> <?import javafx.scene.control.Label?>
<?import javafx.geometry.*?> <?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.ProgressIndicator?>
<?import javafx.scene.effect.*?> <?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.layout.*?> <?import javafx.scene.image.Image?>
<?import javafx.scene.paint.*?> <?import javafx.scene.image.ImageView?>
<?import javafx.scene.text.*?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?>
<StackPane maxHeight="Infinity" maxWidth="Infinity" prefHeight="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.WalletSetPasswordController"> <StackPane maxHeight="Infinity" maxWidth="Infinity" prefHeight="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.WalletSetPasswordController">
<children> <children>
<AnchorPane maxHeight="400.0" maxWidth="600.0" styleClass="root-pane"> <AnchorPane maxHeight="400.0" maxWidth="600.0" styleClass="root-pane">

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?> <?import javafx.geometry.Insets?>
<?import java.util.*?> <?import javafx.scene.control.Button?>
<?import javafx.geometry.*?> <?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.Label?>
<?import javafx.scene.effect.*?> <?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.*?> <?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.paint.*?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.*?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?>
<StackPane maxHeight="Infinity" maxWidth="Infinity" prefHeight="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.WalletSettingsController"> <StackPane maxHeight="Infinity" maxWidth="Infinity" prefHeight="400.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="wallettemplate.WalletSettingsController">
<children> <children>
<AnchorPane maxHeight="400.0" maxWidth="600.0" styleClass="root-pane"> <AnchorPane maxHeight="400.0" maxWidth="600.0" styleClass="root-pane">

View File

@ -17,42 +17,23 @@
package org.bitcoinj.wallettool; package org.bitcoinj.wallettool;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Network;
import org.bitcoinj.base.Sha256Hash;
import org.bitcoinj.base.internal.TimeUtils;
import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.base.internal.ByteUtils;
import org.bitcoinj.core.TransactionOutput;
import org.bitcoinj.crypto.*;
import org.bitcoinj.protocols.payments.PaymentProtocol;
import org.bitcoinj.protocols.payments.PaymentProtocolException;
import org.bitcoinj.protocols.payments.PaymentSession;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.script.ScriptException;
import org.bitcoinj.store.*;
import org.bitcoinj.uri.BitcoinURI;
import org.bitcoinj.uri.BitcoinURIParseException;
import org.bitcoinj.utils.BriefLogFormatter;
import org.bitcoinj.wallet.CoinSelection;
import org.bitcoinj.wallet.CoinSelector;
import org.bitcoinj.wallet.DeterministicKeyChain;
import org.bitcoinj.wallet.DeterministicSeed;
import com.google.protobuf.ByteString; import com.google.protobuf.ByteString;
import org.bitcoinj.core.AbstractBlockChain;
import org.bitcoinj.base.Address; import org.bitcoinj.base.Address;
import org.bitcoinj.base.exceptions.AddressFormatException;
import org.bitcoinj.base.Base58; import org.bitcoinj.base.Base58;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.Coin;
import org.bitcoinj.base.LegacyAddress;
import org.bitcoinj.base.Network;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.base.Sha256Hash;
import org.bitcoinj.base.exceptions.AddressFormatException;
import org.bitcoinj.base.internal.ByteUtils;
import org.bitcoinj.base.internal.TimeUtils;
import org.bitcoinj.core.AbstractBlockChain;
import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.BlockChain;
import org.bitcoinj.core.CheckpointManager; import org.bitcoinj.core.CheckpointManager;
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.Context; import org.bitcoinj.core.Context;
import org.bitcoinj.crypto.DumpedPrivateKey;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.InsufficientMoneyException;
import org.bitcoinj.base.LegacyAddress;
import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.Peer; import org.bitcoinj.core.Peer;
import org.bitcoinj.core.PeerAddress; import org.bitcoinj.core.PeerAddress;
@ -62,33 +43,50 @@ import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.TransactionBroadcast; import org.bitcoinj.core.TransactionBroadcast;
import org.bitcoinj.core.VerificationException; import org.bitcoinj.core.VerificationException;
import org.bitcoinj.core.listeners.DownloadProgressTracker; import org.bitcoinj.core.listeners.DownloadProgressTracker;
import org.bitcoinj.wallet.KeyChainGroupStructure; import org.bitcoinj.crypto.AesKey;
import org.bitcoinj.crypto.DumpedPrivateKey;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.crypto.KeyCrypterException;
import org.bitcoinj.crypto.MnemonicCode;
import org.bitcoinj.crypto.MnemonicException;
import org.bitcoinj.protobuf.wallet.Protos; import org.bitcoinj.protobuf.wallet.Protos;
import org.bitcoinj.protocols.payments.PaymentProtocol;
import org.bitcoinj.protocols.payments.PaymentProtocolException;
import org.bitcoinj.protocols.payments.PaymentSession;
import org.bitcoinj.script.ScriptException;
import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.BlockStoreException;
import org.bitcoinj.store.SPVBlockStore;
import org.bitcoinj.uri.BitcoinURI;
import org.bitcoinj.uri.BitcoinURIParseException;
import org.bitcoinj.utils.BriefLogFormatter;
import org.bitcoinj.wallet.CoinSelector;
import org.bitcoinj.wallet.DeterministicKeyChain;
import org.bitcoinj.wallet.DeterministicSeed;
import org.bitcoinj.wallet.KeyChainGroupStructure;
import org.bitcoinj.wallet.SendRequest; import org.bitcoinj.wallet.SendRequest;
import org.bitcoinj.wallet.UnreadableWalletException; import org.bitcoinj.wallet.UnreadableWalletException;
import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.WalletProtobufSerializer;
import org.bitcoinj.wallet.Wallet.BalanceType; import org.bitcoinj.wallet.Wallet.BalanceType;
import org.bitcoinj.wallet.WalletProtobufSerializer;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import picocli.CommandLine; import picocli.CommandLine;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.io.*; import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigInteger; import java.math.BigInteger;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.text.ParseException; import java.text.ParseException;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;

View File

@ -16,7 +16,6 @@
package org.bitcoinj.wallettool; package org.bitcoinj.wallettool;
import org.checkerframework.framework.qual.IgnoreInWholeProgramInference;
import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.api.io.TempDir;