diff --git a/core/src/main/java/org/bitcoinj/core/Coin.java b/core/src/main/java/org/bitcoinj/base/Coin.java similarity index 99% rename from core/src/main/java/org/bitcoinj/core/Coin.java rename to core/src/main/java/org/bitcoinj/base/Coin.java index df32c0f07..35f78ea93 100644 --- a/core/src/main/java/org/bitcoinj/core/Coin.java +++ b/core/src/main/java/org/bitcoinj/base/Coin.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package org.bitcoinj.core; +package org.bitcoinj.base; import com.google.common.math.LongMath; -import org.bitcoinj.utils.MonetaryFormat; +import org.bitcoinj.base.utils.MonetaryFormat; import java.math.BigDecimal; diff --git a/core/src/main/java/org/bitcoinj/core/Monetary.java b/core/src/main/java/org/bitcoinj/base/Monetary.java similarity index 97% rename from core/src/main/java/org/bitcoinj/core/Monetary.java rename to core/src/main/java/org/bitcoinj/base/Monetary.java index b3d340bab..986b93205 100644 --- a/core/src/main/java/org/bitcoinj/core/Monetary.java +++ b/core/src/main/java/org/bitcoinj/base/Monetary.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.bitcoinj.core; +package org.bitcoinj.base; /** * Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount. diff --git a/core/src/main/java/org/bitcoinj/base/package-info.java b/core/src/main/java/org/bitcoinj/base/package-info.java new file mode 100644 index 000000000..5785984d0 --- /dev/null +++ b/core/src/main/java/org/bitcoinj/base/package-info.java @@ -0,0 +1,29 @@ +/* + * Copyright by the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The {@code base} package provides fundamental types for bitcoinj. These types must have + * minimal dependencies. The criteria for allowed dependencies for {@code base} types are: + * + * The base package will help us make bitcoinj more modular as we will use it to break circular dependencies + * between existing packages. We are also considering splitting {@code base} into a separate JAR/module in a + * future release. + */ +package org.bitcoinj.base; diff --git a/core/src/main/java/org/bitcoinj/utils/Fiat.java b/core/src/main/java/org/bitcoinj/base/utils/Fiat.java similarity index 98% rename from core/src/main/java/org/bitcoinj/utils/Fiat.java rename to core/src/main/java/org/bitcoinj/base/utils/Fiat.java index b91f9f73e..2f76e11ee 100644 --- a/core/src/main/java/org/bitcoinj/utils/Fiat.java +++ b/core/src/main/java/org/bitcoinj/base/utils/Fiat.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package org.bitcoinj.utils; +package org.bitcoinj.base.utils; import com.google.common.math.LongMath; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Monetary; +import org.bitcoinj.base.Coin; +import org.bitcoinj.base.Monetary; import java.math.BigDecimal; import java.util.Objects; diff --git a/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java b/core/src/main/java/org/bitcoinj/base/utils/MonetaryFormat.java similarity index 99% rename from core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java rename to core/src/main/java/org/bitcoinj/base/utils/MonetaryFormat.java index 44fe59c08..4ffe65e51 100644 --- a/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java +++ b/core/src/main/java/org/bitcoinj/base/utils/MonetaryFormat.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package org.bitcoinj.utils; +package org.bitcoinj.base.utils; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Monetary; +import org.bitcoinj.base.Coin; +import org.bitcoinj.base.Monetary; import java.math.RoundingMode; import java.text.DecimalFormatSymbols; diff --git a/core/src/main/java/org/bitcoinj/core/Block.java b/core/src/main/java/org/bitcoinj/core/Block.java index 515adb049..e6820b87d 100644 --- a/core/src/main/java/org/bitcoinj/core/Block.java +++ b/core/src/main/java/org/bitcoinj/core/Block.java @@ -19,6 +19,7 @@ package org.bitcoinj.core; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.internal.InternalUtils; import org.bitcoinj.params.AbstractBitcoinNetParams; import org.bitcoinj.script.Script; @@ -41,7 +42,7 @@ import java.util.List; import java.util.Locale; import static com.google.common.base.Preconditions.checkState; -import static org.bitcoinj.core.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.FIFTY_COINS; import static org.bitcoinj.core.Sha256Hash.hashTwice; /** diff --git a/core/src/main/java/org/bitcoinj/core/Context.java b/core/src/main/java/org/bitcoinj/core/Context.java index 3a54f46f1..270d9e15c 100644 --- a/core/src/main/java/org/bitcoinj/core/Context.java +++ b/core/src/main/java/org/bitcoinj/core/Context.java @@ -16,6 +16,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.utils.ContextPropagatingThreadFactory; import org.bitcoinj.wallet.SendRequest; import org.slf4j.Logger; diff --git a/core/src/main/java/org/bitcoinj/core/FeeFilterMessage.java b/core/src/main/java/org/bitcoinj/core/FeeFilterMessage.java index 40e2982e0..bd164b5d1 100644 --- a/core/src/main/java/org/bitcoinj/core/FeeFilterMessage.java +++ b/core/src/main/java/org/bitcoinj/core/FeeFilterMessage.java @@ -16,6 +16,8 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; + import java.io.IOException; import java.io.OutputStream; import java.math.BigInteger; diff --git a/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java index 22ef791ff..692cb1f8d 100644 --- a/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.params.AbstractBitcoinNetParams; import org.bitcoinj.script.Script; import org.bitcoinj.script.Script.VerifyFlag; diff --git a/core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java b/core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java index ad8490c8c..f6607bbb7 100644 --- a/core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java +++ b/core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java @@ -16,6 +16,8 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; + import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/src/main/java/org/bitcoinj/core/NetworkParameters.java b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java index 8b2e35177..c4335b5f8 100644 --- a/core/src/main/java/org/bitcoinj/core/NetworkParameters.java +++ b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.params.MainNetParams; import org.bitcoinj.params.RegTestParams; import org.bitcoinj.params.SigNetParams; @@ -25,7 +26,7 @@ import org.bitcoinj.params.UnitTestParams; import org.bitcoinj.script.Script; import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStoreException; -import org.bitcoinj.utils.MonetaryFormat; +import org.bitcoinj.base.utils.MonetaryFormat; import org.bitcoinj.utils.VersionTally; import javax.annotation.Nullable; @@ -35,7 +36,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.base.Coin.COIN; /** *

NetworkParameters contains the data needed for working with an instantiation of a Bitcoin chain.

diff --git a/core/src/main/java/org/bitcoinj/core/Peer.java b/core/src/main/java/org/bitcoinj/core/Peer.java index f752fd86e..ca637ced0 100644 --- a/core/src/main/java/org/bitcoinj/core/Peer.java +++ b/core/src/main/java/org/bitcoinj/core/Peer.java @@ -21,6 +21,7 @@ import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.base.Throwables; import net.jcip.annotations.GuardedBy; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.listeners.BlocksDownloadedEventListener; import org.bitcoinj.core.listeners.ChainDownloadStartedEventListener; import org.bitcoinj.core.listeners.GetDataEventListener; diff --git a/core/src/main/java/org/bitcoinj/core/Transaction.java b/core/src/main/java/org/bitcoinj/core/Transaction.java index 3536d7364..6960e376e 100644 --- a/core/src/main/java/org/bitcoinj/core/Transaction.java +++ b/core/src/main/java/org/bitcoinj/core/Transaction.java @@ -20,6 +20,7 @@ package org.bitcoinj.core; import com.google.common.base.MoreObjects; import com.google.common.collect.Lists; import com.google.common.math.IntMath; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.TransactionConfidence.ConfidenceType; import org.bitcoinj.crypto.TransactionSignature; import org.bitcoinj.script.Script; diff --git a/core/src/main/java/org/bitcoinj/core/TransactionInput.java b/core/src/main/java/org/bitcoinj/core/TransactionInput.java index 9ce0389de..4a9b3a159 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionInput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionInput.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.internal.InternalUtils; import org.bitcoinj.script.Script; import org.bitcoinj.script.ScriptException; diff --git a/core/src/main/java/org/bitcoinj/core/TransactionOutput.java b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java index c5e79ddaa..b615c7fa4 100644 --- a/core/src/main/java/org/bitcoinj/core/TransactionOutput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.script.Script; import org.bitcoinj.script.ScriptBuilder; import org.bitcoinj.script.ScriptException; diff --git a/core/src/main/java/org/bitcoinj/core/UTXO.java b/core/src/main/java/org/bitcoinj/core/UTXO.java index 8ed106601..cfc39e56d 100644 --- a/core/src/main/java/org/bitcoinj/core/UTXO.java +++ b/core/src/main/java/org/bitcoinj/core/UTXO.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.script.Script; import java.io.EOFException; diff --git a/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.java b/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.java index 60589052d..722e3bd8d 100644 --- a/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.java +++ b/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsReceivedEventListener.java @@ -16,7 +16,7 @@ package org.bitcoinj.jni; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener; diff --git a/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.java b/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.java index bf324f999..64c9727a4 100644 --- a/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.java +++ b/core/src/main/java/org/bitcoinj/jni/NativeWalletCoinsSentEventListener.java @@ -16,7 +16,7 @@ package org.bitcoinj.jni; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.wallet.Wallet; import org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener; diff --git a/core/src/main/java/org/bitcoinj/params/AbstractBitcoinNetParams.java b/core/src/main/java/org/bitcoinj/params/AbstractBitcoinNetParams.java index 4d029a1fb..cc9116253 100644 --- a/core/src/main/java/org/bitcoinj/params/AbstractBitcoinNetParams.java +++ b/core/src/main/java/org/bitcoinj/params/AbstractBitcoinNetParams.java @@ -20,7 +20,7 @@ package org.bitcoinj.params; import com.google.common.base.Stopwatch; import org.bitcoinj.core.BitcoinSerializer; import org.bitcoinj.core.Block; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Sha256Hash; import org.bitcoinj.core.StoredBlock; @@ -30,7 +30,7 @@ import org.bitcoinj.core.Utils; import org.bitcoinj.core.VerificationException; import org.bitcoinj.store.BlockStore; import org.bitcoinj.store.BlockStoreException; -import org.bitcoinj.utils.MonetaryFormat; +import org.bitcoinj.base.utils.MonetaryFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java index 8d5a029dd..edc094497 100644 --- a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java @@ -22,7 +22,7 @@ import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; import org.bitcoin.protocols.payments.Protos; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.Utils; diff --git a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java index ed9033b34..db4c0a46f 100644 --- a/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java @@ -21,7 +21,7 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.protobuf.InvalidProtocolBufferException; import org.bitcoin.protocols.payments.Protos; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionOutput; diff --git a/core/src/main/java/org/bitcoinj/script/Script.java b/core/src/main/java/org/bitcoinj/script/Script.java index c66230ac7..3e373dc3c 100644 --- a/core/src/main/java/org/bitcoinj/script/Script.java +++ b/core/src/main/java/org/bitcoinj/script/Script.java @@ -20,7 +20,7 @@ package org.bitcoinj.script; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; import org.bitcoinj.core.NetworkParameters; diff --git a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java index 3e8d8718e..da2e35d38 100644 --- a/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java @@ -17,7 +17,7 @@ package org.bitcoinj.signers; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionInput; diff --git a/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java index 0726ead5a..51191c37d 100644 --- a/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/DatabaseFullPrunedBlockStore.java @@ -20,7 +20,7 @@ package org.bitcoinj.store; import org.bitcoinj.core.Address; import org.bitcoinj.core.Block; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; import org.bitcoinj.core.NetworkParameters; diff --git a/core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java b/core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java index e0baa2d19..3da481210 100644 --- a/core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java +++ b/core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java @@ -20,7 +20,7 @@ package org.bitcoinj.testing; import com.google.common.annotations.VisibleForTesting; import org.bitcoinj.core.Address; import org.bitcoinj.core.Block; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; import org.bitcoinj.core.MessageSerializer; @@ -46,8 +46,8 @@ import java.nio.ByteBuffer; import java.util.Random; import static com.google.common.base.Preconditions.checkState; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.valueOf; /** * Methods for building fake transactions for unit tests. Since these methods are currently used both in the `bitcoinj-core` diff --git a/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java b/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java index 4fed96ce1..1131a4c22 100644 --- a/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java +++ b/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java @@ -18,7 +18,7 @@ package org.bitcoinj.uri; import org.bitcoinj.core.Address; import org.bitcoinj.core.AddressFormatException; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.params.AbstractBitcoinNetParams; diff --git a/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java index 006dd4e2b..1f2bf696d 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java @@ -16,6 +16,8 @@ package org.bitcoinj.utils; +import org.bitcoinj.base.Coin; + import java.math.BigDecimal; import java.math.BigInteger; import java.text.DecimalFormat; @@ -27,7 +29,7 @@ import java.util.Locale; import static java.math.BigDecimal.ONE; import static java.math.BigDecimal.ZERO; import static java.math.RoundingMode.HALF_UP; -import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; +import static org.bitcoinj.base.Coin.SMALLEST_UNIT_EXPONENT; /** *

This class, a concrete extension of {@link BtcFormat}, is distinguished by its @@ -52,7 +54,7 @@ import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; * @see java.text.NumberFormat * @see java.text.DecimalFormat * @see DecimalFormatSymbols - * @see org.bitcoinj.core.Coin + * @see Coin */ public final class BtcAutoFormat extends BtcFormat { diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java index 19c199110..13e09d4ce 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java @@ -16,7 +16,7 @@ package org.bitcoinj.utils; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import java.math.BigInteger; import java.text.DecimalFormat; @@ -27,7 +27,7 @@ import java.util.Locale; import java.util.Objects; import static com.google.common.base.Preconditions.checkArgument; -import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; +import static org.bitcoinj.base.Coin.SMALLEST_UNIT_EXPONENT; /** *

This class, a concrete extension of {@link BtcFormat}, is distinguished in that each diff --git a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java index 862c9ba7d..1f4b7c676 100644 --- a/core/src/main/java/org/bitcoinj/utils/BtcFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java @@ -17,7 +17,7 @@ package org.bitcoinj.utils; import com.google.common.base.Strings; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.utils.BtcAutoFormat.Style; import java.math.BigDecimal; diff --git a/core/src/main/java/org/bitcoinj/utils/ExchangeRate.java b/core/src/main/java/org/bitcoinj/utils/ExchangeRate.java index 810619c36..34c86c6da 100644 --- a/core/src/main/java/org/bitcoinj/utils/ExchangeRate.java +++ b/core/src/main/java/org/bitcoinj/utils/ExchangeRate.java @@ -16,7 +16,8 @@ package org.bitcoinj.utils; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.utils.Fiat; +import org.bitcoinj.base.Coin; import java.math.BigInteger; import java.util.Objects; diff --git a/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java b/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java index 789ce76ca..cf735a690 100644 --- a/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java +++ b/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java @@ -16,7 +16,7 @@ package org.bitcoinj.wallet; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.TransactionOutput; import java.util.Collection; diff --git a/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java index 2fd2d770c..e5ffbabe5 100644 --- a/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java @@ -16,7 +16,7 @@ package org.bitcoinj.wallet; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.TransactionOutput; import java.util.List; diff --git a/core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java index 332a7483a..3f7a55de9 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java @@ -17,7 +17,7 @@ package org.bitcoinj.wallet; import com.google.common.annotations.VisibleForTesting; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; diff --git a/core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java index 01928c4a4..6225b7615 100644 --- a/core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java @@ -16,7 +16,7 @@ package org.bitcoinj.wallet; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionInput; import org.bitcoinj.core.TransactionOutPoint; diff --git a/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java index a6789d0ce..c4f65715f 100644 --- a/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java @@ -17,7 +17,7 @@ package org.bitcoinj.wallet; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; diff --git a/core/src/main/java/org/bitcoinj/wallet/SendRequest.java b/core/src/main/java/org/bitcoinj/wallet/SendRequest.java index e14a5fecd..b27cd339e 100644 --- a/core/src/main/java/org/bitcoinj/wallet/SendRequest.java +++ b/core/src/main/java/org/bitcoinj/wallet/SendRequest.java @@ -20,7 +20,7 @@ package org.bitcoinj.wallet; import com.google.common.base.MoreObjects; import org.bitcoin.protocols.payments.Protos.PaymentDetails; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.NetworkParameters; diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index ce90ffcfa..d83995eeb 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -29,7 +29,7 @@ import org.bitcoinj.core.Address; import org.bitcoinj.core.Base58; import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.BloomFilter; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.FilteredBlock; diff --git a/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java b/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java index 1f8030198..bf8b1f18a 100644 --- a/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java +++ b/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java @@ -21,7 +21,7 @@ import com.google.protobuf.ByteString; import com.google.protobuf.CodedInputStream; import com.google.protobuf.CodedOutputStream; import com.google.protobuf.WireFormat; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.PeerAddress; import org.bitcoinj.core.Sha256Hash; @@ -37,7 +37,7 @@ import org.bitcoinj.crypto.KeyCrypterScrypt; import org.bitcoinj.script.Script; import org.bitcoinj.script.ScriptException; import org.bitcoinj.utils.ExchangeRate; -import org.bitcoinj.utils.Fiat; +import org.bitcoinj.base.utils.Fiat; import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java index 86ed98025..ac41fd69a 100644 --- a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java +++ b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsReceivedEventListener.java @@ -16,7 +16,7 @@ package org.bitcoinj.wallet.listeners; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.wallet.Wallet; diff --git a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.java b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.java index 712d84107..e509c0993 100644 --- a/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.java +++ b/core/src/main/java/org/bitcoinj/wallet/listeners/WalletCoinsSentEventListener.java @@ -16,7 +16,7 @@ package org.bitcoinj.wallet.listeners; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.wallet.Wallet; diff --git a/core/src/test/java/org/bitcoinj/core/CoinTest.java b/core/src/test/java/org/bitcoinj/base/CoinTest.java similarity index 93% rename from core/src/test/java/org/bitcoinj/core/CoinTest.java rename to core/src/test/java/org/bitcoinj/base/CoinTest.java index df727a73d..5d8f5d6df 100644 --- a/core/src/test/java/org/bitcoinj/core/CoinTest.java +++ b/core/src/test/java/org/bitcoinj/base/CoinTest.java @@ -14,24 +14,25 @@ * limitations under the License. */ -package org.bitcoinj.core; +package org.bitcoinj.base; +import org.bitcoinj.base.Coin; import org.hamcrest.Matchers; import org.junit.Test; import java.math.BigDecimal; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.FIFTY_COINS; -import static org.bitcoinj.core.Coin.NEGATIVE_SATOSHI; -import static org.bitcoinj.core.Coin.SATOSHI; -import static org.bitcoinj.core.Coin.ZERO; -import static org.bitcoinj.core.Coin.btcToSatoshi; -import static org.bitcoinj.core.Coin.parseCoin; -import static org.bitcoinj.core.Coin.parseCoinInexact; -import static org.bitcoinj.core.Coin.satoshiToBtc; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.NEGATIVE_SATOSHI; +import static org.bitcoinj.base.Coin.SATOSHI; +import static org.bitcoinj.base.Coin.ZERO; +import static org.bitcoinj.base.Coin.btcToSatoshi; +import static org.bitcoinj.base.Coin.parseCoin; +import static org.bitcoinj.base.Coin.parseCoinInexact; +import static org.bitcoinj.base.Coin.satoshiToBtc; +import static org.bitcoinj.base.Coin.valueOf; import static org.bitcoinj.core.NetworkParameters.MAX_MONEY; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; diff --git a/core/src/test/java/org/bitcoinj/utils/FiatTest.java b/core/src/test/java/org/bitcoinj/base/utils/FiatTest.java similarity index 97% rename from core/src/test/java/org/bitcoinj/utils/FiatTest.java rename to core/src/test/java/org/bitcoinj/base/utils/FiatTest.java index 320fa3846..caa49ced8 100644 --- a/core/src/test/java/org/bitcoinj/utils/FiatTest.java +++ b/core/src/test/java/org/bitcoinj/base/utils/FiatTest.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package org.bitcoinj.utils; +package org.bitcoinj.base.utils; +import org.bitcoinj.base.utils.Fiat; import org.junit.Test; -import static org.bitcoinj.utils.Fiat.parseFiat; +import static org.bitcoinj.base.utils.Fiat.parseFiat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/org/bitcoinj/utils/MonetaryFormatTest.java b/core/src/test/java/org/bitcoinj/base/utils/MonetaryFormatTest.java similarity index 97% rename from core/src/test/java/org/bitcoinj/utils/MonetaryFormatTest.java rename to core/src/test/java/org/bitcoinj/base/utils/MonetaryFormatTest.java index 16881e6ff..9c53a1293 100644 --- a/core/src/test/java/org/bitcoinj/utils/MonetaryFormatTest.java +++ b/core/src/test/java/org/bitcoinj/base/utils/MonetaryFormatTest.java @@ -14,19 +14,21 @@ * limitations under the License. */ -package org.bitcoinj.utils; +package org.bitcoinj.base.utils; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.utils.Fiat; +import org.bitcoinj.base.utils.MonetaryFormat; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.junit.Ignore; import org.junit.Test; import java.util.Locale; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.SATOSHI; -import static org.bitcoinj.core.Coin.ZERO; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.SATOSHI; +import static org.bitcoinj.base.Coin.ZERO; import static org.junit.Assert.assertEquals; public class MonetaryFormatTest { diff --git a/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java b/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java index 6dcc43735..35570fc09 100644 --- a/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java @@ -18,6 +18,7 @@ package org.bitcoinj.core; import com.google.common.collect.Lists; +import org.bitcoinj.base.Coin; import org.bitcoinj.params.MainNetParams; import org.bitcoinj.params.UnitTestParams; import org.bitcoinj.script.Script; @@ -40,7 +41,7 @@ import java.lang.ref.WeakReference; import java.util.Arrays; import java.util.List; -import static org.bitcoinj.core.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.FIFTY_COINS; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; diff --git a/core/src/test/java/org/bitcoinj/core/BlockChainTest.java b/core/src/test/java/org/bitcoinj/core/BlockChainTest.java index 2c3d514f5..4e12f155a 100644 --- a/core/src/test/java/org/bitcoinj/core/BlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/BlockChainTest.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.params.MainNetParams; import org.bitcoinj.params.TestNet3Params; import org.bitcoinj.params.UnitTestParams; @@ -39,10 +40,10 @@ import java.util.Date; import java.util.Locale; import java.util.concurrent.CompletableFuture; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.FIFTY_COINS; -import static org.bitcoinj.core.Coin.ZERO; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.ZERO; +import static org.bitcoinj.base.Coin.valueOf; import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; import static org.junit.Assert.assertEquals; diff --git a/core/src/test/java/org/bitcoinj/core/BlockTest.java b/core/src/test/java/org/bitcoinj/core/BlockTest.java index 93e7056f7..68323712f 100644 --- a/core/src/test/java/org/bitcoinj/core/BlockTest.java +++ b/core/src/test/java/org/bitcoinj/core/BlockTest.java @@ -18,6 +18,7 @@ package org.bitcoinj.core; import com.google.common.io.ByteStreams; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.AbstractBlockChain.NewBlockType; import org.bitcoinj.params.MainNetParams; import org.bitcoinj.params.TestNet3Params; diff --git a/core/src/test/java/org/bitcoinj/core/ChainSplitTest.java b/core/src/test/java/org/bitcoinj/core/ChainSplitTest.java index 3ac76ccec..4a9bb9d35 100644 --- a/core/src/test/java/org/bitcoinj/core/ChainSplitTest.java +++ b/core/src/test/java/org/bitcoinj/core/ChainSplitTest.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.TransactionConfidence.ConfidenceType; import org.bitcoinj.params.UnitTestParams; import org.bitcoinj.script.Script; @@ -40,11 +41,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.FIFTY_COINS; -import static org.bitcoinj.core.Coin.ZERO; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.ZERO; +import static org.bitcoinj.base.Coin.valueOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java index 824c0fa6f..8708a328d 100644 --- a/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java +++ b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; import com.google.common.base.Preconditions; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Transaction.SigHash; import org.bitcoinj.crypto.TransactionSignature; import org.bitcoinj.script.Script; @@ -44,9 +45,9 @@ import java.util.Set; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; -import static org.bitcoinj.core.Coin.FIFTY_COINS; -import static org.bitcoinj.core.Coin.SATOSHI; -import static org.bitcoinj.core.Coin.ZERO; +import static org.bitcoinj.base.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.SATOSHI; +import static org.bitcoinj.base.Coin.ZERO; import static org.bitcoinj.script.ScriptOpCodes.OP_1; import static org.bitcoinj.script.ScriptOpCodes.OP_2DUP; import static org.bitcoinj.script.ScriptOpCodes.OP_CHECKMULTISIG; diff --git a/core/src/test/java/org/bitcoinj/core/ParseByteCacheTest.java b/core/src/test/java/org/bitcoinj/core/ParseByteCacheTest.java index efd65f3f4..e1a9eb08c 100644 --- a/core/src/test/java/org/bitcoinj/core/ParseByteCacheTest.java +++ b/core/src/test/java/org/bitcoinj/core/ParseByteCacheTest.java @@ -29,8 +29,8 @@ import org.junit.Test; import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.valueOf; import static org.bitcoinj.core.Utils.HEX; import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; diff --git a/core/src/test/java/org/bitcoinj/core/TransactionInputTest.java b/core/src/test/java/org/bitcoinj/core/TransactionInputTest.java index b46451056..b74fe97f4 100644 --- a/core/src/test/java/org/bitcoinj/core/TransactionInputTest.java +++ b/core/src/test/java/org/bitcoinj/core/TransactionInputTest.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; import com.google.common.collect.Lists; +import org.bitcoinj.base.Coin; import org.bitcoinj.params.UnitTestParams; import org.bitcoinj.script.Script; import org.bitcoinj.script.ScriptBuilder; diff --git a/core/src/test/java/org/bitcoinj/core/TransactionOutputTest.java b/core/src/test/java/org/bitcoinj/core/TransactionOutputTest.java index 71d6f681b..95bf4e47e 100644 --- a/core/src/test/java/org/bitcoinj/core/TransactionOutputTest.java +++ b/core/src/test/java/org/bitcoinj/core/TransactionOutputTest.java @@ -16,6 +16,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.script.Script; import org.bitcoinj.script.ScriptBuilder; import org.bitcoinj.script.ScriptPattern; diff --git a/core/src/test/java/org/bitcoinj/core/TransactionTest.java b/core/src/test/java/org/bitcoinj/core/TransactionTest.java index c3cc3d3f1..abc479f8e 100644 --- a/core/src/test/java/org/bitcoinj/core/TransactionTest.java +++ b/core/src/test/java/org/bitcoinj/core/TransactionTest.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.TransactionConfidence.ConfidenceType; import org.bitcoinj.crypto.TransactionSignature; import org.bitcoinj.params.TestNet3Params; diff --git a/core/src/test/java/org/bitcoinj/core/TxConfidenceTableTest.java b/core/src/test/java/org/bitcoinj/core/TxConfidenceTableTest.java index 8fa8fc425..b1a56af3b 100644 --- a/core/src/test/java/org/bitcoinj/core/TxConfidenceTableTest.java +++ b/core/src/test/java/org/bitcoinj/core/TxConfidenceTableTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import java.net.InetAddress; -import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.base.Coin.COIN; import static org.easymock.EasyMock.anyObject; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; diff --git a/core/src/test/java/org/bitcoinj/core/UTXOTest.java b/core/src/test/java/org/bitcoinj/core/UTXOTest.java index 3b80d607e..3eb8aed0b 100644 --- a/core/src/test/java/org/bitcoinj/core/UTXOTest.java +++ b/core/src/test/java/org/bitcoinj/core/UTXOTest.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.script.ScriptBuilder; import org.junit.Test; diff --git a/core/src/test/java/org/bitcoinj/params/AbstractBitcoinNetParamsTest.java b/core/src/test/java/org/bitcoinj/params/AbstractBitcoinNetParamsTest.java index e525fdce5..ecdc77045 100644 --- a/core/src/test/java/org/bitcoinj/params/AbstractBitcoinNetParamsTest.java +++ b/core/src/test/java/org/bitcoinj/params/AbstractBitcoinNetParamsTest.java @@ -17,7 +17,7 @@ package org.bitcoinj.params; import org.bitcoinj.core.Block; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java index 6e263970a..367221199 100644 --- a/core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java @@ -21,7 +21,7 @@ import org.bitcoin.protocols.payments.Protos.Payment; import org.bitcoin.protocols.payments.Protos.PaymentACK; import org.bitcoin.protocols.payments.Protos.PaymentRequest; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; import org.bitcoinj.core.NetworkParameters; diff --git a/core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java index db9e48b9a..de9996fdb 100644 --- a/core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java @@ -20,7 +20,7 @@ package org.bitcoinj.protocols.payments; import com.google.protobuf.ByteString; import org.bitcoin.protocols.payments.Protos; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; @@ -44,7 +44,7 @@ import java.util.Date; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; -import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.base.Coin.COIN; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; diff --git a/core/src/test/java/org/bitcoinj/script/ScriptTest.java b/core/src/test/java/org/bitcoinj/script/ScriptTest.java index d41717138..901c33f0a 100644 --- a/core/src/test/java/org/bitcoinj/script/ScriptTest.java +++ b/core/src/test/java/org/bitcoinj/script/ScriptTest.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.DumpedPrivateKey; import org.bitcoinj.core.ECKey; diff --git a/core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java b/core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java index 910cfc167..ac4d0c1a9 100644 --- a/core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java +++ b/core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java @@ -23,7 +23,7 @@ import org.bitcoinj.core.Address; import org.bitcoinj.core.Block; import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.BlockTest; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; @@ -71,8 +71,8 @@ import java.util.Iterator; import java.util.Set; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.FIFTY_COINS; import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; diff --git a/core/src/test/java/org/bitcoinj/testing/TestWithWallet.java b/core/src/test/java/org/bitcoinj/testing/TestWithWallet.java index a85ee6951..1ecb150c6 100644 --- a/core/src/test/java/org/bitcoinj/testing/TestWithWallet.java +++ b/core/src/test/java/org/bitcoinj/testing/TestWithWallet.java @@ -20,7 +20,7 @@ import org.bitcoinj.core.AbstractBlockChain; import org.bitcoinj.core.Address; import org.bitcoinj.core.Block; import org.bitcoinj.core.BlockChain; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.NetworkParameters; diff --git a/core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java b/core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java index 69c5c1e41..8f2fd1295 100644 --- a/core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java +++ b/core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java @@ -28,8 +28,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.Locale; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.parseCoin; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.parseCoin; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; diff --git a/core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java b/core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java index 176aa49dd..9630122a1 100644 --- a/core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java +++ b/core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java @@ -16,7 +16,7 @@ package org.bitcoinj.utils; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -43,12 +43,12 @@ import static java.util.Locale.ITALY; import static java.util.Locale.JAPAN; import static java.util.Locale.TAIWAN; import static java.util.Locale.US; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.SATOSHI; -import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; -import static org.bitcoinj.core.Coin.ZERO; -import static org.bitcoinj.core.Coin.parseCoin; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.SATOSHI; +import static org.bitcoinj.base.Coin.SMALLEST_UNIT_EXPONENT; +import static org.bitcoinj.base.Coin.ZERO; +import static org.bitcoinj.base.Coin.parseCoin; +import static org.bitcoinj.base.Coin.valueOf; import static org.bitcoinj.core.NetworkParameters.MAX_MONEY; import static org.bitcoinj.utils.BtcAutoFormat.Style.CODE; import static org.bitcoinj.utils.BtcAutoFormat.Style.SYMBOL; diff --git a/core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java b/core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java index a0a15fd34..27fdac35b 100644 --- a/core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java +++ b/core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java @@ -16,7 +16,8 @@ package org.bitcoinj.utils; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.utils.Fiat; +import org.bitcoinj.base.Coin; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java b/core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java index 870ea00ea..62324e271 100644 --- a/core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java @@ -18,7 +18,7 @@ package org.bitcoinj.wallet; import org.bitcoinj.core.AbstractBlockChain; import org.bitcoinj.core.Block; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.PeerAddress; import org.bitcoinj.core.Transaction; @@ -39,8 +39,8 @@ import java.util.Arrays; import java.util.List; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.COIN; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java b/core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java index 20b3ac52a..483496d53 100644 --- a/core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java @@ -17,7 +17,7 @@ package org.bitcoinj.wallet; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.NetworkParameters; @@ -41,7 +41,7 @@ import java.util.Collections; import java.util.List; import static com.google.common.base.Preconditions.checkState; -import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.base.Coin.COIN; import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA1; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; diff --git a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java index 879140841..b2f4fd34a 100644 --- a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java @@ -22,7 +22,7 @@ import org.bitcoinj.core.AbstractBlockChain; import org.bitcoinj.core.Address; import org.bitcoinj.core.Block; import org.bitcoinj.core.BlockChain; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.LegacyAddress; @@ -60,7 +60,7 @@ import org.bitcoinj.testing.MockTransactionBroadcaster; import org.bitcoinj.testing.NopTransactionSigner; import org.bitcoinj.testing.TestWithWallet; import org.bitcoinj.utils.ExchangeRate; -import org.bitcoinj.utils.Fiat; +import org.bitcoinj.base.utils.Fiat; import org.bitcoinj.utils.Threading; import org.bitcoinj.wallet.KeyChain.KeyPurpose; import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; @@ -94,12 +94,12 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.MILLICOIN; -import static org.bitcoinj.core.Coin.SATOSHI; -import static org.bitcoinj.core.Coin.ZERO; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.MILLICOIN; +import static org.bitcoinj.base.Coin.SATOSHI; +import static org.bitcoinj.base.Coin.ZERO; +import static org.bitcoinj.base.Coin.valueOf; import static org.bitcoinj.core.Utils.HEX; import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; diff --git a/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java b/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java index 78eed70b7..fae2e21c2 100644 --- a/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java +++ b/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java @@ -28,7 +28,7 @@ import org.bitcoinj.wallet.Wallet; import java.io.File; -import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.base.Coin.*; /** * This is a little test app that waits for a coin on a local regtest node, then generates two transactions that double diff --git a/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java index 71767566b..333521099 100644 --- a/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java +++ b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java @@ -18,7 +18,7 @@ package org.bitcoinj.examples; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.InsufficientMoneyException; import org.bitcoinj.core.LegacyAddress; import org.bitcoinj.core.NetworkParameters; diff --git a/examples/src/main/java/org/bitcoinj/examples/GenerateLowSTests.java b/examples/src/main/java/org/bitcoinj/examples/GenerateLowSTests.java index 18c83c4fe..218d31b1a 100644 --- a/examples/src/main/java/org/bitcoinj/examples/GenerateLowSTests.java +++ b/examples/src/main/java/org/bitcoinj/examples/GenerateLowSTests.java @@ -26,7 +26,7 @@ import java.util.EnumSet; import static com.google.common.base.Preconditions.checkNotNull; import org.bitcoinj.core.LegacyAddress; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.SignatureDecodeException; diff --git a/examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java b/examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java index 512abaf26..ada33c194 100644 --- a/examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java +++ b/examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java @@ -18,7 +18,7 @@ package org.bitcoinj.examples; import org.bitcoinj.core.AddressMessage; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.core.Peer; import org.bitcoinj.core.PeerGroup; diff --git a/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java b/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java index 7a6524f1a..cc95f4376 100644 --- a/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java +++ b/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java @@ -17,6 +17,7 @@ package org.bitcoinj.examples; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.*; import org.bitcoinj.params.TestNet3Params; import org.bitcoinj.store.BlockStore; diff --git a/examples/src/main/java/org/bitcoinj/examples/SendRequest.java b/examples/src/main/java/org/bitcoinj/examples/SendRequest.java index ea1474c6f..f1bbd5531 100644 --- a/examples/src/main/java/org/bitcoinj/examples/SendRequest.java +++ b/examples/src/main/java/org/bitcoinj/examples/SendRequest.java @@ -16,6 +16,7 @@ package org.bitcoinj.examples; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.*; import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.TestNet3Params; diff --git a/integration-test/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTest.java b/integration-test/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTest.java index 84dbc05d2..a1d551584 100644 --- a/integration-test/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTest.java +++ b/integration-test/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTest.java @@ -17,6 +17,7 @@ package org.bitcoinj.core; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.TransactionConfidence.ConfidenceType; import org.bitcoinj.store.MemoryBlockStore; import org.bitcoinj.testing.FakeTxBuilder; diff --git a/integration-test/src/test/java/org/bitcoinj/core/PeerGroupTest.java b/integration-test/src/test/java/org/bitcoinj/core/PeerGroupTest.java index 07d80e5d3..21db7fd41 100644 --- a/integration-test/src/test/java/org/bitcoinj/core/PeerGroupTest.java +++ b/integration-test/src/test/java/org/bitcoinj/core/PeerGroupTest.java @@ -19,6 +19,7 @@ package org.bitcoinj.core; import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.listeners.DownloadProgressTracker; import org.bitcoinj.core.listeners.PeerConnectedEventListener; import org.bitcoinj.core.listeners.PeerDisconnectedEventListener; @@ -61,8 +62,8 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.valueOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; diff --git a/integration-test/src/test/java/org/bitcoinj/core/PeerTest.java b/integration-test/src/test/java/org/bitcoinj/core/PeerTest.java index eeb80c4d0..a63f9e432 100644 --- a/integration-test/src/test/java/org/bitcoinj/core/PeerTest.java +++ b/integration-test/src/test/java/org/bitcoinj/core/PeerTest.java @@ -18,6 +18,7 @@ package org.bitcoinj.core; import com.google.common.collect.Lists; import com.google.common.util.concurrent.Uninterruptibles; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.listeners.BlocksDownloadedEventListener; import org.bitcoinj.core.listeners.PreMessageReceivedEventListener; import org.bitcoinj.params.TestNet3Params; @@ -51,8 +52,8 @@ import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.valueOf; import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; import static org.bitcoinj.testing.FakeTxBuilder.makeSolvedTestBlock; diff --git a/integration-test/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java b/integration-test/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java index db3e599b4..0a77a9f5b 100644 --- a/integration-test/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java +++ b/integration-test/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java @@ -37,10 +37,10 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import static com.google.common.base.Preconditions.checkNotNull; -import static org.bitcoinj.core.Coin.CENT; -import static org.bitcoinj.core.Coin.COIN; -import static org.bitcoinj.core.Coin.FIFTY_COINS; -import static org.bitcoinj.core.Coin.valueOf; +import static org.bitcoinj.base.Coin.CENT; +import static org.bitcoinj.base.Coin.COIN; +import static org.bitcoinj.base.Coin.FIFTY_COINS; +import static org.bitcoinj.base.Coin.valueOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; diff --git a/integration-test/src/test/java/org/bitcoinj/testing/TestWithNetworkConnections.java b/integration-test/src/test/java/org/bitcoinj/testing/TestWithNetworkConnections.java index 9ccb961c7..7b3085be6 100644 --- a/integration-test/src/test/java/org/bitcoinj/testing/TestWithNetworkConnections.java +++ b/integration-test/src/test/java/org/bitcoinj/testing/TestWithNetworkConnections.java @@ -19,7 +19,7 @@ package org.bitcoinj.testing; import org.bitcoinj.core.Address; import org.bitcoinj.core.BlockChain; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.LegacyAddress; diff --git a/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java index a9598d4ef..1dd722562 100644 --- a/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java +++ b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java @@ -16,6 +16,7 @@ package org.bitcoinj.tools; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.*; import org.bitcoinj.core.listeners.PeerConnectedEventListener; import org.bitcoinj.core.listeners.PeerDisconnectedEventListener; diff --git a/wallettemplate/src/main/java/org/bitcoinj/walletfx/utils/BitcoinUIModel.java b/wallettemplate/src/main/java/org/bitcoinj/walletfx/utils/BitcoinUIModel.java index f082ea8b1..211426260 100644 --- a/wallettemplate/src/main/java/org/bitcoinj/walletfx/utils/BitcoinUIModel.java +++ b/wallettemplate/src/main/java/org/bitcoinj/walletfx/utils/BitcoinUIModel.java @@ -17,7 +17,7 @@ package org.bitcoinj.walletfx.utils; import org.bitcoinj.core.Address; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.listeners.DownloadProgressTracker; import org.bitcoinj.wallet.Wallet; import javafx.application.Platform; diff --git a/wallettemplate/src/main/java/wallettemplate/MainController.java b/wallettemplate/src/main/java/wallettemplate/MainController.java index 530f0c377..fe749380a 100644 --- a/wallettemplate/src/main/java/wallettemplate/MainController.java +++ b/wallettemplate/src/main/java/wallettemplate/MainController.java @@ -23,8 +23,8 @@ import javafx.scene.Scene; import javafx.scene.input.KeyCombination; import javafx.scene.layout.Pane; import org.bitcoinj.core.listeners.DownloadProgressTracker; -import org.bitcoinj.core.Coin; -import org.bitcoinj.utils.MonetaryFormat; +import org.bitcoinj.base.Coin; +import org.bitcoinj.base.utils.MonetaryFormat; import javafx.animation.FadeTransition; import javafx.animation.ParallelTransition; import javafx.animation.TranslateTransition; diff --git a/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java b/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java index 573b7897f..0d5b13d12 100644 --- a/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java +++ b/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java @@ -17,6 +17,7 @@ package wallettemplate; import javafx.scene.layout.HBox; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.*; import org.bitcoinj.wallet.SendRequest; import org.bitcoinj.wallet.Wallet; diff --git a/wallettool/src/main/java/org/bitcoinj/wallettool/WalletTool.java b/wallettool/src/main/java/org/bitcoinj/wallettool/WalletTool.java index fc5dfd9ca..3bcbaa0e9 100644 --- a/wallettool/src/main/java/org/bitcoinj/wallettool/WalletTool.java +++ b/wallettool/src/main/java/org/bitcoinj/wallettool/WalletTool.java @@ -47,7 +47,7 @@ import org.bitcoinj.core.AddressFormatException; import org.bitcoinj.core.Base58; import org.bitcoinj.core.BlockChain; import org.bitcoinj.core.CheckpointManager; -import org.bitcoinj.core.Coin; +import org.bitcoinj.base.Coin; import org.bitcoinj.core.Context; import org.bitcoinj.core.DumpedPrivateKey; import org.bitcoinj.core.ECKey; @@ -108,7 +108,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.bitcoinj.core.Coin.parseCoin; +import static org.bitcoinj.base.Coin.parseCoin; import static com.google.common.base.Preconditions.checkNotNull; /**