From 0a6f901b23524af1ee178174a35d06de3d0e29fd Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 30 Sep 2014 17:05:06 +0200 Subject: [PATCH] Renamespace to org.bitcoinj away from com.google.bitcoin, as bitcoinj is no longer a Google project and being namespaced under com.google causes issues with Sonatype/Maven Central. To fixinate your code: find . -name '*.java' | xargs sed -i .bak 's/import com.google.bitcoin./import org.bitcoinj./g;s/import static com.google.bitcoin./import static org.bitcoinj./g' --- README.md | 2 +- core/findbugs.xml | 2 +- core/pom.xml | 8 +- .../bitcoinj}/core/AbstractBlockChain.java | 14 +- .../core/AbstractBlockChainListener.java | 2 +- .../core/AbstractPeerEventListener.java | 2 +- .../core/AbstractWalletEventListener.java | 6 +- .../bitcoinj}/core/Address.java | 6 +- .../core/AddressFormatException.java | 2 +- .../bitcoinj}/core/AddressMessage.java | 2 +- .../bitcoinj}/core/AlertMessage.java | 2 +- .../bitcoin => org/bitcoinj}/core/Base58.java | 2 +- .../bitcoinj}/core/BitcoinSerializer.java | 4 +- .../bitcoin => org/bitcoinj}/core/Block.java | 16 +- .../bitcoinj}/core/BlockChain.java | 10 +- .../bitcoinj}/core/BlockChainListener.java | 6 +- .../bitcoinj}/core/BloomFilter.java | 10 +- .../bitcoinj}/core/CheckpointManager.java | 10 +- .../bitcoinj}/core/ChildMessage.java | 2 +- .../bitcoin => org/bitcoinj}/core/Coin.java | 4 +- .../bitcoinj}/core/DownloadListener.java | 2 +- .../bitcoinj}/core/DumpedPrivateKey.java | 2 +- .../bitcoin => org/bitcoinj}/core/ECKey.java | 14 +- .../bitcoinj}/core/EmptyMessage.java | 2 +- .../bitcoinj}/core/FilteredBlock.java | 2 +- .../bitcoinj}/core/FullPrunedBlockChain.java | 10 +- .../bitcoinj}/core/GetAddrMessage.java | 2 +- .../bitcoinj}/core/GetBlocksMessage.java | 2 +- .../bitcoinj}/core/GetDataMessage.java | 2 +- .../bitcoinj}/core/GetHeadersMessage.java | 2 +- .../bitcoinj}/core/GetUTXOsMessage.java | 2 +- .../bitcoinj}/core/HeadersMessage.java | 2 +- .../core/InsufficientMoneyException.java | 2 +- .../bitcoinj}/core/InventoryItem.java | 2 +- .../bitcoinj}/core/InventoryMessage.java | 2 +- .../bitcoinj}/core/ListMessage.java | 2 +- .../bitcoinj}/core/MemoryPool.java | 4 +- .../bitcoinj}/core/MemoryPoolMessage.java | 2 +- .../bitcoinj}/core/Message.java | 2 +- .../bitcoinj}/core/Monetary.java | 2 +- .../bitcoinj}/core/NetworkParameters.java | 21 +- .../bitcoinj}/core/NotFoundMessage.java | 2 +- .../bitcoinj}/core/PartialMerkleTree.java | 4 +- .../bitcoin => org/bitcoinj}/core/Peer.java | 36 ++-- .../bitcoinj}/core/PeerAddress.java | 8 +- .../bitcoinj}/core/PeerEventListener.java | 6 +- .../bitcoinj}/core/PeerException.java | 2 +- .../bitcoinj}/core/PeerFilterProvider.java | 6 +- .../bitcoinj}/core/PeerGroup.java | 40 ++-- .../bitcoinj}/core/PeerSocketHandler.java | 16 +- .../bitcoin => org/bitcoinj}/core/Ping.java | 2 +- .../bitcoin => org/bitcoinj}/core/Pong.java | 2 +- .../bitcoinj}/core/ProtocolException.java | 2 +- .../bitcoinj}/core/PrunedException.java | 2 +- .../bitcoinj}/core/RejectMessage.java | 2 +- .../bitcoinj}/core/ScriptException.java | 2 +- .../bitcoinj}/core/Sha256Hash.java | 2 +- .../bitcoinj}/core/StoredBlock.java | 6 +- .../core/StoredTransactionOutput.java | 2 +- .../bitcoinj}/core/StoredUndoableBlock.java | 2 +- .../bitcoinj}/core/Transaction.java | 24 +-- .../bitcoinj}/core/TransactionBag.java | 8 +- .../bitcoinj}/core/TransactionBroadcast.java | 4 +- .../core/TransactionBroadcaster.java | 4 +- .../bitcoinj}/core/TransactionConfidence.java | 19 +- .../bitcoinj}/core/TransactionInput.java | 10 +- .../bitcoinj}/core/TransactionOutPoint.java | 10 +- .../bitcoinj}/core/TransactionOutput.java | 8 +- .../core/TransactionOutputChanges.java | 2 +- .../bitcoinj}/core/UTXOsMessage.java | 3 +- .../bitcoinj}/core/UnknownMessage.java | 2 +- .../core/UnsafeByteArrayOutputStream.java | 2 +- .../bitcoin => org/bitcoinj}/core/Utils.java | 2 +- .../bitcoin => org/bitcoinj}/core/VarInt.java | 6 +- .../bitcoinj}/core/VerificationException.java | 2 +- .../bitcoinj}/core/VersionAck.java | 2 +- .../bitcoinj}/core/VersionMessage.java | 2 +- .../core/VersionedChecksummedBytes.java | 4 +- .../bitcoin => org/bitcoinj}/core/Wallet.java | 103 +++++---- .../bitcoinj}/core/WalletEventListener.java | 8 +- .../bitcoinj}/core/WalletExtension.java | 2 +- .../bitcoinj}/core/WrongNetworkException.java | 2 +- .../bitcoinj}/crypto/BIP38PrivateKey.java | 4 +- .../bitcoinj}/crypto/ChildNumber.java | 2 +- .../bitcoinj}/crypto/DRMWorkaround.java | 4 +- .../crypto/DeterministicHierarchy.java | 2 +- .../bitcoinj}/crypto/DeterministicKey.java | 10 +- .../bitcoinj}/crypto/EncryptableItem.java | 4 +- .../bitcoinj}/crypto/EncryptedData.java | 2 +- .../bitcoinj}/crypto/EncryptedPrivateKey.java | 2 +- .../crypto/HDDerivationException.java | 2 +- .../bitcoinj}/crypto/HDKeyDerivation.java | 6 +- .../bitcoinj}/crypto/HDUtils.java | 4 +- .../bitcoinj}/crypto/KeyCrypter.java | 2 +- .../bitcoinj}/crypto/KeyCrypterException.java | 2 +- .../bitcoinj}/crypto/KeyCrypterScrypt.java | 2 +- .../bitcoinj}/crypto/MnemonicCode.java | 8 +- .../bitcoinj}/crypto/MnemonicException.java | 2 +- .../bitcoinj}/crypto/PBKDF2SHA512.java | 2 +- .../crypto/TransactionSignature.java | 10 +- .../bitcoinj}/crypto/TrustStoreLoader.java | 2 +- .../bitcoinj}/crypto/X509Utils.java | 4 +- .../jni/NativeBlockChainListener.java | 4 +- .../bitcoinj}/jni/NativeFutureCallback.java | 2 +- .../NativePaymentChannelHandlerFactory.java | 6 +- ...ntChannelServerConnectionEventHandler.java | 8 +- .../jni/NativePeerEventListener.java | 4 +- .../NativeTransactionConfidenceListener.java | 6 +- .../jni/NativeWalletEventListener.java | 14 +- .../bitcoinj}/kits/WalletAppKit.java | 20 +- .../bitcoinj}/net/AbstractTimeoutHandler.java | 2 +- .../bitcoinj}/net/BlockingClient.java | 2 +- .../bitcoinj}/net/BlockingClientManager.java | 2 +- .../net/ClientConnectionManager.java | 2 +- .../bitcoinj}/net/ConnectionHandler.java | 6 +- .../bitcoinj}/net/FilterMerger.java | 12 +- .../bitcoinj}/net/MessageWriteTarget.java | 2 +- .../bitcoinj}/net/NioClient.java | 2 +- .../bitcoinj}/net/NioClientManager.java | 2 +- .../bitcoinj}/net/NioServer.java | 2 +- .../bitcoinj}/net/ProtobufParser.java | 6 +- .../bitcoinj}/net/StreamParser.java | 2 +- .../bitcoinj}/net/StreamParserFactory.java | 2 +- .../bitcoinj}/net/discovery/DnsDiscovery.java | 4 +- .../bitcoinj}/net/discovery/IrcDiscovery.java | 8 +- .../net/discovery/PeerDiscovery.java | 2 +- .../net/discovery/PeerDiscoveryException.java | 2 +- .../bitcoinj}/net/discovery/SeedPeers.java | 4 +- .../bitcoinj}/net/discovery/TorDiscovery.java | 4 +- .../bitcoinj}/params/MainNetParams.java | 8 +- .../bitcoinj}/params/Networks.java | 4 +- .../bitcoinj}/params/RegTestParams.java | 4 +- .../bitcoinj}/params/TestNet2Params.java | 6 +- .../bitcoinj}/params/TestNet3Params.java | 6 +- .../bitcoinj}/params/UnitTestParams.java | 8 +- .../protocols/channels/ClientState.java | 200 +++++++++--------- .../channels/IPaymentChannelClient.java | 26 +-- .../channels/PaymentChannelClient.java | 12 +- .../PaymentChannelClientConnection.java | 20 +- .../channels/PaymentChannelClientState.java | 16 +- .../PaymentChannelCloseException.java | 6 +- .../channels/PaymentChannelServer.java | 8 +- .../PaymentChannelServerListener.java | 16 +- .../channels/PaymentChannelServerState.java | 10 +- .../channels/PaymentIncrementAck.java | 4 +- .../ServerConnectionEventHandler.java | 12 +- .../protocols/channels/ServerState.java | 200 +++++++++--------- .../channels/Simple channels protocol.txt | 0 .../StoredPaymentChannelClientStates.java | 6 +- .../StoredPaymentChannelServerStates.java | 6 +- .../channels/StoredServerChannel.java | 6 +- .../channels/ValueOutOfRangeException.java | 2 +- .../protocols/payments/PaymentProtocol.java | 8 +- .../payments/PaymentProtocolException.java | 2 +- .../protocols/payments/PaymentSession.java | 15 +- .../bitcoinj}/script/Script.java | 8 +- .../bitcoinj}/script/ScriptBuilder.java | 14 +- .../bitcoinj}/script/ScriptChunk.java | 22 +- .../bitcoinj}/script/ScriptOpCodes.java | 4 +- .../signers/CustomTransactionSigner.java | 16 +- .../signers/LocalTransactionSigner.java | 24 +-- .../signers/MissingSigResolutionSigner.java | 18 +- .../signers/StatelessTransactionSigner.java | 2 +- .../bitcoinj}/signers/TransactionSigner.java | 12 +- .../bitcoinj}/store/BlockStore.java | 10 +- .../bitcoinj}/store/BlockStoreException.java | 2 +- .../bitcoinj}/store/FullPrunedBlockStore.java | 10 +- .../store/H2FullPrunedBlockStore.java | 4 +- .../bitcoinj}/store/MemoryBlockStore.java | 6 +- .../store/MemoryFullPrunedBlockStore.java | 4 +- .../store/PostgresFullPrunedBlockStore.java | 8 +- .../bitcoinj}/store/SPVBlockStore.java | 6 +- .../store/UnreadableWalletException.java | 2 +- .../store/WalletProtobufSerializer.java | 24 +-- .../bitcoinj}/testing/FakeTxBuilder.java | 10 +- .../testing/InboundMessageQueuer.java | 6 +- .../testing/KeyChainTransactionSigner.java | 12 +- .../testing/MockTransactionBroadcaster.java | 12 +- .../testing/NopTransactionSigner.java | 6 +- .../testing/TestWithNetworkConnections.java | 16 +- .../bitcoinj}/testing/TestWithPeerGroup.java | 14 +- .../bitcoinj}/testing/TestWithWallet.java | 16 +- .../bitcoinj}/uri/BitcoinURI.java | 10 +- .../uri/BitcoinURIParseException.java | 2 +- .../uri/OptionalFieldValidationException.java | 2 +- .../uri/RequiredFieldValidationException.java | 2 +- .../bitcoinj}/utils/BaseTaggableObject.java | 2 +- .../bitcoinj}/utils/BlockFileLoader.java | 10 +- .../bitcoinj}/utils/BriefLogFormatter.java | 2 +- .../bitcoinj}/utils/BtcAutoFormat.java | 6 +- .../bitcoinj}/utils/BtcFixedFormat.java | 8 +- .../bitcoinj}/utils/BtcFormat.java | 17 +- .../bitcoinj}/utils/ExchangeRate.java | 4 +- .../bitcoinj}/utils/ExponentialBackoff.java | 4 +- .../bitcoin => org/bitcoinj}/utils/Fiat.java | 4 +- .../bitcoinj}/utils/ListenerRegistration.java | 2 +- .../bitcoinj}/utils/MonetaryFormat.java | 10 +- .../bitcoinj}/utils/TaggableObject.java | 2 +- .../bitcoinj}/utils/Threading.java | 2 +- .../wallet/AbstractKeyChainEventListener.java | 4 +- .../wallet/AllowUnconfirmedCoinSelector.java | 4 +- .../bitcoinj}/wallet/BasicKeyChain.java | 23 +- .../bitcoinj}/wallet/CoinSelection.java | 8 +- .../bitcoinj}/wallet/CoinSelector.java | 8 +- .../bitcoinj}/wallet/DecryptingKeyBag.java | 6 +- .../bitcoinj}/wallet/DefaultCoinSelector.java | 16 +- .../bitcoinj}/wallet/DefaultRiskAnalysis.java | 20 +- .../wallet/DeterministicKeyChain.java | 35 ++- .../bitcoinj}/wallet/DeterministicSeed.java | 19 +- ...DeterministicUpgradeRequiredException.java | 2 +- .../DeterministicUpgradeRequiresPassword.java | 2 +- .../bitcoinj}/wallet/EncryptableKeyChain.java | 12 +- .../wallet/FilteringCoinSelector.java | 4 +- .../bitcoinj}/wallet/KeyBag.java | 4 +- .../bitcoinj}/wallet/KeyChain.java | 11 +- .../wallet/KeyChainEventListener.java | 4 +- .../bitcoinj}/wallet/KeyChainGroup.java | 71 +++---- .../bitcoinj}/wallet/KeyTimeCoinSelector.java | 8 +- .../bitcoinj}/wallet/RedeemData.java | 6 +- .../bitcoinj}/wallet/RiskAnalysis.java | 6 +- .../bitcoinj}/wallet/WalletFiles.java | 6 +- .../bitcoinj}/wallet/WalletTransaction.java | 6 +- .../bitcoin => org/bitcoinj}/crypto/cacerts | Bin .../crypto/mnemonic/wordlist/english.txt | 0 core/src/storedclientpaymentchannel.proto | 2 +- core/src/storedserverpaymentchannel.proto | 2 +- .../AbstractFullPrunedBlockChainTest.java | 18 +- .../bitcoinj}/core/AddressTest.java | 14 +- .../bitcoinj}/core/AlertMessageTest.java | 6 +- .../bitcoinj}/core/Base58Test.java | 2 +- .../bitcoinj}/core/BitcoinSerializerTest.java | 6 +- .../core/BitcoindComparisonTool.java | 16 +- .../bitcoinj}/core/BlockChainTest.java | 24 +-- .../bitcoinj}/core/BlockTest.java | 10 +- .../bitcoinj}/core/BloomFilterTest.java | 8 +- .../bitcoinj}/core/ChainSplitTest.java | 16 +- .../bitcoinj}/core/CoinTest.java | 6 +- .../bitcoinj}/core/CoinbaseBlockTest.java | 8 +- .../bitcoinj}/core/DumpedPrivateKeyTest.java | 4 +- .../bitcoinj}/core/ECKeyTest.java | 22 +- ...ilteredBlockAndPartialMerkleTreeTests.java | 18 +- .../core/FullBlockTestGenerator.java | 14 +- .../core/H2FullPrunedBlockChainTest.java | 8 +- .../core/LazyParseByteCacheTest.java | 18 +- .../core/MemoryFullPrunedBlockChainTest.java | 8 +- .../bitcoinj}/core/MemoryPoolTest.java | 10 +- .../bitcoinj}/core/MessageTest.java | 4 +- .../bitcoinj}/core/PeerAddressTest.java | 6 +- .../bitcoinj}/core/PeerGroupTest.java | 20 +- .../bitcoinj}/core/PeerTest.java | 16 +- .../PostgresFullPrunedBlockChainTest.java | 8 +- .../core/TransactionBroadcastTest.java | 14 +- .../bitcoinj}/core/TransactionTest.java | 8 +- .../bitcoinj}/core/UtilsTest.java | 2 +- .../bitcoinj}/core/VarIntTest.java | 2 +- .../bitcoinj}/core/VersionMessageTest.java | 6 +- .../bitcoinj}/core/WalletTest.java | 35 ++- .../bitcoinj}/crypto/BIP32Test.java | 8 +- .../bitcoinj}/crypto/BIP38PrivateKeyTest.java | 11 +- .../crypto/ChildKeyDerivationTest.java | 8 +- .../bitcoinj}/crypto/HDUtilsTest.java | 4 +- .../crypto/KeyCrypterScryptTest.java | 6 +- .../bitcoinj}/crypto/MnemonicCodeTest.java | 4 +- .../bitcoinj}/crypto/X509UtilsTest.java | 3 +- .../net/NetworkAbstractionTests.java | 4 +- .../net/discovery/SeedPeersTest.java | 4 +- .../channels/ChannelConnectionTest.java | 19 +- .../protocols/channels/ChannelTestUtils.java | 11 +- .../channels/PaymentChannelClientTest.java | 4 +- .../channels/PaymentChannelServerTest.java | 10 +- .../channels/PaymentChannelStateTest.java | 16 +- .../payments/PaymentProtocolTest.java | 20 +- .../payments/PaymentSessionTest.java | 12 +- .../bitcoinj}/script/ScriptChunkTest.java | 8 +- .../bitcoinj}/script/ScriptTest.java | 20 +- .../bitcoinj}/store/SPVBlockStoreTest.java | 12 +- .../store/WalletProtobufSerializerTest.java | 28 +-- .../bitcoinj}/uri/BitcoinURITest.java | 10 +- .../utils/BaseTaggableObjectTest.java | 2 +- .../bitcoinj}/utils/BtcFormatTest.java | 16 +- .../bitcoinj}/utils/ExchangeRateTest.java | 4 +- .../utils/ExponentialBackoffTest.java | 5 +- .../bitcoinj}/utils/FiatTest.java | 4 +- .../bitcoinj}/utils/MonetaryFormatTest.java | 12 +- .../bitcoinj}/wallet/BasicKeyChainTest.java | 21 +- .../wallet/DefaultCoinSelectorTest.java | 16 +- .../wallet/DefaultRiskAnalysisTest.java | 16 +- .../wallet/DeterministicKeyChainTest.java | 19 +- .../bitcoinj}/wallet/KeyChainGroupTest.java | 14 +- .../bitcoinj}/core/block169482.dat | Bin .../bitcoinj}/core/first-100k-blocks.dat | Bin .../bitcoinj}/core/sig_canonical.json | 0 .../bitcoinj}/core/sig_noncanonical.json | 0 .../bitcoinj}/crypto/comodo-smime.crt | 0 .../bitcoinj}/crypto/startssl-client.crt | 0 .../bitcoinj}/crypto/startssl-smime.crt | 0 .../bitcoinj}/protocols/payments/README | 0 .../payments/pki_test.bitcoinpaymentrequest | Bin .../protocols/payments/test-cacert.key | 0 .../bitcoinj}/protocols/payments/test-cacerts | Bin .../protocols/payments/test-expired-cert | Bin .../protocols/payments/test-valid-cert | Bin .../bitcoinj}/script/script_invalid.json | 0 .../bitcoinj}/script/script_valid.json | 0 .../bitcoinj}/script/tx_invalid.json | 0 .../bitcoinj}/script/tx_valid.json | 0 .../deterministic-wallet-serialization.txt | 0 .../wallet/watching-wallet-serialization.txt | 0 examples/pom.xml | 6 +- .../examples/BackupToMnemonicSeed.java | 10 +- .../bitcoinj}/examples/DoubleSpend.java | 14 +- .../bitcoinj}/examples/DumpWallet.java | 4 +- .../examples/ExamplePaymentChannelClient.java | 20 +- .../examples/ExamplePaymentChannelServer.java | 20 +- .../bitcoinj}/examples/FetchBlock.java | 12 +- .../bitcoinj}/examples/FetchTransactions.java | 12 +- .../bitcoinj}/examples/ForwardingService.java | 16 +- .../bitcoinj}/examples/Kit.java | 20 +- .../bitcoinj}/examples/PeerMonitor.java | 16 +- .../bitcoinj}/examples/PrintPeers.java | 22 +- .../bitcoinj}/examples/PrivateKeys.java | 8 +- .../bitcoinj}/examples/RefreshWallet.java | 10 +- .../bitcoinj}/examples/RestoreFromSeed.java | 12 +- .../bitcoinj}/examples/SendRequest.java | 18 +- examples/src/main/python/forwarding.py | 8 +- pom.xml | 2 +- tools/pom.xml | 8 +- .../bitcoinj}/tools/BlockImporter.java | 14 +- .../bitcoinj}/tools/BuildCheckpoints.java | 14 +- .../bitcoinj}/tools/PaymentProtocolTool.java | 14 +- .../bitcoinj}/tools/TestFeeLevel.java | 10 +- .../bitcoinj}/tools/WalletTool.java | 42 ++-- .../bitcoinj}/tools/WatchMempool.java | 10 +- .../bitcoinj}/tools/wallet-tool-help.txt | 0 wallettemplate/pom.xml | 4 +- .../src/main/java/wallettemplate/Main.java | 16 +- .../java/wallettemplate/MainController.java | 6 +- .../wallettemplate/SendMoneyController.java | 2 +- .../WalletPasswordController.java | 2 +- .../WalletSetPasswordController.java | 2 +- .../WalletSettingsController.java | 4 +- .../controls/BitcoinAddressValidator.java | 6 +- .../controls/ClickableBitcoinAddress.java | 4 +- .../wallettemplate/utils/BitcoinUIModel.java | 2 +- .../utils/KeyDerivationTasks.java | 2 +- 345 files changed, 1565 insertions(+), 1588 deletions(-) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AbstractBlockChain.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AbstractBlockChainListener.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AbstractPeerEventListener.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AbstractWalletEventListener.java (92%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Address.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AddressFormatException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AddressMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/AlertMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Base58.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/BitcoinSerializer.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Block.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/BlockChain.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/BlockChainListener.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/BloomFilter.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/CheckpointManager.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/ChildMessage.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Coin.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/DownloadListener.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/DumpedPrivateKey.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/ECKey.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/EmptyMessage.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/FilteredBlock.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/FullPrunedBlockChain.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/GetAddrMessage.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/GetBlocksMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/GetDataMessage.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/GetHeadersMessage.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/GetUTXOsMessage.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/HeadersMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/InsufficientMoneyException.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/InventoryItem.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/InventoryMessage.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/ListMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/MemoryPool.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/MemoryPoolMessage.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Message.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Monetary.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/NetworkParameters.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/NotFoundMessage.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PartialMerkleTree.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Peer.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PeerAddress.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PeerEventListener.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PeerException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PeerFilterProvider.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PeerGroup.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PeerSocketHandler.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Ping.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Pong.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/ProtocolException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/PrunedException.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/RejectMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/ScriptException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Sha256Hash.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/StoredBlock.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/StoredTransactionOutput.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/StoredUndoableBlock.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Transaction.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionBag.java (84%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionBroadcast.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionBroadcaster.java (92%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionConfidence.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionInput.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionOutPoint.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionOutput.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionOutputChanges.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/UTXOsMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/UnknownMessage.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/UnsafeByteArrayOutputStream.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Utils.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/VarInt.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/VerificationException.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/VersionAck.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/VersionMessage.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/VersionedChecksummedBytes.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/Wallet.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/WalletEventListener.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/WalletExtension.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/core/WrongNetworkException.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/BIP38PrivateKey.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/ChildNumber.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/DRMWorkaround.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/DeterministicHierarchy.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/DeterministicKey.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/EncryptableItem.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/EncryptedData.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/EncryptedPrivateKey.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/HDDerivationException.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/HDKeyDerivation.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/HDUtils.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/KeyCrypter.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/KeyCrypterException.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/KeyCrypterScrypt.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/MnemonicCode.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/MnemonicException.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/PBKDF2SHA512.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/TransactionSignature.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/TrustStoreLoader.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/crypto/X509Utils.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativeBlockChainListener.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativeFutureCallback.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativePaymentChannelHandlerFactory.java (75%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativePaymentChannelServerConnectionEventHandler.java (77%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativePeerEventListener.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativeTransactionConfidenceListener.java (89%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/jni/NativeWalletEventListener.java (84%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/kits/WalletAppKit.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/AbstractTimeoutHandler.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/BlockingClient.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/BlockingClientManager.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/ClientConnectionManager.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/ConnectionHandler.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/FilterMerger.java (92%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/MessageWriteTarget.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/NioClient.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/NioClientManager.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/NioServer.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/ProtobufParser.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/StreamParser.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/StreamParserFactory.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/DnsDiscovery.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/IrcDiscovery.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/PeerDiscovery.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/PeerDiscoveryException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/SeedPeers.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/TorDiscovery.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/params/MainNetParams.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/params/Networks.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/params/RegTestParams.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/params/TestNet2Params.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/params/TestNet3Params.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/params/UnitTestParams.java (89%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/ClientState.java (81%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/IPaymentChannelClient.java (82%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelClient.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelClientConnection.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelClientState.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelCloseException.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelServer.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelServerListener.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelServerState.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentIncrementAck.java (85%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/ServerConnectionEventHandler.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/ServerState.java (80%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/Simple channels protocol.txt (100%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/StoredPaymentChannelClientStates.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/StoredPaymentChannelServerStates.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/StoredServerChannel.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/ValueOutOfRangeException.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/payments/PaymentProtocol.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/payments/PaymentProtocolException.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/protocols/payments/PaymentSession.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/script/Script.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/script/ScriptBuilder.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/script/ScriptChunk.java (88%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/script/ScriptOpCodes.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/signers/CustomTransactionSigner.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/signers/LocalTransactionSigner.java (90%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/signers/MissingSigResolutionSigner.java (90%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/signers/StatelessTransactionSigner.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/signers/TransactionSigner.java (90%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/BlockStore.java (88%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/BlockStoreException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/FullPrunedBlockStore.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/H2FullPrunedBlockStore.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/MemoryBlockStore.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/MemoryFullPrunedBlockStore.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/PostgresFullPrunedBlockStore.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/SPVBlockStore.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/UnreadableWalletException.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/store/WalletProtobufSerializer.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/FakeTxBuilder.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/InboundMessageQueuer.java (87%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/KeyChainTransactionSigner.java (85%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/MockTransactionBroadcaster.java (93%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/NopTransactionSigner.java (90%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/TestWithNetworkConnections.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/TestWithPeerGroup.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/testing/TestWithWallet.java (90%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/uri/BitcoinURI.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/uri/BitcoinURIParseException.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/uri/OptionalFieldValidationException.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/uri/RequiredFieldValidationException.java (95%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/BaseTaggableObject.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/BlockFileLoader.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/BriefLogFormatter.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/BtcAutoFormat.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/BtcFixedFormat.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/BtcFormat.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/ExchangeRate.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/ExponentialBackoff.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/Fiat.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/ListenerRegistration.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/MonetaryFormat.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/TaggableObject.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/utils/Threading.java (99%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/AbstractKeyChainEventListener.java (70%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/AllowUnconfirmedCoinSelector.java (90%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/BasicKeyChain.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/CoinSelection.java (73%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/CoinSelector.java (80%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DecryptingKeyBag.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DefaultCoinSelector.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DefaultRiskAnalysis.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DeterministicKeyChain.java (97%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DeterministicSeed.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DeterministicUpgradeRequiredException.java (88%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/DeterministicUpgradeRequiresPassword.java (91%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/EncryptableKeyChain.java (85%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/FilteringCoinSelector.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/KeyBag.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/KeyChain.java (93%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/KeyChainEventListener.java (93%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/KeyChainGroup.java (93%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/KeyTimeCoinSelector.java (94%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/RedeemData.java (96%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/RiskAnalysis.java (92%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/WalletFiles.java (98%) rename core/src/main/java/{com/google/bitcoin => org/bitcoinj}/wallet/WalletTransaction.java (91%) rename core/src/main/resources/{com/google/bitcoin => org/bitcoinj}/crypto/cacerts (100%) rename core/src/main/resources/{com/google/bitcoin => org/bitcoinj}/crypto/mnemonic/wordlist/english.txt (100%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/AbstractFullPrunedBlockChainTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/AddressTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/AlertMessageTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/Base58Test.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/BitcoinSerializerTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/BitcoindComparisonTool.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/BlockChainTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/BlockTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/BloomFilterTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/ChainSplitTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/CoinTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/CoinbaseBlockTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/DumpedPrivateKeyTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/ECKeyTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/FilteredBlockAndPartialMerkleTreeTests.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/FullBlockTestGenerator.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/H2FullPrunedBlockChainTest.java (81%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/LazyParseByteCacheTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/MemoryFullPrunedBlockChainTest.java (72%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/MemoryPoolTest.java (93%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/MessageTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/PeerAddressTest.java (92%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/PeerGroupTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/PeerTest.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/PostgresFullPrunedBlockChainTest.java (89%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionBroadcastTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/TransactionTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/UtilsTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/VarIntTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/VersionMessageTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/core/WalletTest.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/BIP32Test.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/BIP38PrivateKeyTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/ChildKeyDerivationTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/HDUtilsTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/KeyCrypterScryptTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/MnemonicCodeTest.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/crypto/X509UtilsTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/net/NetworkAbstractionTests.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/net/discovery/SeedPeersTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/ChannelConnectionTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/ChannelTestUtils.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelClientTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelServerTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/channels/PaymentChannelStateTest.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/payments/PaymentProtocolTest.java (92%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/protocols/payments/PaymentSessionTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/script/ScriptChunkTest.java (89%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/script/ScriptTest.java (97%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/store/SPVBlockStoreTest.java (88%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/store/WalletProtobufSerializerTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/uri/BitcoinURITest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/utils/BaseTaggableObjectTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/utils/BtcFormatTest.java (99%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/utils/ExchangeRateTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/utils/ExponentialBackoffTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/utils/FiatTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/utils/MonetaryFormatTest.java (98%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/wallet/BasicKeyChainTest.java (95%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/wallet/DefaultCoinSelectorTest.java (92%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/wallet/DefaultRiskAnalysisTest.java (94%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/wallet/DeterministicKeyChainTest.java (96%) rename core/src/test/java/{com/google/bitcoin => org/bitcoinj}/wallet/KeyChainGroupTest.java (98%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/core/block169482.dat (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/core/first-100k-blocks.dat (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/core/sig_canonical.json (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/core/sig_noncanonical.json (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/crypto/comodo-smime.crt (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/crypto/startssl-client.crt (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/crypto/startssl-smime.crt (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/protocols/payments/README (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/protocols/payments/pki_test.bitcoinpaymentrequest (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/protocols/payments/test-cacert.key (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/protocols/payments/test-cacerts (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/protocols/payments/test-expired-cert (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/protocols/payments/test-valid-cert (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/script/script_invalid.json (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/script/script_valid.json (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/script/tx_invalid.json (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/script/tx_valid.json (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/wallet/deterministic-wallet-serialization.txt (100%) rename core/src/test/resources/{com/google/bitcoin => org/bitcoinj}/wallet/watching-wallet-serialization.txt (100%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/BackupToMnemonicSeed.java (82%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/DoubleSpend.java (84%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/DumpWallet.java (93%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/ExamplePaymentChannelClient.java (94%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/ExamplePaymentChannelServer.java (91%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/FetchBlock.java (87%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/FetchTransactions.java (89%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/ForwardingService.java (94%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/Kit.java (88%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/PeerMonitor.java (96%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/PrintPeers.java (89%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/PrivateKeys.java (95%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/RefreshWallet.java (90%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/RestoreFromSeed.java (92%) rename examples/src/main/java/{com/google/bitcoin => org/bitcoinj}/examples/SendRequest.java (90%) rename tools/src/main/java/{com/google/bitcoin => org/bitcoinj}/tools/BlockImporter.java (86%) rename tools/src/main/java/{com/google/bitcoin => org/bitcoinj}/tools/BuildCheckpoints.java (95%) rename tools/src/main/java/{com/google/bitcoin => org/bitcoinj}/tools/PaymentProtocolTool.java (92%) rename tools/src/main/java/{com/google/bitcoin => org/bitcoinj}/tools/TestFeeLevel.java (91%) rename tools/src/main/java/{com/google/bitcoin => org/bitcoinj}/tools/WalletTool.java (97%) rename tools/src/main/java/{com/google/bitcoin => org/bitcoinj}/tools/WatchMempool.java (87%) rename tools/src/main/resources/{com/google/bitcoin => org/bitcoinj}/tools/wallet-tool-help.txt (100%) diff --git a/README.md b/README.md index 9ef262f7..231d99e0 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ If you send coins to that address, it will forward them on to the address you sp ``` cd examples - mvn exec:java -Dexec.mainClass=com.google.bitcoin.examples.ForwardingService -Dexec.args="" + mvn exec:java -Dexec.mainClass=org.bitcoinj.examples.ForwardingService -Dexec.args="" ``` Note that this example app *does not use checkpointing*, so the initial chain sync will be pretty slow. You can make an app that starts up and does the initial sync much faster by including a checkpoints file; see the documentation for diff --git a/core/findbugs.xml b/core/findbugs.xml index 7b8e1ffd..1fbc59d8 100644 --- a/core/findbugs.xml +++ b/core/findbugs.xml @@ -38,7 +38,7 @@ - + diff --git a/core/pom.xml b/core/pom.xml index 36b2f33b..17616a10 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -20,12 +20,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google + org.bitcoinj bitcoinj-parent 0.12-SNAPSHOT - bitcoinj + bitcoinj-core bitcoinj A Java Bitcoin library @@ -246,7 +246,7 @@ target/test-classes/ - com.google + org.bitcoinj bitcoinj 0.12-SNAPSHOT @@ -280,7 +280,7 @@ - com.google.bitcoin.core.BitcoindComparisonTool + org.bitcoinj.core.BitcoindComparisonTool false diff --git a/core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java b/core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java rename to core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java index 210f231e..7b28eff4 100644 --- a/core/src/main/java/com/google/bitcoin/core/AbstractBlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/AbstractBlockChain.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import com.google.common.util.concurrent.ListenableFuture; @@ -47,7 +47,7 @@ import static com.google.common.base.Preconditions.*; *

An AbstractBlockChain implementation must be connected to a {@link BlockStore} implementation. The chain object * by itself doesn't store any data, that's delegated to the store. Which store you use is a decision best made by * reading the getting started guide, but briefly, fully validating block chains need fully validating stores. In - * the lightweight SPV mode, a {@link com.google.bitcoin.store.SPVBlockStore} is the right choice.

+ * the lightweight SPV mode, a {@link org.bitcoinj.store.SPVBlockStore} is the right choice.

* *

This class implements an abstract class which makes it simple to create a BlockChain that does/doesn't do full * verification. It verifies headers and is implements most of what is required to implement SPV mode, but @@ -56,7 +56,7 @@ import static com.google.common.base.Preconditions.*; *

There are two subclasses of AbstractBlockChain that are useful: {@link BlockChain}, which is the simplest * class and implements simplified payment verification. This is a lightweight and efficient mode that does * not verify the contents of blocks, just their headers. A {@link FullPrunedBlockChain} paired with a - * {@link com.google.bitcoin.store.H2FullPrunedBlockStore} implements full verification, which is equivalent to the + * {@link org.bitcoinj.store.H2FullPrunedBlockStore} implements full verification, which is equivalent to the * original Satoshi client. To learn more about the alternative security models, please consult the articles on the * website.

* diff --git a/core/src/main/java/com/google/bitcoin/core/AbstractBlockChainListener.java b/core/src/main/java/org/bitcoinj/core/AbstractBlockChainListener.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/AbstractBlockChainListener.java rename to core/src/main/java/org/bitcoinj/core/AbstractBlockChainListener.java index adabca0a..a3e95495 100644 --- a/core/src/main/java/com/google/bitcoin/core/AbstractBlockChainListener.java +++ b/core/src/main/java/org/bitcoinj/core/AbstractBlockChainListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/core/AbstractPeerEventListener.java b/core/src/main/java/org/bitcoinj/core/AbstractPeerEventListener.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/AbstractPeerEventListener.java rename to core/src/main/java/org/bitcoinj/core/AbstractPeerEventListener.java index 86ceff72..add09511 100644 --- a/core/src/main/java/com/google/bitcoin/core/AbstractPeerEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/AbstractPeerEventListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/core/AbstractWalletEventListener.java b/core/src/main/java/org/bitcoinj/core/AbstractWalletEventListener.java similarity index 92% rename from core/src/main/java/com/google/bitcoin/core/AbstractWalletEventListener.java rename to core/src/main/java/org/bitcoinj/core/AbstractWalletEventListener.java index 7f98d005..3162a64c 100644 --- a/core/src/main/java/com/google/bitcoin/core/AbstractWalletEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/AbstractWalletEventListener.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.AbstractKeyChainEventListener; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.AbstractKeyChainEventListener; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/core/Address.java b/core/src/main/java/org/bitcoinj/core/Address.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Address.java rename to core/src/main/java/org/bitcoinj/core/Address.java index 95790e3e..7c8a0cf1 100644 --- a/core/src/main/java/com/google/bitcoin/core/Address.java +++ b/core/src/main/java/org/bitcoinj/core/Address.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.Networks; -import com.google.bitcoin.script.Script; +import org.bitcoinj.params.Networks; +import org.bitcoinj.script.Script; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/core/AddressFormatException.java b/core/src/main/java/org/bitcoinj/core/AddressFormatException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/AddressFormatException.java rename to core/src/main/java/org/bitcoinj/core/AddressFormatException.java index 2dac3253..37a2bdef 100644 --- a/core/src/main/java/com/google/bitcoin/core/AddressFormatException.java +++ b/core/src/main/java/org/bitcoinj/core/AddressFormatException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; @SuppressWarnings("serial") public class AddressFormatException extends Exception { diff --git a/core/src/main/java/com/google/bitcoin/core/AddressMessage.java b/core/src/main/java/org/bitcoinj/core/AddressMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/AddressMessage.java rename to core/src/main/java/org/bitcoinj/core/AddressMessage.java index 3693f2fe..b9a22977 100644 --- a/core/src/main/java/com/google/bitcoin/core/AddressMessage.java +++ b/core/src/main/java/org/bitcoinj/core/AddressMessage.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/AlertMessage.java b/core/src/main/java/org/bitcoinj/core/AlertMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/AlertMessage.java rename to core/src/main/java/org/bitcoinj/core/AlertMessage.java index 13261ef1..ed26389a 100644 --- a/core/src/main/java/com/google/bitcoin/core/AlertMessage.java +++ b/core/src/main/java/org/bitcoinj/core/AlertMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.Date; import java.util.HashSet; diff --git a/core/src/main/java/com/google/bitcoin/core/Base58.java b/core/src/main/java/org/bitcoinj/core/Base58.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/Base58.java rename to core/src/main/java/org/bitcoinj/core/Base58.java index 3da3c071..913d20ba 100644 --- a/core/src/main/java/com/google/bitcoin/core/Base58.java +++ b/core/src/main/java/org/bitcoinj/core/Base58.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.UnsupportedEncodingException; import java.math.BigInteger; diff --git a/core/src/main/java/com/google/bitcoin/core/BitcoinSerializer.java b/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/BitcoinSerializer.java rename to core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java index 45a5f6c2..547207b5 100644 --- a/core/src/main/java/com/google/bitcoin/core/BitcoinSerializer.java +++ b/core/src/main/java/org/bitcoinj/core/BitcoinSerializer.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,7 +28,7 @@ import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; -import static com.google.bitcoin.core.Utils.*; +import static org.bitcoinj.core.Utils.*; /** *

Methods to serialize and de-serialize messages to the Bitcoin network format as defined in diff --git a/core/src/main/java/com/google/bitcoin/core/Block.java b/core/src/main/java/org/bitcoinj/core/Block.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Block.java rename to core/src/main/java/org/bitcoinj/core/Block.java index 42713de2..93aad4c3 100644 --- a/core/src/main/java/com/google/bitcoin/core/Block.java +++ b/core/src/main/java/org/bitcoinj/core/Block.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -35,9 +35,9 @@ import java.util.Date; import java.util.LinkedList; import java.util.List; -import static com.google.bitcoin.core.Coin.FIFTY_COINS; -import static com.google.bitcoin.core.Utils.doubleDigest; -import static com.google.bitcoin.core.Utils.doubleDigestTwoBuffers; +import static org.bitcoinj.core.Coin.FIFTY_COINS; +import static org.bitcoinj.core.Utils.doubleDigest; +import static org.bitcoinj.core.Utils.doubleDigestTwoBuffers; /** *

A block is a group of transactions, and is one of the fundamental data structures of the Bitcoin system. @@ -164,7 +164,7 @@ public class Block extends Message { * the system it was 50 coins per block, in late 2012 it went to 25 coins per block, and so on. The size of * a coinbase transaction is inflation plus fees.

* - *

The half-life is controlled by {@link com.google.bitcoin.core.NetworkParameters#getSubsidyDecreaseBlockCount()}. + *

The half-life is controlled by {@link org.bitcoinj.core.NetworkParameters#getSubsidyDecreaseBlockCount()}. *

*/ public Coin getBlockInflation(int height) { @@ -915,7 +915,7 @@ public class Block extends Message { * Returns the difficulty of the proof of work that this block should meet encoded in compact form. The {@link * BlockChain} verifies that this is not too easy by looking at the length of the chain when the block is added. * To find the actual value the hash should be compared against, use - * {@link com.google.bitcoin.core.Block#getDifficultyTargetAsInteger()}. Note that this is not the same as + * {@link org.bitcoinj.core.Block#getDifficultyTargetAsInteger()}. Note that this is not the same as * the difficulty value reported by the Bitcoin "getdifficulty" RPC that you may see on various block explorers. * That number is the result of applying a formula to the underlying difficulty to normalize the minimum to 1. * Calculating the difficulty that way is currently unsupported. diff --git a/core/src/main/java/com/google/bitcoin/core/BlockChain.java b/core/src/main/java/org/bitcoinj/core/BlockChain.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/core/BlockChain.java rename to core/src/main/java/org/bitcoinj/core/BlockChain.java index ca05a818..48f7b941 100644 --- a/core/src/main/java/com/google/bitcoin/core/BlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/BlockChain.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import static com.google.common.base.Preconditions.checkArgument; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.BlockStoreException; import java.util.ArrayList; import java.util.List; @@ -40,8 +40,8 @@ public class BlockChain extends AbstractBlockChain { * one from scratch, or you can deserialize a saved wallet from disk using {@link Wallet#loadFromFile(java.io.File)} *

* - *

For the store, you should use {@link com.google.bitcoin.store.SPVBlockStore} or you could also try a - * {@link com.google.bitcoin.store.MemoryBlockStore} if you want to hold all headers in RAM and don't care about + *

For the store, you should use {@link org.bitcoinj.store.SPVBlockStore} or you could also try a + * {@link org.bitcoinj.store.MemoryBlockStore} if you want to hold all headers in RAM and don't care about * disk serialization (this is rare).

*/ public BlockChain(NetworkParameters params, Wallet wallet, BlockStore blockStore) throws BlockStoreException { diff --git a/core/src/main/java/com/google/bitcoin/core/BlockChainListener.java b/core/src/main/java/org/bitcoinj/core/BlockChainListener.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/BlockChainListener.java rename to core/src/main/java/org/bitcoinj/core/BlockChainListener.java index 1bc0436b..2f591e7c 100644 --- a/core/src/main/java/com/google/bitcoin/core/BlockChainListener.java +++ b/core/src/main/java/org/bitcoinj/core/BlockChainListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.List; @@ -26,8 +26,8 @@ import java.util.List; public interface BlockChainListener { /** * Called when a new block on the best chain is seen, after relevant transactions are extracted and sent to - * us via either {@link #receiveFromBlock(Transaction, StoredBlock, com.google.bitcoin.core.BlockChain.NewBlockType, int)} - * or {@link #notifyTransactionIsInBlock(Sha256Hash, StoredBlock, com.google.bitcoin.core.BlockChain.NewBlockType, int)}. + * us via either {@link #receiveFromBlock(Transaction, StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int)} + * or {@link #notifyTransactionIsInBlock(Sha256Hash, StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int)}. * If this block is causing a re-organise to a new chain, this method is NOT called even though the block may be * the new best block: your reorganize implementation is expected to do whatever would normally be done do for a new * best block in this case. diff --git a/core/src/main/java/com/google/bitcoin/core/BloomFilter.java b/core/src/main/java/org/bitcoinj/core/BloomFilter.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/BloomFilter.java rename to core/src/main/java/org/bitcoinj/core/BloomFilter.java index f99be9a3..715d7726 100644 --- a/core/src/main/java/com/google/bitcoin/core/BloomFilter.java +++ b/core/src/main/java/org/bitcoinj/core/BloomFilter.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptChunk; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptChunk; import com.google.common.base.Objects; import com.google.common.collect.Lists; @@ -100,7 +100,7 @@ public class BloomFilter extends Message { * It should be a random value, however secureness of the random value is of no great consequence.

* *

updateFlag is used to control filter behaviour on the server (remote node) side when it encounters a hit. - * See {@link com.google.bitcoin.core.BloomFilter.BloomUpdate} for a brief description of each mode. The purpose + * See {@link org.bitcoinj.core.BloomFilter.BloomUpdate} for a brief description of each mode. The purpose * of this flag is to reduce network round-tripping and avoid over-dirtying the filter for the most common * wallet configurations.

*/ @@ -270,7 +270,7 @@ public class BloomFilter extends Message { } /** - * Returns true if this filter will match anything. See {@link com.google.bitcoin.core.BloomFilter#setMatchAll()} + * Returns true if this filter will match anything. See {@link org.bitcoinj.core.BloomFilter#setMatchAll()} * for when this can be a useful thing to do. */ public synchronized boolean matchesAll() { diff --git a/core/src/main/java/com/google/bitcoin/core/CheckpointManager.java b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/CheckpointManager.java rename to core/src/main/java/org/bitcoinj/core/CheckpointManager.java index 06459e4e..844a86b8 100644 --- a/core/src/main/java/com/google/bitcoin/core/CheckpointManager.java +++ b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; import com.google.common.base.Charsets; import com.google.common.hash.HashCode; import com.google.common.hash.Hasher; @@ -55,7 +55,7 @@ import static com.google.common.base.Preconditions.*; * * *

Checkpoints are used by the SPV {@link BlockChain} to initialize fresh - * {@link com.google.bitcoin.store.SPVBlockStore}s. They are not used by fully validating mode, which instead has a + * {@link org.bitcoinj.store.SPVBlockStore}s. They are not used by fully validating mode, which instead has a * different concept of checkpoints that are used to hard-code the validity of blocks that violate BIP30 (duplicate * coinbase transactions). Those "checkpoints" can be found in NetworkParameters.

* diff --git a/core/src/main/java/com/google/bitcoin/core/ChildMessage.java b/core/src/main/java/org/bitcoinj/core/ChildMessage.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/ChildMessage.java rename to core/src/main/java/org/bitcoinj/core/ChildMessage.java index 54f21512..6d38c6a7 100644 --- a/core/src/main/java/com/google/bitcoin/core/ChildMessage.java +++ b/core/src/main/java/org/bitcoinj/core/ChildMessage.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/core/Coin.java b/core/src/main/java/org/bitcoinj/core/Coin.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Coin.java rename to core/src/main/java/org/bitcoinj/core/Coin.java index a503dc5d..2d3a50b8 100644 --- a/core/src/main/java/com/google/bitcoin/core/Coin.java +++ b/core/src/main/java/org/bitcoinj/core/Coin.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.utils.MonetaryFormat; +import org.bitcoinj.utils.MonetaryFormat; import com.google.common.math.LongMath; import java.io.Serializable; diff --git a/core/src/main/java/com/google/bitcoin/core/DownloadListener.java b/core/src/main/java/org/bitcoinj/core/DownloadListener.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/DownloadListener.java rename to core/src/main/java/org/bitcoinj/core/DownloadListener.java index 6e27ef5b..cda3e28b 100644 --- a/core/src/main/java/com/google/bitcoin/core/DownloadListener.java +++ b/core/src/main/java/org/bitcoinj/core/DownloadListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/core/DumpedPrivateKey.java b/core/src/main/java/org/bitcoinj/core/DumpedPrivateKey.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/DumpedPrivateKey.java rename to core/src/main/java/org/bitcoinj/core/DumpedPrivateKey.java index 554ddb0c..ac7cc387 100644 --- a/core/src/main/java/com/google/bitcoin/core/DumpedPrivateKey.java +++ b/core/src/main/java/org/bitcoinj/core/DumpedPrivateKey.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import com.google.common.base.Objects; import com.google.common.base.Preconditions; diff --git a/core/src/main/java/com/google/bitcoin/core/ECKey.java b/core/src/main/java/org/bitcoinj/core/ECKey.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/ECKey.java rename to core/src/main/java/org/bitcoinj/core/ECKey.java index 803aa526..2df6e7ab 100644 --- a/core/src/main/java/com/google/bitcoin/core/ECKey.java +++ b/core/src/main/java/org/bitcoinj/core/ECKey.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.crypto.*; +import org.bitcoinj.crypto.*; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Objects.ToStringHelper; @@ -368,7 +368,7 @@ public class ECKey implements EncryptableItem, Serializable { /** * Output this ECKey as an ASN.1 encoded private key, as understood by OpenSSL or used by the Bitcoin reference * implementation in its wallet storage format. - * @throws com.google.bitcoin.core.ECKey.MissingPrivateKeyException if the private key is missing or encrypted. + * @throws org.bitcoinj.core.ECKey.MissingPrivateKeyException if the private key is missing or encrypted. */ public byte[] toASN1() { try { @@ -553,7 +553,7 @@ public class ECKey implements EncryptableItem, Serializable { /** * Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are - * usually encoded using ASN.1 format, so you want {@link com.google.bitcoin.core.ECKey.ECDSASignature#toASN1()} + * usually encoded using ASN.1 format, so you want {@link org.bitcoinj.core.ECKey.ECDSASignature#toASN1()} * instead. However sometimes the independent components can be useful, for instance, if you're going to do * further EC maths on them. * @throws KeyCrypterException if this ECKey doesn't have a private part. @@ -572,7 +572,7 @@ public class ECKey implements EncryptableItem, Serializable { /** * Signs the given hash and returns the R and S components as BigIntegers. In the Bitcoin protocol, they are - * usually encoded using DER format, so you want {@link com.google.bitcoin.core.ECKey.ECDSASignature#encodeToDER()} + * usually encoded using DER format, so you want {@link org.bitcoinj.core.ECKey.ECDSASignature#encodeToDER()} * instead. However sometimes the independent components can be useful, for instance, if you're doing to do further * EC maths on them. * @@ -897,7 +897,7 @@ public class ECKey implements EncryptableItem, Serializable { /** * Returns a 32 byte array containing the private key. - * @throws com.google.bitcoin.core.ECKey.MissingPrivateKeyException if the private key bytes are missing/encrypted. + * @throws org.bitcoinj.core.ECKey.MissingPrivateKeyException if the private key bytes are missing/encrypted. */ public byte[] getPrivKeyBytes() { return Utils.bigIntegerToBytes(getPrivKey(), 32); @@ -905,7 +905,7 @@ public class ECKey implements EncryptableItem, Serializable { /** * Exports the private key in the form used by the Satoshi client "dumpprivkey" and "importprivkey" commands. Use - * the {@link com.google.bitcoin.core.DumpedPrivateKey#toString()} method to get the string. + * the {@link org.bitcoinj.core.DumpedPrivateKey#toString()} method to get the string. * * @param params The network this key is intended for use on. * @return Private key bytes as a {@link DumpedPrivateKey}. diff --git a/core/src/main/java/com/google/bitcoin/core/EmptyMessage.java b/core/src/main/java/org/bitcoinj/core/EmptyMessage.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/EmptyMessage.java rename to core/src/main/java/org/bitcoinj/core/EmptyMessage.java index 0d82536e..deb0cadc 100644 --- a/core/src/main/java/com/google/bitcoin/core/EmptyMessage.java +++ b/core/src/main/java/org/bitcoinj/core/EmptyMessage.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/FilteredBlock.java b/core/src/main/java/org/bitcoinj/core/FilteredBlock.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/FilteredBlock.java rename to core/src/main/java/org/bitcoinj/core/FilteredBlock.java index 52d30fc3..aa3eb80c 100644 --- a/core/src/main/java/com/google/bitcoin/core/FilteredBlock.java +++ b/core/src/main/java/org/bitcoinj/core/FilteredBlock.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/FullPrunedBlockChain.java b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/FullPrunedBlockChain.java rename to core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java index 7dbe811c..36fc1eca 100644 --- a/core/src/main/java/com/google/bitcoin/core/FullPrunedBlockChain.java +++ b/core/src/main/java/org/bitcoinj/core/FullPrunedBlockChain.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.Script.VerifyFlag; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.Script.VerifyFlag; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/core/GetAddrMessage.java b/core/src/main/java/org/bitcoinj/core/GetAddrMessage.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/GetAddrMessage.java rename to core/src/main/java/org/bitcoinj/core/GetAddrMessage.java index e00287c3..54339c04 100644 --- a/core/src/main/java/com/google/bitcoin/core/GetAddrMessage.java +++ b/core/src/main/java/org/bitcoinj/core/GetAddrMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; /** * Represents the "getaddr" P2P protocol message, which requests network {@link AddressMessage}s from a peer. Not to diff --git a/core/src/main/java/com/google/bitcoin/core/GetBlocksMessage.java b/core/src/main/java/org/bitcoinj/core/GetBlocksMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/GetBlocksMessage.java rename to core/src/main/java/org/bitcoinj/core/GetBlocksMessage.java index ec3f280d..0f3765fc 100644 --- a/core/src/main/java/com/google/bitcoin/core/GetBlocksMessage.java +++ b/core/src/main/java/org/bitcoinj/core/GetBlocksMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/GetDataMessage.java b/core/src/main/java/org/bitcoinj/core/GetDataMessage.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/GetDataMessage.java rename to core/src/main/java/org/bitcoinj/core/GetDataMessage.java index 32fe8c0b..2848a525 100644 --- a/core/src/main/java/com/google/bitcoin/core/GetDataMessage.java +++ b/core/src/main/java/org/bitcoinj/core/GetDataMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; /** * Represents the "getdata" P2P network message, which requests the contents of blocks or transactions given their diff --git a/core/src/main/java/com/google/bitcoin/core/GetHeadersMessage.java b/core/src/main/java/org/bitcoinj/core/GetHeadersMessage.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/GetHeadersMessage.java rename to core/src/main/java/org/bitcoinj/core/GetHeadersMessage.java index 6ba84389..5f0d89f0 100644 --- a/core/src/main/java/com/google/bitcoin/core/GetHeadersMessage.java +++ b/core/src/main/java/org/bitcoinj/core/GetHeadersMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/core/GetUTXOsMessage.java b/core/src/main/java/org/bitcoinj/core/GetUTXOsMessage.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/GetUTXOsMessage.java rename to core/src/main/java/org/bitcoinj/core/GetUTXOsMessage.java index ed53cd29..08f5c9f3 100644 --- a/core/src/main/java/com/google/bitcoin/core/GetUTXOsMessage.java +++ b/core/src/main/java/org/bitcoinj/core/GetUTXOsMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import com.google.common.collect.ImmutableList; diff --git a/core/src/main/java/com/google/bitcoin/core/HeadersMessage.java b/core/src/main/java/org/bitcoinj/core/HeadersMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/HeadersMessage.java rename to core/src/main/java/org/bitcoinj/core/HeadersMessage.java index dd0650ec..3953af85 100644 --- a/core/src/main/java/com/google/bitcoin/core/HeadersMessage.java +++ b/core/src/main/java/org/bitcoinj/core/HeadersMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/core/InsufficientMoneyException.java b/core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/InsufficientMoneyException.java rename to core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java index 883ddd92..da3d5278 100644 --- a/core/src/main/java/com/google/bitcoin/core/InsufficientMoneyException.java +++ b/core/src/main/java/org/bitcoinj/core/InsufficientMoneyException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/core/InventoryItem.java b/core/src/main/java/org/bitcoinj/core/InventoryItem.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/InventoryItem.java rename to core/src/main/java/org/bitcoinj/core/InventoryItem.java index 0c6572f9..63320703 100644 --- a/core/src/main/java/com/google/bitcoin/core/InventoryItem.java +++ b/core/src/main/java/org/bitcoinj/core/InventoryItem.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; public class InventoryItem { diff --git a/core/src/main/java/com/google/bitcoin/core/InventoryMessage.java b/core/src/main/java/org/bitcoinj/core/InventoryMessage.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/InventoryMessage.java rename to core/src/main/java/org/bitcoinj/core/InventoryMessage.java index b94adcbd..ac8685a3 100644 --- a/core/src/main/java/com/google/bitcoin/core/InventoryMessage.java +++ b/core/src/main/java/org/bitcoinj/core/InventoryMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/src/main/java/com/google/bitcoin/core/ListMessage.java b/core/src/main/java/org/bitcoinj/core/ListMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/ListMessage.java rename to core/src/main/java/org/bitcoinj/core/ListMessage.java index 7cd9b185..0ec4d959 100644 --- a/core/src/main/java/com/google/bitcoin/core/ListMessage.java +++ b/core/src/main/java/org/bitcoinj/core/ListMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/MemoryPool.java b/core/src/main/java/org/bitcoinj/core/MemoryPool.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/MemoryPool.java rename to core/src/main/java/org/bitcoinj/core/MemoryPool.java index ade3512f..8b9f9452 100644 --- a/core/src/main/java/com/google/bitcoin/core/MemoryPool.java +++ b/core/src/main/java/org/bitcoinj/core/MemoryPool.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.utils.Threading; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/core/MemoryPoolMessage.java b/core/src/main/java/org/bitcoinj/core/MemoryPoolMessage.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/MemoryPoolMessage.java rename to core/src/main/java/org/bitcoinj/core/MemoryPoolMessage.java index 571a7f51..5c90fbbd 100644 --- a/core/src/main/java/com/google/bitcoin/core/MemoryPoolMessage.java +++ b/core/src/main/java/org/bitcoinj/core/MemoryPoolMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/Message.java b/core/src/main/java/org/bitcoinj/core/Message.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/Message.java rename to core/src/main/java/org/bitcoinj/core/Message.java index 0076e52c..26cf995a 100644 --- a/core/src/main/java/com/google/bitcoin/core/Message.java +++ b/core/src/main/java/org/bitcoinj/core/Message.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/core/Monetary.java b/core/src/main/java/org/bitcoinj/core/Monetary.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/Monetary.java rename to core/src/main/java/org/bitcoinj/core/Monetary.java index 0a026f30..26bf479e 100644 --- a/core/src/main/java/com/google/bitcoin/core/Monetary.java +++ b/core/src/main/java/org/bitcoinj/core/Monetary.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.Serializable; diff --git a/core/src/main/java/com/google/bitcoin/core/NetworkParameters.java b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/core/NetworkParameters.java rename to core/src/main/java/org/bitcoinj/core/NetworkParameters.java index c572e227..2efd3420 100644 --- a/core/src/main/java/com/google/bitcoin/core/NetworkParameters.java +++ b/core/src/main/java/org/bitcoinj/core/NetworkParameters.java @@ -15,15 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.*; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptOpCodes; +import org.bitcoinj.params.*; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptOpCodes; import com.google.common.base.Objects; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; import javax.annotation.Nullable; import java.io.ByteArrayOutputStream; @@ -31,7 +28,7 @@ import java.io.Serializable; import java.math.BigInteger; import java.util.*; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.Coin.*; /** *

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

@@ -59,7 +56,7 @@ public abstract class NetworkParameters implements Serializable { /** The string returned by getId() for regtest mode. */ public static final String ID_REGTEST = "org.bitcoin.regtest"; /** Unit test network. */ - public static final String ID_UNITTESTNET = "com.google.bitcoin.unittest"; + public static final String ID_UNITTESTNET = "org.bitcoinj.unittest"; /** The string used by the payment protocol to represent the main net. */ public static final String PAYMENT_PROTOCOL_ID_MAINNET = "main"; @@ -285,7 +282,7 @@ public abstract class NetworkParameters implements Serializable { } /** - * First byte of a base58 encoded address. See {@link com.google.bitcoin.core.Address}. This is the same as acceptableAddressCodes[0] and + * First byte of a base58 encoded address. See {@link org.bitcoinj.core.Address}. This is the same as acceptableAddressCodes[0] and * is the one used for "normal" addresses. Other types of address may be encountered with version codes found in * the acceptableAddressCodes array. */ @@ -300,7 +297,7 @@ public abstract class NetworkParameters implements Serializable { return p2shHeader; } - /** First byte of a base58 encoded dumped private key. See {@link com.google.bitcoin.core.DumpedPrivateKey}. */ + /** First byte of a base58 encoded dumped private key. See {@link org.bitcoinj.core.DumpedPrivateKey}. */ public int getDumpedPrivateKeyHeader() { return dumpedPrivateKeyHeader; } @@ -341,7 +338,7 @@ public abstract class NetworkParameters implements Serializable { } /** - * The key used to sign {@link com.google.bitcoin.core.AlertMessage}s. You can use {@link com.google.bitcoin.core.ECKey#verify(byte[], byte[], byte[])} to verify + * The key used to sign {@link org.bitcoinj.core.AlertMessage}s. You can use {@link org.bitcoinj.core.ECKey#verify(byte[], byte[], byte[])} to verify * signatures using it. */ public byte[] getAlertSigningKey() { diff --git a/core/src/main/java/com/google/bitcoin/core/NotFoundMessage.java b/core/src/main/java/org/bitcoinj/core/NotFoundMessage.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/NotFoundMessage.java rename to core/src/main/java/org/bitcoinj/core/NotFoundMessage.java index 4f769778..ea1319d0 100644 --- a/core/src/main/java/com/google/bitcoin/core/NotFoundMessage.java +++ b/core/src/main/java/org/bitcoinj/core/NotFoundMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/core/PartialMerkleTree.java b/core/src/main/java/org/bitcoinj/core/PartialMerkleTree.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/PartialMerkleTree.java rename to core/src/main/java/org/bitcoinj/core/PartialMerkleTree.java index 894218a1..511f2437 100644 --- a/core/src/main/java/com/google/bitcoin/core/PartialMerkleTree.java +++ b/core/src/main/java/org/bitcoinj/core/PartialMerkleTree.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; @@ -23,7 +23,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static com.google.bitcoin.core.Utils.*; +import static org.bitcoinj.core.Utils.*; /** *

A data structure that contains proofs of block inclusion for one or more transactions, in an efficient manner.

diff --git a/core/src/main/java/com/google/bitcoin/core/Peer.java b/core/src/main/java/org/bitcoinj/core/Peer.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Peer.java rename to core/src/main/java/org/bitcoinj/core/Peer.java index 4c80ba33..9bee391f 100644 --- a/core/src/main/java/com/google/bitcoin/core/Peer.java +++ b/core/src/main/java/org/bitcoinj/core/Peer.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; @@ -47,8 +47,8 @@ import static com.google.common.base.Preconditions.checkState; * handles low-level message (de)serialization.

* *

Note that timeouts are handled by the extended - * {@link com.google.bitcoin.net.AbstractTimeoutHandler} and timeout is automatically disabled (using - * {@link com.google.bitcoin.net.AbstractTimeoutHandler#setTimeoutEnabled(boolean)}) once the version + * {@link org.bitcoinj.net.AbstractTimeoutHandler} and timeout is automatically disabled (using + * {@link org.bitcoinj.net.AbstractTimeoutHandler#setTimeoutEnabled(boolean)}) once the version * handshake completes.

*/ public class Peer extends PeerSocketHandler { @@ -157,9 +157,9 @@ public class Peer extends PeerSocketHandler { * *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link com.google.bitcoin.net.NioClientManager#openConnection(java.net.SocketAddress, com.google.bitcoin.net.StreamParser)} + * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, org.bitcoinj.net.StreamParser)} * or - * {@link com.google.bitcoin.net.NioClient#NioClient(java.net.SocketAddress, com.google.bitcoin.net.StreamParser, int)}.

+ * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, org.bitcoinj.net.StreamParser, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -175,9 +175,9 @@ public class Peer extends PeerSocketHandler { * *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link com.google.bitcoin.net.NioClientManager#openConnection(java.net.SocketAddress, com.google.bitcoin.net.StreamParser)} + * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, org.bitcoinj.net.StreamParser)} * or - * {@link com.google.bitcoin.net.NioClient#NioClient(java.net.SocketAddress, com.google.bitcoin.net.StreamParser, int)}.

+ * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, org.bitcoinj.net.StreamParser, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -194,9 +194,9 @@ public class Peer extends PeerSocketHandler { * *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link com.google.bitcoin.net.NioClientManager#openConnection(java.net.SocketAddress, com.google.bitcoin.net.StreamParser)} + * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, org.bitcoinj.net.StreamParser)} * or - * {@link com.google.bitcoin.net.NioClient#NioClient(java.net.SocketAddress, com.google.bitcoin.net.StreamParser, int)}.

+ * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, org.bitcoinj.net.StreamParser, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -225,9 +225,9 @@ public class Peer extends PeerSocketHandler { * *

Note that this does NOT make a connection to the given remoteAddress, it only creates a handler for a * connection. If you want to create a one-off connection, create a Peer and pass it to - * {@link com.google.bitcoin.net.NioClientManager#openConnection(java.net.SocketAddress, com.google.bitcoin.net.StreamParser)} + * {@link org.bitcoinj.net.NioClientManager#openConnection(java.net.SocketAddress, org.bitcoinj.net.StreamParser)} * or - * {@link com.google.bitcoin.net.NioClient#NioClient(java.net.SocketAddress, com.google.bitcoin.net.StreamParser, int)}.

+ * {@link org.bitcoinj.net.NioClient#NioClient(java.net.SocketAddress, org.bitcoinj.net.StreamParser, int)}.

* *

The remoteAddress provided should match the remote address of the peer which is being connected to, and is * used to keep track of which peers relayed transactions and offer more descriptive logging.

@@ -1406,7 +1406,7 @@ public class Peer extends PeerSocketHandler { /** * Sends the peer a ping message and returns a future that will be invoked when the pong is received back. * The future provides a number which is the number of milliseconds elapsed between the ping and the pong. - * Once the pong is received the value returned by {@link com.google.bitcoin.core.Peer#getLastPingTime()} is + * Once the pong is received the value returned by {@link org.bitcoinj.core.Peer#getLastPingTime()} is * updated. * @throws ProtocolException if the peer version is too low to support measurable pings. */ @@ -1425,7 +1425,7 @@ public class Peer extends PeerSocketHandler { } /** - * Returns the elapsed time of the last ping/pong cycle. If {@link com.google.bitcoin.core.Peer#ping()} has never + * Returns the elapsed time of the last ping/pong cycle. If {@link org.bitcoinj.core.Peer#ping()} has never * been called or we did not hear back the "pong" message yet, returns {@link Long#MAX_VALUE}. */ public long getLastPingTime() { @@ -1440,7 +1440,7 @@ public class Peer extends PeerSocketHandler { } /** - * Returns a moving average of the last N ping/pong cycles. If {@link com.google.bitcoin.core.Peer#ping()} has never + * Returns a moving average of the last N ping/pong cycles. If {@link org.bitcoinj.core.Peer#ping()} has never * been called or we did not hear back the "pong" message yet, returns {@link Long#MAX_VALUE}. The moving average * window is 5 buckets. */ diff --git a/core/src/main/java/com/google/bitcoin/core/PeerAddress.java b/core/src/main/java/org/bitcoinj/core/PeerAddress.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/PeerAddress.java rename to core/src/main/java/org/bitcoinj/core/PeerAddress.java index 648241ec..a508b8e5 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerAddress.java +++ b/core/src/main/java/org/bitcoinj/core/PeerAddress.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; +import org.bitcoinj.params.MainNetParams; import com.google.common.net.InetAddresses; import java.io.IOException; @@ -26,8 +26,8 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.UnknownHostException; -import static com.google.bitcoin.core.Utils.uint32ToByteStreamLE; -import static com.google.bitcoin.core.Utils.uint64ToByteStreamLE; +import static org.bitcoinj.core.Utils.uint32ToByteStreamLE; +import static org.bitcoinj.core.Utils.uint64ToByteStreamLE; import static com.google.common.base.Preconditions.checkNotNull; /** diff --git a/core/src/main/java/com/google/bitcoin/core/PeerEventListener.java b/core/src/main/java/org/bitcoinj/core/PeerEventListener.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/core/PeerEventListener.java rename to core/src/main/java/org/bitcoinj/core/PeerEventListener.java index 0ef15f9c..962fd01a 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/PeerEventListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import javax.annotation.Nullable; import java.util.List; @@ -70,7 +70,7 @@ public interface PeerEventListener { * callback is passed as "m" to the next, forming a chain.

* *

Note that this will never be called if registered with any executor other than - * {@link com.google.bitcoin.utils.Threading#SAME_THREAD}

+ * {@link org.bitcoinj.utils.Threading#SAME_THREAD}

*/ public Message onPreMessageReceived(Peer peer, Message m); @@ -84,7 +84,7 @@ public interface PeerEventListener { * items as possible which appear in the {@link GetDataMessage}, or null if you're not interested in responding.

* *

Note that this will never be called if registered with any executor other than - * {@link com.google.bitcoin.utils.Threading#SAME_THREAD}

+ * {@link org.bitcoinj.utils.Threading#SAME_THREAD}

*/ @Nullable public List getData(Peer peer, GetDataMessage m); diff --git a/core/src/main/java/com/google/bitcoin/core/PeerException.java b/core/src/main/java/org/bitcoinj/core/PeerException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/PeerException.java rename to core/src/main/java/org/bitcoinj/core/PeerException.java index aac89990..ac4ab5e3 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerException.java +++ b/core/src/main/java/org/bitcoinj/core/PeerException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; /** * Thrown when a problem occurs in communicating with a peer, and we should diff --git a/core/src/main/java/com/google/bitcoin/core/PeerFilterProvider.java b/core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/core/PeerFilterProvider.java rename to core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java index 921bd10c..3af57b77 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerFilterProvider.java +++ b/core/src/main/java/org/bitcoinj/core/PeerFilterProvider.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.concurrent.locks.Lock; /** * An interface which provides the information required to properly filter data downloaded from Peers. - * Note that an implementer is responsible for calling {@link PeerGroup#recalculateFastCatchupAndFilter(com.google.bitcoin.core.PeerGroup.FilterRecalculateMode)} + * Note that an implementer is responsible for calling {@link PeerGroup#recalculateFastCatchupAndFilter(org.bitcoinj.core.PeerGroup.FilterRecalculateMode)} * whenever a change occurs which effects the data provided via this interface. */ public interface PeerFilterProvider { @@ -49,7 +49,7 @@ public interface PeerFilterProvider { /** * Returns an object that will be locked before any other methods are called and unlocked afterwards. You must * provide one of these because the results from calling the above methods must be consistent. Otherwise it's - * possible for the {@link com.google.bitcoin.net.FilterMerger} to request the counts of a bunch of providers + * possible for the {@link org.bitcoinj.net.FilterMerger} to request the counts of a bunch of providers * with {@link #getBloomFilterElementCount()}, create a filter of the right size, call {@link #getBloomFilter(int, double, long)} * and then the filter provider discovers it's been mutated in the mean time and now has a different number of * elements. For instance, a Wallet that has keys added to it whilst a filter recalc is in progress could cause diff --git a/core/src/main/java/com/google/bitcoin/core/PeerGroup.java b/core/src/main/java/org/bitcoinj/core/PeerGroup.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/PeerGroup.java rename to core/src/main/java/org/bitcoinj/core/PeerGroup.java index 075f9679..37631332 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerGroup.java +++ b/core/src/main/java/org/bitcoinj/core/PeerGroup.java @@ -15,20 +15,20 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.crypto.DRMWorkaround; -import com.google.bitcoin.net.BlockingClientManager; -import com.google.bitcoin.net.ClientConnectionManager; -import com.google.bitcoin.net.FilterMerger; -import com.google.bitcoin.net.NioClientManager; -import com.google.bitcoin.net.discovery.PeerDiscovery; -import com.google.bitcoin.net.discovery.PeerDiscoveryException; -import com.google.bitcoin.net.discovery.TorDiscovery; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.utils.ExponentialBackoff; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.crypto.DRMWorkaround; +import org.bitcoinj.net.BlockingClientManager; +import org.bitcoinj.net.ClientConnectionManager; +import org.bitcoinj.net.FilterMerger; +import org.bitcoinj.net.NioClientManager; +import org.bitcoinj.net.discovery.PeerDiscovery; +import org.bitcoinj.net.discovery.PeerDiscoveryException; +import org.bitcoinj.net.discovery.TorDiscovery; +import org.bitcoinj.script.Script; +import org.bitcoinj.utils.ExponentialBackoff; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; @@ -982,7 +982,7 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac * * @param address destination IP and port. * @return The newly created Peer object or null if the peer could not be connected. - * Use {@link com.google.bitcoin.core.Peer#getConnectionOpenFuture()} if you + * Use {@link org.bitcoinj.core.Peer#getConnectionOpenFuture()} if you * want a future which completes when the connection is open. */ @Nullable @@ -1349,7 +1349,7 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac /** * Returns a future that is triggered when the number of connected peers is equal to the given number of - * peers. By using this with {@link com.google.bitcoin.core.PeerGroup#getMaxConnections()} you can wait until the + * peers. By using this with {@link org.bitcoinj.core.PeerGroup#getMaxConnections()} you can wait until the * network is fully online. To block immediately, just call get() on the result. Just calls * {@link #waitForPeersOfVersion(int, long)} with zero as the protocol version. * @@ -1407,7 +1407,7 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac * enough, {@link PeerGroup#broadcastTransaction(Transaction)} will wait until the minimum number is reached so * propagation across the network can be observed. If no value has been set using * {@link PeerGroup#setMinBroadcastConnections(int)} a default of half of whatever - * {@link com.google.bitcoin.core.PeerGroup#getMaxConnections()} returns is used. + * {@link org.bitcoinj.core.PeerGroup#getMaxConnections()} returns is used. */ public int getMinBroadcastConnections() { lock.lock(); @@ -1426,7 +1426,7 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac } /** - * See {@link com.google.bitcoin.core.PeerGroup#getMinBroadcastConnections()}. + * See {@link org.bitcoinj.core.PeerGroup#getMinBroadcastConnections()}. */ public void setMinBroadcastConnections(int value) { lock.lock(); @@ -1509,7 +1509,7 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac /** * Returns the period between pings for an individual peer. Setting this lower means more accurate and timely ping - * times are available via {@link com.google.bitcoin.core.Peer#getLastPingTime()} but it increases load on the + * times are available via {@link org.bitcoinj.core.Peer#getLastPingTime()} but it increases load on the * remote node. It defaults to 5000. */ public long getPingIntervalMsec() { @@ -1523,10 +1523,10 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac /** * Sets the period between pings for an individual peer. Setting this lower means more accurate and timely ping - * times are available via {@link com.google.bitcoin.core.Peer#getLastPingTime()} but it increases load on the + * times are available via {@link org.bitcoinj.core.Peer#getLastPingTime()} but it increases load on the * remote node. It defaults to {@link PeerGroup#DEFAULT_PING_INTERVAL_MSEC}. * Setting the value to be <= 0 disables pinging entirely, although you can still request one yourself - * using {@link com.google.bitcoin.core.Peer#ping()}. + * using {@link org.bitcoinj.core.Peer#ping()}. */ public void setPingIntervalMsec(long pingIntervalMsec) { lock.lock(); diff --git a/core/src/main/java/com/google/bitcoin/core/PeerSocketHandler.java b/core/src/main/java/org/bitcoinj/core/PeerSocketHandler.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/core/PeerSocketHandler.java rename to core/src/main/java/org/bitcoinj/core/PeerSocketHandler.java index a2e59558..0ab9d53e 100644 --- a/core/src/main/java/com/google/bitcoin/core/PeerSocketHandler.java +++ b/core/src/main/java/org/bitcoinj/core/PeerSocketHandler.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.net.AbstractTimeoutHandler; -import com.google.bitcoin.net.MessageWriteTarget; -import com.google.bitcoin.net.StreamParser; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.net.AbstractTimeoutHandler; +import org.bitcoinj.net.MessageWriteTarget; +import org.bitcoinj.net.StreamParser; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,7 +37,7 @@ import static com.google.common.base.Preconditions.*; /** * Handles high-level message (de)serialization for peers, acting as the bridge between the - * {@link com.google.bitcoin.net} classes and {@link Peer}. + * {@link org.bitcoinj.net} classes and {@link Peer}. */ public abstract class PeerSocketHandler extends AbstractTimeoutHandler implements StreamParser { private static final Logger log = LoggerFactory.getLogger(PeerSocketHandler.class); @@ -185,8 +185,8 @@ public abstract class PeerSocketHandler extends AbstractTimeoutHandler implement /** * Sets the {@link MessageWriteTarget} used to write messages to the peer. This should almost never be called, it is - * called automatically by {@link com.google.bitcoin.net.NioClient} or - * {@link com.google.bitcoin.net.NioClientManager} once the socket finishes initialization. + * called automatically by {@link org.bitcoinj.net.NioClient} or + * {@link org.bitcoinj.net.NioClientManager} once the socket finishes initialization. */ @Override public void setWriteTarget(MessageWriteTarget writeTarget) { diff --git a/core/src/main/java/com/google/bitcoin/core/Ping.java b/core/src/main/java/org/bitcoinj/core/Ping.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Ping.java rename to core/src/main/java/org/bitcoinj/core/Ping.java index 550d15c6..b357daac 100644 --- a/core/src/main/java/com/google/bitcoin/core/Ping.java +++ b/core/src/main/java/org/bitcoinj/core/Ping.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/Pong.java b/core/src/main/java/org/bitcoinj/core/Pong.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Pong.java rename to core/src/main/java/org/bitcoinj/core/Pong.java index 393a18ed..09147555 100644 --- a/core/src/main/java/com/google/bitcoin/core/Pong.java +++ b/core/src/main/java/org/bitcoinj/core/Pong.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/ProtocolException.java b/core/src/main/java/org/bitcoinj/core/ProtocolException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/ProtocolException.java rename to core/src/main/java/org/bitcoinj/core/ProtocolException.java index c5526e89..898c1bc8 100644 --- a/core/src/main/java/com/google/bitcoin/core/ProtocolException.java +++ b/core/src/main/java/org/bitcoinj/core/ProtocolException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; @SuppressWarnings("serial") public class ProtocolException extends VerificationException { diff --git a/core/src/main/java/com/google/bitcoin/core/PrunedException.java b/core/src/main/java/org/bitcoinj/core/PrunedException.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/PrunedException.java rename to core/src/main/java/org/bitcoinj/core/PrunedException.java index b0e8d8d1..df67dafd 100644 --- a/core/src/main/java/com/google/bitcoin/core/PrunedException.java +++ b/core/src/main/java/org/bitcoinj/core/PrunedException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; // TODO: Rename PrunedException to something like RequiredDataWasPrunedException diff --git a/core/src/main/java/com/google/bitcoin/core/RejectMessage.java b/core/src/main/java/org/bitcoinj/core/RejectMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/RejectMessage.java rename to core/src/main/java/org/bitcoinj/core/RejectMessage.java index f73b7167..660e4f0f 100644 --- a/core/src/main/java/com/google/bitcoin/core/RejectMessage.java +++ b/core/src/main/java/org/bitcoinj/core/RejectMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/ScriptException.java b/core/src/main/java/org/bitcoinj/core/ScriptException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/ScriptException.java rename to core/src/main/java/org/bitcoinj/core/ScriptException.java index aed69eff..b578f0ed 100644 --- a/core/src/main/java/com/google/bitcoin/core/ScriptException.java +++ b/core/src/main/java/org/bitcoinj/core/ScriptException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; @SuppressWarnings("serial") public class ScriptException extends VerificationException { diff --git a/core/src/main/java/com/google/bitcoin/core/Sha256Hash.java b/core/src/main/java/org/bitcoinj/core/Sha256Hash.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/Sha256Hash.java rename to core/src/main/java/org/bitcoinj/core/Sha256Hash.java index 96a47338..ea021a8c 100644 --- a/core/src/main/java/com/google/bitcoin/core/Sha256Hash.java +++ b/core/src/main/java/org/bitcoinj/core/Sha256Hash.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import com.google.common.io.ByteStreams; diff --git a/core/src/main/java/com/google/bitcoin/core/StoredBlock.java b/core/src/main/java/org/bitcoinj/core/StoredBlock.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/StoredBlock.java rename to core/src/main/java/org/bitcoinj/core/StoredBlock.java index e844e571..de1e9352 100644 --- a/core/src/main/java/com/google/bitcoin/core/StoredBlock.java +++ b/core/src/main/java/org/bitcoinj/core/StoredBlock.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.BlockStoreException; import java.io.*; import java.math.BigInteger; diff --git a/core/src/main/java/com/google/bitcoin/core/StoredTransactionOutput.java b/core/src/main/java/org/bitcoinj/core/StoredTransactionOutput.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/StoredTransactionOutput.java rename to core/src/main/java/org/bitcoinj/core/StoredTransactionOutput.java index 7b5b9bbb..75637a71 100644 --- a/core/src/main/java/com/google/bitcoin/core/StoredTransactionOutput.java +++ b/core/src/main/java/org/bitcoinj/core/StoredTransactionOutput.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.*; import java.math.BigInteger; diff --git a/core/src/main/java/com/google/bitcoin/core/StoredUndoableBlock.java b/core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/StoredUndoableBlock.java rename to core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java index 3c5f42ec..3a4b24f1 100644 --- a/core/src/main/java/com/google/bitcoin/core/StoredUndoableBlock.java +++ b/core/src/main/java/org/bitcoinj/core/StoredUndoableBlock.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.Serializable; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/core/Transaction.java b/core/src/main/java/org/bitcoinj/core/Transaction.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/Transaction.java rename to core/src/main/java/org/bitcoinj/core/Transaction.java index 116c2ede..28702b03 100644 --- a/core/src/main/java/com/google/bitcoin/core/Transaction.java +++ b/core/src/main/java/org/bitcoinj/core/Transaction.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.script.ScriptOpCodes; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.wallet.WalletTransaction.Pool; +import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.script.ScriptOpCodes; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.wallet.WalletTransaction.Pool; import com.google.common.collect.ImmutableMap; import com.google.common.primitives.Ints; import com.google.common.primitives.Longs; @@ -36,7 +36,7 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; -import static com.google.bitcoin.core.Utils.*; +import static org.bitcoinj.core.Utils.*; import static com.google.common.base.Preconditions.checkState; /** @@ -772,7 +772,7 @@ public class Transaction extends ChildMessage implements Serializable { } /** - * Same as {@link #addSignedInput(TransactionOutPoint, com.google.bitcoin.script.Script, ECKey, com.google.bitcoin.core.Transaction.SigHash, boolean)} + * Same as {@link #addSignedInput(TransactionOutPoint, org.bitcoinj.script.Script, ECKey, org.bitcoinj.core.Transaction.SigHash, boolean)} * but defaults to {@link SigHash#ALL} and "false" for the anyoneCanPay flag. This is normally what you want. */ public TransactionInput addSignedInput(TransactionOutPoint prevOut, Script scriptPubKey, ECKey sigKey) throws ScriptException { @@ -846,7 +846,7 @@ public class Transaction extends ChildMessage implements Serializable { /** * Calculates a signature that is valid for being inserted into the input at the given position. This is simply - * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], com.google.bitcoin.core.Transaction.SigHash, boolean)} + * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], org.bitcoinj.core.Transaction.SigHash, boolean)} * followed by {@link ECKey#sign(Sha256Hash)} and then returning a new {@link TransactionSignature}. The key * must be usable for signing as-is: if the key is encrypted it must be decrypted first external to this method. * @@ -866,7 +866,7 @@ public class Transaction extends ChildMessage implements Serializable { /** * Calculates a signature that is valid for being inserted into the input at the given position. This is simply - * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], com.google.bitcoin.core.Transaction.SigHash, boolean)} + * a wrapper around calling {@link Transaction#hashForSignature(int, byte[], org.bitcoinj.core.Transaction.SigHash, boolean)} * followed by {@link ECKey#sign(Sha256Hash)} and then returning a new {@link TransactionSignature}. * * @param inputIndex Which input to calculate the signature for, as an index. diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionBag.java b/core/src/main/java/org/bitcoinj/core/TransactionBag.java similarity index 84% rename from core/src/main/java/com/google/bitcoin/core/TransactionBag.java rename to core/src/main/java/org/bitcoinj/core/TransactionBag.java index 7c8fa137..a5149f8b 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionBag.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBag.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.WalletTransaction; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.WalletTransaction; import java.util.Map; /** - * This interface is used to abstract the {@link com.google.bitcoin.core.Wallet} and the {@link com.google.bitcoin.core.Transaction} + * This interface is used to abstract the {@link org.bitcoinj.core.Wallet} and the {@link org.bitcoinj.core.Transaction} */ public interface TransactionBag { /** Returns true if this wallet contains a public key which hashes to the given hash. */ diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionBroadcast.java b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/TransactionBroadcast.java rename to core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java index 58796845..14afd04b 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionBroadcast.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.util.concurrent.ListenableFuture; diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionBroadcaster.java b/core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java similarity index 92% rename from core/src/main/java/com/google/bitcoin/core/TransactionBroadcaster.java rename to core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java index 23f2e8d4..3ba6e3bf 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionBroadcaster.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionBroadcaster.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import com.google.common.util.concurrent.ListenableFuture; /** * A general interface which declares the ability to broadcast transactions. This is implemented - * by {@link com.google.bitcoin.core.PeerGroup}. + * by {@link org.bitcoinj.core.PeerGroup}. */ public interface TransactionBroadcaster { /** Broadcast the given transaction on the network */ diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionConfidence.java b/core/src/main/java/org/bitcoinj/core/TransactionConfidence.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/core/TransactionConfidence.java rename to core/src/main/java/org/bitcoinj/core/TransactionConfidence.java index a4bc7a7d..11f7f246 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionConfidence.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionConfidence.java @@ -15,16 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import javax.annotation.Nullable; import java.io.Serializable; -import java.math.BigInteger; import java.util.ListIterator; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.Executor; @@ -55,9 +54,9 @@ import static com.google.common.base.Preconditions.*; *

Alternatively, you may know that the transaction is "dead", that is, one or more of its inputs have * been double spent and will never confirm unless there is another re-org.

* - *

TransactionConfidence is updated via the {@link com.google.bitcoin.core.TransactionConfidence#incrementDepthInBlocks()} + *

TransactionConfidence is updated via the {@link org.bitcoinj.core.TransactionConfidence#incrementDepthInBlocks()} * method to ensure the block depth is up to date.

- * To make a copy that won't be changed, use {@link com.google.bitcoin.core.TransactionConfidence#duplicate()}. + * To make a copy that won't be changed, use {@link org.bitcoinj.core.TransactionConfidence#duplicate()}. */ public class TransactionConfidence implements Serializable { private static final long serialVersionUID = 4577920141400556444L; @@ -86,7 +85,7 @@ public class TransactionConfidence implements Serializable { * announced and is considered valid by the network. A pending transaction will be announced if the containing * wallet has been attached to a live {@link PeerGroup} using {@link PeerGroup#addWallet(Wallet)}. * You can estimate how likely the transaction is to be included by connecting to a bunch of nodes then measuring - * how many announce it, using {@link com.google.bitcoin.core.TransactionConfidence#numBroadcastPeers()}. + * how many announce it, using {@link org.bitcoinj.core.TransactionConfidence#numBroadcastPeers()}. * Or if you saw it from a trusted peer, you can assume it's valid and will get mined sooner or later as well. */ PENDING(2), @@ -154,7 +153,7 @@ public class TransactionConfidence implements Serializable { /** An enum that describes why a transaction confidence listener is being invoked (i.e. the class of change). */ public enum ChangeReason { /** - * Occurs when the type returned by {@link com.google.bitcoin.core.TransactionConfidence#getConfidenceType()} + * Occurs when the type returned by {@link org.bitcoinj.core.TransactionConfidence#getConfidenceType()} * has changed. For example, if a PENDING transaction changes to BUILDING or DEAD, then this reason will * be given. It's a high level summary. */ @@ -411,7 +410,7 @@ public class TransactionConfidence implements Serializable { /** * The source of a transaction tries to identify where it came from originally. For instance, did we download it * from the peer to peer network, or make it ourselves, or receive it via Bluetooth, or import it from another app, - * and so on. This information is useful for {@link com.google.bitcoin.wallet.CoinSelector} implementations to risk analyze + * and so on. This information is useful for {@link org.bitcoinj.wallet.CoinSelector} implementations to risk analyze * transactions and decide when to spend them. */ public synchronized Source getSource() { @@ -421,7 +420,7 @@ public class TransactionConfidence implements Serializable { /** * The source of a transaction tries to identify where it came from originally. For instance, did we download it * from the peer to peer network, or make it ourselves, or receive it via Bluetooth, or import it from another app, - * and so on. This information is useful for {@link com.google.bitcoin.wallet.CoinSelector} implementations to risk analyze + * and so on. This information is useful for {@link org.bitcoinj.wallet.CoinSelector} implementations to risk analyze * transactions and decide when to spend them. */ public synchronized void setSource(Source source) { diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionInput.java b/core/src/main/java/org/bitcoinj/core/TransactionInput.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/TransactionInput.java rename to core/src/main/java/org/bitcoinj/core/TransactionInput.java index 5f615a46..a854e650 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionInput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionInput.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.KeyBag; -import com.google.bitcoin.wallet.RedeemData; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyBag; +import org.bitcoinj.wallet.RedeemData; import javax.annotation.Nullable; import java.io.IOException; @@ -307,7 +307,7 @@ public class TransactionInput extends ChildMessage implements Serializable { /** * Alias for getOutpoint().getConnectedRedeemData(keyBag) - * @see TransactionOutPoint#getConnectedRedeemData(com.google.bitcoin.wallet.KeyBag) + * @see TransactionOutPoint#getConnectedRedeemData(org.bitcoinj.wallet.KeyBag) */ @Nullable public RedeemData getConnectedRedeemData(KeyBag keyBag) throws ScriptException { diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionOutPoint.java b/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/TransactionOutPoint.java rename to core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java index c2bf7293..12677210 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionOutPoint.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.KeyBag; -import com.google.bitcoin.wallet.RedeemData; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyBag; +import org.bitcoinj.wallet.RedeemData; import javax.annotation.Nullable; import java.io.IOException; @@ -136,7 +136,7 @@ public class TransactionOutPoint extends ChildMessage implements Serializable { /** * Returns the ECKey identified in the connected output, for either pay-to-address scripts or pay-to-key scripts. - * For P2SH scripts you can use {@link #getConnectedRedeemData(com.google.bitcoin.wallet.KeyBag)} and then get the + * For P2SH scripts you can use {@link #getConnectedRedeemData(org.bitcoinj.wallet.KeyBag)} and then get the * key from RedeemData. * If the script form cannot be understood, throws ScriptException. * diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionOutput.java b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/TransactionOutput.java rename to core/src/main/java/org/bitcoinj/core/TransactionOutput.java index 39d6a983..7cf0579e 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionOutput.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutput.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -234,7 +234,7 @@ public class TransactionOutput extends ChildMessage implements Serializable { * so we call them "dust outputs" and they're made non standard. The choice of one third is somewhat arbitrary and * may change in future.

* - *

You probably should use {@link com.google.bitcoin.core.TransactionOutput#getMinNonDustValue()} which uses + *

You probably should use {@link org.bitcoinj.core.TransactionOutput#getMinNonDustValue()} which uses * a safe fee-per-kb by default.

* * @param feePerKbRequired The fee required per kilobyte. Note that this is the same as the reference client's -minrelaytxfee * 3 diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionOutputChanges.java b/core/src/main/java/org/bitcoinj/core/TransactionOutputChanges.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/TransactionOutputChanges.java rename to core/src/main/java/org/bitcoinj/core/TransactionOutputChanges.java index c65b84f3..30ad7779 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionOutputChanges.java +++ b/core/src/main/java/org/bitcoinj/core/TransactionOutputChanges.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.InputStream; diff --git a/core/src/main/java/com/google/bitcoin/core/UTXOsMessage.java b/core/src/main/java/org/bitcoinj/core/UTXOsMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/UTXOsMessage.java rename to core/src/main/java/org/bitcoinj/core/UTXOsMessage.java index 81801ba8..7e30eabc 100644 --- a/core/src/main/java/com/google/bitcoin/core/UTXOsMessage.java +++ b/core/src/main/java/org/bitcoinj/core/UTXOsMessage.java @@ -13,13 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; -import java.util.BitSet; import java.util.List; /** Message representing a list of unspent transaction outputs, returned in response to sending a GetUTXOsMessage. */ diff --git a/core/src/main/java/com/google/bitcoin/core/UnknownMessage.java b/core/src/main/java/org/bitcoinj/core/UnknownMessage.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/UnknownMessage.java rename to core/src/main/java/org/bitcoinj/core/UnknownMessage.java index 9f9b6e55..04649230 100644 --- a/core/src/main/java/com/google/bitcoin/core/UnknownMessage.java +++ b/core/src/main/java/org/bitcoinj/core/UnknownMessage.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; public class UnknownMessage extends EmptyMessage { private static final long serialVersionUID = 3614705938207918775L; diff --git a/core/src/main/java/com/google/bitcoin/core/UnsafeByteArrayOutputStream.java b/core/src/main/java/org/bitcoinj/core/UnsafeByteArrayOutputStream.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/UnsafeByteArrayOutputStream.java rename to core/src/main/java/org/bitcoinj/core/UnsafeByteArrayOutputStream.java index a60eca82..ad95cf3f 100644 --- a/core/src/main/java/com/google/bitcoin/core/UnsafeByteArrayOutputStream.java +++ b/core/src/main/java/org/bitcoinj/core/UnsafeByteArrayOutputStream.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/core/src/main/java/com/google/bitcoin/core/Utils.java b/core/src/main/java/org/bitcoinj/core/Utils.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/Utils.java rename to core/src/main/java/org/bitcoinj/core/Utils.java index e645bb8b..1b8dac62 100644 --- a/core/src/main/java/com/google/bitcoin/core/Utils.java +++ b/core/src/main/java/org/bitcoinj/core/Utils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import com.google.common.base.Charsets; import com.google.common.base.Joiner; diff --git a/core/src/main/java/com/google/bitcoin/core/VarInt.java b/core/src/main/java/org/bitcoinj/core/VarInt.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/core/VarInt.java rename to core/src/main/java/org/bitcoinj/core/VarInt.java index 84f6baa2..0ba02703 100644 --- a/core/src/main/java/com/google/bitcoin/core/VarInt.java +++ b/core/src/main/java/org/bitcoinj/core/VarInt.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import static com.google.bitcoin.core.Utils.isLessThanUnsigned; -import static com.google.bitcoin.core.Utils.isLessThanOrEqualToUnsigned; +import static org.bitcoinj.core.Utils.isLessThanUnsigned; +import static org.bitcoinj.core.Utils.isLessThanOrEqualToUnsigned; /** * A variable-length encoded integer using Satoshis encoding. diff --git a/core/src/main/java/com/google/bitcoin/core/VerificationException.java b/core/src/main/java/org/bitcoinj/core/VerificationException.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/VerificationException.java rename to core/src/main/java/org/bitcoinj/core/VerificationException.java index f07862d7..5ddf2a87 100644 --- a/core/src/main/java/com/google/bitcoin/core/VerificationException.java +++ b/core/src/main/java/org/bitcoinj/core/VerificationException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; @SuppressWarnings("serial") public class VerificationException extends RuntimeException { diff --git a/core/src/main/java/com/google/bitcoin/core/VersionAck.java b/core/src/main/java/org/bitcoinj/core/VersionAck.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/VersionAck.java rename to core/src/main/java/org/bitcoinj/core/VersionAck.java index a1d85c9f..e32a2530 100644 --- a/core/src/main/java/com/google/bitcoin/core/VersionAck.java +++ b/core/src/main/java/org/bitcoinj/core/VersionAck.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; /** * The verack message, sent by a client accepting the version message they diff --git a/core/src/main/java/com/google/bitcoin/core/VersionMessage.java b/core/src/main/java/org/bitcoinj/core/VersionMessage.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/core/VersionMessage.java rename to core/src/main/java/org/bitcoinj/core/VersionMessage.java index 024d78f4..b266a9b1 100644 --- a/core/src/main/java/com/google/bitcoin/core/VersionMessage.java +++ b/core/src/main/java/org/bitcoinj/core/VersionMessage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import javax.annotation.Nullable; import java.io.IOException; diff --git a/core/src/main/java/com/google/bitcoin/core/VersionedChecksummedBytes.java b/core/src/main/java/org/bitcoinj/core/VersionedChecksummedBytes.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/VersionedChecksummedBytes.java rename to core/src/main/java/org/bitcoinj/core/VersionedChecksummedBytes.java index d9aa0aea..3cb698ad 100644 --- a/core/src/main/java/com/google/bitcoin/core/VersionedChecksummedBytes.java +++ b/core/src/main/java/org/bitcoinj/core/VersionedChecksummedBytes.java @@ -14,15 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import static com.google.common.base.Preconditions.checkArgument; import java.io.Serializable; import java.util.Arrays; -import org.spongycastle.util.Integers; - import com.google.common.base.Objects; /** diff --git a/core/src/main/java/com/google/bitcoin/core/Wallet.java b/core/src/main/java/org/bitcoinj/core/Wallet.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/Wallet.java rename to core/src/main/java/org/bitcoinj/core/Wallet.java index de05febb..c27c0e2d 100644 --- a/core/src/main/java/com/google/bitcoin/core/Wallet.java +++ b/core/src/main/java/org/bitcoinj/core/Wallet.java @@ -15,25 +15,25 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; -import com.google.bitcoin.crypto.*; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.script.ScriptChunk; -import com.google.bitcoin.signers.MissingSigResolutionSigner; -import com.google.bitcoin.signers.LocalTransactionSigner; -import com.google.bitcoin.signers.TransactionSigner; -import com.google.bitcoin.store.UnreadableWalletException; -import com.google.bitcoin.store.WalletProtobufSerializer; -import com.google.bitcoin.utils.BaseTaggableObject; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; -import com.google.bitcoin.wallet.*; -import com.google.bitcoin.wallet.WalletTransaction.Pool; +import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.crypto.*; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.script.ScriptChunk; +import org.bitcoinj.signers.MissingSigResolutionSigner; +import org.bitcoinj.signers.LocalTransactionSigner; +import org.bitcoinj.signers.TransactionSigner; +import org.bitcoinj.store.UnreadableWalletException; +import org.bitcoinj.store.WalletProtobufSerializer; +import org.bitcoinj.utils.BaseTaggableObject; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.*; +import org.bitcoinj.wallet.WalletTransaction.Pool; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Objects.ToStringHelper; @@ -46,7 +46,6 @@ import com.google.common.util.concurrent.SettableFuture; import com.google.protobuf.ByteString; import org.bitcoin.protocols.payments.Protos.PaymentDetails; -import org.bitcoinj.wallet.Protos; import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -99,7 +98,7 @@ import static com.google.common.base.Preconditions.*; * that simplifies this for you although you're still responsible for manually triggering a save when your app is about * to quit because the auto-save feature waits a moment before actually committing to disk to avoid IO thrashing when * the wallet is changing very fast (eg due to a block chain sync). See - * {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, com.google.bitcoin.wallet.WalletFiles.Listener)} + * {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, org.bitcoinj.wallet.WalletFiles.Listener)} * for more information about this.

*/ public class Wallet extends BaseTaggableObject implements Serializable, BlockChainListener, PeerFilterProvider, KeyBag, TransactionBag { @@ -342,7 +341,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet * user interface as "a convenient key to receive funds on" when the purpose parameter is - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS}. The returned key is stable until + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS}. The returned key is stable until * it's actually seen in a pending or confirmed transaction, at which point this method will start returning * a different key (for each purpose independently). */ @@ -357,15 +356,15 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } /** - * An alias for calling {@link #currentKey(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} with - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public DeterministicKey currentReceiveKey() { return currentKey(KeyChain.KeyPurpose.RECEIVE_FUNDS); } /** - * Returns address for a {@link #currentKey(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * Returns address for a {@link #currentKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} */ public Address currentAddress(KeyChain.KeyPurpose purpose) { lock.lock(); @@ -378,8 +377,8 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } /** - * An alias for calling {@link #currentAddress(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} with - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #currentAddress(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public Address currentReceiveAddress() { return currentAddress(KeyChain.KeyPurpose.RECEIVE_FUNDS); @@ -388,8 +387,8 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Returns a key that has not been returned by this method before (fresh). You can think of this as being * a newly created key, although the notion of "create" is not really valid for a - * {@link com.google.bitcoin.wallet.DeterministicKeyChain}. When the parameter is - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put + * {@link org.bitcoinj.wallet.DeterministicKeyChain}. When the parameter is + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put * into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out * to someone who wishes to send money. */ @@ -400,8 +399,8 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Returns a key/s that has not been returned by this method before (fresh). You can think of this as being * a newly created key/s, although the notion of "create" is not really valid for a - * {@link com.google.bitcoin.wallet.DeterministicKeyChain}. When the parameter is - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put + * {@link org.bitcoinj.wallet.DeterministicKeyChain}. When the parameter is + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put * into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key/s out * to someone who wishes to send money. */ @@ -420,15 +419,15 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } /** - * An alias for calling {@link #freshKey(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} with - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #freshKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public DeterministicKey freshReceiveKey() { return freshKey(KeyChain.KeyPurpose.RECEIVE_FUNDS); } /** - * Returns address for a {@link #freshKey(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * Returns address for a {@link #freshKey(org.bitcoinj.wallet.KeyChain.KeyPurpose)} */ public Address freshAddress(KeyChain.KeyPurpose purpose) { lock.lock(); @@ -442,8 +441,8 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } /** - * An alias for calling {@link #freshAddress(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} with - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. + * An alias for calling {@link #freshAddress(org.bitcoinj.wallet.KeyChain.KeyPurpose)} with + * {@link org.bitcoinj.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} as the parameter. */ public Address freshReceiveAddress() { return freshAddress(KeyChain.KeyPurpose.RECEIVE_FUNDS); @@ -582,7 +581,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Imports the given keys to the wallet. - * If {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, com.google.bitcoin.wallet.WalletFiles.Listener)} + * If {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, org.bitcoinj.wallet.WalletFiles.Listener)} * has been called, triggers an auto save bypassing the normal coalescing delay and event handlers. * Returns the number of keys added, after duplicates are ignored. The onKeyAdded event will be called for each key * in the list that was not already present. @@ -664,7 +663,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } } - /** See {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ + /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ public void setKeychainLookaheadSize(int lookaheadSize) { lock.lock(); try { @@ -674,12 +673,12 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } } - /** See {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ + /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int)} for more info on this. */ public int getKeychainLookaheadSize() { return keychain.getLookaheadSize(); } - /** See {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ + /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ public void setKeychainLookaheadThreshold(int num) { lock.lock(); try { @@ -690,7 +689,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } } - /** See {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ + /** See {@link org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} for more info on this. */ public int getKeychainLookaheadThreshold() { lock.lock(); try { @@ -890,7 +889,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Marks all keys used in the transaction output as used in the wallet. - * See {@link com.google.bitcoin.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. + * See {@link org.bitcoinj.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. */ private void markKeysAsUsed(Transaction tx) { lock.lock(); @@ -917,7 +916,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Returns the immutable seed for the current active HD chain. - * @throws com.google.bitcoin.core.ECKey.MissingPrivateKeyException if the seed is unavailable (watching wallet) + * @throws org.bitcoinj.core.ECKey.MissingPrivateKeyException if the seed is unavailable (watching wallet) */ public DeterministicSeed getKeyChainSeed() { lock.lock(); @@ -946,7 +945,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha } /** - * Convenience wrapper around {@link Wallet#encrypt(com.google.bitcoin.crypto.KeyCrypter, + * Convenience wrapper around {@link Wallet#encrypt(org.bitcoinj.crypto.KeyCrypter, * org.spongycastle.crypto.params.KeyParameter)} which uses the default Scrypt key derivation algorithm and * parameters to derive a key from the given password. */ @@ -963,7 +962,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Encrypt the wallet using the KeyCrypter and the AES key. A good default KeyCrypter to use is - * {@link com.google.bitcoin.crypto.KeyCrypterScrypt}. + * {@link org.bitcoinj.crypto.KeyCrypterScrypt}. * * @param keyCrypter The KeyCrypter that specifies how to encrypt/ decrypt a key * @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to create from a password) @@ -1241,7 +1240,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** *

* Disables auto-saving, after it had been enabled with - * {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, com.google.bitcoin.wallet.WalletFiles.Listener)} + * {@link Wallet#autosaveToFile(java.io.File, long, java.util.concurrent.TimeUnit, org.bitcoinj.wallet.WalletFiles.Listener)} * before. This method blocks until finished. *

*/ @@ -2624,7 +2623,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Returns the earliest creation time of keys or watched scripts in this wallet, in seconds since the epoch, ie the min - * of {@link com.google.bitcoin.core.ECKey#getCreationTimeSeconds()}. This can return zero if at least one key does + * of {@link org.bitcoinj.core.ECKey#getCreationTimeSeconds()}. This can return zero if at least one key does * not have that data (was created before key timestamping was implemented).

* * This method is most often used in conjunction with {@link PeerGroup#setFastCatchupTimeSecs(long)} in order to @@ -2877,7 +2876,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * money to fail! Finally please be aware that any listeners on the future will run either on the calling thread * if it completes immediately, or eventually on a background thread if the balance is not yet at the right * level. If you do something that means you know the balance should be sufficient to trigger the future, - * you can use {@link com.google.bitcoin.utils.Threading#waitForUserCode()} to block until the future had a + * you can use {@link org.bitcoinj.utils.Threading#waitForUserCode()} to block until the future had a * chance to be updated.

*/ public ListenableFuture getBalanceFuture(final Coin value, final BalanceType type) { @@ -2959,7 +2958,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha */ USE_DUMMY_SIG, /** - * If signature is missing, {@link com.google.bitcoin.signers.TransactionSigner.MissingSignatureException} + * If signature is missing, {@link org.bitcoinj.signers.TransactionSigner.MissingSignatureException} * will be thrown for P2SH and {@link ECKey.MissingPrivateKeyException} for other tx types. */ THROW @@ -2990,7 +2989,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * When emptyWallet is set, all coins selected by the coin selector are sent to the first output in tx - * (its value is ignored and set to {@link com.google.bitcoin.core.Wallet#getBalance()} - the fees required + * (its value is ignored and set to {@link org.bitcoinj.core.Wallet#getBalance()} - the fees required * for the transaction). Any additional outputs are removed. */ public boolean emptyWallet = false; @@ -3064,7 +3063,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha public KeyParameter aesKey = null; /** - * If not null, the {@link com.google.bitcoin.wallet.CoinSelector} to use instead of the wallets default. Coin selectors are + * If not null, the {@link org.bitcoinj.wallet.CoinSelector} to use instead of the wallets default. Coin selectors are * responsible for choosing which transaction outputs (coins) in a wallet to use given the desired send value * amount. */ @@ -4256,7 +4255,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha * re-organisation of the wallet contents on the block chain. For instance, in future the wallet may choose to * optimise itself to reduce fees or improve privacy.

*/ - public void setTransactionBroadcaster(@Nullable com.google.bitcoin.core.TransactionBroadcaster broadcaster) { + public void setTransactionBroadcaster(@Nullable org.bitcoinj.core.TransactionBroadcaster broadcaster) { Transaction[] toBroadcast = {}; lock.lock(); try { @@ -4462,7 +4461,7 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Returns the wallet lock under which most operations happen. This is here to satisfy the - * {@link com.google.bitcoin.core.PeerFilterProvider} interface and generally should not be used directly by apps. + * {@link org.bitcoinj.core.PeerFilterProvider} interface and generally should not be used directly by apps. * In particular, do not hold this lock if you're display a send confirm screen to the user or for any other * long length of time, as it may cause processing holdups elsewhere. Instead, for the "confirm payment screen" * use case you should complete a candidate transaction, present it to the user (e.g. for fee purposes) and then diff --git a/core/src/main/java/com/google/bitcoin/core/WalletEventListener.java b/core/src/main/java/org/bitcoinj/core/WalletEventListener.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/core/WalletEventListener.java rename to core/src/main/java/org/bitcoinj/core/WalletEventListener.java index 40d31ea6..ea4ee58b 100644 --- a/core/src/main/java/com/google/bitcoin/core/WalletEventListener.java +++ b/core/src/main/java/org/bitcoinj/core/WalletEventListener.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.KeyChainEventListener; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyChainEventListener; import java.util.List; @@ -31,7 +31,7 @@ public interface WalletEventListener extends KeyChainEventListener { * was broadcast across the network or because a block was received. If a transaction is seen when it was broadcast, * onCoinsReceived won't be called again when a block containing it is received. If you want to know when such a * transaction receives its first confirmation, register a {@link TransactionConfidence} event listener using - * the object retrieved via {@link com.google.bitcoin.core.Transaction#getConfidence()}. It's safe to modify the + * the object retrieved via {@link org.bitcoinj.core.Transaction#getConfidence()}. It's safe to modify the * wallet in this callback, for example, by spending the transaction just received. * * @param wallet The wallet object that received the coins diff --git a/core/src/main/java/com/google/bitcoin/core/WalletExtension.java b/core/src/main/java/org/bitcoinj/core/WalletExtension.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/core/WalletExtension.java rename to core/src/main/java/org/bitcoinj/core/WalletExtension.java index 429ec582..cd36c1ea 100644 --- a/core/src/main/java/com/google/bitcoin/core/WalletExtension.java +++ b/core/src/main/java/org/bitcoinj/core/WalletExtension.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; /** *

An object implementing this interface can be added to a {@link Wallet} and provide arbitrary byte arrays that will diff --git a/core/src/main/java/com/google/bitcoin/core/WrongNetworkException.java b/core/src/main/java/org/bitcoinj/core/WrongNetworkException.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/core/WrongNetworkException.java rename to core/src/main/java/org/bitcoinj/core/WrongNetworkException.java index 716e2014..e49dd284 100644 --- a/core/src/main/java/com/google/bitcoin/core/WrongNetworkException.java +++ b/core/src/main/java/org/bitcoinj/core/WrongNetworkException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.util.Arrays; diff --git a/core/src/main/java/com/google/bitcoin/crypto/BIP38PrivateKey.java b/core/src/main/java/org/bitcoinj/crypto/BIP38PrivateKey.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/crypto/BIP38PrivateKey.java rename to core/src/main/java/org/bitcoinj/crypto/BIP38PrivateKey.java index d45a7cca..3b7d3e42 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/BIP38PrivateKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/BIP38PrivateKey.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import com.google.common.base.Charsets; import com.google.common.base.Objects; import com.google.common.primitives.Bytes; diff --git a/core/src/main/java/com/google/bitcoin/crypto/ChildNumber.java b/core/src/main/java/org/bitcoinj/crypto/ChildNumber.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/ChildNumber.java rename to core/src/main/java/org/bitcoinj/crypto/ChildNumber.java index 33d07763..4e93f85e 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/ChildNumber.java +++ b/core/src/main/java/org/bitcoinj/crypto/ChildNumber.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; /** *

This is just a wrapper for the i (child number) as per BIP 32 with a boolean getter for the most significant bit diff --git a/core/src/main/java/com/google/bitcoin/crypto/DRMWorkaround.java b/core/src/main/java/org/bitcoinj/crypto/DRMWorkaround.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/crypto/DRMWorkaround.java rename to core/src/main/java/org/bitcoinj/crypto/DRMWorkaround.java index 46891db6..e250436c 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/DRMWorkaround.java +++ b/core/src/main/java/org/bitcoinj/crypto/DRMWorkaround.java @@ -1,6 +1,6 @@ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/crypto/DeterministicHierarchy.java b/core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/crypto/DeterministicHierarchy.java rename to core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java index 261f4450..0f9cf2ef 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/DeterministicHierarchy.java +++ b/core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; diff --git a/core/src/main/java/com/google/bitcoin/crypto/DeterministicKey.java b/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/DeterministicKey.java rename to core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java index e738bbc4..7917a527 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/DeterministicKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import com.google.common.base.Objects; import com.google.common.base.Objects.ToStringHelper; import com.google.common.collect.ImmutableList; @@ -28,7 +28,7 @@ import java.math.BigInteger; import java.nio.ByteBuffer; import java.util.Arrays; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static com.google.common.base.Preconditions.*; /** @@ -204,7 +204,7 @@ public class DeterministicKey extends ECKey { } /** - * Returns this keys {@link com.google.bitcoin.crypto.KeyCrypter} or the keycrypter of its parent key. + * Returns this keys {@link org.bitcoinj.crypto.KeyCrypter} or the keycrypter of its parent key. */ @Override @Nullable public KeyCrypter getKeyCrypter() { @@ -408,7 +408,7 @@ public class DeterministicKey extends ECKey { /** * The creation time of a deterministic key is equal to that of its parent, unless this key is the root of a tree - * in which case the time is stored alongside the key as per normal, see {@link com.google.bitcoin.core.ECKey#getCreationTimeSeconds()}. + * in which case the time is stored alongside the key as per normal, see {@link org.bitcoinj.core.ECKey#getCreationTimeSeconds()}. */ @Override public long getCreationTimeSeconds() { diff --git a/core/src/main/java/com/google/bitcoin/crypto/EncryptableItem.java b/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/crypto/EncryptableItem.java rename to core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java index 4a4bb967..c860daed 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/EncryptableItem.java +++ b/core/src/main/java/org/bitcoinj/crypto/EncryptableItem.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import org.bitcoinj.wallet.Protos; @@ -22,7 +22,7 @@ import javax.annotation.Nullable; /** * Provides a uniform way to access something that can be optionally encrypted with a - * {@link com.google.bitcoin.crypto.KeyCrypter}, yielding an {@link com.google.bitcoin.crypto.EncryptedData}, and + * {@link org.bitcoinj.crypto.KeyCrypter}, yielding an {@link org.bitcoinj.crypto.EncryptedData}, and * which can have a creation time associated with it. */ public interface EncryptableItem { diff --git a/core/src/main/java/com/google/bitcoin/crypto/EncryptedData.java b/core/src/main/java/org/bitcoinj/crypto/EncryptedData.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/EncryptedData.java rename to core/src/main/java/org/bitcoinj/crypto/EncryptedData.java index b596e2f9..040c9bbe 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/EncryptedData.java +++ b/core/src/main/java/org/bitcoinj/crypto/EncryptedData.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import java.util.Arrays; diff --git a/core/src/main/java/com/google/bitcoin/crypto/EncryptedPrivateKey.java b/core/src/main/java/org/bitcoinj/crypto/EncryptedPrivateKey.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/crypto/EncryptedPrivateKey.java rename to core/src/main/java/org/bitcoinj/crypto/EncryptedPrivateKey.java index 7fe56b57..022825ea 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/EncryptedPrivateKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/EncryptedPrivateKey.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import com.google.common.base.Objects; diff --git a/core/src/main/java/com/google/bitcoin/crypto/HDDerivationException.java b/core/src/main/java/org/bitcoinj/crypto/HDDerivationException.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/crypto/HDDerivationException.java rename to core/src/main/java/org/bitcoinj/crypto/HDDerivationException.java index 9cbbe994..0bde8208 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/HDDerivationException.java +++ b/core/src/main/java/org/bitcoinj/crypto/HDDerivationException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; public class HDDerivationException extends RuntimeException { public HDDerivationException(String message) { diff --git a/core/src/main/java/com/google/bitcoin/crypto/HDKeyDerivation.java b/core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/HDKeyDerivation.java rename to core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java index 1099a29c..90a57117 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/HDKeyDerivation.java +++ b/core/src/main/java/org/bitcoinj/crypto/HDKeyDerivation.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; import com.google.common.collect.ImmutableList; import org.spongycastle.crypto.macs.HMac; import org.spongycastle.math.ec.ECPoint; diff --git a/core/src/main/java/com/google/bitcoin/crypto/HDUtils.java b/core/src/main/java/org/bitcoinj/crypto/HDUtils.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/crypto/HDUtils.java rename to core/src/main/java/org/bitcoinj/crypto/HDUtils.java index 1a057ef1..111a7598 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/HDUtils.java +++ b/core/src/main/java/org/bitcoinj/crypto/HDUtils.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.ECKey; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; diff --git a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypter.java b/core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/KeyCrypter.java rename to core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java index 41c407f5..67322351 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypter.java +++ b/core/src/main/java/org/bitcoinj/crypto/KeyCrypter.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; import org.spongycastle.crypto.params.KeyParameter; diff --git a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterException.java b/core/src/main/java/org/bitcoinj/crypto/KeyCrypterException.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/crypto/KeyCrypterException.java rename to core/src/main/java/org/bitcoinj/crypto/KeyCrypterException.java index efd016b0..a3386ba6 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterException.java +++ b/core/src/main/java/org/bitcoinj/crypto/KeyCrypterException.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; /** *

Exception to provide the following to {@link EncrypterDecrypterOpenSSL}:

diff --git a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java b/core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java rename to core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java index fa76ff8a..cf595a2e 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/KeyCrypterScrypt.java +++ b/core/src/main/java/org/bitcoinj/crypto/KeyCrypterScrypt.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import com.google.common.base.Objects; import com.google.protobuf.ByteString; diff --git a/core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java b/core/src/main/java/org/bitcoinj/crypto/MnemonicCode.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java rename to core/src/main/java/org/bitcoinj/crypto/MnemonicCode.java index 5c3bbd52..2b1272a4 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/MnemonicCode.java +++ b/core/src/main/java/org/bitcoinj/crypto/MnemonicCode.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.Utils; import com.google.common.base.Joiner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,7 +34,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; /** * A MnemonicCode object may be used to convert between binary seed values and diff --git a/core/src/main/java/com/google/bitcoin/crypto/MnemonicException.java b/core/src/main/java/org/bitcoinj/crypto/MnemonicException.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/crypto/MnemonicException.java rename to core/src/main/java/org/bitcoinj/crypto/MnemonicException.java index 61630242..ff862f49 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/MnemonicException.java +++ b/core/src/main/java/org/bitcoinj/crypto/MnemonicException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; /** * Exceptions thrown by the MnemonicCode module. diff --git a/core/src/main/java/com/google/bitcoin/crypto/PBKDF2SHA512.java b/core/src/main/java/org/bitcoinj/crypto/PBKDF2SHA512.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/crypto/PBKDF2SHA512.java rename to core/src/main/java/org/bitcoinj/crypto/PBKDF2SHA512.java index 957498ac..03cfa419 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/PBKDF2SHA512.java +++ b/core/src/main/java/org/bitcoinj/crypto/PBKDF2SHA512.java @@ -21,7 +21,7 @@ * */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; diff --git a/core/src/main/java/com/google/bitcoin/crypto/TransactionSignature.java b/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/crypto/TransactionSignature.java rename to core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java index 964cb715..b260783a 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/TransactionSignature.java +++ b/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java @@ -14,18 +14,18 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.VerificationException; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.VerificationException; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.math.BigInteger; /** - * A TransactionSignature wraps an {@link com.google.bitcoin.core.ECKey.ECDSASignature} and adds methods for handling + * A TransactionSignature wraps an {@link org.bitcoinj.core.ECKey.ECDSASignature} and adds methods for handling * the additional SIGHASH mode byte that is used. */ public class TransactionSignature extends ECKey.ECDSASignature { diff --git a/core/src/main/java/com/google/bitcoin/crypto/TrustStoreLoader.java b/core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/crypto/TrustStoreLoader.java rename to core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java index 40b11901..6aa7331a 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/TrustStoreLoader.java +++ b/core/src/main/java/org/bitcoinj/crypto/TrustStoreLoader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import javax.annotation.Nonnull; import java.io.File; diff --git a/core/src/main/java/com/google/bitcoin/crypto/X509Utils.java b/core/src/main/java/org/bitcoinj/crypto/X509Utils.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/crypto/X509Utils.java rename to core/src/main/java/org/bitcoinj/crypto/X509Utils.java index 822d74ff..0d07ec22 100644 --- a/core/src/main/java/com/google/bitcoin/crypto/X509Utils.java +++ b/core/src/main/java/org/bitcoinj/crypto/X509Utils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import com.google.common.base.Joiner; import org.spongycastle.asn1.ASN1ObjectIdentifier; @@ -38,7 +38,7 @@ import java.util.List; /** * X509Utils provides tools for working with X.509 certificates and keystores, as used in the BIP 70 payment protocol. - * For more details on this, see {@link com.google.bitcoin.protocols.payments.PaymentSession}, the article "Working with + * For more details on this, see {@link org.bitcoinj.protocols.payments.PaymentSession}, the article "Working with * the payment protocol" on the bitcoinj website, or the Bitcoin developer guide. */ public class X509Utils { diff --git a/core/src/main/java/com/google/bitcoin/jni/NativeBlockChainListener.java b/core/src/main/java/org/bitcoinj/jni/NativeBlockChainListener.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/jni/NativeBlockChainListener.java rename to core/src/main/java/org/bitcoinj/jni/NativeBlockChainListener.java index 0291b4d7..560f6cd3 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativeBlockChainListener.java +++ b/core/src/main/java/org/bitcoinj/jni/NativeBlockChainListener.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/jni/NativeFutureCallback.java b/core/src/main/java/org/bitcoinj/jni/NativeFutureCallback.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/jni/NativeFutureCallback.java rename to core/src/main/java/org/bitcoinj/jni/NativeFutureCallback.java index b8fdefe0..67a47354 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativeFutureCallback.java +++ b/core/src/main/java/org/bitcoinj/jni/NativeFutureCallback.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; import com.google.common.util.concurrent.FutureCallback; diff --git a/core/src/main/java/com/google/bitcoin/jni/NativePaymentChannelHandlerFactory.java b/core/src/main/java/org/bitcoinj/jni/NativePaymentChannelHandlerFactory.java similarity index 75% rename from core/src/main/java/com/google/bitcoin/jni/NativePaymentChannelHandlerFactory.java rename to core/src/main/java/org/bitcoinj/jni/NativePaymentChannelHandlerFactory.java index 28bae52a..88e394ac 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativePaymentChannelHandlerFactory.java +++ b/core/src/main/java/org/bitcoinj/jni/NativePaymentChannelHandlerFactory.java @@ -1,7 +1,7 @@ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; -import com.google.bitcoin.protocols.channels.PaymentChannelServerListener; -import com.google.bitcoin.protocols.channels.ServerConnectionEventHandler; +import org.bitcoinj.protocols.channels.PaymentChannelServerListener; +import org.bitcoinj.protocols.channels.ServerConnectionEventHandler; import javax.annotation.Nullable; import java.net.SocketAddress; diff --git a/core/src/main/java/com/google/bitcoin/jni/NativePaymentChannelServerConnectionEventHandler.java b/core/src/main/java/org/bitcoinj/jni/NativePaymentChannelServerConnectionEventHandler.java similarity index 77% rename from core/src/main/java/com/google/bitcoin/jni/NativePaymentChannelServerConnectionEventHandler.java rename to core/src/main/java/org/bitcoinj/jni/NativePaymentChannelServerConnectionEventHandler.java index 0d018707..f4c1ecc3 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativePaymentChannelServerConnectionEventHandler.java +++ b/core/src/main/java/org/bitcoinj/jni/NativePaymentChannelServerConnectionEventHandler.java @@ -1,8 +1,8 @@ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; -import com.google.bitcoin.core.*; -import com.google.bitcoin.protocols.channels.PaymentChannelCloseException; -import com.google.bitcoin.protocols.channels.ServerConnectionEventHandler; +import org.bitcoinj.core.*; +import org.bitcoinj.protocols.channels.PaymentChannelCloseException; +import org.bitcoinj.protocols.channels.ServerConnectionEventHandler; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString; diff --git a/core/src/main/java/com/google/bitcoin/jni/NativePeerEventListener.java b/core/src/main/java/org/bitcoinj/jni/NativePeerEventListener.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/jni/NativePeerEventListener.java rename to core/src/main/java/org/bitcoinj/jni/NativePeerEventListener.java index a218303b..474c6f43 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativePeerEventListener.java +++ b/core/src/main/java/org/bitcoinj/jni/NativePeerEventListener.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/jni/NativeTransactionConfidenceListener.java b/core/src/main/java/org/bitcoinj/jni/NativeTransactionConfidenceListener.java similarity index 89% rename from core/src/main/java/com/google/bitcoin/jni/NativeTransactionConfidenceListener.java rename to core/src/main/java/org/bitcoinj/jni/NativeTransactionConfidenceListener.java index fad68763..065d29aa 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativeTransactionConfidenceListener.java +++ b/core/src/main/java/org/bitcoinj/jni/NativeTransactionConfidenceListener.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; /** * An event listener that relays events to a native C++ object. A pointer to that object is stored in diff --git a/core/src/main/java/com/google/bitcoin/jni/NativeWalletEventListener.java b/core/src/main/java/org/bitcoinj/jni/NativeWalletEventListener.java similarity index 84% rename from core/src/main/java/com/google/bitcoin/jni/NativeWalletEventListener.java rename to core/src/main/java/org/bitcoinj/jni/NativeWalletEventListener.java index 0a324c52..705fc7b1 100644 --- a/core/src/main/java/com/google/bitcoin/jni/NativeWalletEventListener.java +++ b/core/src/main/java/org/bitcoinj/jni/NativeWalletEventListener.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.jni; +package org.bitcoinj.jni; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.core.WalletEventListener; -import com.google.bitcoin.script.Script; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.core.WalletEventListener; +import org.bitcoinj.script.Script; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/kits/WalletAppKit.java b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/kits/WalletAppKit.java rename to core/src/main/java/org/bitcoinj/kits/WalletAppKit.java index a31660c0..e7cb7c1d 100644 --- a/core/src/main/java/com/google/bitcoin/kits/WalletAppKit.java +++ b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package com.google.bitcoin.kits; +package org.bitcoinj.kits; -import com.google.bitcoin.core.*; -import com.google.bitcoin.net.discovery.DnsDiscovery; -import com.google.bitcoin.protocols.channels.StoredPaymentChannelClientStates; -import com.google.bitcoin.protocols.channels.StoredPaymentChannelServerStates; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.SPVBlockStore; -import com.google.bitcoin.store.WalletProtobufSerializer; -import com.google.bitcoin.wallet.DeterministicSeed; -import com.google.bitcoin.wallet.KeyChainGroup; +import org.bitcoinj.core.*; +import org.bitcoinj.net.discovery.DnsDiscovery; +import org.bitcoinj.protocols.channels.StoredPaymentChannelClientStates; +import org.bitcoinj.protocols.channels.StoredPaymentChannelServerStates; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.SPVBlockStore; +import org.bitcoinj.store.WalletProtobufSerializer; +import org.bitcoinj.wallet.DeterministicSeed; +import org.bitcoinj.wallet.KeyChainGroup; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.AbstractIdleService; import com.google.common.util.concurrent.MoreExecutors; diff --git a/core/src/main/java/com/google/bitcoin/net/AbstractTimeoutHandler.java b/core/src/main/java/org/bitcoinj/net/AbstractTimeoutHandler.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/AbstractTimeoutHandler.java rename to core/src/main/java/org/bitcoinj/net/AbstractTimeoutHandler.java index 707aa798..354fa43c 100644 --- a/core/src/main/java/com/google/bitcoin/net/AbstractTimeoutHandler.java +++ b/core/src/main/java/org/bitcoinj/net/AbstractTimeoutHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import java.util.Timer; import java.util.TimerTask; diff --git a/core/src/main/java/com/google/bitcoin/net/BlockingClient.java b/core/src/main/java/org/bitcoinj/net/BlockingClient.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/net/BlockingClient.java rename to core/src/main/java/org/bitcoinj/net/BlockingClient.java index e50de5e7..e564eb4a 100644 --- a/core/src/main/java/com/google/bitcoin/net/BlockingClient.java +++ b/core/src/main/java/org/bitcoinj/net/BlockingClient.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/net/BlockingClientManager.java b/core/src/main/java/org/bitcoinj/net/BlockingClientManager.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/net/BlockingClientManager.java rename to core/src/main/java/org/bitcoinj/net/BlockingClientManager.java index 46efb170..bae580e7 100644 --- a/core/src/main/java/com/google/bitcoin/net/BlockingClientManager.java +++ b/core/src/main/java/org/bitcoinj/net/BlockingClientManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import com.google.common.util.concurrent.AbstractIdleService; diff --git a/core/src/main/java/com/google/bitcoin/net/ClientConnectionManager.java b/core/src/main/java/org/bitcoinj/net/ClientConnectionManager.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/net/ClientConnectionManager.java rename to core/src/main/java/org/bitcoinj/net/ClientConnectionManager.java index fcb2a9e4..1ec49af2 100644 --- a/core/src/main/java/com/google/bitcoin/net/ClientConnectionManager.java +++ b/core/src/main/java/org/bitcoinj/net/ClientConnectionManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import com.google.common.util.concurrent.Service; diff --git a/core/src/main/java/com/google/bitcoin/net/ConnectionHandler.java b/core/src/main/java/org/bitcoinj/net/ConnectionHandler.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/ConnectionHandler.java rename to core/src/main/java/org/bitcoinj/net/ConnectionHandler.java index 5ed350d4..57562042 100644 --- a/core/src/main/java/com/google/bitcoin/net/ConnectionHandler.java +++ b/core/src/main/java/org/bitcoinj/net/ConnectionHandler.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; -import com.google.bitcoin.core.Message; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.Message; +import org.bitcoinj.utils.Threading; import com.google.common.base.Throwables; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/net/FilterMerger.java b/core/src/main/java/org/bitcoinj/net/FilterMerger.java similarity index 92% rename from core/src/main/java/com/google/bitcoin/net/FilterMerger.java rename to core/src/main/java/org/bitcoinj/net/FilterMerger.java index 75df856e..d3dcb0c7 100644 --- a/core/src/main/java/com/google/bitcoin/net/FilterMerger.java +++ b/core/src/main/java/org/bitcoinj/net/FilterMerger.java @@ -1,7 +1,7 @@ -package com.google.bitcoin.net; +package org.bitcoinj.net; -import com.google.bitcoin.core.BloomFilter; -import com.google.bitcoin.core.PeerFilterProvider; +import org.bitcoinj.core.BloomFilter; +import org.bitcoinj.core.PeerFilterProvider; import com.google.common.collect.ImmutableList; import java.util.LinkedList; @@ -10,9 +10,9 @@ import java.util.concurrent.locks.Lock; // This code is unit tested by the PeerGroup tests. /** - *

A reusable object that will calculate, given a list of {@link com.google.bitcoin.core.PeerFilterProvider}s, a merged - * {@link com.google.bitcoin.core.BloomFilter} and earliest key time for all of them. - * Used by the {@link com.google.bitcoin.core.PeerGroup} class internally.

+ *

A reusable object that will calculate, given a list of {@link org.bitcoinj.core.PeerFilterProvider}s, a merged + * {@link org.bitcoinj.core.BloomFilter} and earliest key time for all of them. + * Used by the {@link org.bitcoinj.core.PeerGroup} class internally.

* *

Thread safety: this class tracks the element count of the last filter it calculated and so must be synchronised * externally or used from only one thread. It will acquire a lock on each filter in turn before performing the diff --git a/core/src/main/java/com/google/bitcoin/net/MessageWriteTarget.java b/core/src/main/java/org/bitcoinj/net/MessageWriteTarget.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/net/MessageWriteTarget.java rename to core/src/main/java/org/bitcoinj/net/MessageWriteTarget.java index 2fe05836..18166b47 100644 --- a/core/src/main/java/com/google/bitcoin/net/MessageWriteTarget.java +++ b/core/src/main/java/org/bitcoinj/net/MessageWriteTarget.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import java.io.IOException; diff --git a/core/src/main/java/com/google/bitcoin/net/NioClient.java b/core/src/main/java/org/bitcoinj/net/NioClient.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/net/NioClient.java rename to core/src/main/java/org/bitcoinj/net/NioClient.java index 0d258ec6..cd83e9cf 100644 --- a/core/src/main/java/com/google/bitcoin/net/NioClient.java +++ b/core/src/main/java/org/bitcoinj/net/NioClient.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import java.io.IOException; import java.net.SocketAddress; diff --git a/core/src/main/java/com/google/bitcoin/net/NioClientManager.java b/core/src/main/java/org/bitcoinj/net/NioClientManager.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/net/NioClientManager.java rename to core/src/main/java/org/bitcoinj/net/NioClientManager.java index d948f6d9..9eb0aca2 100644 --- a/core/src/main/java/com/google/bitcoin/net/NioClientManager.java +++ b/core/src/main/java/org/bitcoinj/net/NioClientManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import com.google.common.base.Throwables; import com.google.common.util.concurrent.AbstractExecutionThreadService; diff --git a/core/src/main/java/com/google/bitcoin/net/NioServer.java b/core/src/main/java/org/bitcoinj/net/NioServer.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/net/NioServer.java rename to core/src/main/java/org/bitcoinj/net/NioServer.java index 641209a4..800f80f0 100644 --- a/core/src/main/java/com/google/bitcoin/net/NioServer.java +++ b/core/src/main/java/org/bitcoinj/net/NioServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import java.io.IOException; import java.net.InetSocketAddress; diff --git a/core/src/main/java/com/google/bitcoin/net/ProtobufParser.java b/core/src/main/java/org/bitcoinj/net/ProtobufParser.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/ProtobufParser.java rename to core/src/main/java/org/bitcoinj/net/ProtobufParser.java index 1036532f..812afd02 100644 --- a/core/src/main/java/com/google/bitcoin/net/ProtobufParser.java +++ b/core/src/main/java/org/bitcoinj/net/ProtobufParser.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.Utils; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.protobuf.ByteString; import com.google.protobuf.MessageLite; diff --git a/core/src/main/java/com/google/bitcoin/net/StreamParser.java b/core/src/main/java/org/bitcoinj/net/StreamParser.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/StreamParser.java rename to core/src/main/java/org/bitcoinj/net/StreamParser.java index 7fbaa645..51f6e435 100644 --- a/core/src/main/java/com/google/bitcoin/net/StreamParser.java +++ b/core/src/main/java/org/bitcoinj/net/StreamParser.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import java.nio.ByteBuffer; diff --git a/core/src/main/java/com/google/bitcoin/net/StreamParserFactory.java b/core/src/main/java/org/bitcoinj/net/StreamParserFactory.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/net/StreamParserFactory.java rename to core/src/main/java/org/bitcoinj/net/StreamParserFactory.java index b028fb4e..9fcfe55b 100644 --- a/core/src/main/java/com/google/bitcoin/net/StreamParserFactory.java +++ b/core/src/main/java/org/bitcoinj/net/StreamParserFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; import java.net.InetAddress; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/net/discovery/DnsDiscovery.java b/core/src/main/java/org/bitcoinj/net/discovery/DnsDiscovery.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/discovery/DnsDiscovery.java rename to core/src/main/java/org/bitcoinj/net/discovery/DnsDiscovery.java index 0de687ca..28d80b3b 100644 --- a/core/src/main/java/com/google/bitcoin/net/discovery/DnsDiscovery.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/DnsDiscovery.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.NetworkParameters; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/net/discovery/IrcDiscovery.java b/core/src/main/java/org/bitcoinj/net/discovery/IrcDiscovery.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/discovery/IrcDiscovery.java rename to core/src/main/java/org/bitcoinj/net/discovery/IrcDiscovery.java index 9d256594..5a2b155f 100644 --- a/core/src/main/java/com/google/bitcoin/net/discovery/IrcDiscovery.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/IrcDiscovery.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Base58; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Base58; +import org.bitcoinj.core.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/net/discovery/PeerDiscovery.java b/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/net/discovery/PeerDiscovery.java rename to core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java index 670384e6..e560d10c 100644 --- a/core/src/main/java/com/google/bitcoin/net/discovery/PeerDiscovery.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscovery.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; import java.net.InetSocketAddress; import java.util.concurrent.TimeUnit; diff --git a/core/src/main/java/com/google/bitcoin/net/discovery/PeerDiscoveryException.java b/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscoveryException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/net/discovery/PeerDiscoveryException.java rename to core/src/main/java/org/bitcoinj/net/discovery/PeerDiscoveryException.java index fe45a1a4..711828cb 100644 --- a/core/src/main/java/com/google/bitcoin/net/discovery/PeerDiscoveryException.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/PeerDiscoveryException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; public class PeerDiscoveryException extends Exception { private static final long serialVersionUID = -2863411151549391392L; diff --git a/core/src/main/java/com/google/bitcoin/net/discovery/SeedPeers.java b/core/src/main/java/org/bitcoinj/net/discovery/SeedPeers.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/net/discovery/SeedPeers.java rename to core/src/main/java/org/bitcoinj/net/discovery/SeedPeers.java index 781abc51..d5fde22d 100644 --- a/core/src/main/java/com/google/bitcoin/net/discovery/SeedPeers.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/SeedPeers.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.NetworkParameters; import javax.annotation.Nullable; import java.net.InetAddress; diff --git a/core/src/main/java/com/google/bitcoin/net/discovery/TorDiscovery.java b/core/src/main/java/org/bitcoinj/net/discovery/TorDiscovery.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/net/discovery/TorDiscovery.java rename to core/src/main/java/org/bitcoinj/net/discovery/TorDiscovery.java index bf8324c8..002431ab 100644 --- a/core/src/main/java/com/google/bitcoin/net/discovery/TorDiscovery.java +++ b/core/src/main/java/org/bitcoinj/net/discovery/TorDiscovery.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; import static com.google.common.base.Preconditions.checkArgument; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.NetworkParameters; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; diff --git a/core/src/main/java/com/google/bitcoin/params/MainNetParams.java b/core/src/main/java/org/bitcoinj/params/MainNetParams.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/params/MainNetParams.java rename to core/src/main/java/org/bitcoinj/params/MainNetParams.java index 0cd2ce47..1f08d3a2 100644 --- a/core/src/main/java/com/google/bitcoin/params/MainNetParams.java +++ b/core/src/main/java/org/bitcoinj/params/MainNetParams.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.params; +package org.bitcoinj.params; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.Utils; import static com.google.common.base.Preconditions.checkState; diff --git a/core/src/main/java/com/google/bitcoin/params/Networks.java b/core/src/main/java/org/bitcoinj/params/Networks.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/params/Networks.java rename to core/src/main/java/org/bitcoinj/params/Networks.java index ab922eb1..dc965da8 100644 --- a/core/src/main/java/com/google/bitcoin/params/Networks.java +++ b/core/src/main/java/org/bitcoinj/params/Networks.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.params; +package org.bitcoinj.params; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.NetworkParameters; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; diff --git a/core/src/main/java/com/google/bitcoin/params/RegTestParams.java b/core/src/main/java/org/bitcoinj/params/RegTestParams.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/params/RegTestParams.java rename to core/src/main/java/org/bitcoinj/params/RegTestParams.java index 295361e1..eeb460ac 100644 --- a/core/src/main/java/com/google/bitcoin/params/RegTestParams.java +++ b/core/src/main/java/org/bitcoinj/params/RegTestParams.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.params; +package org.bitcoinj.params; -import com.google.bitcoin.core.Block; +import org.bitcoinj.core.Block; import java.math.BigInteger; diff --git a/core/src/main/java/com/google/bitcoin/params/TestNet2Params.java b/core/src/main/java/org/bitcoinj/params/TestNet2Params.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/params/TestNet2Params.java rename to core/src/main/java/org/bitcoinj/params/TestNet2Params.java index b5b3a7be..99df8176 100644 --- a/core/src/main/java/com/google/bitcoin/params/TestNet2Params.java +++ b/core/src/main/java/org/bitcoinj/params/TestNet2Params.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.params; +package org.bitcoinj.params; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Utils; import static com.google.common.base.Preconditions.checkState; diff --git a/core/src/main/java/com/google/bitcoin/params/TestNet3Params.java b/core/src/main/java/org/bitcoinj/params/TestNet3Params.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/params/TestNet3Params.java rename to core/src/main/java/org/bitcoinj/params/TestNet3Params.java index e91109f7..095b2c33 100644 --- a/core/src/main/java/com/google/bitcoin/params/TestNet3Params.java +++ b/core/src/main/java/org/bitcoinj/params/TestNet3Params.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.params; +package org.bitcoinj.params; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Utils; import static com.google.common.base.Preconditions.checkState; diff --git a/core/src/main/java/com/google/bitcoin/params/UnitTestParams.java b/core/src/main/java/org/bitcoinj/params/UnitTestParams.java similarity index 89% rename from core/src/main/java/com/google/bitcoin/params/UnitTestParams.java rename to core/src/main/java/org/bitcoinj/params/UnitTestParams.java index dd1d5ee8..4f433d36 100644 --- a/core/src/main/java/com/google/bitcoin/params/UnitTestParams.java +++ b/core/src/main/java/org/bitcoinj/params/UnitTestParams.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.google.bitcoin.params; +package org.bitcoinj.params; -import com.google.bitcoin.core.Block; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.Block; +import org.bitcoinj.core.NetworkParameters; import java.math.BigInteger; /** * Network parameters used by the bitcoinj unit tests (and potentially your own). This lets you solve a block using - * {@link com.google.bitcoin.core.Block#solve()} by setting difficulty to the easiest possible. + * {@link org.bitcoinj.core.Block#solve()} by setting difficulty to the easiest possible. */ public class UnitTestParams extends NetworkParameters { public UnitTestParams() { diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/ClientState.java b/core/src/main/java/org/bitcoinj/protocols/channels/ClientState.java similarity index 81% rename from core/src/main/java/com/google/bitcoin/protocols/channels/ClientState.java rename to core/src/main/java/org/bitcoinj/protocols/channels/ClientState.java index 4045169e..6cb63e90 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/ClientState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/ClientState.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: storedclientpaymentchannel.proto -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; public final class ClientState { private ClientState() {} @@ -15,12 +15,12 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - java.util.List + java.util.List getChannelsList(); /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index); + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index); /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ @@ -28,12 +28,12 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - java.util.List + java.util.List getChannelsOrBuilderList(); /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder( + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder( int index); } /** @@ -93,10 +93,10 @@ public final class ClientState { } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - channels_ = new java.util.ArrayList(); + channels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - channels_.add(input.readMessage(com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.PARSER, extensionRegistry)); + channels_.add(input.readMessage(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.PARSER, extensionRegistry)); break; } } @@ -116,14 +116,14 @@ public final class ClientState { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor; + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.class, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.Builder.class); + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.Builder.class); } public static com.google.protobuf.Parser PARSER = @@ -143,17 +143,17 @@ public final class ClientState { // repeated .paymentchannels.StoredClientPaymentChannel channels = 1; public static final int CHANNELS_FIELD_NUMBER = 1; - private java.util.List channels_; + private java.util.List channels_; /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public java.util.List getChannelsList() { + public java.util.List getChannelsList() { return channels_; } /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public java.util.List + public java.util.List getChannelsOrBuilderList() { return channels_; } @@ -166,13 +166,13 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index) { + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index) { return channels_.get(index); } /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder( + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder( int index) { return channels_.get(index); } @@ -226,53 +226,53 @@ public final class ClientState { return super.writeReplace(); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(byte[] data) + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseDelimitedFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseDelimitedFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -281,7 +281,7 @@ public final class ClientState { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels prototype) { + public static Builder newBuilder(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -301,20 +301,20 @@ public final class ClientState { */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelsOrBuilder { + implements org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor; + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.class, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.Builder.class); + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.Builder.class); } - // Construct using com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.newBuilder() + // Construct using org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -350,23 +350,23 @@ public final class ClientState { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor; + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannels_descriptor; } - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels getDefaultInstanceForType() { - return com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.getDefaultInstance(); + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels getDefaultInstanceForType() { + return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.getDefaultInstance(); } - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels build() { - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels result = buildPartial(); + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels build() { + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels buildPartial() { - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels result = new com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels(this); + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels buildPartial() { + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels(this); int from_bitField0_ = bitField0_; if (channelsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -382,16 +382,16 @@ public final class ClientState { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels) { - return mergeFrom((com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels)other); + if (other instanceof org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels) { + return mergeFrom((org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels other) { - if (other == com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels.getDefaultInstance()) return this; + public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels other) { + if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels.getDefaultInstance()) return this; if (channelsBuilder_ == null) { if (!other.channels_.isEmpty()) { if (channels_.isEmpty()) { @@ -436,11 +436,11 @@ public final class ClientState { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels parsedMessage = null; + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannels) e.getUnfinishedMessage(); + parsedMessage = (org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannels) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -452,22 +452,22 @@ public final class ClientState { private int bitField0_; // repeated .paymentchannels.StoredClientPaymentChannel channels = 1; - private java.util.List channels_ = + private java.util.List channels_ = java.util.Collections.emptyList(); private void ensureChannelsIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { - channels_ = new java.util.ArrayList(channels_); + channels_ = new java.util.ArrayList(channels_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder> channelsBuilder_; + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder> channelsBuilder_; /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public java.util.List getChannelsList() { + public java.util.List getChannelsList() { if (channelsBuilder_ == null) { return java.util.Collections.unmodifiableList(channels_); } else { @@ -487,7 +487,7 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index) { + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getChannels(int index) { if (channelsBuilder_ == null) { return channels_.get(index); } else { @@ -498,7 +498,7 @@ public final class ClientState { * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ public Builder setChannels( - int index, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel value) { + int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel value) { if (channelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -515,7 +515,7 @@ public final class ClientState { * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ public Builder setChannels( - int index, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) { + int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); channels_.set(index, builderForValue.build()); @@ -528,7 +528,7 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public Builder addChannels(com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel value) { + public Builder addChannels(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel value) { if (channelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -545,7 +545,7 @@ public final class ClientState { * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ public Builder addChannels( - int index, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel value) { + int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel value) { if (channelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -562,7 +562,7 @@ public final class ClientState { * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ public Builder addChannels( - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) { + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); channels_.add(builderForValue.build()); @@ -576,7 +576,7 @@ public final class ClientState { * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ public Builder addChannels( - int index, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) { + int index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder builderForValue) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); channels_.add(index, builderForValue.build()); @@ -590,7 +590,7 @@ public final class ClientState { * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ public Builder addAllChannels( - java.lang.Iterable values) { + java.lang.Iterable values) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); super.addAll(values, channels_); @@ -629,14 +629,14 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder getChannelsBuilder( + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder getChannelsBuilder( int index) { return getChannelsFieldBuilder().getBuilder(index); } /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder( + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder getChannelsOrBuilder( int index) { if (channelsBuilder_ == null) { return channels_.get(index); } else { @@ -646,7 +646,7 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public java.util.List + public java.util.List getChannelsOrBuilderList() { if (channelsBuilder_ != null) { return channelsBuilder_.getMessageOrBuilderList(); @@ -657,31 +657,31 @@ public final class ClientState { /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder() { + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder() { return getChannelsFieldBuilder().addBuilder( - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()); + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()); } /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder( + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder( int index) { return getChannelsFieldBuilder().addBuilder( - index, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()); + index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()); } /** * repeated .paymentchannels.StoredClientPaymentChannel channels = 1; */ - public java.util.List + public java.util.List getChannelsBuilderList() { return getChannelsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder> + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder> getChannelsFieldBuilder() { if (channelsBuilder_ == null) { channelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>( + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>( channels_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), @@ -892,14 +892,14 @@ public final class ClientState { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor; + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.class, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder.class); + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder.class); } public static com.google.protobuf.Parser PARSER = @@ -1157,53 +1157,53 @@ public final class ClientState { return super.writeReplace(); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(byte[] data) + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseDelimitedFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseDelimitedFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1212,7 +1212,7 @@ public final class ClientState { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel prototype) { + public static Builder newBuilder(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1233,20 +1233,20 @@ public final class ClientState { */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder { + implements org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor; + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.class, com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.Builder.class); + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.class, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder.class); } - // Construct using com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.newBuilder() + // Construct using org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1289,23 +1289,23 @@ public final class ClientState { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bitcoin.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor; + return org.bitcoinj.protocols.channels.ClientState.internal_static_paymentchannels_StoredClientPaymentChannel_descriptor; } - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel getDefaultInstanceForType() { - return com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance(); + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getDefaultInstanceForType() { + return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance(); } - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel build() { - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel result = buildPartial(); + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel build() { + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() { - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel result = new com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel(this); + public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() { + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1342,16 +1342,16 @@ public final class ClientState { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel) { - return mergeFrom((com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel)other); + if (other instanceof org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel) { + return mergeFrom((org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel other) { - if (other == com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this; + public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel other) { + if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } @@ -1409,11 +1409,11 @@ public final class ClientState { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel parsedMessage = null; + org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel) e.getUnfinishedMessage(); + parsedMessage = (org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1732,8 +1732,8 @@ public final class ClientState { "Transaction\030\002 \002(\014\022\031\n\021refundTransaction\030\003" + " \002(\014\022\r\n\005myKey\030\004 \002(\014\022\021\n\tvalueToMe\030\005 \002(\004\022\022" + "\n\nrefundFees\030\006 \002(\004\022\034\n\024closeTransactionHa" + - "sh\030\007 \001(\014B4\n%com.google.bitcoin.protocols" + - ".channelsB\013ClientState" + "sh\030\007 \001(\014B.\n\037org.bitcoinj.protocols.chann" + + "elsB\013ClientState" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/IPaymentChannelClient.java b/core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java similarity index 82% rename from core/src/main/java/com/google/bitcoin/protocols/channels/IPaymentChannelClient.java rename to core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java index 6da3802b..328bd756 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/IPaymentChannelClient.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/IPaymentChannelClient.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString; @@ -44,7 +44,7 @@ public interface IPaymentChannelClient { * intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.

* *

Note that this MUST still be called even after either - * {@link PaymentChannelClient.ClientConnection#destroyConnection(com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link PaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or * {@link IPaymentChannelClient#settle()} is called, to actually handle the connection close logic.

*/ void connectionClosed(); @@ -53,7 +53,7 @@ public interface IPaymentChannelClient { *

Settles the channel, notifying the server it can broadcast the most recent payment transaction.

* *

Note that this only generates a CLOSE message for the server and calls - * {@link PaymentChannelClient.ClientConnection#destroyConnection(com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason)} + * {@link PaymentChannelClient.ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} * to settle the connection, it does not actually handle connection close logic, and * {@link PaymentChannelClient#connectionClosed()} must still be called after the connection fully settles.

* @@ -97,25 +97,25 @@ public interface IPaymentChannelClient { * however the order of messages must be preserved.

* *

If the send fails, no exception should be thrown, however - * {@link com.google.bitcoin.protocols.channels.PaymentChannelClient#connectionClosed()} should be called immediately. In the case of messages which + * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#connectionClosed()} should be called immediately. In the case of messages which * are a part of initialization, initialization will simply fail and the refund transaction will be broadcasted * when it unlocks (if necessary). In the case of a payment message, the payment will be lost however if the * channel is resumed it will begin again from the channel value after the failed payment.

* - *

Called while holding a lock on the {@link com.google.bitcoin.protocols.channels.PaymentChannelClient} object - be careful about reentrancy

+ *

Called while holding a lock on the {@link org.bitcoinj.protocols.channels.PaymentChannelClient} object - be careful about reentrancy

*/ void sendToServer(Protos.TwoWayChannelMessage msg); /** *

Requests that the connection to the server be closed. For stateless protocols, note that after this call, * no more messages should be received from the server and this object is no longer usable. A - * {@link com.google.bitcoin.protocols.channels.PaymentChannelClient#connectionClosed()} event should be generated immediately after this call.

+ * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#connectionClosed()} event should be generated immediately after this call.

* - *

Called while holding a lock on the {@link com.google.bitcoin.protocols.channels.PaymentChannelClient} object - be careful about reentrancy

+ *

Called while holding a lock on the {@link org.bitcoinj.protocols.channels.PaymentChannelClient} object - be careful about reentrancy

* * @param reason The reason for the closure, see the individual values for more details. * It is usually safe to ignore this and treat any value below - * {@link com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason#CLIENT_REQUESTED_CLOSE} as "unrecoverable error" and all others as + * {@link org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason#CLIENT_REQUESTED_CLOSE} as "unrecoverable error" and all others as * "try again once and see if it works then" */ void destroyConnection(PaymentChannelCloseException.CloseReason reason); @@ -123,7 +123,7 @@ public interface IPaymentChannelClient { /** *

Queries if the expire time proposed by server is acceptable. If false is return the channel - * will be closed with a {@link com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason#TIME_WINDOW_UNACCEPTABLE}.

+ * will be closed with a {@link org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason#TIME_WINDOW_UNACCEPTABLE}.

* @param expireTime The time, in seconds, when this channel will be closed by the server. Note this is in absolute time, i.e. seconds since 1970-01-01T00:00:00. * @return true if the proposed time is acceptable false otherwise. */ @@ -131,10 +131,10 @@ public interface IPaymentChannelClient { /** *

Indicates the channel has been successfully opened and - * {@link com.google.bitcoin.protocols.channels.PaymentChannelClient#incrementPayment(Coin)} + * {@link org.bitcoinj.protocols.channels.PaymentChannelClient#incrementPayment(Coin)} * may be called at will.

* - *

Called while holding a lock on the {@link com.google.bitcoin.protocols.channels.PaymentChannelClient} + *

Called while holding a lock on the {@link org.bitcoinj.protocols.channels.PaymentChannelClient} * object - be careful about reentrancy

* * @param wasInitiated If true, the channel is newly opened. If false, it was resumed. diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClient.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClient.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java index d5866be7..f811ebcd 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClient.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClient.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; @@ -147,7 +147,7 @@ public class PaymentChannelClient implements IPaymentChannelClient { * attempt will be made to resume that channel. * @param timeWindow The time in seconds, relative to now, on how long this channel should be kept open. Note that is is * a proposal to the server. The server may in turn propose something different. - * See {@link com.google.bitcoin.protocols.channels.IPaymentChannelClient.ClientConnection#acceptExpireTime(long)} + * See {@link org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientConnection#acceptExpireTime(long)} * @param conn A callback listener which represents the connection to the server (forwards messages we generate to * the server) */ @@ -390,7 +390,7 @@ public class PaymentChannelClient implements IPaymentChannelClient { * intending to reopen the channel later. There is likely little reason to use this in a stateless protocol.

* *

Note that this MUST still be called even after either - * {@link ClientConnection#destroyConnection(com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason)} or + * {@link ClientConnection#destroyConnection(org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason)} or * {@link PaymentChannelClient#settle()} is called, to actually handle the connection close logic.

*/ @Override diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClientConnection.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClientConnection.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java index f7d504e4..769ef93b 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClientConnection.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientConnection.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.net.NioClient; -import com.google.bitcoin.net.ProtobufParser; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.Utils; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.net.NioClient; +import org.bitcoinj.net.ProtobufParser; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; @@ -45,7 +45,7 @@ public class PaymentChannelClientConnection { /** * Attempts to open a new connection to and open a payment channel with the given host and port, blocking until the - * connection is open. The server is requested to keep the channel open for {@link com.google.bitcoin.protocols.channels.PaymentChannelClient#DEFAULT_TIME_WINDOW} + * connection is open. The server is requested to keep the channel open for {@link org.bitcoinj.protocols.channels.PaymentChannelClient#DEFAULT_TIME_WINDOW} * seconds. If the server proposes a longer time the channel will be closed. * * @param server The host/port pair where the server is listening. diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClientState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClientState.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java index 1864b41f..9f1d7215 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelClientState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.utils.Threading; -import com.google.bitcoin.wallet.AllowUnconfirmedCoinSelector; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.AllowUnconfirmedCoinSelector; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Throwables; import com.google.common.collect.Lists; @@ -229,7 +229,7 @@ public class PaymentChannelClientState { * Creates the initial multisig contract and incomplete refund transaction which can be requested at the appropriate * time using {@link PaymentChannelClientState#getIncompleteRefundTransaction} and * {@link PaymentChannelClientState#getMultisigContract()}. The way the contract is crafted can be adjusted by - * overriding {@link PaymentChannelClientState#editContractSendRequest(com.google.bitcoin.core.Wallet.SendRequest)}. + * overriding {@link PaymentChannelClientState#editContractSendRequest(org.bitcoinj.core.Wallet.SendRequest)}. * By default unconfirmed coins are allowed to be used, as for micropayments the risk should be relatively low. * * @throws ValueOutOfRangeException if the value being used is too small to be accepted by the network diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelCloseException.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelCloseException.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java index a9162813..f0d4fbee 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelCloseException.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelCloseException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; /** * Used to indicate that a channel was closed before it was expected to be closed. @@ -34,7 +34,7 @@ public class PaymentChannelCloseException extends Exception { // Values after here indicate its probably possible to try reopening channel again /** - *

The {@link com.google.bitcoin.protocols.channels.PaymentChannelClient#settle()} method was called or the + *

The {@link org.bitcoinj.protocols.channels.PaymentChannelClient#settle()} method was called or the * client sent a CLOSE message.

*

As long as the server received the CLOSE message, this means that the channel is settling and the payment * transaction (if any) will be broadcast. If the client attempts to open a new connection, a new channel will @@ -43,7 +43,7 @@ public class PaymentChannelCloseException extends Exception { CLIENT_REQUESTED_CLOSE, /** - *

The {@link com.google.bitcoin.protocols.channels.PaymentChannelServer#close()} method was called or server + *

The {@link org.bitcoinj.protocols.channels.PaymentChannelServer#close()} method was called or server * sent a CLOSE message.

* *

This may occur if the server opts to close the connection for some reason, or automatically if the channel diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServer.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServer.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java index 67c30661..bbb1244e 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServer.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServer.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason; +import org.bitcoinj.utils.Threading; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerListener.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerListener.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerListener.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerListener.java index 3170cf5d..286d7014 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerListener.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerListener.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.TransactionBroadcaster; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.net.NioServer; -import com.google.bitcoin.net.ProtobufParser; -import com.google.bitcoin.net.StreamParserFactory; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.TransactionBroadcaster; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.net.NioServer; +import org.bitcoinj.net.ProtobufParser; +import org.bitcoinj.net.StreamParserFactory; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString; diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java index f6fc54d5..86a23459 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentChannelServerState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerState.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.util.concurrent.FutureCallback; diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentIncrementAck.java b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentIncrementAck.java similarity index 85% rename from core/src/main/java/com/google/bitcoin/protocols/channels/PaymentIncrementAck.java rename to core/src/main/java/org/bitcoinj/protocols/channels/PaymentIncrementAck.java index 171f93b4..02788326 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/PaymentIncrementAck.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/PaymentIncrementAck.java @@ -1,6 +1,6 @@ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import com.google.protobuf.ByteString; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/ServerConnectionEventHandler.java b/core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/protocols/channels/ServerConnectionEventHandler.java rename to core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java index db48df58..978c00b3 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/ServerConnectionEventHandler.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/ServerConnectionEventHandler.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.net.ProtobufParser; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.net.ProtobufParser; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString; @@ -43,8 +43,8 @@ public abstract class ServerConnectionEventHandler { *

Note that this does NOT actually broadcast the most recent payment transaction, which will be triggered * automatically when the channel times out by the {@link StoredPaymentChannelServerStates}, or manually by calling * {@link StoredPaymentChannelServerStates#closeChannel(StoredServerChannel)} with the channel returned by - * {@link StoredPaymentChannelServerStates#getChannel(com.google.bitcoin.core.Sha256Hash)} with the id provided in - * {@link ServerConnectionEventHandler#channelOpen(com.google.bitcoin.core.Sha256Hash)}

+ * {@link StoredPaymentChannelServerStates#getChannel(org.bitcoinj.core.Sha256Hash)} with the id provided in + * {@link ServerConnectionEventHandler#channelOpen(org.bitcoinj.core.Sha256Hash)}

*/ @SuppressWarnings("unchecked") // The warning 'unchecked call to write(MessageType)' being suppressed here comes from the build() diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/ServerState.java b/core/src/main/java/org/bitcoinj/protocols/channels/ServerState.java similarity index 80% rename from core/src/main/java/com/google/bitcoin/protocols/channels/ServerState.java rename to core/src/main/java/org/bitcoinj/protocols/channels/ServerState.java index 99316fda..eb16a9a1 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/ServerState.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/ServerState.java @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: storedserverpaymentchannel.proto -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; public final class ServerState { private ServerState() {} @@ -15,12 +15,12 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - java.util.List + java.util.List getChannelsList(); /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel getChannels(int index); + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel getChannels(int index); /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ @@ -28,12 +28,12 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - java.util.List + java.util.List getChannelsOrBuilderList(); /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder getChannelsOrBuilder( + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder getChannelsOrBuilder( int index); } /** @@ -93,10 +93,10 @@ public final class ServerState { } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - channels_ = new java.util.ArrayList(); + channels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - channels_.add(input.readMessage(com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.PARSER, extensionRegistry)); + channels_.add(input.readMessage(org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.PARSER, extensionRegistry)); break; } } @@ -116,14 +116,14 @@ public final class ServerState { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_descriptor; + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_fieldAccessorTable + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.class, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.Builder.class); + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.class, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.Builder.class); } public static com.google.protobuf.Parser PARSER = @@ -143,17 +143,17 @@ public final class ServerState { // repeated .paymentchannels.StoredServerPaymentChannel channels = 1; public static final int CHANNELS_FIELD_NUMBER = 1; - private java.util.List channels_; + private java.util.List channels_; /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public java.util.List getChannelsList() { + public java.util.List getChannelsList() { return channels_; } /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public java.util.List + public java.util.List getChannelsOrBuilderList() { return channels_; } @@ -166,13 +166,13 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel getChannels(int index) { + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel getChannels(int index) { return channels_.get(index); } /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder getChannelsOrBuilder( + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder getChannelsOrBuilder( int index) { return channels_.get(index); } @@ -226,53 +226,53 @@ public final class ServerState { return super.writeReplace(); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom(byte[] data) + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseDelimitedFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseDelimitedFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -281,7 +281,7 @@ public final class ServerState { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels prototype) { + public static Builder newBuilder(org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -301,20 +301,20 @@ public final class ServerState { */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelsOrBuilder { + implements org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_descriptor; + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_fieldAccessorTable + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.class, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.Builder.class); + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.class, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.Builder.class); } - // Construct using com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.newBuilder() + // Construct using org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -350,23 +350,23 @@ public final class ServerState { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_descriptor; + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannels_descriptor; } - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels getDefaultInstanceForType() { - return com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.getDefaultInstance(); + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels getDefaultInstanceForType() { + return org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.getDefaultInstance(); } - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels build() { - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels result = buildPartial(); + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels build() { + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels buildPartial() { - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels result = new com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels(this); + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels buildPartial() { + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels result = new org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels(this); int from_bitField0_ = bitField0_; if (channelsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { @@ -382,16 +382,16 @@ public final class ServerState { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels) { - return mergeFrom((com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels)other); + if (other instanceof org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels) { + return mergeFrom((org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels other) { - if (other == com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels.getDefaultInstance()) return this; + public Builder mergeFrom(org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels other) { + if (other == org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels.getDefaultInstance()) return this; if (channelsBuilder_ == null) { if (!other.channels_.isEmpty()) { if (channels_.isEmpty()) { @@ -436,11 +436,11 @@ public final class ServerState { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels parsedMessage = null; + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannels) e.getUnfinishedMessage(); + parsedMessage = (org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannels) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -452,22 +452,22 @@ public final class ServerState { private int bitField0_; // repeated .paymentchannels.StoredServerPaymentChannel channels = 1; - private java.util.List channels_ = + private java.util.List channels_ = java.util.Collections.emptyList(); private void ensureChannelsIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { - channels_ = new java.util.ArrayList(channels_); + channels_ = new java.util.ArrayList(channels_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder> channelsBuilder_; + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder> channelsBuilder_; /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public java.util.List getChannelsList() { + public java.util.List getChannelsList() { if (channelsBuilder_ == null) { return java.util.Collections.unmodifiableList(channels_); } else { @@ -487,7 +487,7 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel getChannels(int index) { + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel getChannels(int index) { if (channelsBuilder_ == null) { return channels_.get(index); } else { @@ -498,7 +498,7 @@ public final class ServerState { * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ public Builder setChannels( - int index, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel value) { + int index, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel value) { if (channelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -515,7 +515,7 @@ public final class ServerState { * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ public Builder setChannels( - int index, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder builderForValue) { + int index, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder builderForValue) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); channels_.set(index, builderForValue.build()); @@ -528,7 +528,7 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public Builder addChannels(com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel value) { + public Builder addChannels(org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel value) { if (channelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -545,7 +545,7 @@ public final class ServerState { * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ public Builder addChannels( - int index, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel value) { + int index, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel value) { if (channelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -562,7 +562,7 @@ public final class ServerState { * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ public Builder addChannels( - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder builderForValue) { + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder builderForValue) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); channels_.add(builderForValue.build()); @@ -576,7 +576,7 @@ public final class ServerState { * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ public Builder addChannels( - int index, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder builderForValue) { + int index, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder builderForValue) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); channels_.add(index, builderForValue.build()); @@ -590,7 +590,7 @@ public final class ServerState { * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ public Builder addAllChannels( - java.lang.Iterable values) { + java.lang.Iterable values) { if (channelsBuilder_ == null) { ensureChannelsIsMutable(); super.addAll(values, channels_); @@ -629,14 +629,14 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder getChannelsBuilder( + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder getChannelsBuilder( int index) { return getChannelsFieldBuilder().getBuilder(index); } /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder getChannelsOrBuilder( + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder getChannelsOrBuilder( int index) { if (channelsBuilder_ == null) { return channels_.get(index); } else { @@ -646,7 +646,7 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public java.util.List + public java.util.List getChannelsOrBuilderList() { if (channelsBuilder_ != null) { return channelsBuilder_.getMessageOrBuilderList(); @@ -657,31 +657,31 @@ public final class ServerState { /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder addChannelsBuilder() { + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder addChannelsBuilder() { return getChannelsFieldBuilder().addBuilder( - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance()); + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance()); } /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder addChannelsBuilder( + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder addChannelsBuilder( int index) { return getChannelsFieldBuilder().addBuilder( - index, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance()); + index, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance()); } /** * repeated .paymentchannels.StoredServerPaymentChannel channels = 1; */ - public java.util.List + public java.util.List getChannelsBuilderList() { return getChannelsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder> + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder> getChannelsFieldBuilder() { if (channelsBuilder_ == null) { channelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>( + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>( channels_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), @@ -864,14 +864,14 @@ public final class ServerState { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_descriptor; + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_fieldAccessorTable + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.class, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder.class); + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.class, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder.class); } public static com.google.protobuf.Parser PARSER = @@ -1089,53 +1089,53 @@ public final class ServerState { return super.writeReplace(); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom(byte[] data) + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseDelimitedFrom(java.io.InputStream input) + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseDelimitedFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( + public static org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1144,7 +1144,7 @@ public final class ServerState { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel prototype) { + public static Builder newBuilder(org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1164,20 +1164,20 @@ public final class ServerState { */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder { + implements org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_descriptor; + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_fieldAccessorTable + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.class, com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.Builder.class); + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.class, org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.Builder.class); } - // Construct using com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.newBuilder() + // Construct using org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1218,23 +1218,23 @@ public final class ServerState { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.bitcoin.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_descriptor; + return org.bitcoinj.protocols.channels.ServerState.internal_static_paymentchannels_StoredServerPaymentChannel_descriptor; } - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel getDefaultInstanceForType() { - return com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance(); + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel getDefaultInstanceForType() { + return org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance(); } - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel build() { - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel result = buildPartial(); + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel build() { + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel buildPartial() { - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel result = new com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel(this); + public org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel buildPartial() { + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel result = new org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1267,16 +1267,16 @@ public final class ServerState { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel) { - return mergeFrom((com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel)other); + if (other instanceof org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel) { + return mergeFrom((org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel other) { - if (other == com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance()) return this; + public Builder mergeFrom(org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel other) { + if (other == org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel.getDefaultInstance()) return this; if (other.hasBestValueToMe()) { setBestValueToMe(other.getBestValueToMe()); } @@ -1327,11 +1327,11 @@ public final class ServerState { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel parsedMessage = null; + org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel) e.getUnfinishedMessage(); + parsedMessage = (org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1590,8 +1590,8 @@ public final class ServerState { "\032\n\022bestValueSignature\030\002 \001(\014\022\'\n\037refundTra" + "nsactionUnlockTimeSecs\030\003 \002(\004\022\033\n\023contract" + "Transaction\030\004 \002(\014\022\024\n\014clientOutput\030\005 \002(\014\022" + - "\r\n\005myKey\030\006 \002(\014B4\n%com.google.bitcoin.pro" + - "tocols.channelsB\013ServerState" + "\r\n\005myKey\030\006 \002(\014B.\n\037org.bitcoinj.protocols" + + ".channelsB\013ServerState" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/Simple channels protocol.txt b/core/src/main/java/org/bitcoinj/protocols/channels/Simple channels protocol.txt similarity index 100% rename from core/src/main/java/com/google/bitcoin/protocols/channels/Simple channels protocol.txt rename to core/src/main/java/org/bitcoinj/protocols/channels/Simple channels protocol.txt diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/StoredPaymentChannelClientStates.java b/core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/protocols/channels/StoredPaymentChannelClientStates.java rename to core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java index 93f42f69..488c5b35 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/StoredPaymentChannelClientStates.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.HashMultimap; import com.google.common.util.concurrent.SettableFuture; diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/StoredPaymentChannelServerStates.java b/core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelServerStates.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/protocols/channels/StoredPaymentChannelServerStates.java rename to core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelServerStates.java index 062ddf10..d83727e0 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/StoredPaymentChannelServerStates.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelServerStates.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.SettableFuture; import com.google.protobuf.ByteString; diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/StoredServerChannel.java b/core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/protocols/channels/StoredServerChannel.java rename to core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java index 430fef59..1de4bcfb 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/StoredServerChannel.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/StoredServerChannel.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import javax.annotation.Nullable; import java.util.Date; @@ -78,7 +78,7 @@ public class StoredServerChannel { } /** - * If a handler is connected, call its {@link com.google.bitcoin.protocols.channels.PaymentChannelServer#close()} + * If a handler is connected, call its {@link org.bitcoinj.protocols.channels.PaymentChannelServer#close()} * method thus disconnecting the TCP connection. */ synchronized void closeConnectedHandler() { diff --git a/core/src/main/java/com/google/bitcoin/protocols/channels/ValueOutOfRangeException.java b/core/src/main/java/org/bitcoinj/protocols/channels/ValueOutOfRangeException.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/protocols/channels/ValueOutOfRangeException.java rename to core/src/main/java/org/bitcoinj/protocols/channels/ValueOutOfRangeException.java index 4801253b..0d747afb 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/channels/ValueOutOfRangeException.java +++ b/core/src/main/java/org/bitcoinj/protocols/channels/ValueOutOfRangeException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; /** * Used when a given value is either too large too afford or too small for the network to accept. diff --git a/core/src/main/java/com/google/bitcoin/protocols/payments/PaymentProtocol.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/protocols/payments/PaymentProtocol.java rename to core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java index 90fd0991..ed753b37 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/payments/PaymentProtocol.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocol.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.payments; +package org.bitcoinj.protocols.payments; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.X509Utils; -import com.google.bitcoin.script.ScriptBuilder; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.X509Utils; +import org.bitcoinj.script.ScriptBuilder; import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; diff --git a/core/src/main/java/com/google/bitcoin/protocols/payments/PaymentProtocolException.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocolException.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/protocols/payments/PaymentProtocolException.java rename to core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocolException.java index 138f9074..01a2a025 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/payments/PaymentProtocolException.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentProtocolException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.payments; +package org.bitcoinj.protocols.payments; import java.security.cert.X509Certificate; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/protocols/payments/PaymentSession.java b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/protocols/payments/PaymentSession.java rename to core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java index 4fa65a99..bb84d15d 100644 --- a/core/src/main/java/com/google/bitcoin/protocols/payments/PaymentSession.java +++ b/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java @@ -12,15 +12,14 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.payments; +package org.bitcoinj.protocols.payments; -import com.google.bitcoin.core.*; -import com.google.bitcoin.core.Wallet.SendRequest; -import com.google.bitcoin.crypto.TrustStoreLoader; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.protocols.payments.PaymentProtocol.PkiVerificationData; -import com.google.bitcoin.uri.BitcoinURI; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.TrustStoreLoader; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData; +import org.bitcoinj.uri.BitcoinURI; +import org.bitcoinj.utils.Threading; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; diff --git a/core/src/main/java/com/google/bitcoin/script/Script.java b/core/src/main/java/org/bitcoinj/script/Script.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/script/Script.java rename to core/src/main/java/org/bitcoinj/script/Script.java index 99e212b5..2418dfae 100644 --- a/core/src/main/java/com/google/bitcoin/script/Script.java +++ b/core/src/main/java/org/bitcoinj/script/Script.java @@ -16,10 +16,10 @@ * limitations under the License. */ -package com.google.bitcoin.script; +package org.bitcoinj.script; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.TransactionSignature; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.TransactionSignature; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +35,7 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.*; -import static com.google.bitcoin.script.ScriptOpCodes.*; +import static org.bitcoinj.script.ScriptOpCodes.*; import static com.google.common.base.Preconditions.*; /** diff --git a/core/src/main/java/com/google/bitcoin/script/ScriptBuilder.java b/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/script/ScriptBuilder.java rename to core/src/main/java/org/bitcoinj/script/ScriptBuilder.java index 08b1d1c8..8df8b011 100644 --- a/core/src/main/java/com/google/bitcoin/script/ScriptBuilder.java +++ b/core/src/main/java/org/bitcoinj/script/ScriptBuilder.java @@ -14,24 +14,24 @@ * limitations under the License. */ -package com.google.bitcoin.script; +package org.bitcoinj.script; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.crypto.TransactionSignature; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; +import org.bitcoinj.crypto.TransactionSignature; import com.google.common.collect.Lists; import javax.annotation.Nullable; import java.util.*; -import static com.google.bitcoin.script.ScriptOpCodes.*; +import static org.bitcoinj.script.ScriptOpCodes.*; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; /** *

Tools for the construction of commonly used script types. You don't normally need this as it's hidden behind - * convenience methods on {@link com.google.bitcoin.core.Transaction}, but they are useful when working with the + * convenience methods on {@link org.bitcoinj.core.Transaction}, but they are useful when working with the * protocol at a lower level.

*/ public class ScriptBuilder { diff --git a/core/src/main/java/com/google/bitcoin/script/ScriptChunk.java b/core/src/main/java/org/bitcoinj/script/ScriptChunk.java similarity index 88% rename from core/src/main/java/com/google/bitcoin/script/ScriptChunk.java rename to core/src/main/java/org/bitcoinj/script/ScriptChunk.java index e8154578..98d5efac 100644 --- a/core/src/main/java/com/google/bitcoin/script/ScriptChunk.java +++ b/core/src/main/java/org/bitcoinj/script/ScriptChunk.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package com.google.bitcoin.script; +package org.bitcoinj.script; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Utils; import java.io.IOException; import java.io.OutputStream; @@ -25,15 +25,15 @@ import java.util.Arrays; import javax.annotation.Nullable; -import static com.google.bitcoin.script.ScriptOpCodes.OP_0; -import static com.google.bitcoin.script.ScriptOpCodes.OP_1; -import static com.google.bitcoin.script.ScriptOpCodes.OP_16; -import static com.google.bitcoin.script.ScriptOpCodes.OP_1NEGATE; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA1; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA2; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA4; -import static com.google.bitcoin.script.ScriptOpCodes.getOpCodeName; -import static com.google.bitcoin.script.ScriptOpCodes.getPushDataName; +import static org.bitcoinj.script.ScriptOpCodes.OP_0; +import static org.bitcoinj.script.ScriptOpCodes.OP_1; +import static org.bitcoinj.script.ScriptOpCodes.OP_16; +import static org.bitcoinj.script.ScriptOpCodes.OP_1NEGATE; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA1; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA2; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA4; +import static org.bitcoinj.script.ScriptOpCodes.getOpCodeName; +import static org.bitcoinj.script.ScriptOpCodes.getPushDataName; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; diff --git a/core/src/main/java/com/google/bitcoin/script/ScriptOpCodes.java b/core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/script/ScriptOpCodes.java rename to core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java index ce8df0d2..f2f9ba65 100644 --- a/core/src/main/java/com/google/bitcoin/script/ScriptOpCodes.java +++ b/core/src/main/java/org/bitcoinj/script/ScriptOpCodes.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.script; +package org.bitcoinj.script; import com.google.common.collect.ImmutableMap; @@ -22,7 +22,7 @@ import java.util.Map; /** * Various constants that define the assembly-like scripting language that forms part of the Bitcoin protocol. - * See {@link com.google.bitcoin.script.Script} for details. Also provides a method to convert them to a string. + * See {@link org.bitcoinj.script.Script} for details. Also provides a method to convert them to a string. */ public class ScriptOpCodes { // push value diff --git a/core/src/main/java/com/google/bitcoin/signers/CustomTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/signers/CustomTransactionSigner.java rename to core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java index de60d945..1e35fed2 100644 --- a/core/src/main/java/com/google/bitcoin/signers/CustomTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/CustomTransactionSigner.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.signers; +package org.bitcoinj.signers; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.ChildNumber; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.KeyBag; -import com.google.bitcoin.wallet.RedeemData; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.ChildNumber; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyBag; +import org.bitcoinj.wallet.RedeemData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -31,7 +31,7 @@ import static com.google.common.base.Preconditions.checkNotNull; /** *

This signer may be used as a template for creating custom multisig transaction signers.

*

- * Concrete implementations have to implement {@link #getSignature(com.google.bitcoin.core.Sha256Hash, java.util.List)} + * Concrete implementations have to implement {@link #getSignature(org.bitcoinj.core.Sha256Hash, java.util.List)} * method returning a signature and a public key of the keypair used to created that signature. * It's up to custom implementation where to locate signatures: it may be a network connection, * some local API or something else. diff --git a/core/src/main/java/com/google/bitcoin/signers/LocalTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java similarity index 90% rename from core/src/main/java/com/google/bitcoin/signers/LocalTransactionSigner.java rename to core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java index 4ea4a775..644ee335 100644 --- a/core/src/main/java/com/google/bitcoin/signers/LocalTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/LocalTransactionSigner.java @@ -13,22 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.signers; +package org.bitcoinj.signers; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.ScriptException; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionInput; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.KeyBag; -import com.google.bitcoin.wallet.RedeemData; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.ScriptException; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionInput; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyBag; +import org.bitcoinj.wallet.RedeemData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - *

{@link TransactionSigner} implementation for signing inputs using keys from provided {@link com.google.bitcoin.wallet.KeyBag}.

+ *

{@link TransactionSigner} implementation for signing inputs using keys from provided {@link org.bitcoinj.wallet.KeyBag}.

*

This signer doesn't create input scripts for tx inputs. Instead it expects inputs to contain scripts with * empty sigs and replaces one of the empty sigs with calculated signature. *

@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory; * {@link ProposedTransaction} object that will be also passed then to the next signer in chain. This allows other * signers to use correct signing key for P2SH inputs, because all the keys involved in a single P2SH address have * the same derivation path.

- *

This signer always uses {@link com.google.bitcoin.core.Transaction.SigHash#ALL} signing mode.

+ *

This signer always uses {@link org.bitcoinj.core.Transaction.SigHash#ALL} signing mode.

*/ public class LocalTransactionSigner extends StatelessTransactionSigner { private static final Logger log = LoggerFactory.getLogger(LocalTransactionSigner.class); diff --git a/core/src/main/java/com/google/bitcoin/signers/MissingSigResolutionSigner.java b/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java similarity index 90% rename from core/src/main/java/com/google/bitcoin/signers/MissingSigResolutionSigner.java rename to core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java index 1d7fa834..1e529cff 100644 --- a/core/src/main/java/com/google/bitcoin/signers/MissingSigResolutionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/MissingSigResolutionSigner.java @@ -13,20 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.signers; +package org.bitcoinj.signers; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.TransactionInput; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptChunk; -import com.google.bitcoin.wallet.KeyBag; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.TransactionInput; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptChunk; +import org.bitcoinj.wallet.KeyBag; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * This transaction signer resolves missing signatures in accordance with the given {@link com.google.bitcoin.core.Wallet.MissingSigsMode}. + * This transaction signer resolves missing signatures in accordance with the given {@link org.bitcoinj.core.Wallet.MissingSigsMode}. * If missingSigsMode is USE_OP_ZERO this signer does nothing assuming missing signatures are already presented in * scriptSigs as OP_0. * In MissingSigsMode.THROW mode this signer will throw an exception. It would be MissingSignatureException diff --git a/core/src/main/java/com/google/bitcoin/signers/StatelessTransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/StatelessTransactionSigner.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/signers/StatelessTransactionSigner.java rename to core/src/main/java/org/bitcoinj/signers/StatelessTransactionSigner.java index eedb96f7..29932607 100644 --- a/core/src/main/java/com/google/bitcoin/signers/StatelessTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/StatelessTransactionSigner.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.signers; +package org.bitcoinj.signers; /** * A signer that doesn't have any state to be serialized. diff --git a/core/src/main/java/com/google/bitcoin/signers/TransactionSigner.java b/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java similarity index 90% rename from core/src/main/java/com/google/bitcoin/signers/TransactionSigner.java rename to core/src/main/java/org/bitcoinj/signers/TransactionSigner.java index adbbe143..884cd335 100644 --- a/core/src/main/java/com/google/bitcoin/signers/TransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/signers/TransactionSigner.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.signers; +package org.bitcoinj.signers; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.crypto.ChildNumber; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.wallet.KeyBag; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.crypto.ChildNumber; +import org.bitcoinj.script.Script; +import org.bitcoinj.wallet.KeyBag; import java.util.HashMap; import java.util.List; @@ -28,7 +28,7 @@ import java.util.Map; *

Implementations of this interface are intended to sign inputs of the given transaction. Given transaction may already * be partially signed or somehow altered by other signers.

*

To make use of the signer, you need to add it into the wallet by - * calling {@link com.google.bitcoin.core.Wallet#addTransactionSigner(TransactionSigner)}. Signer will be serialized + * calling {@link org.bitcoinj.core.Wallet#addTransactionSigner(TransactionSigner)}. Signer will be serialized * along with the wallet data. In order for a wallet to recreate signer after deserialization, each signer * should have no-args constructor

*/ diff --git a/core/src/main/java/com/google/bitcoin/store/BlockStore.java b/core/src/main/java/org/bitcoinj/store/BlockStore.java similarity index 88% rename from core/src/main/java/com/google/bitcoin/store/BlockStore.java rename to core/src/main/java/org/bitcoinj/store/BlockStore.java index bb1ecbc4..bae6090f 100644 --- a/core/src/main/java/com/google/bitcoin/store/BlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/BlockStore.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.StoredBlock; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.StoredBlock; /** * An implementor of BlockStore saves StoredBlock objects to disk. Different implementations store them in @@ -45,8 +45,8 @@ public interface BlockStore { /** * Returns the {@link StoredBlock} that represents the top of the chain of greatest total work. Note that this - * can be arbitrarily expensive, you probably should use {@link com.google.bitcoin.core.BlockChain#getChainHead()} - * or perhaps {@link com.google.bitcoin.core.BlockChain#getBestChainHeight()} which will run in constant time and + * can be arbitrarily expensive, you probably should use {@link org.bitcoinj.core.BlockChain#getChainHead()} + * or perhaps {@link org.bitcoinj.core.BlockChain#getBestChainHeight()} which will run in constant time and * not take any heavyweight locks. */ StoredBlock getChainHead() throws BlockStoreException; diff --git a/core/src/main/java/com/google/bitcoin/store/BlockStoreException.java b/core/src/main/java/org/bitcoinj/store/BlockStoreException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/store/BlockStoreException.java rename to core/src/main/java/org/bitcoinj/store/BlockStoreException.java index 817b1539..00172ecf 100644 --- a/core/src/main/java/com/google/bitcoin/store/BlockStoreException.java +++ b/core/src/main/java/org/bitcoinj/store/BlockStoreException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; /** * Thrown when something goes wrong with storing a block. Examples: out of disk space. diff --git a/core/src/main/java/com/google/bitcoin/store/FullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/store/FullPrunedBlockStore.java rename to core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java index e6c69210..5a58ad48 100644 --- a/core/src/main/java/com/google/bitcoin/store/FullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/FullPrunedBlockStore.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.StoredBlock; -import com.google.bitcoin.core.StoredTransactionOutput; -import com.google.bitcoin.core.StoredUndoableBlock; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.StoredBlock; +import org.bitcoinj.core.StoredTransactionOutput; +import org.bitcoinj.core.StoredUndoableBlock; /** *

An implementor of FullPrunedBlockStore saves StoredBlock objects to some storage mechanism.

diff --git a/core/src/main/java/com/google/bitcoin/store/H2FullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/H2FullPrunedBlockStore.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/store/H2FullPrunedBlockStore.java rename to core/src/main/java/org/bitcoinj/store/H2FullPrunedBlockStore.java index e12694ee..d95ceeec 100644 --- a/core/src/main/java/com/google/bitcoin/store/H2FullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/H2FullPrunedBlockStore.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/store/MemoryBlockStore.java b/core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/store/MemoryBlockStore.java rename to core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java index 54eda06b..cf3d891c 100644 --- a/core/src/main/java/com/google/bitcoin/store/MemoryBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/MemoryBlockStore.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import java.util.LinkedHashMap; import java.util.Map; /** - * Keeps {@link com.google.bitcoin.core.StoredBlock}s in memory. Used primarily for unit testing. + * Keeps {@link org.bitcoinj.core.StoredBlock}s in memory. Used primarily for unit testing. */ public class MemoryBlockStore implements BlockStore { private LinkedHashMap blockMap = new LinkedHashMap() { diff --git a/core/src/main/java/com/google/bitcoin/store/MemoryFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/store/MemoryFullPrunedBlockStore.java rename to core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java index ecc0a330..f86a13d2 100644 --- a/core/src/main/java/com/google/bitcoin/store/MemoryFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/MemoryFullPrunedBlockStore.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; diff --git a/core/src/main/java/com/google/bitcoin/store/PostgresFullPrunedBlockStore.java b/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/store/PostgresFullPrunedBlockStore.java rename to core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java index f02d787d..0b42f846 100644 --- a/core/src/main/java/com/google/bitcoin/store/PostgresFullPrunedBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/PostgresFullPrunedBlockStore.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; -import com.google.bitcoin.script.Script; +import org.bitcoinj.core.*; +import org.bitcoinj.script.Script; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +35,7 @@ import java.util.Properties; /** *

A full pruned block store using the Postgres database engine. As an added bonus an address index is calculated, - * so you can use {@link #calculateBalanceForAddress(com.google.bitcoin.core.Address)} to quickly look up + * so you can use {@link #calculateBalanceForAddress(org.bitcoinj.core.Address)} to quickly look up * the quantity of bitcoins controlled by that address.

*/ public class PostgresFullPrunedBlockStore implements FullPrunedBlockStore { diff --git a/core/src/main/java/com/google/bitcoin/store/SPVBlockStore.java b/core/src/main/java/org/bitcoinj/store/SPVBlockStore.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/store/SPVBlockStore.java rename to core/src/main/java/org/bitcoinj/store/SPVBlockStore.java index 0070e3d0..661b07d5 100644 --- a/core/src/main/java/com/google/bitcoin/store/SPVBlockStore.java +++ b/core/src/main/java/org/bitcoinj/store/SPVBlockStore.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.utils.Threading; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/store/UnreadableWalletException.java b/core/src/main/java/org/bitcoinj/store/UnreadableWalletException.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/store/UnreadableWalletException.java rename to core/src/main/java/org/bitcoinj/store/UnreadableWalletException.java index 6c135bd8..1a8c4e88 100644 --- a/core/src/main/java/com/google/bitcoin/store/UnreadableWalletException.java +++ b/core/src/main/java/org/bitcoinj/store/UnreadableWalletException.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.store; +package org.bitcoinj.store; /** * Thrown by the {@link WalletProtobufSerializer} when the serialized protocol buffer is either corrupted, diff --git a/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java b/core/src/main/java/org/bitcoinj/store/WalletProtobufSerializer.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java rename to core/src/main/java/org/bitcoinj/store/WalletProtobufSerializer.java index f48ea41f..fb8984cc 100644 --- a/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java +++ b/core/src/main/java/org/bitcoinj/store/WalletProtobufSerializer.java @@ -15,19 +15,19 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; -import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; -import com.google.bitcoin.crypto.KeyCrypter; -import com.google.bitcoin.crypto.KeyCrypterScrypt; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.signers.LocalTransactionSigner; -import com.google.bitcoin.signers.TransactionSigner; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.Fiat; -import com.google.bitcoin.wallet.KeyChainGroup; -import com.google.bitcoin.wallet.WalletTransaction; +import org.bitcoinj.core.*; +import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.crypto.KeyCrypter; +import org.bitcoinj.crypto.KeyCrypterScrypt; +import org.bitcoinj.script.Script; +import org.bitcoinj.signers.LocalTransactionSigner; +import org.bitcoinj.signers.TransactionSigner; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; +import org.bitcoinj.wallet.KeyChainGroup; +import org.bitcoinj.wallet.WalletTransaction; import com.google.common.collect.Lists; import com.google.protobuf.ByteString; import com.google.protobuf.CodedInputStream; diff --git a/core/src/main/java/com/google/bitcoin/testing/FakeTxBuilder.java b/core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/testing/FakeTxBuilder.java rename to core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java index f29e3925..9a72877b 100644 --- a/core/src/main/java/com/google/bitcoin/testing/FakeTxBuilder.java +++ b/core/src/main/java/org/bitcoinj/testing/FakeTxBuilder.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.*; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.BlockStoreException; +import org.bitcoinj.core.*; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.BlockStoreException; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.Coin.*; public class FakeTxBuilder { /** diff --git a/core/src/main/java/com/google/bitcoin/testing/InboundMessageQueuer.java b/core/src/main/java/org/bitcoinj/testing/InboundMessageQueuer.java similarity index 87% rename from core/src/main/java/com/google/bitcoin/testing/InboundMessageQueuer.java rename to core/src/main/java/org/bitcoinj/testing/InboundMessageQueuer.java index 05c16f95..50b492cd 100644 --- a/core/src/main/java/com/google/bitcoin/testing/InboundMessageQueuer.java +++ b/core/src/main/java/org/bitcoinj/testing/InboundMessageQueuer.java @@ -1,6 +1,6 @@ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import com.google.common.util.concurrent.SettableFuture; import java.net.InetSocketAddress; @@ -10,7 +10,7 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; /** - * An extension of {@link com.google.bitcoin.core.PeerSocketHandler} that keeps inbound messages in a queue for later processing + * An extension of {@link org.bitcoinj.core.PeerSocketHandler} that keeps inbound messages in a queue for later processing */ public abstract class InboundMessageQueuer extends PeerSocketHandler { public final BlockingQueue inboundMessages = new ArrayBlockingQueue(1000); diff --git a/core/src/main/java/com/google/bitcoin/testing/KeyChainTransactionSigner.java b/core/src/main/java/org/bitcoinj/testing/KeyChainTransactionSigner.java similarity index 85% rename from core/src/main/java/com/google/bitcoin/testing/KeyChainTransactionSigner.java rename to core/src/main/java/org/bitcoinj/testing/KeyChainTransactionSigner.java index 14072ea3..57966474 100644 --- a/core/src/main/java/com/google/bitcoin/testing/KeyChainTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/testing/KeyChainTransactionSigner.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.crypto.ChildNumber; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.signers.CustomTransactionSigner; -import com.google.bitcoin.wallet.DeterministicKeyChain; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.crypto.ChildNumber; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.signers.CustomTransactionSigner; +import org.bitcoinj.wallet.DeterministicKeyChain; import com.google.common.collect.ImmutableList; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/testing/MockTransactionBroadcaster.java b/core/src/main/java/org/bitcoinj/testing/MockTransactionBroadcaster.java similarity index 93% rename from core/src/main/java/com/google/bitcoin/testing/MockTransactionBroadcaster.java rename to core/src/main/java/org/bitcoinj/testing/MockTransactionBroadcaster.java index d54e2120..5c49cb16 100644 --- a/core/src/main/java/com/google/bitcoin/testing/MockTransactionBroadcaster.java +++ b/core/src/main/java/org/bitcoinj/testing/MockTransactionBroadcaster.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionBroadcaster; -import com.google.bitcoin.core.VerificationException; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionBroadcaster; +import org.bitcoinj.core.VerificationException; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.utils.Threading; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.SettableFuture; diff --git a/core/src/main/java/com/google/bitcoin/testing/NopTransactionSigner.java b/core/src/main/java/org/bitcoinj/testing/NopTransactionSigner.java similarity index 90% rename from core/src/main/java/com/google/bitcoin/testing/NopTransactionSigner.java rename to core/src/main/java/org/bitcoinj/testing/NopTransactionSigner.java index c9752015..ae17e923 100644 --- a/core/src/main/java/com/google/bitcoin/testing/NopTransactionSigner.java +++ b/core/src/main/java/org/bitcoinj/testing/NopTransactionSigner.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.signers.TransactionSigner; -import com.google.bitcoin.wallet.KeyBag; +import org.bitcoinj.signers.TransactionSigner; +import org.bitcoinj.wallet.KeyBag; public class NopTransactionSigner implements TransactionSigner { private boolean isReady; diff --git a/core/src/main/java/com/google/bitcoin/testing/TestWithNetworkConnections.java b/core/src/main/java/org/bitcoinj/testing/TestWithNetworkConnections.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/testing/TestWithNetworkConnections.java rename to core/src/main/java/org/bitcoinj/testing/TestWithNetworkConnections.java index fb32958e..547e3c0e 100644 --- a/core/src/main/java/com/google/bitcoin/testing/TestWithNetworkConnections.java +++ b/core/src/main/java/org/bitcoinj/testing/TestWithNetworkConnections.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.*; -import com.google.bitcoin.net.*; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.net.*; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import com.google.common.util.concurrent.SettableFuture; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/testing/TestWithPeerGroup.java b/core/src/main/java/org/bitcoinj/testing/TestWithPeerGroup.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/testing/TestWithPeerGroup.java rename to core/src/main/java/org/bitcoinj/testing/TestWithPeerGroup.java index 9c724cfb..acbc8451 100644 --- a/core/src/main/java/com/google/bitcoin/testing/TestWithPeerGroup.java +++ b/core/src/main/java/org/bitcoinj/testing/TestWithPeerGroup.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.*; -import com.google.bitcoin.net.BlockingClientManager; -import com.google.bitcoin.net.NioClientManager; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; +import org.bitcoinj.core.*; +import org.bitcoinj.net.BlockingClientManager; +import org.bitcoinj.net.NioClientManager; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; import com.google.common.base.Preconditions; import java.net.InetSocketAddress; diff --git a/core/src/main/java/com/google/bitcoin/testing/TestWithWallet.java b/core/src/main/java/org/bitcoinj/testing/TestWithWallet.java similarity index 90% rename from core/src/main/java/com/google/bitcoin/testing/TestWithWallet.java rename to core/src/main/java/org/bitcoinj/testing/TestWithWallet.java index ff7ca8db..a373278c 100644 --- a/core/src/main/java/com/google/bitcoin/testing/TestWithWallet.java +++ b/core/src/main/java/org/bitcoinj/testing/TestWithWallet.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package com.google.bitcoin.testing; +package org.bitcoinj.testing; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.*; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.utils.BriefLogFormatter; import javax.annotation.Nullable; import java.io.IOException; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeBlock; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeTx; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; // TODO: This needs to be somewhat rewritten - the "sendMoneyToWallet" methods aren't sending via the block chain object diff --git a/core/src/main/java/com/google/bitcoin/uri/BitcoinURI.java b/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/uri/BitcoinURI.java rename to core/src/main/java/org/bitcoinj/uri/BitcoinURI.java index 43d47934..2875a476 100644 --- a/core/src/main/java/com/google/bitcoin/uri/BitcoinURI.java +++ b/core/src/main/java/org/bitcoinj/uri/BitcoinURI.java @@ -16,12 +16,12 @@ * */ -package com.google.bitcoin.uri; +package org.bitcoinj.uri; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/uri/BitcoinURIParseException.java b/core/src/main/java/org/bitcoinj/uri/BitcoinURIParseException.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/uri/BitcoinURIParseException.java rename to core/src/main/java/org/bitcoinj/uri/BitcoinURIParseException.java index 5f335467..79faf93a 100644 --- a/core/src/main/java/com/google/bitcoin/uri/BitcoinURIParseException.java +++ b/core/src/main/java/org/bitcoinj/uri/BitcoinURIParseException.java @@ -16,7 +16,7 @@ * */ -package com.google.bitcoin.uri; +package org.bitcoinj.uri; /** *

Exception to provide the following to {@link BitcoinURI}:

diff --git a/core/src/main/java/com/google/bitcoin/uri/OptionalFieldValidationException.java b/core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/uri/OptionalFieldValidationException.java rename to core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java index 3d84652b..f44110d0 100644 --- a/core/src/main/java/com/google/bitcoin/uri/OptionalFieldValidationException.java +++ b/core/src/main/java/org/bitcoinj/uri/OptionalFieldValidationException.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.uri; +package org.bitcoinj.uri; /** *

Exception to provide the following to {@link org.multibit.qrcode.BitcoinURI}:

diff --git a/core/src/main/java/com/google/bitcoin/uri/RequiredFieldValidationException.java b/core/src/main/java/org/bitcoinj/uri/RequiredFieldValidationException.java similarity index 95% rename from core/src/main/java/com/google/bitcoin/uri/RequiredFieldValidationException.java rename to core/src/main/java/org/bitcoinj/uri/RequiredFieldValidationException.java index 85a6bb78..98300925 100644 --- a/core/src/main/java/com/google/bitcoin/uri/RequiredFieldValidationException.java +++ b/core/src/main/java/org/bitcoinj/uri/RequiredFieldValidationException.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.uri; +package org.bitcoinj.uri; /** *

Exception to provide the following to {@link BitcoinURI}:

diff --git a/core/src/main/java/com/google/bitcoin/utils/BaseTaggableObject.java b/core/src/main/java/org/bitcoinj/utils/BaseTaggableObject.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/utils/BaseTaggableObject.java rename to core/src/main/java/org/bitcoinj/utils/BaseTaggableObject.java index 69bc7b01..badf9a25 100644 --- a/core/src/main/java/com/google/bitcoin/utils/BaseTaggableObject.java +++ b/core/src/main/java/org/bitcoinj/utils/BaseTaggableObject.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import com.google.common.collect.Maps; import com.google.protobuf.ByteString; diff --git a/core/src/main/java/com/google/bitcoin/utils/BlockFileLoader.java b/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/utils/BlockFileLoader.java rename to core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java index 6a66fbc5..1b210319 100644 --- a/core/src/main/java/com/google/bitcoin/utils/BlockFileLoader.java +++ b/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import com.google.bitcoin.core.Block; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.ProtocolException; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Block; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.ProtocolException; +import org.bitcoinj.core.Utils; import java.io.File; import java.io.FileInputStream; diff --git a/core/src/main/java/com/google/bitcoin/utils/BriefLogFormatter.java b/core/src/main/java/org/bitcoinj/utils/BriefLogFormatter.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/utils/BriefLogFormatter.java rename to core/src/main/java/org/bitcoinj/utils/BriefLogFormatter.java index 1a95f622..33eeee7f 100644 --- a/core/src/main/java/com/google/bitcoin/utils/BriefLogFormatter.java +++ b/core/src/main/java/org/bitcoinj/utils/BriefLogFormatter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/core/src/main/java/com/google/bitcoin/utils/BtcAutoFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/utils/BtcAutoFormat.java rename to core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java index b687f099..aedcbb21 100644 --- a/core/src/main/java/com/google/bitcoin/utils/BtcAutoFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcAutoFormat.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import static com.google.bitcoin.core.Coin.SMALLEST_UNIT_EXPONENT; +import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; import com.google.common.collect.ImmutableList; import java.math.BigInteger; @@ -54,7 +54,7 @@ import java.util.Locale; * @see java.text.NumberFormat * @see java.text.DecimalFormat * @see DecimalFormatSymbols - * @see com.google.bitcoin.core.Coin + * @see org.bitcoinj.core.Coin */ public final class BtcAutoFormat extends BtcFormat { diff --git a/core/src/main/java/com/google/bitcoin/utils/BtcFixedFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/utils/BtcFixedFormat.java rename to core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java index e669bf10..1803206b 100644 --- a/core/src/main/java/com/google/bitcoin/utils/BtcFixedFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java @@ -14,17 +14,15 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import static com.google.bitcoin.core.Coin.SMALLEST_UNIT_EXPONENT; +import static org.bitcoinj.core.Coin.SMALLEST_UNIT_EXPONENT; import static com.google.common.base.Preconditions.checkArgument; import java.math.BigInteger; import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.Locale; import java.util.List; -import java.util.ListIterator; /** *

This class, a concrete extension of {@link BtcFormat}, is distinguished in that each @@ -43,7 +41,7 @@ import java.util.ListIterator; * @see java.text.Format * @see java.text.NumberFormat * @see java.text.DecimalFormat - * @see com.google.bitcoin.core.Coin + * @see org.bitcoinj.core.Coin */ public final class BtcFixedFormat extends BtcFormat { diff --git a/core/src/main/java/com/google/bitcoin/utils/BtcFormat.java b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/utils/BtcFormat.java rename to core/src/main/java/org/bitcoinj/utils/BtcFormat.java index 20115c17..0539fd31 100644 --- a/core/src/main/java/com/google/bitcoin/utils/BtcFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/BtcFormat.java @@ -14,20 +14,19 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import com.google.bitcoin.utils.BtcAutoFormat.Style; -import static com.google.bitcoin.utils.BtcAutoFormat.Style.*; +import org.bitcoinj.utils.BtcAutoFormat.Style; +import static org.bitcoinj.utils.BtcAutoFormat.Style.*; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import com.google.common.collect.ImmutableList; import static com.google.common.base.Preconditions.checkArgument; import com.google.common.base.Strings; import java.math.BigDecimal; import java.math.BigInteger; -import static java.math.BigDecimal.ONE; -import static java.math.BigDecimal.ZERO; + import static java.math.RoundingMode.HALF_UP; import java.text.AttributedCharacterIterator; @@ -260,7 +259,7 @@ import java.util.regex.Pattern; *

Formatting

* *

You format a Bitcoin monetary value by passing it to the {@link BtcFormat#format(Object)} - * method. This argument can be either a {@link com.google.bitcoin.core.Coin}-type object or a + * method. This argument can be either a {@link org.bitcoinj.core.Coin}-type object or a * numerical object such as {@link java.lang.Long} or {@link java.math.BigDecimal}. * Integer-based types such as {@link java.math.BigInteger} are interpreted as representing a * number of satoshis, while a {@link java.math.BigDecimal} is interpreted as representing a @@ -463,7 +462,7 @@ import java.util.regex.Pattern; * @see java.text.DecimalFormat * @see java.text.DecimalFormatSymbols * @see java.text.FieldPosition - * @see com.google.bitcoin.core.Coin + * @see org.bitcoinj.core.Coin */ public abstract class BtcFormat extends Format { @@ -1300,7 +1299,7 @@ public abstract class BtcFormat extends Format { /** * Parse a String representation of a Bitcoin monetary value. Returns a - * {@link com.google.bitcoin.core.Coin} object that represents the parsed value. + * {@link org.bitcoinj.core.Coin} object that represents the parsed value. * @see java.text.NumberFormat */ @Override public final Object parseObject(String source, ParsePosition pos) { return parse(source, pos); } diff --git a/core/src/main/java/com/google/bitcoin/utils/ExchangeRate.java b/core/src/main/java/org/bitcoinj/utils/ExchangeRate.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/utils/ExchangeRate.java rename to core/src/main/java/org/bitcoinj/utils/ExchangeRate.java index 6440c91b..c4829bc5 100644 --- a/core/src/main/java/com/google/bitcoin/utils/ExchangeRate.java +++ b/core/src/main/java/org/bitcoinj/utils/ExchangeRate.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import static com.google.common.base.Preconditions.checkArgument; import java.io.Serializable; import java.math.BigInteger; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; /** * An exchange rate is expressed as a ratio of a {@link Coin} and a {@link Fiat} amount. diff --git a/core/src/main/java/com/google/bitcoin/utils/ExponentialBackoff.java b/core/src/main/java/org/bitcoinj/utils/ExponentialBackoff.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/utils/ExponentialBackoff.java rename to core/src/main/java/org/bitcoinj/utils/ExponentialBackoff.java index bee37dab..0be4449f 100644 --- a/core/src/main/java/com/google/bitcoin/utils/ExponentialBackoff.java +++ b/core/src/main/java/org/bitcoinj/utils/ExponentialBackoff.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Utils; import static com.google.common.base.Preconditions.checkArgument; diff --git a/core/src/main/java/com/google/bitcoin/utils/Fiat.java b/core/src/main/java/org/bitcoinj/utils/Fiat.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/utils/Fiat.java rename to core/src/main/java/org/bitcoinj/utils/Fiat.java index 652c629f..bcb95988 100644 --- a/core/src/main/java/com/google/bitcoin/utils/Fiat.java +++ b/core/src/main/java/org/bitcoinj/utils/Fiat.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import static com.google.common.base.Preconditions.checkArgument; import java.io.Serializable; import java.math.BigDecimal; -import com.google.bitcoin.core.Monetary; +import org.bitcoinj.core.Monetary; import com.google.common.math.LongMath; /** diff --git a/core/src/main/java/com/google/bitcoin/utils/ListenerRegistration.java b/core/src/main/java/org/bitcoinj/utils/ListenerRegistration.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/utils/ListenerRegistration.java rename to core/src/main/java/org/bitcoinj/utils/ListenerRegistration.java index 5ae792f7..d8e61729 100644 --- a/core/src/main/java/com/google/bitcoin/utils/ListenerRegistration.java +++ b/core/src/main/java/org/bitcoinj/utils/ListenerRegistration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import java.util.List; import java.util.concurrent.Executor; diff --git a/core/src/main/java/com/google/bitcoin/utils/MonetaryFormat.java b/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/utils/MonetaryFormat.java rename to core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java index 66a37c47..4d73b05e 100644 --- a/core/src/main/java/com/google/bitcoin/utils/MonetaryFormat.java +++ b/core/src/main/java/org/bitcoinj/utils/MonetaryFormat.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; @@ -30,8 +30,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Monetary; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Monetary; /** *

@@ -389,7 +389,7 @@ public final class MonetaryFormat { } /** - * Parse a human readable coin value to a {@link com.google.bitcoin.core.Coin} instance. + * Parse a human readable coin value to a {@link org.bitcoinj.core.Coin} instance. * * @throws NumberFormatException * if the string cannot be parsed for some reason @@ -399,7 +399,7 @@ public final class MonetaryFormat { } /** - * Parse a human readable fiat value to a {@link com.google.bitcoin.core.Fiat} instance. + * Parse a human readable fiat value to a {@link org.bitcoinj.core.Fiat} instance. * * @throws NumberFormatException * if the string cannot be parsed for some reason diff --git a/core/src/main/java/com/google/bitcoin/utils/TaggableObject.java b/core/src/main/java/org/bitcoinj/utils/TaggableObject.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/utils/TaggableObject.java rename to core/src/main/java/org/bitcoinj/utils/TaggableObject.java index 43b4b33f..36eac85d 100644 --- a/core/src/main/java/com/google/bitcoin/utils/TaggableObject.java +++ b/core/src/main/java/org/bitcoinj/utils/TaggableObject.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import com.google.protobuf.ByteString; diff --git a/core/src/main/java/com/google/bitcoin/utils/Threading.java b/core/src/main/java/org/bitcoinj/utils/Threading.java similarity index 99% rename from core/src/main/java/com/google/bitcoin/utils/Threading.java rename to core/src/main/java/org/bitcoinj/utils/Threading.java index f36f5575..28a20f65 100644 --- a/core/src/main/java/com/google/bitcoin/utils/Threading.java +++ b/core/src/main/java/org/bitcoinj/utils/Threading.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import com.google.common.util.concurrent.CycleDetectingLockFactory; import com.google.common.util.concurrent.ListeningExecutorService; diff --git a/core/src/main/java/com/google/bitcoin/wallet/AbstractKeyChainEventListener.java b/core/src/main/java/org/bitcoinj/wallet/AbstractKeyChainEventListener.java similarity index 70% rename from core/src/main/java/com/google/bitcoin/wallet/AbstractKeyChainEventListener.java rename to core/src/main/java/org/bitcoinj/wallet/AbstractKeyChainEventListener.java index eda9b0d7..9880271a 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/AbstractKeyChainEventListener.java +++ b/core/src/main/java/org/bitcoinj/wallet/AbstractKeyChainEventListener.java @@ -1,6 +1,6 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.ECKey; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/wallet/AllowUnconfirmedCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.java similarity index 90% rename from core/src/main/java/com/google/bitcoin/wallet/AllowUnconfirmedCoinSelector.java rename to core/src/main/java/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.java index 0a9a546f..054ea75c 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/AllowUnconfirmedCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/AllowUnconfirmedCoinSelector.java @@ -1,6 +1,6 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; /** * This coin selector will select any transaction at all, regardless of where it came from or whether it was diff --git a/core/src/main/java/com/google/bitcoin/wallet/BasicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/wallet/BasicKeyChain.java rename to core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java index 7c5744e7..30cc48a6 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/BasicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/BasicKeyChain.java @@ -14,18 +14,17 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.BloomFilter; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.crypto.*; -import com.google.bitcoin.store.UnreadableWalletException; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.BloomFilter; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.crypto.*; +import org.bitcoinj.store.UnreadableWalletException; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.protobuf.ByteString; -import org.bitcoinj.wallet.Protos; import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; @@ -317,8 +316,8 @@ public class BasicKeyChain implements EncryptableKeyChain { /** * Returns a new BasicKeyChain that contains all basic, ORIGINAL type keys and also any encrypted keys extracted * from the list. Unrecognised key types are ignored. - * @throws com.google.bitcoin.store.UnreadableWalletException.BadPassword if the password doesn't seem to match - * @throws com.google.bitcoin.store.UnreadableWalletException if the data structures are corrupted/inconsistent + * @throws org.bitcoinj.store.UnreadableWalletException.BadPassword if the password doesn't seem to match + * @throws org.bitcoinj.store.UnreadableWalletException if the data structures are corrupted/inconsistent */ public static BasicKeyChain fromProtobufEncrypted(List keys, KeyCrypter crypter) throws UnreadableWalletException { BasicKeyChain chain = new BasicKeyChain(checkNotNull(crypter)); @@ -402,7 +401,7 @@ public class BasicKeyChain implements EncryptableKeyChain { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * Convenience wrapper around {@link #toEncrypted(com.google.bitcoin.crypto.KeyCrypter, + * Convenience wrapper around {@link #toEncrypted(org.bitcoinj.crypto.KeyCrypter, * org.spongycastle.crypto.params.KeyParameter)} which uses the default Scrypt key derivation algorithm and * parameters, derives a key from the given password and returns the created key. */ @@ -417,7 +416,7 @@ public class BasicKeyChain implements EncryptableKeyChain { /** * Encrypt the wallet using the KeyCrypter and the AES key. A good default KeyCrypter to use is - * {@link com.google.bitcoin.crypto.KeyCrypterScrypt}. + * {@link org.bitcoinj.crypto.KeyCrypterScrypt}. * * @param keyCrypter The KeyCrypter that specifies how to encrypt/ decrypt a key * @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming diff --git a/core/src/main/java/com/google/bitcoin/wallet/CoinSelection.java b/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java similarity index 73% rename from core/src/main/java/com/google/bitcoin/wallet/CoinSelection.java rename to core/src/main/java/org/bitcoinj/wallet/CoinSelection.java index 560176d4..ff4fba53 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/CoinSelection.java +++ b/core/src/main/java/org/bitcoinj/wallet/CoinSelection.java @@ -1,13 +1,13 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.TransactionOutput; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.TransactionOutput; import java.util.Collection; /** * Represents the results of a - * {@link com.google.bitcoin.wallet.CoinSelector#select(Coin, java.util.LinkedList)} operation. A + * {@link CoinSelector#select(Coin, java.util.LinkedList)} operation. A * coin selection represents a list of spendable transaction outputs that sum together to give valueGathered. * Different coin selections could be produced by different coin selectors from the same input set, according * to their varying policies. diff --git a/core/src/main/java/com/google/bitcoin/wallet/CoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java similarity index 80% rename from core/src/main/java/com/google/bitcoin/wallet/CoinSelector.java rename to core/src/main/java/org/bitcoinj/wallet/CoinSelector.java index cee958f6..c92d758f 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/CoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java @@ -1,7 +1,7 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.TransactionOutput; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.TransactionOutput; import java.util.List; @@ -15,7 +15,7 @@ public interface CoinSelector { /** * Creates a CoinSelection that tries to meet the target amount of value. The candidates list is given to * this call and can be edited freely. See the docs for CoinSelection to learn more, or look a the implementation - * of {@link com.google.bitcoin.wallet.DefaultCoinSelector}. + * of {@link DefaultCoinSelector}. */ public CoinSelection select(Coin target, List candidates); } diff --git a/core/src/main/java/com/google/bitcoin/wallet/DecryptingKeyBag.java b/core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/wallet/DecryptingKeyBag.java rename to core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java index 0c2013cc..c82792e8 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DecryptingKeyBag.java +++ b/core/src/main/java/org/bitcoinj/wallet/DecryptingKeyBag.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.ECKey; import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; @@ -28,7 +28,7 @@ import static com.google.common.base.Preconditions.checkNotNull; /** * A DecryptingKeyBag filters a pre-existing key bag, decrypting keys as they are requested using the provided - * AES key. If the keys are encrypted and no AES key provided, {@link com.google.bitcoin.core.ECKey.KeyIsEncryptedException} + * AES key. If the keys are encrypted and no AES key provided, {@link org.bitcoinj.core.ECKey.KeyIsEncryptedException} * will be thrown. */ public class DecryptingKeyBag implements KeyBag { diff --git a/core/src/main/java/com/google/bitcoin/wallet/DefaultCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/wallet/DefaultCoinSelector.java rename to core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java index ee5ef546..164e57f8 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DefaultCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/DefaultCoinSelector.java @@ -1,18 +1,18 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; -import com.google.bitcoin.core.TransactionOutput; -import com.google.bitcoin.params.RegTestParams; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; +import org.bitcoinj.core.TransactionOutput; +import org.bitcoinj.params.RegTestParams; import com.google.common.annotations.VisibleForTesting; import java.math.BigInteger; import java.util.*; /** - * This class implements a {@link com.google.bitcoin.wallet.CoinSelector} which attempts to get the highest priority + * This class implements a {@link CoinSelector} which attempts to get the highest priority * possible. This means that the transaction is the most likely to get confirmed. Note that this means we may end up * "spending" more priority than would be required to get the transaction we are creating confirmed. */ diff --git a/core/src/main/java/com/google/bitcoin/wallet/DefaultRiskAnalysis.java b/core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/wallet/DefaultRiskAnalysis.java rename to core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java index bea9d47f..64af56c8 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DefaultRiskAnalysis.java +++ b/core/src/main/java/org/bitcoinj/wallet/DefaultRiskAnalysis.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; -import com.google.bitcoin.core.TransactionInput; -import com.google.bitcoin.core.TransactionOutput; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.script.ScriptChunk; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; +import org.bitcoinj.core.TransactionInput; +import org.bitcoinj.core.TransactionOutput; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.script.ScriptChunk; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -101,7 +101,7 @@ public class DefaultRiskAnalysis implements RiskAnalysis { /** * The reason a transaction is considered non-standard, returned by - * {@link #isStandard(com.google.bitcoin.core.Transaction)}. + * {@link #isStandard(org.bitcoinj.core.Transaction)}. */ public enum RuleViolation { NONE, diff --git a/core/src/main/java/com/google/bitcoin/wallet/DeterministicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java similarity index 97% rename from core/src/main/java/com/google/bitcoin/wallet/DeterministicKeyChain.java rename to core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java index 87697db5..9fe5bf31 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DeterministicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java @@ -14,17 +14,16 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.BloomFilter; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.crypto.*; -import com.google.bitcoin.store.UnreadableWalletException; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.BloomFilter; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; +import org.bitcoinj.crypto.*; +import org.bitcoinj.store.UnreadableWalletException; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; -import org.bitcoinj.wallet.Protos; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongycastle.crypto.params.KeyParameter; @@ -43,10 +42,10 @@ import static com.google.common.collect.Lists.newLinkedList; /** *

A deterministic key chain is a {@link KeyChain} that uses the * BIP 32 standard, as implemented by - * {@link com.google.bitcoin.crypto.DeterministicHierarchy}, to derive all the keys in the keychain from a master seed. + * {@link org.bitcoinj.crypto.DeterministicHierarchy}, to derive all the keys in the keychain from a master seed. * This type of wallet is extremely convenient and flexible. Although backing up full wallet files is always a good * idea, to recover money only the root seed needs to be preserved and that is a number small enough that it can be - * written down on paper or, when represented using a BIP 39 {@link com.google.bitcoin.crypto.MnemonicCode}, + * written down on paper or, when represented using a BIP 39 {@link org.bitcoinj.crypto.MnemonicCode}, * dictated over the phone (possibly even memorized).

* *

Deterministic key chains have other advantages: parts of the key tree can be selectively revealed to allow @@ -56,14 +55,14 @@ import static com.google.common.collect.Lists.newLinkedList; * A watching wallet is not instantiated using the public part of the master key as you may imagine. Instead, you * need to take the account key (first child of the master key) and provide the public part of that to the watching * wallet instead. You can do this by calling {@link #getWatchingKey()} and then serializing it with - * {@link com.google.bitcoin.crypto.DeterministicKey#serializePubB58()}. The resulting "xpub..." string encodes + * {@link org.bitcoinj.crypto.DeterministicKey#serializePubB58()}. The resulting "xpub..." string encodes * sufficient information about the account key to create a watching chain via - * {@link com.google.bitcoin.crypto.DeterministicKey#deserializeB58(com.google.bitcoin.crypto.DeterministicKey, String)} + * {@link org.bitcoinj.crypto.DeterministicKey#deserializeB58(org.bitcoinj.crypto.DeterministicKey, String)} * (with null as the first parameter) and then - * {@link DeterministicKeyChain#DeterministicKeyChain(com.google.bitcoin.crypto.DeterministicKey)}.

+ * {@link DeterministicKeyChain#DeterministicKeyChain(org.bitcoinj.crypto.DeterministicKey)}.

* - *

This class builds on {@link com.google.bitcoin.crypto.DeterministicHierarchy} and - * {@link com.google.bitcoin.crypto.DeterministicKey} by adding support for serialization to and from protobufs, + *

This class builds on {@link org.bitcoinj.crypto.DeterministicHierarchy} and + * {@link org.bitcoinj.crypto.DeterministicKey} by adding support for serialization to and from protobufs, * and encryption of parts of the key tree. Internally it arranges itself as per the BIP 32 spec, with the seed being * used to derive a master key, which is then used to derive an account key, the account key is used to derive two * child keys called the internal and external keys (for change and handing out addresses respectively) @@ -442,7 +441,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { /** * Mark the DeterministicKeys as used, if they match the pubkeyHash - * See {@link com.google.bitcoin.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. + * See {@link DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. */ @Nullable public DeterministicKey markPubHashAsUsed(byte[] pubkeyHash) { @@ -459,7 +458,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { /** * Mark the DeterministicKeys as used, if they match the pubkey - * See {@link com.google.bitcoin.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. + * See {@link DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. */ @Nullable public DeterministicKey markPubKeyAsUsed(byte[] pubkey) { @@ -502,7 +501,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { /** *

An alias for getKeyByPath(DeterministicKeyChain.ACCOUNT_ZERO_PATH).getPubOnly(). * Use this when you would like to create a watching key chain that follows this one, but can't spend money from it. - * The returned key can be serialized and then passed into {@link #watch(com.google.bitcoin.crypto.DeterministicKey)} + * The returned key can be serialized and then passed into {@link #watch(org.bitcoinj.crypto.DeterministicKey)} * on another system to watch the hierarchy.

*/ public DeterministicKey getWatchingKey() { diff --git a/core/src/main/java/com/google/bitcoin/wallet/DeterministicSeed.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/wallet/DeterministicSeed.java rename to core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java index 4e8cda53..c5b8aead 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DeterministicSeed.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicSeed.java @@ -15,15 +15,14 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.crypto.*; -import com.google.bitcoin.store.UnreadableWalletException; +import org.bitcoinj.crypto.*; +import org.bitcoinj.store.UnreadableWalletException; import com.google.common.base.Charsets; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.base.Splitter; -import org.bitcoinj.wallet.Protos; import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; @@ -31,13 +30,13 @@ import java.io.UnsupportedEncodingException; import java.security.SecureRandom; import java.util.List; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; /** * Holds the seed bytes for the BIP32 deterministic wallet algorithm, inside a - * {@link com.google.bitcoin.wallet.DeterministicKeyChain}. The purpose of this wrapper is to simplify the encryption + * {@link DeterministicKeyChain}. The purpose of this wrapper is to simplify the encryption * code. */ public class DeterministicSeed implements EncryptableItem { @@ -71,7 +70,7 @@ public class DeterministicSeed implements EncryptableItem { } /** - * Constructs a seed from a BIP 39 mnemonic code. See {@link com.google.bitcoin.crypto.MnemonicCode} for more + * Constructs a seed from a BIP 39 mnemonic code. See {@link org.bitcoinj.crypto.MnemonicCode} for more * details on this scheme. * @param mnemonicCode A list of words. * @param seed The derived seed, or pass null to derive it from mnemonicCode (slow) @@ -83,7 +82,7 @@ public class DeterministicSeed implements EncryptableItem { } /** - * Constructs a seed from a BIP 39 mnemonic code. See {@link com.google.bitcoin.crypto.MnemonicCode} for more + * Constructs a seed from a BIP 39 mnemonic code. See {@link org.bitcoinj.crypto.MnemonicCode} for more * details on this scheme. * @param random Entropy source * @param bits number of bits, must be divisible by 32 @@ -95,7 +94,7 @@ public class DeterministicSeed implements EncryptableItem { } /** - * Constructs a seed from a BIP 39 mnemonic code. See {@link com.google.bitcoin.crypto.MnemonicCode} for more + * Constructs a seed from a BIP 39 mnemonic code. See {@link org.bitcoinj.crypto.MnemonicCode} for more * details on this scheme. * @param entropy entropy bits, length must be divisible by 32 * @param passphrase A user supplied passphrase, or an empty string if there is no passphrase @@ -238,7 +237,7 @@ public class DeterministicSeed implements EncryptableItem { * Check if our mnemonic is a valid mnemonic phrase for our word list. * Does nothing if we are encrypted. * - * @throws com.google.bitcoin.crypto.MnemonicException if check fails + * @throws org.bitcoinj.crypto.MnemonicException if check fails */ public void check() throws MnemonicException { if (mnemonicCode != null) diff --git a/core/src/main/java/com/google/bitcoin/wallet/DeterministicUpgradeRequiredException.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.java similarity index 88% rename from core/src/main/java/com/google/bitcoin/wallet/DeterministicUpgradeRequiredException.java rename to core/src/main/java/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.java index 847c3ca4..fd8d5bf8 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DeterministicUpgradeRequiredException.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicUpgradeRequiredException.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; /** * Indicates that an attempt was made to use HD wallet features on a wallet that was deserialized from an old, diff --git a/core/src/main/java/com/google/bitcoin/wallet/DeterministicUpgradeRequiresPassword.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/wallet/DeterministicUpgradeRequiresPassword.java rename to core/src/main/java/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.java index 6ca4c0bc..0199b20b 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/DeterministicUpgradeRequiresPassword.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicUpgradeRequiresPassword.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; /** * Indicates that the pre-HD random wallet is encrypted, so you should try the upgrade again after getting the diff --git a/core/src/main/java/com/google/bitcoin/wallet/EncryptableKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java similarity index 85% rename from core/src/main/java/com/google/bitcoin/wallet/EncryptableKeyChain.java rename to core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java index 7bdde569..a4e9103c 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/EncryptableKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/EncryptableKeyChain.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.crypto.KeyCrypter; -import com.google.bitcoin.crypto.KeyCrypterException; +import org.bitcoinj.crypto.KeyCrypter; +import org.bitcoinj.crypto.KeyCrypterException; import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; @@ -28,8 +28,8 @@ import javax.annotation.Nullable; public interface EncryptableKeyChain extends KeyChain { /** * Takes the given password, which should be strong, derives a key from it and then invokes - * {@link #toEncrypted(com.google.bitcoin.crypto.KeyCrypter, org.spongycastle.crypto.params.KeyParameter)} with - * {@link com.google.bitcoin.crypto.KeyCrypterScrypt} as the crypter. + * {@link #toEncrypted(org.bitcoinj.crypto.KeyCrypter, org.spongycastle.crypto.params.KeyParameter)} with + * {@link org.bitcoinj.crypto.KeyCrypterScrypt} as the crypter. * * @return The derived key, in case you wish to cache it for future use. */ @@ -50,7 +50,7 @@ public interface EncryptableKeyChain extends KeyChain { /** * Decrypt the key chain with the given AES key and whatever {@link KeyCrypter} is already set. Note that if you * just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the - * {@link com.google.bitcoin.core.Wallet.SendRequest#aesKey} field before asking the wallet to build the send. + * {@link org.bitcoinj.core.Wallet.SendRequest#aesKey} field before asking the wallet to build the send. * * @param aesKey AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to * create from a password) diff --git a/core/src/main/java/com/google/bitcoin/wallet/FilteringCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/wallet/FilteringCoinSelector.java rename to core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java index ba4b3c3f..a500b839 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/FilteringCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/FilteringCoinSelector.java @@ -15,9 +15,9 @@ */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import java.util.HashSet; import java.util.Iterator; diff --git a/core/src/main/java/com/google/bitcoin/wallet/KeyBag.java b/core/src/main/java/org/bitcoinj/wallet/KeyBag.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/wallet/KeyBag.java rename to core/src/main/java/org/bitcoinj/wallet/KeyBag.java index fafcd5c4..231db858 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/KeyBag.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyBag.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.ECKey; import javax.annotation.Nullable; diff --git a/core/src/main/java/com/google/bitcoin/wallet/KeyChain.java b/core/src/main/java/org/bitcoinj/wallet/KeyChain.java similarity index 93% rename from core/src/main/java/com/google/bitcoin/wallet/KeyChain.java rename to core/src/main/java/org/bitcoinj/wallet/KeyChain.java index 8e61c268..33119780 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/KeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChain.java @@ -14,17 +14,16 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.BloomFilter; -import com.google.bitcoin.core.ECKey; -import org.bitcoinj.wallet.Protos; +import org.bitcoinj.core.BloomFilter; +import org.bitcoinj.core.ECKey; import java.util.List; import java.util.concurrent.Executor; /** - *

A KeyChain is a class that stores a collection of keys for a {@link com.google.bitcoin.core.Wallet}. Key chains + *

A KeyChain is a class that stores a collection of keys for a {@link org.bitcoinj.core.Wallet}. Key chains * are expected to be able to look up keys given a hash (i.e. address) or pubkey bytes, and provide keys on request * for a given purpose. They can inform event listeners about new keys being added.

* @@ -88,7 +87,7 @@ public interface KeyChain { *

This is used to generate a {@link BloomFilter} which can be {@link BloomFilter#merge(BloomFilter)}d with * another. It could also be used if you have a specific target for the filter's size.

* - *

See the docs for {@link com.google.bitcoin.core.BloomFilter#BloomFilter(int, double, long)} for a brief + *

See the docs for {@link org.bitcoinj.core.BloomFilter#BloomFilter(int, double, long)} for a brief * explanation of anonymity when using bloom filters, and for the meaning of these parameters.

*/ public BloomFilter getFilter(int size, double falsePositiveRate, long tweak); diff --git a/core/src/main/java/com/google/bitcoin/wallet/KeyChainEventListener.java b/core/src/main/java/org/bitcoinj/wallet/KeyChainEventListener.java similarity index 93% rename from core/src/main/java/com/google/bitcoin/wallet/KeyChainEventListener.java rename to core/src/main/java/org/bitcoinj/wallet/KeyChainEventListener.java index 211ad21c..ba50ccec 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/KeyChainEventListener.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChainEventListener.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.ECKey; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java similarity index 93% rename from core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java rename to core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java index 3d09a92b..7f1ff2b6 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyChainGroup.java @@ -15,24 +15,23 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.ChildNumber; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.crypto.KeyCrypter; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.store.UnreadableWalletException; -import com.google.bitcoin.utils.ListenerRegistration; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.ChildNumber; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.crypto.KeyCrypter; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.store.UnreadableWalletException; +import org.bitcoinj.utils.ListenerRegistration; +import org.bitcoinj.utils.Threading; import com.google.common.base.Joiner; import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; import com.google.protobuf.ByteString; -import org.bitcoinj.wallet.Protos; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongycastle.crypto.params.KeyParameter; @@ -45,9 +44,9 @@ import java.util.concurrent.Executor; import static com.google.common.base.Preconditions.*; /** - *

A KeyChainGroup is used by the {@link com.google.bitcoin.core.Wallet} and - * manages: a {@link com.google.bitcoin.wallet.BasicKeyChain} object (which will normally be empty), and zero or more - * {@link com.google.bitcoin.wallet.DeterministicKeyChain}s. A deterministic key chain will be created lazily/on demand + *

A KeyChainGroup is used by the {@link org.bitcoinj.core.Wallet} and + * manages: a {@link BasicKeyChain} object (which will normally be empty), and zero or more + * {@link DeterministicKeyChain}s. A deterministic key chain will be created lazily/on demand * when a fresh or current key is requested, possibly being initialized from the private key bytes of the earliest non * rotating key in the basic key chain if one is available, or from a fresh random seed if not.

* @@ -61,7 +60,7 @@ import static com.google.common.base.Preconditions.*; * combining their responses together when necessary.

* *

Deterministic key chains have a concept of a lookahead size and threshold. Please see the discussion in the - * class docs for {@link com.google.bitcoin.wallet.DeterministicKeyChain} for more information on this topic.

+ * class docs for {@link DeterministicKeyChain} for more information on this topic.

*/ public class KeyChainGroup implements KeyBag { private static final Logger log = LoggerFactory.getLogger(KeyChainGroup.class); @@ -240,12 +239,12 @@ public class KeyChainGroup implements KeyBag { /** * Returns a key that hasn't been seen in a transaction yet, and which is suitable for displaying in a wallet * user interface as "a convenient key to receive funds on" when the purpose parameter is - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS}. The returned key is stable until + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS}. The returned key is stable until * it's actually seen in a pending or confirmed transaction, at which point this method will start returning * a different key (for each purpose independently). *

This method is not supposed to be used for married keychains and will throw UnsupportedOperationException if * the active chain is married. - * For married keychains use {@link #currentAddress(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * For married keychains use {@link #currentAddress(KeyChain.KeyPurpose)} * to get a proper P2SH address

*/ public DeterministicKey currentKey(KeyChain.KeyPurpose purpose) { @@ -263,7 +262,7 @@ public class KeyChainGroup implements KeyBag { } /** - * Returns address for a {@link #currentKey(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * Returns address for a {@link #currentKey(KeyChain.KeyPurpose)} */ public Address currentAddress(KeyChain.KeyPurpose purpose) { DeterministicKeyChain chain = getActiveKeyChain(); @@ -282,13 +281,13 @@ public class KeyChainGroup implements KeyBag { /** * Returns a key that has not been returned by this method before (fresh). You can think of this as being * a newly created key, although the notion of "create" is not really valid for a - * {@link com.google.bitcoin.wallet.DeterministicKeyChain}. When the parameter is - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put + * {@link DeterministicKeyChain}. When the parameter is + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put * into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out * to someone who wishes to send money. *

This method is not supposed to be used for married keychains and will throw UnsupportedOperationException if * the active chain is married. - * For married keychains use {@link #freshAddress(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * For married keychains use {@link #freshAddress(KeyChain.KeyPurpose)} * to get a proper P2SH address

*/ public DeterministicKey freshKey(KeyChain.KeyPurpose purpose) { @@ -298,13 +297,13 @@ public class KeyChainGroup implements KeyBag { /** * Returns a key/s that have not been returned by this method before (fresh). You can think of this as being * newly created key/s, although the notion of "create" is not really valid for a - * {@link com.google.bitcoin.wallet.DeterministicKeyChain}. When the parameter is - * {@link com.google.bitcoin.wallet.KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put + * {@link DeterministicKeyChain}. When the parameter is + * {@link KeyChain.KeyPurpose#RECEIVE_FUNDS} the returned key is suitable for being put * into a receive coins wizard type UI. You should use this when the user is definitely going to hand this key out * to someone who wishes to send money. *

This method is not supposed to be used for married keychains and will throw UnsupportedOperationException if * the active chain is married. - * For married keychains use {@link #freshAddress(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * For married keychains use {@link #freshAddress(KeyChain.KeyPurpose)} * to get a proper P2SH address

*/ public List freshKeys(KeyChain.KeyPurpose purpose, int numberOfKeys) { @@ -317,7 +316,7 @@ public class KeyChainGroup implements KeyBag { } /** - * Returns address for a {@link #freshKey(com.google.bitcoin.wallet.KeyChain.KeyPurpose)} + * Returns address for a {@link #freshKey(KeyChain.KeyPurpose)} */ public Address freshAddress(KeyChain.KeyPurpose purpose) { DeterministicKeyChain chain = getActiveKeyChain(); @@ -372,7 +371,7 @@ public class KeyChainGroup implements KeyBag { /** * Sets the lookahead buffer size for ALL deterministic key chains as well as for following key chains if any exist, - * see {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadSize(int)} + * see {@link DeterministicKeyChain#setLookaheadSize(int)} * for more information. */ public void setLookaheadSize(int lookaheadSize) { @@ -387,7 +386,7 @@ public class KeyChainGroup implements KeyBag { /** * Gets the current lookahead size being used for ALL deterministic key chains. See - * {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadSize(int)} + * {@link DeterministicKeyChain#setLookaheadSize(int)} * for more information. */ public int getLookaheadSize() { @@ -399,7 +398,7 @@ public class KeyChainGroup implements KeyBag { /** * Sets the lookahead buffer threshold for ALL deterministic key chains, see - * {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} + * {@link DeterministicKeyChain#setLookaheadThreshold(int)} * for more information. */ public void setLookaheadThreshold(int num) { @@ -410,7 +409,7 @@ public class KeyChainGroup implements KeyBag { /** * Gets the current lookahead threshold being used for ALL deterministic key chains. See - * {@link com.google.bitcoin.wallet.DeterministicKeyChain#setLookaheadThreshold(int)} + * {@link DeterministicKeyChain#setLookaheadThreshold(int)} * for more information. */ public int getLookaheadThreshold() { @@ -475,7 +474,7 @@ public class KeyChainGroup implements KeyBag { /** * Mark the DeterministicKeys as used, if they match the pubkeyHash - * See {@link com.google.bitcoin.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. + * See {@link DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. */ public void markPubKeyHashAsUsed(byte[] pubkeyHash) { for (DeterministicKeyChain chain : chains) { @@ -522,7 +521,7 @@ public class KeyChainGroup implements KeyBag { /** * Mark the DeterministicKeys as used, if they match the pubkey - * See {@link com.google.bitcoin.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. + * See {@link DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this. */ public void markPubKeyAsUsed(byte[] pubkey) { for (DeterministicKeyChain chain : chains) { @@ -569,9 +568,9 @@ public class KeyChainGroup implements KeyBag { /** * Encrypt the keys in the group using the KeyCrypter and the AES key. A good default KeyCrypter to use is - * {@link com.google.bitcoin.crypto.KeyCrypterScrypt}. + * {@link org.bitcoinj.crypto.KeyCrypterScrypt}. * - * @throws com.google.bitcoin.crypto.KeyCrypterException Thrown if the wallet encryption fails for some reason, + * @throws org.bitcoinj.crypto.KeyCrypterException Thrown if the wallet encryption fails for some reason, * leaving the group unchanged. * @throws DeterministicUpgradeRequiredException Thrown if there are random keys but no HD chain. */ @@ -596,9 +595,9 @@ public class KeyChainGroup implements KeyBag { /** * Decrypt the keys in the group using the previously given key crypter and the AES key. A good default - * KeyCrypter to use is {@link com.google.bitcoin.crypto.KeyCrypterScrypt}. + * KeyCrypter to use is {@link org.bitcoinj.crypto.KeyCrypterScrypt}. * - * @throws com.google.bitcoin.crypto.KeyCrypterException Thrown if the wallet decryption fails for some reason, leaving the group unchanged. + * @throws org.bitcoinj.crypto.KeyCrypterException Thrown if the wallet decryption fails for some reason, leaving the group unchanged. */ public void decrypt(KeyParameter aesKey) { // This code must be exception safe. @@ -770,7 +769,7 @@ public class KeyChainGroup implements KeyBag { * no random keys (i.e. this is not an upgrade scenario), or if aesKey is * provided but the wallet is not encrypted. * @throws java.lang.IllegalArgumentException if the rotation time specified excludes all keys. - * @throws com.google.bitcoin.wallet.DeterministicUpgradeRequiresPassword if the key chain group is encrypted + * @throws DeterministicUpgradeRequiresPassword if the key chain group is encrypted * and you should provide the users encryption key. * @return the DeterministicKeyChain that was created by the upgrade. */ diff --git a/core/src/main/java/com/google/bitcoin/wallet/KeyTimeCoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java similarity index 94% rename from core/src/main/java/com/google/bitcoin/wallet/KeyTimeCoinSelector.java rename to core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java index 1848c69b..56a2199a 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/KeyTimeCoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/KeyTimeCoinSelector.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; -import com.google.bitcoin.script.Script; +import org.bitcoinj.core.*; +import org.bitcoinj.script.Script; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,7 +34,7 @@ import static com.google.common.base.Preconditions.checkNotNull; public class KeyTimeCoinSelector implements CoinSelector { private static final Logger log = LoggerFactory.getLogger(KeyTimeCoinSelector.class); - /** A number of inputs chosen to avoid hitting {@link com.google.bitcoin.core.Transaction.MAX_STANDARD_TX_SIZE} */ + /** A number of inputs chosen to avoid hitting {@link org.bitcoinj.core.Transaction.MAX_STANDARD_TX_SIZE} */ public static final int MAX_SIMULTANEOUS_INPUTS = 600; private final long unixTimeSeconds; diff --git a/core/src/main/java/com/google/bitcoin/wallet/RedeemData.java b/core/src/main/java/org/bitcoinj/wallet/RedeemData.java similarity index 96% rename from core/src/main/java/com/google/bitcoin/wallet/RedeemData.java rename to core/src/main/java/org/bitcoinj/wallet/RedeemData.java index ff672a96..36f23d6a 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/RedeemData.java +++ b/core/src/main/java/org/bitcoinj/wallet/RedeemData.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.script.Script; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.script.Script; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/src/main/java/com/google/bitcoin/wallet/RiskAnalysis.java b/core/src/main/java/org/bitcoinj/wallet/RiskAnalysis.java similarity index 92% rename from core/src/main/java/com/google/bitcoin/wallet/RiskAnalysis.java rename to core/src/main/java/org/bitcoinj/wallet/RiskAnalysis.java index 193a9bc8..f61133af 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/RiskAnalysis.java +++ b/core/src/main/java/org/bitcoinj/wallet/RiskAnalysis.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Wallet; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Wallet; import java.util.List; diff --git a/core/src/main/java/com/google/bitcoin/wallet/WalletFiles.java b/core/src/main/java/org/bitcoinj/wallet/WalletFiles.java similarity index 98% rename from core/src/main/java/com/google/bitcoin/wallet/WalletFiles.java rename to core/src/main/java/org/bitcoinj/wallet/WalletFiles.java index d99fbc0d..57a2e80f 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/WalletFiles.java +++ b/core/src/main/java/org/bitcoinj/wallet/WalletFiles.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.utils.Threading; import com.google.common.util.concurrent.ThreadFactoryBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/com/google/bitcoin/wallet/WalletTransaction.java b/core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java similarity index 91% rename from core/src/main/java/com/google/bitcoin/wallet/WalletTransaction.java rename to core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java index 0dabac62..9e8aa31e 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/WalletTransaction.java +++ b/core/src/main/java/org/bitcoinj/wallet/WalletTransaction.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; import static com.google.common.base.Preconditions.checkNotNull; /** - * Stores data about a transaction that is only relevant to the {@link com.google.bitcoin.core.Wallet} class. + * Stores data about a transaction that is only relevant to the {@link org.bitcoinj.core.Wallet} class. */ public class WalletTransaction { public enum Pool { diff --git a/core/src/main/resources/com/google/bitcoin/crypto/cacerts b/core/src/main/resources/org/bitcoinj/crypto/cacerts similarity index 100% rename from core/src/main/resources/com/google/bitcoin/crypto/cacerts rename to core/src/main/resources/org/bitcoinj/crypto/cacerts diff --git a/core/src/main/resources/com/google/bitcoin/crypto/mnemonic/wordlist/english.txt b/core/src/main/resources/org/bitcoinj/crypto/mnemonic/wordlist/english.txt similarity index 100% rename from core/src/main/resources/com/google/bitcoin/crypto/mnemonic/wordlist/english.txt rename to core/src/main/resources/org/bitcoinj/crypto/mnemonic/wordlist/english.txt diff --git a/core/src/storedclientpaymentchannel.proto b/core/src/storedclientpaymentchannel.proto index 6e31409c..c3de819a 100644 --- a/core/src/storedclientpaymentchannel.proto +++ b/core/src/storedclientpaymentchannel.proto @@ -24,7 +24,7 @@ package paymentchannels; -option java_package = "com.google.bitcoin.protocols.channels"; +option java_package = "org.bitcoinj.protocols.channels"; option java_outer_classname = "ClientState"; diff --git a/core/src/storedserverpaymentchannel.proto b/core/src/storedserverpaymentchannel.proto index 96a9106e..1ff58abc 100644 --- a/core/src/storedserverpaymentchannel.proto +++ b/core/src/storedserverpaymentchannel.proto @@ -24,7 +24,7 @@ package paymentchannels; -option java_package = "com.google.bitcoin.protocols.channels"; +option java_package = "org.bitcoinj.protocols.channels"; option java_outer_classname = "ServerState"; diff --git a/core/src/test/java/com/google/bitcoin/core/AbstractFullPrunedBlockChainTest.java b/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/core/AbstractFullPrunedBlockChainTest.java rename to core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java index 1fa70dda..68733821 100644 --- a/core/src/test/java/com/google/bitcoin/core/AbstractFullPrunedBlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/AbstractFullPrunedBlockChainTest.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; -import com.google.bitcoin.utils.BlockFileLoader; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.script.Script; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; +import org.bitcoinj.utils.BlockFileLoader; +import org.bitcoinj.utils.BriefLogFormatter; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; @@ -33,7 +33,7 @@ import java.io.File; import java.lang.ref.WeakReference; import java.util.Arrays; -import static com.google.bitcoin.core.Coin.FIFTY_COINS; +import static org.bitcoinj.core.Coin.FIFTY_COINS; import static org.junit.Assert.*; /** diff --git a/core/src/test/java/com/google/bitcoin/core/AddressTest.java b/core/src/test/java/org/bitcoinj/core/AddressTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/core/AddressTest.java rename to core/src/test/java/org/bitcoinj/core/AddressTest.java index bef7dc1a..ae1d1ca5 100644 --- a/core/src/test/java/com/google/bitcoin/core/AddressTest.java +++ b/core/src/test/java/org/bitcoinj/core/AddressTest.java @@ -15,19 +15,19 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.Networks; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.Networks; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; import org.junit.Test; import java.util.Arrays; import java.util.List; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.*; public class AddressTest { diff --git a/core/src/test/java/com/google/bitcoin/core/AlertMessageTest.java b/core/src/test/java/org/bitcoinj/core/AlertMessageTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/core/AlertMessageTest.java rename to core/src/test/java/org/bitcoinj/core/AlertMessageTest.java index 90c3c14e..7da8de2d 100644 --- a/core/src/test/java/com/google/bitcoin/core/AlertMessageTest.java +++ b/core/src/test/java/org/bitcoinj/core/AlertMessageTest.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.UnitTestParams; +import org.bitcoinj.params.UnitTestParams; import org.junit.Before; import org.junit.Test; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/com/google/bitcoin/core/Base58Test.java b/core/src/test/java/org/bitcoinj/core/Base58Test.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/Base58Test.java rename to core/src/test/java/org/bitcoinj/core/Base58Test.java index 72d14338..6a89a4d6 100644 --- a/core/src/test/java/com/google/bitcoin/core/Base58Test.java +++ b/core/src/test/java/org/bitcoinj/core/Base58Test.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import junit.framework.TestCase; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/core/BitcoinSerializerTest.java b/core/src/test/java/org/bitcoinj/core/BitcoinSerializerTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/BitcoinSerializerTest.java rename to core/src/test/java/org/bitcoinj/core/BitcoinSerializerTest.java index 574bd2fa..b5f2f497 100644 --- a/core/src/test/java/com/google/bitcoin/core/BitcoinSerializerTest.java +++ b/core/src/test/java/org/bitcoinj/core/BitcoinSerializerTest.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; +import org.bitcoinj.params.MainNetParams; import org.junit.Test; import java.io.ByteArrayOutputStream; @@ -25,7 +25,7 @@ import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.util.Arrays; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.*; public class BitcoinSerializerTest { diff --git a/core/src/test/java/com/google/bitcoin/core/BitcoindComparisonTool.java b/core/src/test/java/org/bitcoinj/core/BitcoindComparisonTool.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/core/BitcoindComparisonTool.java rename to core/src/test/java/org/bitcoinj/core/BitcoindComparisonTool.java index 8704377d..ab71c57e 100644 --- a/core/src/test/java/com/google/bitcoin/core/BitcoindComparisonTool.java +++ b/core/src/test/java/org/bitcoinj/core/BitcoindComparisonTool.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; -import com.google.bitcoin.store.H2FullPrunedBlockStore; -import com.google.bitcoin.utils.BlockFileLoader; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; +import org.bitcoinj.store.H2FullPrunedBlockStore; +import org.bitcoinj.utils.BlockFileLoader; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/test/java/com/google/bitcoin/core/BlockChainTest.java b/core/src/test/java/org/bitcoinj/core/BlockChainTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/core/BlockChainTest.java rename to core/src/test/java/org/bitcoinj/core/BlockChainTest.java index 09e9ca5d..49143ea9 100644 --- a/core/src/test/java/com/google/bitcoin/core/BlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/BlockChainTest.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.Wallet.BalanceType; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet2Params; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.Wallet.BalanceType; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet2Params; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.util.concurrent.ListenableFuture; import org.junit.After; import org.junit.Before; @@ -35,9 +35,9 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeBlock; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeTx; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; import static org.junit.Assert.*; // Handling of chain splits/reorgs are in ChainSplitTests. diff --git a/core/src/test/java/com/google/bitcoin/core/BlockTest.java b/core/src/test/java/org/bitcoinj/core/BlockTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/BlockTest.java rename to core/src/test/java/org/bitcoinj/core/BlockTest.java index 8ec81661..7a93c666 100644 --- a/core/src/test/java/com/google/bitcoin/core/BlockTest.java +++ b/core/src/test/java/org/bitcoinj/core/BlockTest.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.TestNet2Params; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.script.ScriptOpCodes; +import org.bitcoinj.params.TestNet2Params; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.script.ScriptOpCodes; import org.junit.Test; import java.io.ByteArrayInputStream; @@ -29,7 +29,7 @@ import java.io.ObjectOutputStream; import java.math.BigInteger; import java.util.Arrays; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.*; public class BlockTest { diff --git a/core/src/test/java/com/google/bitcoin/core/BloomFilterTest.java b/core/src/test/java/org/bitcoinj/core/BloomFilterTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/core/BloomFilterTest.java rename to core/src/test/java/org/bitcoinj/core/BloomFilterTest.java index b7827ff0..440bb79f 100644 --- a/core/src/test/java/com/google/bitcoin/core/BloomFilterTest.java +++ b/core/src/test/java/org/bitcoinj/core/BloomFilterTest.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.wallet.KeyChainGroup; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.wallet.KeyChainGroup; import org.junit.Test; import java.util.Arrays; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.*; public class BloomFilterTest { diff --git a/core/src/test/java/com/google/bitcoin/core/ChainSplitTest.java b/core/src/test/java/org/bitcoinj/core/ChainSplitTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/ChainSplitTest.java rename to core/src/test/java/org/bitcoinj/core/ChainSplitTest.java index 5e98db52..cf103968 100644 --- a/core/src/test/java/com/google/bitcoin/core/ChainSplitTest.java +++ b/core/src/test/java/org/bitcoinj/core/ChainSplitTest.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import org.junit.Before; import org.junit.Test; @@ -37,7 +37,7 @@ import java.util.ArrayList; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.Coin.*; import static com.google.common.base.Preconditions.checkNotNull; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/core/CoinTest.java b/core/src/test/java/org/bitcoinj/core/CoinTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/core/CoinTest.java rename to core/src/test/java/org/bitcoinj/core/CoinTest.java index 6403ae2e..80446477 100644 --- a/core/src/test/java/com/google/bitcoin/core/CoinTest.java +++ b/core/src/test/java/org/bitcoinj/core/CoinTest.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.core.NetworkParameters.MAX_MONEY; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.core.NetworkParameters.MAX_MONEY; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/com/google/bitcoin/core/CoinbaseBlockTest.java b/core/src/test/java/org/bitcoinj/core/CoinbaseBlockTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/core/CoinbaseBlockTest.java rename to core/src/test/java/org/bitcoinj/core/CoinbaseBlockTest.java index 8616d634..50ddca6d 100644 --- a/core/src/test/java/com/google/bitcoin/core/CoinbaseBlockTest.java +++ b/core/src/test/java/org/bitcoinj/core/CoinbaseBlockTest.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.AbstractBlockChain.NewBlockType; -import com.google.bitcoin.core.Wallet.BalanceType; -import com.google.bitcoin.params.MainNetParams; +import org.bitcoinj.core.AbstractBlockChain.NewBlockType; +import org.bitcoinj.core.Wallet.BalanceType; +import org.bitcoinj.params.MainNetParams; import org.junit.Test; import java.io.ByteArrayOutputStream; diff --git a/core/src/test/java/com/google/bitcoin/core/DumpedPrivateKeyTest.java b/core/src/test/java/org/bitcoinj/core/DumpedPrivateKeyTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/core/DumpedPrivateKeyTest.java rename to core/src/test/java/org/bitcoinj/core/DumpedPrivateKeyTest.java index 1819f79d..82197757 100644 --- a/core/src/test/java/com/google/bitcoin/core/DumpedPrivateKeyTest.java +++ b/core/src/test/java/org/bitcoinj/core/DumpedPrivateKeyTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import static org.junit.Assert.assertEquals; @@ -25,7 +25,7 @@ import java.io.ObjectOutputStream; import org.junit.Test; -import com.google.bitcoin.params.MainNetParams; +import org.bitcoinj.params.MainNetParams; public class DumpedPrivateKeyTest { @Test diff --git a/core/src/test/java/com/google/bitcoin/core/ECKeyTest.java b/core/src/test/java/org/bitcoinj/core/ECKeyTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/core/ECKeyTest.java rename to core/src/test/java/org/bitcoinj/core/ECKeyTest.java index cb95882c..2eb7de24 100644 --- a/core/src/test/java/com/google/bitcoin/core/ECKeyTest.java +++ b/core/src/test/java/org/bitcoinj/core/ECKeyTest.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.crypto.EncryptedData; -import com.google.bitcoin.crypto.KeyCrypter; -import com.google.bitcoin.crypto.KeyCrypterScrypt; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.crypto.EncryptedData; +import org.bitcoinj.crypto.KeyCrypter; +import org.bitcoinj.crypto.KeyCrypterScrypt; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.collect.Lists; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -49,8 +49,8 @@ import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.Executors; -import static com.google.bitcoin.core.Utils.HEX; -import static com.google.bitcoin.core.Utils.reverseBytes; +import static org.bitcoinj.core.Utils.HEX; +import static org.bitcoinj.core.Utils.reverseBytes; import static com.google.common.base.Preconditions.checkNotNull; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/core/FilteredBlockAndPartialMerkleTreeTests.java b/core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/core/FilteredBlockAndPartialMerkleTreeTests.java rename to core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java index c793788f..c62c16e4 100644 --- a/core/src/test/java/com/google/bitcoin/core/FilteredBlockAndPartialMerkleTreeTests.java +++ b/core/src/test/java/org/bitcoinj/core/FilteredBlockAndPartialMerkleTreeTests.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.testing.InboundMessageQueuer; -import com.google.bitcoin.testing.TestWithPeerGroup; -import com.google.bitcoin.wallet.KeyChainGroup; +import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.testing.InboundMessageQueuer; +import org.bitcoinj.testing.TestWithPeerGroup; +import org.bitcoinj.wallet.KeyChainGroup; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -34,7 +34,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java rename to core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java index ae6fa7f0..53644f28 100644 --- a/core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java +++ b/core/src/test/java/org/bitcoinj/core/FullBlockTestGenerator.java @@ -1,9 +1,9 @@ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.Transaction.SigHash; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; +import org.bitcoinj.core.Transaction.SigHash; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -16,8 +16,8 @@ import java.io.IOException; import java.math.BigInteger; import java.util.*; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.script.ScriptOpCodes.*; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.script.ScriptOpCodes.*; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import static java.util.Collections.singletonList; diff --git a/core/src/test/java/com/google/bitcoin/core/H2FullPrunedBlockChainTest.java b/core/src/test/java/org/bitcoinj/core/H2FullPrunedBlockChainTest.java similarity index 81% rename from core/src/test/java/com/google/bitcoin/core/H2FullPrunedBlockChainTest.java rename to core/src/test/java/org/bitcoinj/core/H2FullPrunedBlockChainTest.java index 4aff3e16..96b14d25 100644 --- a/core/src/test/java/com/google/bitcoin/core/H2FullPrunedBlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/H2FullPrunedBlockChainTest.java @@ -1,8 +1,8 @@ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; -import com.google.bitcoin.store.H2FullPrunedBlockStore; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; +import org.bitcoinj.store.H2FullPrunedBlockStore; import org.junit.After; import java.io.File; diff --git a/core/src/test/java/com/google/bitcoin/core/LazyParseByteCacheTest.java b/core/src/test/java/org/bitcoinj/core/LazyParseByteCacheTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/core/LazyParseByteCacheTest.java rename to core/src/test/java/org/bitcoinj/core/LazyParseByteCacheTest.java index 3756f26b..f4b010bf 100644 --- a/core/src/test/java/com/google/bitcoin/core/LazyParseByteCacheTest.java +++ b/core/src/test/java/org/bitcoinj/core/LazyParseByteCacheTest.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; import org.junit.Before; import org.junit.Test; @@ -28,10 +28,10 @@ import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; import java.util.Arrays; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.core.Utils.HEX; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeBlock; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeTx; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.core.Utils.HEX; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; import static org.junit.Assert.*; public class LazyParseByteCacheTest { diff --git a/core/src/test/java/com/google/bitcoin/core/MemoryFullPrunedBlockChainTest.java b/core/src/test/java/org/bitcoinj/core/MemoryFullPrunedBlockChainTest.java similarity index 72% rename from core/src/test/java/com/google/bitcoin/core/MemoryFullPrunedBlockChainTest.java rename to core/src/test/java/org/bitcoinj/core/MemoryFullPrunedBlockChainTest.java index ae95124b..dc0fe8da 100644 --- a/core/src/test/java/com/google/bitcoin/core/MemoryFullPrunedBlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/MemoryFullPrunedBlockChainTest.java @@ -1,8 +1,8 @@ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; -import com.google.bitcoin.store.MemoryFullPrunedBlockStore; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; +import org.bitcoinj.store.MemoryFullPrunedBlockStore; /** * A MemoryStore implementation of the FullPrunedBlockStoreTest diff --git a/core/src/test/java/com/google/bitcoin/core/MemoryPoolTest.java b/core/src/test/java/org/bitcoinj/core/MemoryPoolTest.java similarity index 93% rename from core/src/test/java/com/google/bitcoin/core/MemoryPoolTest.java rename to core/src/test/java/org/bitcoinj/core/MemoryPoolTest.java index db7d8dc2..2a85afb8 100644 --- a/core/src/test/java/com/google/bitcoin/core/MemoryPoolTest.java +++ b/core/src/test/java/org/bitcoinj/core/MemoryPoolTest.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.utils.BriefLogFormatter; import org.junit.Before; import org.junit.Test; import java.net.InetAddress; -import static com.google.bitcoin.core.Coin.COIN; +import static org.bitcoinj.core.Coin.COIN; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/com/google/bitcoin/core/MessageTest.java b/core/src/test/java/org/bitcoinj/core/MessageTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/core/MessageTest.java rename to core/src/test/java/org/bitcoinj/core/MessageTest.java index 812a4fa7..c36a0e6c 100644 --- a/core/src/test/java/com/google/bitcoin/core/MessageTest.java +++ b/core/src/test/java/org/bitcoinj/core/MessageTest.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.UnitTestParams; +import org.bitcoinj.params.UnitTestParams; import org.junit.Test; public class MessageTest { diff --git a/core/src/test/java/com/google/bitcoin/core/PeerAddressTest.java b/core/src/test/java/org/bitcoinj/core/PeerAddressTest.java similarity index 92% rename from core/src/test/java/com/google/bitcoin/core/PeerAddressTest.java rename to core/src/test/java/org/bitcoinj/core/PeerAddressTest.java index a1efacde..2802f93f 100644 --- a/core/src/test/java/com/google/bitcoin/core/PeerAddressTest.java +++ b/core/src/test/java/org/bitcoinj/core/PeerAddressTest.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.MainNetParams; +import org.bitcoinj.params.MainNetParams; import org.junit.Test; import java.net.InetAddress; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.assertEquals; public class PeerAddressTest diff --git a/core/src/test/java/com/google/bitcoin/core/PeerGroupTest.java b/core/src/test/java/org/bitcoinj/core/PeerGroupTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/PeerGroupTest.java rename to core/src/test/java/org/bitcoinj/core/PeerGroupTest.java index f7ec9414..5d97fa8f 100644 --- a/core/src/test/java/com/google/bitcoin/core/PeerGroupTest.java +++ b/core/src/test/java/org/bitcoinj/core/PeerGroupTest.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.net.discovery.PeerDiscovery; -import com.google.bitcoin.net.discovery.PeerDiscoveryException; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.testing.InboundMessageQueuer; -import com.google.bitcoin.testing.TestWithPeerGroup; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.net.discovery.PeerDiscovery; +import org.bitcoinj.net.discovery.PeerDiscoveryException; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.testing.InboundMessageQueuer; +import org.bitcoinj.testing.TestWithPeerGroup; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.net.InetAddresses; @@ -46,8 +46,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static com.google.bitcoin.core.Coin.COIN; -import static com.google.bitcoin.core.Coin.valueOf; +import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.core.Coin.valueOf; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/core/PeerTest.java b/core/src/test/java/org/bitcoinj/core/PeerTest.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/core/PeerTest.java rename to core/src/test/java/org/bitcoinj/core/PeerTest.java index 2b45965a..b602e327 100644 --- a/core/src/test/java/com/google/bitcoin/core/PeerTest.java +++ b/core/src/test/java/org/bitcoinj/core/PeerTest.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.testing.InboundMessageQueuer; -import com.google.bitcoin.testing.TestWithNetworkConnections; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.testing.InboundMessageQueuer; +import org.bitcoinj.testing.TestWithNetworkConnections; +import org.bitcoinj.utils.Threading; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; @@ -47,8 +47,8 @@ import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.testing.FakeTxBuilder.*; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.testing.FakeTxBuilder.*; import static org.junit.Assert.*; @RunWith(value = Parameterized.class) diff --git a/core/src/test/java/com/google/bitcoin/core/PostgresFullPrunedBlockChainTest.java b/core/src/test/java/org/bitcoinj/core/PostgresFullPrunedBlockChainTest.java similarity index 89% rename from core/src/test/java/com/google/bitcoin/core/PostgresFullPrunedBlockChainTest.java rename to core/src/test/java/org/bitcoinj/core/PostgresFullPrunedBlockChainTest.java index f459660d..5caa15e8 100644 --- a/core/src/test/java/com/google/bitcoin/core/PostgresFullPrunedBlockChainTest.java +++ b/core/src/test/java/org/bitcoinj/core/PostgresFullPrunedBlockChainTest.java @@ -1,8 +1,8 @@ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.FullPrunedBlockStore; -import com.google.bitcoin.store.PostgresFullPrunedBlockStore; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.FullPrunedBlockStore; +import org.bitcoinj.store.PostgresFullPrunedBlockStore; import org.junit.Ignore; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/core/TransactionBroadcastTest.java b/core/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/core/TransactionBroadcastTest.java rename to core/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java index 13fa5782..a0caa2d4 100644 --- a/core/src/test/java/com/google/bitcoin/core/TransactionBroadcastTest.java +++ b/core/src/test/java/org/bitcoinj/core/TransactionBroadcastTest.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.testing.InboundMessageQueuer; -import com.google.bitcoin.testing.TestWithPeerGroup; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.testing.InboundMessageQueuer; +import org.bitcoinj.testing.TestWithPeerGroup; +import org.bitcoinj.utils.Threading; import com.google.common.util.concurrent.ListenableFuture; import org.junit.After; import org.junit.Before; @@ -33,7 +33,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Random; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.Coin.*; import static com.google.common.base.Preconditions.checkNotNull; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/core/TransactionTest.java b/core/src/test/java/org/bitcoinj/core/TransactionTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/core/TransactionTest.java rename to core/src/test/java/org/bitcoinj/core/TransactionTest.java index 32e0719e..9d58a681 100644 --- a/core/src/test/java/com/google/bitcoin/core/TransactionTest.java +++ b/core/src/test/java/org/bitcoinj/core/TransactionTest.java @@ -1,8 +1,8 @@ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.testing.FakeTxBuilder; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.testing.FakeTxBuilder; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/core/UtilsTest.java b/core/src/test/java/org/bitcoinj/core/UtilsTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/UtilsTest.java rename to core/src/test/java/org/bitcoinj/core/UtilsTest.java index cadf0804..a261001b 100644 --- a/core/src/test/java/com/google/bitcoin/core/UtilsTest.java +++ b/core/src/test/java/org/bitcoinj/core/UtilsTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import java.math.BigInteger; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/core/VarIntTest.java b/core/src/test/java/org/bitcoinj/core/VarIntTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/core/VarIntTest.java rename to core/src/test/java/org/bitcoinj/core/VarIntTest.java index c6a5cda1..35360268 100644 --- a/core/src/test/java/com/google/bitcoin/core/VarIntTest.java +++ b/core/src/test/java/org/bitcoinj/core/VarIntTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; import junit.framework.TestCase; diff --git a/core/src/test/java/com/google/bitcoin/core/VersionMessageTest.java b/core/src/test/java/org/bitcoinj/core/VersionMessageTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/core/VersionMessageTest.java rename to core/src/test/java/org/bitcoinj/core/VersionMessageTest.java index d03f64f8..f71a5c88 100644 --- a/core/src/test/java/com/google/bitcoin/core/VersionMessageTest.java +++ b/core/src/test/java/org/bitcoinj/core/VersionMessageTest.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.params.UnitTestParams; +import org.bitcoinj.params.UnitTestParams; import org.junit.Test; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.assertTrue; public class VersionMessageTest { diff --git a/core/src/test/java/com/google/bitcoin/core/WalletTest.java b/core/src/test/java/org/bitcoinj/core/WalletTest.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/core/WalletTest.java rename to core/src/test/java/org/bitcoinj/core/WalletTest.java index 304609ac..04a6b77f 100644 --- a/core/src/test/java/com/google/bitcoin/core/WalletTest.java +++ b/core/src/test/java/org/bitcoinj/core/WalletTest.java @@ -15,26 +15,25 @@ * limitations under the License. */ -package com.google.bitcoin.core; +package org.bitcoinj.core; -import com.google.bitcoin.core.Wallet.SendRequest; -import com.google.bitcoin.crypto.*; -import com.google.bitcoin.signers.StatelessTransactionSigner; -import com.google.bitcoin.signers.TransactionSigner; -import com.google.bitcoin.store.BlockStoreException; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.store.WalletProtobufSerializer; -import com.google.bitcoin.testing.*; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.Fiat; -import com.google.bitcoin.utils.Threading; -import com.google.bitcoin.wallet.*; -import com.google.bitcoin.wallet.WalletTransaction.Pool; +import org.bitcoinj.core.Wallet.SendRequest; +import org.bitcoinj.crypto.*; +import org.bitcoinj.signers.StatelessTransactionSigner; +import org.bitcoinj.signers.TransactionSigner; +import org.bitcoinj.store.BlockStoreException; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.store.WalletProtobufSerializer; +import org.bitcoinj.testing.*; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; +import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.*; +import org.bitcoinj.wallet.WalletTransaction.Pool; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString; -import org.bitcoinj.wallet.Protos; import org.bitcoinj.wallet.Protos.Wallet.EncryptionType; import org.junit.After; import org.junit.Before; @@ -54,9 +53,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.core.Utils.HEX; -import static com.google.bitcoin.testing.FakeTxBuilder.*; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.core.Utils.HEX; +import static org.bitcoinj.testing.FakeTxBuilder.*; import static com.google.common.base.Preconditions.checkNotNull; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/crypto/BIP32Test.java b/core/src/test/java/org/bitcoinj/crypto/BIP32Test.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/crypto/BIP32Test.java rename to core/src/test/java/org/bitcoinj/crypto/BIP32Test.java index 1ec0170f..a000b6bc 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/BIP32Test.java +++ b/core/src/test/java/org/bitcoinj/crypto/BIP32Test.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Base58; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Base58; import com.google.common.base.Functions; import com.google.common.base.Joiner; import com.google.common.collect.Iterables; @@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.List; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.assertEquals; /** diff --git a/core/src/test/java/com/google/bitcoin/crypto/BIP38PrivateKeyTest.java b/core/src/test/java/org/bitcoinj/crypto/BIP38PrivateKeyTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/crypto/BIP38PrivateKeyTest.java rename to core/src/test/java/org/bitcoinj/crypto/BIP38PrivateKeyTest.java index 34527012..844adc57 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/BIP38PrivateKeyTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/BIP38PrivateKeyTest.java @@ -14,13 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.crypto.BIP38PrivateKey.BadPassphraseException; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet3Params; -import org.junit.Ignore; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.crypto.BIP38PrivateKey.BadPassphraseException; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet3Params; import org.junit.Test; import java.io.ByteArrayInputStream; diff --git a/core/src/test/java/com/google/bitcoin/crypto/ChildKeyDerivationTest.java b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/crypto/ChildKeyDerivationTest.java rename to core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java index 828859b4..a0ad8488 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/ChildKeyDerivationTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Sha256Hash; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Sha256Hash; import org.junit.Test; import org.spongycastle.crypto.params.KeyParameter; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.*; /** diff --git a/core/src/test/java/com/google/bitcoin/crypto/HDUtilsTest.java b/core/src/test/java/org/bitcoinj/crypto/HDUtilsTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/crypto/HDUtilsTest.java rename to core/src/test/java/org/bitcoinj/crypto/HDUtilsTest.java index bc682ef5..3620b14b 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/HDUtilsTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/HDUtilsTest.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import com.google.common.collect.ImmutableList; import org.junit.Assert; import org.junit.Test; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import java.util.List; public class HDUtilsTest { diff --git a/core/src/test/java/com/google/bitcoin/crypto/KeyCrypterScryptTest.java b/core/src/test/java/org/bitcoinj/crypto/KeyCrypterScryptTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/crypto/KeyCrypterScryptTest.java rename to core/src/test/java/org/bitcoinj/crypto/KeyCrypterScryptTest.java index 98e1f9f4..fa272166 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/KeyCrypterScryptTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/KeyCrypterScryptTest.java @@ -14,10 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.Utils; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.protobuf.ByteString; import org.bitcoinj.wallet.Protos; diff --git a/core/src/test/java/com/google/bitcoin/crypto/MnemonicCodeTest.java b/core/src/test/java/org/bitcoinj/crypto/MnemonicCodeTest.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/crypto/MnemonicCodeTest.java rename to core/src/test/java/org/bitcoinj/crypto/MnemonicCodeTest.java index 7b532592..4bb56896 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/MnemonicCodeTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/MnemonicCodeTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; import com.google.common.base.Joiner; import com.google.common.collect.Lists; @@ -27,7 +27,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static com.google.bitcoin.core.Utils.HEX; +import static org.bitcoinj.core.Utils.HEX; import static org.junit.Assert.assertEquals; public class MnemonicCodeTest { diff --git a/core/src/test/java/com/google/bitcoin/crypto/X509UtilsTest.java b/core/src/test/java/org/bitcoinj/crypto/X509UtilsTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/crypto/X509UtilsTest.java rename to core/src/test/java/org/bitcoinj/crypto/X509UtilsTest.java index 4eed8d4e..195ee601 100644 --- a/core/src/test/java/com/google/bitcoin/crypto/X509UtilsTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/X509UtilsTest.java @@ -14,9 +14,8 @@ * limitations under the License. */ -package com.google.bitcoin.crypto; +package org.bitcoinj.crypto; -import com.google.bitcoin.crypto.X509Utils; import org.junit.Test; import java.security.cert.CertificateFactory; diff --git a/core/src/test/java/com/google/bitcoin/net/NetworkAbstractionTests.java b/core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/net/NetworkAbstractionTests.java rename to core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java index 5df589b3..1a8a05dc 100644 --- a/core/src/test/java/com/google/bitcoin/net/NetworkAbstractionTests.java +++ b/core/src/test/java/org/bitcoinj/net/NetworkAbstractionTests.java @@ -15,9 +15,9 @@ * limitations under the License. */ -package com.google.bitcoin.net; +package org.bitcoinj.net; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Utils; import com.google.common.util.concurrent.SettableFuture; import com.google.protobuf.ByteString; import org.bitcoin.paymentchannel.Protos; diff --git a/core/src/test/java/com/google/bitcoin/net/discovery/SeedPeersTest.java b/core/src/test/java/org/bitcoinj/net/discovery/SeedPeersTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/net/discovery/SeedPeersTest.java rename to core/src/test/java/org/bitcoinj/net/discovery/SeedPeersTest.java index 6dc2f753..a4389da2 100644 --- a/core/src/test/java/com/google/bitcoin/net/discovery/SeedPeersTest.java +++ b/core/src/test/java/org/bitcoinj/net/discovery/SeedPeersTest.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.bitcoin.net.discovery; +package org.bitcoinj.net.discovery; -import com.google.bitcoin.params.MainNetParams; +import org.bitcoinj.params.MainNetParams; import org.junit.Test; import java.net.InetSocketAddress; diff --git a/core/src/test/java/com/google/bitcoin/protocols/channels/ChannelConnectionTest.java b/core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/protocols/channels/ChannelConnectionTest.java rename to core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java index 4966aabd..a0236e00 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/channels/ChannelConnectionTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/channels/ChannelConnectionTest.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.store.WalletProtobufSerializer; -import com.google.bitcoin.testing.TestWithWallet; -import com.google.bitcoin.utils.Threading; -import com.google.bitcoin.wallet.WalletFiles; +import org.bitcoinj.core.*; +import org.bitcoinj.store.WalletProtobufSerializer; +import org.bitcoinj.testing.TestWithWallet; +import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.WalletFiles; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; @@ -36,14 +36,13 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.net.InetSocketAddress; import java.net.SocketAddress; -import java.util.ArrayList; import java.util.Arrays; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicBoolean; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeBlock; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.protocols.channels.PaymentChannelCloseException.CloseReason; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeBlock; import static org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/protocols/channels/ChannelTestUtils.java b/core/src/test/java/org/bitcoinj/protocols/channels/ChannelTestUtils.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/protocols/channels/ChannelTestUtils.java rename to core/src/test/java/org/bitcoinj/protocols/channels/ChannelTestUtils.java index 0cfaff24..573270d2 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/channels/ChannelTestUtils.java +++ b/core/src/test/java/org/bitcoinj/protocols/channels/ChannelTestUtils.java @@ -1,13 +1,12 @@ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.TransactionBroadcaster; -import com.google.bitcoin.core.Wallet; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.TransactionBroadcaster; +import org.bitcoinj.core.Wallet; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.SettableFuture; import com.google.protobuf.ByteString; import org.bitcoin.paymentchannel.Protos; diff --git a/core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelClientTest.java b/core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelClientTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelClientTest.java rename to core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelClientTest.java index cb31491a..9d374d18 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelClientTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelClientTest.java @@ -1,6 +1,6 @@ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import org.bitcoin.paymentchannel.Protos; import org.easymock.Capture; import org.easymock.EasyMock; diff --git a/core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelServerTest.java b/core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelServerTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelServerTest.java rename to core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelServerTest.java index 8155f3ac..7e0b9c6c 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelServerTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelServerTest.java @@ -1,9 +1,9 @@ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.TransactionBroadcaster; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.core.Wallet; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.TransactionBroadcaster; +import org.bitcoinj.core.Utils; +import org.bitcoinj.core.Wallet; import org.bitcoin.paymentchannel.Protos; import org.easymock.Capture; import org.junit.Before; diff --git a/core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelStateTest.java b/core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelStateTest.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelStateTest.java rename to core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelStateTest.java index c424d6a8..5c87f357 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/channels/PaymentChannelStateTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/channels/PaymentChannelStateTest.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.channels; +package org.bitcoinj.protocols.channels; -import com.google.bitcoin.core.*; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.testing.TestWithWallet; +import org.bitcoinj.core.*; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.testing.TestWithWallet; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; @@ -34,9 +34,9 @@ import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutionException; import java.util.concurrent.LinkedBlockingQueue; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeTx; -import static com.google.bitcoin.testing.FakeTxBuilder.makeSolvedTestBlock; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; +import static org.bitcoinj.testing.FakeTxBuilder.makeSolvedTestBlock; import static org.junit.Assert.*; public class PaymentChannelStateTest extends TestWithWallet { diff --git a/core/src/test/java/com/google/bitcoin/protocols/payments/PaymentProtocolTest.java b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java similarity index 92% rename from core/src/test/java/com/google/bitcoin/protocols/payments/PaymentProtocolTest.java rename to core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java index 64c21495..4191c70c 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/payments/PaymentProtocolTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentProtocolTest.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.payments; +package org.bitcoinj.protocols.payments; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.X509Utils; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.protocols.payments.PaymentProtocol.Output; -import com.google.bitcoin.protocols.payments.PaymentProtocol.PkiVerificationData; -import com.google.bitcoin.protocols.payments.PaymentProtocolException.PkiVerificationException; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.testing.FakeTxBuilder; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.X509Utils; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.protocols.payments.PaymentProtocol.Output; +import org.bitcoinj.protocols.payments.PaymentProtocol.PkiVerificationData; +import org.bitcoinj.protocols.payments.PaymentProtocolException.PkiVerificationException; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.testing.FakeTxBuilder; import org.bitcoin.protocols.payments.Protos; import org.bitcoin.protocols.payments.Protos.Payment; import org.bitcoin.protocols.payments.Protos.PaymentACK; diff --git a/core/src/test/java/com/google/bitcoin/protocols/payments/PaymentSessionTest.java b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/protocols/payments/PaymentSessionTest.java rename to core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java index 49831c5d..01b2fae7 100644 --- a/core/src/test/java/com/google/bitcoin/protocols/payments/PaymentSessionTest.java +++ b/core/src/test/java/org/bitcoinj/protocols/payments/PaymentSessionTest.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.protocols.payments; +package org.bitcoinj.protocols.payments; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.TrustStoreLoader; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet3Params; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.TrustStoreLoader; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet3Params; import com.google.common.util.concurrent.ListenableFuture; import com.google.protobuf.ByteString; import org.bitcoin.protocols.payments.Protos; @@ -32,7 +32,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.Date; -import static com.google.bitcoin.core.Coin.COIN; +import static org.bitcoinj.core.Coin.COIN; import static org.junit.Assert.*; public class PaymentSessionTest { diff --git a/core/src/test/java/com/google/bitcoin/script/ScriptChunkTest.java b/core/src/test/java/org/bitcoinj/script/ScriptChunkTest.java similarity index 89% rename from core/src/test/java/com/google/bitcoin/script/ScriptChunkTest.java rename to core/src/test/java/org/bitcoinj/script/ScriptChunkTest.java index 90c67cbb..3183ad70 100644 --- a/core/src/test/java/com/google/bitcoin/script/ScriptChunkTest.java +++ b/core/src/test/java/org/bitcoinj/script/ScriptChunkTest.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.bitcoin.script; +package org.bitcoinj.script; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA1; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA2; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA4; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA1; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA2; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA4; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/core/src/test/java/com/google/bitcoin/script/ScriptTest.java b/core/src/test/java/org/bitcoinj/script/ScriptTest.java similarity index 97% rename from core/src/test/java/com/google/bitcoin/script/ScriptTest.java rename to core/src/test/java/org/bitcoinj/script/ScriptTest.java index ec309fb8..5bfab65d 100644 --- a/core/src/test/java/com/google/bitcoin/script/ScriptTest.java +++ b/core/src/test/java/org/bitcoinj/script/ScriptTest.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package com.google.bitcoin.script; +package org.bitcoinj.script; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.bitcoin.core.*; -import com.google.bitcoin.core.Transaction.SigHash; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.script.Script.VerifyFlag; +import org.bitcoinj.core.*; +import org.bitcoinj.core.Transaction.SigHash; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.script.Script.VerifyFlag; import com.google.common.base.Charsets; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -41,9 +41,9 @@ import java.math.BigInteger; import java.nio.charset.Charset; import java.util.*; -import static com.google.bitcoin.core.Utils.HEX; -import static com.google.bitcoin.script.ScriptOpCodes.OP_0; -import static com.google.bitcoin.script.ScriptOpCodes.OP_INVALIDOPCODE; +import static org.bitcoinj.core.Utils.HEX; +import static org.bitcoinj.script.ScriptOpCodes.OP_0; +import static org.bitcoinj.script.ScriptOpCodes.OP_INVALIDOPCODE; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/store/SPVBlockStoreTest.java b/core/src/test/java/org/bitcoinj/store/SPVBlockStoreTest.java similarity index 88% rename from core/src/test/java/com/google/bitcoin/store/SPVBlockStoreTest.java rename to core/src/test/java/org/bitcoinj/store/SPVBlockStoreTest.java index e688ca8f..baacc82f 100644 --- a/core/src/test/java/com/google/bitcoin/store/SPVBlockStoreTest.java +++ b/core/src/test/java/org/bitcoinj/store/SPVBlockStoreTest.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.StoredBlock; -import com.google.bitcoin.params.UnitTestParams; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.StoredBlock; +import org.bitcoinj.params.UnitTestParams; import org.junit.Test; import java.io.File; diff --git a/core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java b/core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java rename to core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java index a7bb9878..bed91ac5 100644 --- a/core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java +++ b/core/src/test/java/org/bitcoinj/store/WalletProtobufSerializerTest.java @@ -15,20 +15,20 @@ * limitations under the License. */ -package com.google.bitcoin.store; +package org.bitcoinj.store; -import com.google.bitcoin.core.*; -import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; -import com.google.bitcoin.wallet.DeterministicKeyChain; -import com.google.bitcoin.wallet.KeyChain; +import org.bitcoinj.core.*; +import org.bitcoinj.core.TransactionConfidence.ConfidenceType; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.DeterministicKeyChain; +import org.bitcoinj.wallet.KeyChain; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import org.bitcoinj.wallet.Protos; @@ -45,8 +45,8 @@ import java.util.Date; import java.util.Iterator; import java.util.Set; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.testing.FakeTxBuilder.createFakeTx; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.testing.FakeTxBuilder.createFakeTx; import static org.junit.Assert.*; public class WalletProtobufSerializerTest { diff --git a/core/src/test/java/com/google/bitcoin/uri/BitcoinURITest.java b/core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/uri/BitcoinURITest.java rename to core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java index ec771176..963b58a4 100644 --- a/core/src/test/java/com/google/bitcoin/uri/BitcoinURITest.java +++ b/core/src/test/java/org/bitcoinj/uri/BitcoinURITest.java @@ -16,17 +16,17 @@ * */ -package com.google.bitcoin.uri; +package org.bitcoinj.uri; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet3Params; +import org.bitcoinj.core.Address; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet3Params; import com.google.common.collect.ImmutableList; import org.junit.Test; import java.io.UnsupportedEncodingException; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.Coin.*; import static org.junit.Assert.*; public class BitcoinURITest { diff --git a/core/src/test/java/com/google/bitcoin/utils/BaseTaggableObjectTest.java b/core/src/test/java/org/bitcoinj/utils/BaseTaggableObjectTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/utils/BaseTaggableObjectTest.java rename to core/src/test/java/org/bitcoinj/utils/BaseTaggableObjectTest.java index fa32dd10..2447f038 100644 --- a/core/src/test/java/com/google/bitcoin/utils/BaseTaggableObjectTest.java +++ b/core/src/test/java/org/bitcoinj/utils/BaseTaggableObjectTest.java @@ -1,4 +1,4 @@ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import com.google.protobuf.ByteString; import org.junit.Before; diff --git a/core/src/test/java/com/google/bitcoin/utils/BtcFormatTest.java b/core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java similarity index 99% rename from core/src/test/java/com/google/bitcoin/utils/BtcFormatTest.java rename to core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java index af12e881..598498f5 100644 --- a/core/src/test/java/com/google/bitcoin/utils/BtcFormatTest.java +++ b/core/src/test/java/org/bitcoinj/utils/BtcFormatTest.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -29,12 +29,12 @@ import java.util.HashSet; import java.util.Locale; import java.util.Set; -import static com.google.bitcoin.core.Coin.*; -import static com.google.bitcoin.core.NetworkParameters.MAX_MONEY; -import static com.google.bitcoin.utils.BtcAutoFormat.Style.CODE; -import static com.google.bitcoin.utils.BtcAutoFormat.Style.SYMBOL; -import static com.google.bitcoin.utils.BtcFixedFormat.REPEATING_DOUBLETS; -import static com.google.bitcoin.utils.BtcFixedFormat.REPEATING_TRIPLETS; +import static org.bitcoinj.core.Coin.*; +import static org.bitcoinj.core.NetworkParameters.MAX_MONEY; +import static org.bitcoinj.utils.BtcAutoFormat.Style.CODE; +import static org.bitcoinj.utils.BtcAutoFormat.Style.SYMBOL; +import static org.bitcoinj.utils.BtcFixedFormat.REPEATING_DOUBLETS; +import static org.bitcoinj.utils.BtcFixedFormat.REPEATING_TRIPLETS; import static java.text.NumberFormat.Field.DECIMAL_SEPARATOR; import static java.util.Locale.*; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/utils/ExchangeRateTest.java b/core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/utils/ExchangeRateTest.java rename to core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java index 8245cb8c..c31a28d1 100644 --- a/core/src/test/java/com/google/bitcoin/utils/ExchangeRateTest.java +++ b/core/src/test/java/org/bitcoinj/utils/ExchangeRateTest.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; import static org.junit.Assert.assertEquals; import org.junit.Test; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; public class ExchangeRateTest { diff --git a/core/src/test/java/com/google/bitcoin/utils/ExponentialBackoffTest.java b/core/src/test/java/org/bitcoinj/utils/ExponentialBackoffTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/utils/ExponentialBackoffTest.java rename to core/src/test/java/org/bitcoinj/utils/ExponentialBackoffTest.java index 438be368..841dd271 100644 --- a/core/src/test/java/com/google/bitcoin/utils/ExponentialBackoffTest.java +++ b/core/src/test/java/org/bitcoinj/utils/ExponentialBackoffTest.java @@ -14,10 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.utils.ExponentialBackoff; +import org.bitcoinj.core.Utils; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/utils/FiatTest.java b/core/src/test/java/org/bitcoinj/utils/FiatTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/utils/FiatTest.java rename to core/src/test/java/org/bitcoinj/utils/FiatTest.java index 4e9125b5..fdcbf60b 100644 --- a/core/src/test/java/com/google/bitcoin/utils/FiatTest.java +++ b/core/src/test/java/org/bitcoinj/utils/FiatTest.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import static com.google.bitcoin.utils.Fiat.parseFiat; +import static org.bitcoinj.utils.Fiat.parseFiat; import static org.junit.Assert.assertEquals; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/utils/MonetaryFormatTest.java b/core/src/test/java/org/bitcoinj/utils/MonetaryFormatTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/utils/MonetaryFormatTest.java rename to core/src/test/java/org/bitcoinj/utils/MonetaryFormatTest.java index b6bc775a..a96911ed 100644 --- a/core/src/test/java/com/google/bitcoin/utils/MonetaryFormatTest.java +++ b/core/src/test/java/org/bitcoinj/utils/MonetaryFormatTest.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package com.google.bitcoin.utils; +package org.bitcoinj.utils; -import static com.google.bitcoin.core.Coin.CENT; -import static com.google.bitcoin.core.Coin.COIN; -import static com.google.bitcoin.core.Coin.SATOSHI; -import static com.google.bitcoin.core.Coin.ZERO; +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.junit.Assert.assertEquals; import java.util.Locale; import org.junit.Test; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; public class MonetaryFormatTest { diff --git a/core/src/test/java/com/google/bitcoin/wallet/BasicKeyChainTest.java b/core/src/test/java/org/bitcoinj/wallet/BasicKeyChainTest.java similarity index 95% rename from core/src/test/java/com/google/bitcoin/wallet/BasicKeyChainTest.java rename to core/src/test/java/org/bitcoinj/wallet/BasicKeyChainTest.java index 61e01bd1..0ef2a734 100644 --- a/core/src/test/java/com/google/bitcoin/wallet/BasicKeyChainTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/BasicKeyChainTest.java @@ -14,18 +14,21 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.BloomFilter; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.crypto.KeyCrypter; -import com.google.bitcoin.crypto.KeyCrypterException; -import com.google.bitcoin.crypto.KeyCrypterScrypt; -import com.google.bitcoin.store.UnreadableWalletException; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.BloomFilter; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; +import org.bitcoinj.crypto.KeyCrypter; +import org.bitcoinj.crypto.KeyCrypterException; +import org.bitcoinj.crypto.KeyCrypterScrypt; +import org.bitcoinj.store.UnreadableWalletException; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; +import org.bitcoinj.wallet.AbstractKeyChainEventListener; +import org.bitcoinj.wallet.BasicKeyChain; +import org.bitcoinj.wallet.KeyChain; import org.bitcoinj.wallet.Protos; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/wallet/DefaultCoinSelectorTest.java b/core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java similarity index 92% rename from core/src/test/java/com/google/bitcoin/wallet/DefaultCoinSelectorTest.java rename to core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java index 1dc770aa..6fb018c8 100644 --- a/core/src/test/java/com/google/bitcoin/wallet/DefaultCoinSelectorTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/DefaultCoinSelectorTest.java @@ -14,13 +14,15 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.testing.FakeTxBuilder; -import com.google.bitcoin.testing.TestWithWallet; +import org.bitcoinj.core.*; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.testing.FakeTxBuilder; +import org.bitcoinj.testing.TestWithWallet; +import org.bitcoinj.wallet.CoinSelection; +import org.bitcoinj.wallet.DefaultCoinSelector; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -28,7 +30,7 @@ import org.junit.Test; import java.net.InetAddress; import java.util.ArrayList; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.Coin.*; import static com.google.common.base.Preconditions.checkNotNull; import static org.junit.Assert.*; diff --git a/core/src/test/java/com/google/bitcoin/wallet/DefaultRiskAnalysisTest.java b/core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java similarity index 94% rename from core/src/test/java/com/google/bitcoin/wallet/DefaultRiskAnalysisTest.java rename to core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java index ff21d5ea..a559b6af 100644 --- a/core/src/test/java/com/google/bitcoin/wallet/DefaultRiskAnalysisTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/DefaultRiskAnalysisTest.java @@ -15,18 +15,20 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.script.ScriptChunk; +import org.bitcoinj.core.*; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.script.ScriptChunk; import com.google.common.collect.ImmutableList; +import org.bitcoinj.wallet.DefaultRiskAnalysis; +import org.bitcoinj.wallet.RiskAnalysis; import org.junit.Before; import org.junit.Test; -import static com.google.bitcoin.core.Coin.COIN; -import static com.google.bitcoin.script.ScriptOpCodes.OP_PUSHDATA1; +import static org.bitcoinj.core.Coin.COIN; +import static org.bitcoinj.script.ScriptOpCodes.OP_PUSHDATA1; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; diff --git a/core/src/test/java/com/google/bitcoin/wallet/DeterministicKeyChainTest.java b/core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java similarity index 96% rename from core/src/test/java/com/google/bitcoin/wallet/DeterministicKeyChainTest.java rename to core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java index ed72d412..a0bfde96 100644 --- a/core/src/test/java/com/google/bitcoin/wallet/DeterministicKeyChainTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java @@ -14,16 +14,19 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.DeterministicHierarchy; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.params.UnitTestParams; -import com.google.bitcoin.store.UnreadableWalletException; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.DeterministicHierarchy; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.params.UnitTestParams; +import org.bitcoinj.store.UnreadableWalletException; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import com.google.common.collect.Lists; +import org.bitcoinj.wallet.AbstractKeyChainEventListener; +import org.bitcoinj.wallet.DeterministicKeyChain; +import org.bitcoinj.wallet.KeyChain; import org.bitcoinj.wallet.Protos; import org.junit.Before; import org.junit.Test; diff --git a/core/src/test/java/com/google/bitcoin/wallet/KeyChainGroupTest.java b/core/src/test/java/org/bitcoinj/wallet/KeyChainGroupTest.java similarity index 98% rename from core/src/test/java/com/google/bitcoin/wallet/KeyChainGroupTest.java rename to core/src/test/java/org/bitcoinj/wallet/KeyChainGroupTest.java index 7e432e56..4e0520d7 100644 --- a/core/src/test/java/com/google/bitcoin/wallet/KeyChainGroupTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/KeyChainGroupTest.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.google.bitcoin.wallet; +package org.bitcoinj.wallet; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.*; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.*; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; -import org.bitcoinj.wallet.Protos; +import org.bitcoinj.wallet.*; import org.junit.Before; import org.junit.Test; import org.spongycastle.crypto.params.KeyParameter; diff --git a/core/src/test/resources/com/google/bitcoin/core/block169482.dat b/core/src/test/resources/org/bitcoinj/core/block169482.dat similarity index 100% rename from core/src/test/resources/com/google/bitcoin/core/block169482.dat rename to core/src/test/resources/org/bitcoinj/core/block169482.dat diff --git a/core/src/test/resources/com/google/bitcoin/core/first-100k-blocks.dat b/core/src/test/resources/org/bitcoinj/core/first-100k-blocks.dat similarity index 100% rename from core/src/test/resources/com/google/bitcoin/core/first-100k-blocks.dat rename to core/src/test/resources/org/bitcoinj/core/first-100k-blocks.dat diff --git a/core/src/test/resources/com/google/bitcoin/core/sig_canonical.json b/core/src/test/resources/org/bitcoinj/core/sig_canonical.json similarity index 100% rename from core/src/test/resources/com/google/bitcoin/core/sig_canonical.json rename to core/src/test/resources/org/bitcoinj/core/sig_canonical.json diff --git a/core/src/test/resources/com/google/bitcoin/core/sig_noncanonical.json b/core/src/test/resources/org/bitcoinj/core/sig_noncanonical.json similarity index 100% rename from core/src/test/resources/com/google/bitcoin/core/sig_noncanonical.json rename to core/src/test/resources/org/bitcoinj/core/sig_noncanonical.json diff --git a/core/src/test/resources/com/google/bitcoin/crypto/comodo-smime.crt b/core/src/test/resources/org/bitcoinj/crypto/comodo-smime.crt similarity index 100% rename from core/src/test/resources/com/google/bitcoin/crypto/comodo-smime.crt rename to core/src/test/resources/org/bitcoinj/crypto/comodo-smime.crt diff --git a/core/src/test/resources/com/google/bitcoin/crypto/startssl-client.crt b/core/src/test/resources/org/bitcoinj/crypto/startssl-client.crt similarity index 100% rename from core/src/test/resources/com/google/bitcoin/crypto/startssl-client.crt rename to core/src/test/resources/org/bitcoinj/crypto/startssl-client.crt diff --git a/core/src/test/resources/com/google/bitcoin/crypto/startssl-smime.crt b/core/src/test/resources/org/bitcoinj/crypto/startssl-smime.crt similarity index 100% rename from core/src/test/resources/com/google/bitcoin/crypto/startssl-smime.crt rename to core/src/test/resources/org/bitcoinj/crypto/startssl-smime.crt diff --git a/core/src/test/resources/com/google/bitcoin/protocols/payments/README b/core/src/test/resources/org/bitcoinj/protocols/payments/README similarity index 100% rename from core/src/test/resources/com/google/bitcoin/protocols/payments/README rename to core/src/test/resources/org/bitcoinj/protocols/payments/README diff --git a/core/src/test/resources/com/google/bitcoin/protocols/payments/pki_test.bitcoinpaymentrequest b/core/src/test/resources/org/bitcoinj/protocols/payments/pki_test.bitcoinpaymentrequest similarity index 100% rename from core/src/test/resources/com/google/bitcoin/protocols/payments/pki_test.bitcoinpaymentrequest rename to core/src/test/resources/org/bitcoinj/protocols/payments/pki_test.bitcoinpaymentrequest diff --git a/core/src/test/resources/com/google/bitcoin/protocols/payments/test-cacert.key b/core/src/test/resources/org/bitcoinj/protocols/payments/test-cacert.key similarity index 100% rename from core/src/test/resources/com/google/bitcoin/protocols/payments/test-cacert.key rename to core/src/test/resources/org/bitcoinj/protocols/payments/test-cacert.key diff --git a/core/src/test/resources/com/google/bitcoin/protocols/payments/test-cacerts b/core/src/test/resources/org/bitcoinj/protocols/payments/test-cacerts similarity index 100% rename from core/src/test/resources/com/google/bitcoin/protocols/payments/test-cacerts rename to core/src/test/resources/org/bitcoinj/protocols/payments/test-cacerts diff --git a/core/src/test/resources/com/google/bitcoin/protocols/payments/test-expired-cert b/core/src/test/resources/org/bitcoinj/protocols/payments/test-expired-cert similarity index 100% rename from core/src/test/resources/com/google/bitcoin/protocols/payments/test-expired-cert rename to core/src/test/resources/org/bitcoinj/protocols/payments/test-expired-cert diff --git a/core/src/test/resources/com/google/bitcoin/protocols/payments/test-valid-cert b/core/src/test/resources/org/bitcoinj/protocols/payments/test-valid-cert similarity index 100% rename from core/src/test/resources/com/google/bitcoin/protocols/payments/test-valid-cert rename to core/src/test/resources/org/bitcoinj/protocols/payments/test-valid-cert diff --git a/core/src/test/resources/com/google/bitcoin/script/script_invalid.json b/core/src/test/resources/org/bitcoinj/script/script_invalid.json similarity index 100% rename from core/src/test/resources/com/google/bitcoin/script/script_invalid.json rename to core/src/test/resources/org/bitcoinj/script/script_invalid.json diff --git a/core/src/test/resources/com/google/bitcoin/script/script_valid.json b/core/src/test/resources/org/bitcoinj/script/script_valid.json similarity index 100% rename from core/src/test/resources/com/google/bitcoin/script/script_valid.json rename to core/src/test/resources/org/bitcoinj/script/script_valid.json diff --git a/core/src/test/resources/com/google/bitcoin/script/tx_invalid.json b/core/src/test/resources/org/bitcoinj/script/tx_invalid.json similarity index 100% rename from core/src/test/resources/com/google/bitcoin/script/tx_invalid.json rename to core/src/test/resources/org/bitcoinj/script/tx_invalid.json diff --git a/core/src/test/resources/com/google/bitcoin/script/tx_valid.json b/core/src/test/resources/org/bitcoinj/script/tx_valid.json similarity index 100% rename from core/src/test/resources/com/google/bitcoin/script/tx_valid.json rename to core/src/test/resources/org/bitcoinj/script/tx_valid.json diff --git a/core/src/test/resources/com/google/bitcoin/wallet/deterministic-wallet-serialization.txt b/core/src/test/resources/org/bitcoinj/wallet/deterministic-wallet-serialization.txt similarity index 100% rename from core/src/test/resources/com/google/bitcoin/wallet/deterministic-wallet-serialization.txt rename to core/src/test/resources/org/bitcoinj/wallet/deterministic-wallet-serialization.txt diff --git a/core/src/test/resources/com/google/bitcoin/wallet/watching-wallet-serialization.txt b/core/src/test/resources/org/bitcoinj/wallet/watching-wallet-serialization.txt similarity index 100% rename from core/src/test/resources/com/google/bitcoin/wallet/watching-wallet-serialization.txt rename to core/src/test/resources/org/bitcoinj/wallet/watching-wallet-serialization.txt diff --git a/examples/pom.xml b/examples/pom.xml index 8fd047e2..0bf53031 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.google + org.bitcoinj bitcoinj-parent 0.12-SNAPSHOT @@ -32,8 +32,8 @@ - com.google - bitcoinj + org.bitcoinj + bitcoinj-core ${project.parent.version} diff --git a/examples/src/main/java/com/google/bitcoin/examples/BackupToMnemonicSeed.java b/examples/src/main/java/org/bitcoinj/examples/BackupToMnemonicSeed.java similarity index 82% rename from examples/src/main/java/com/google/bitcoin/examples/BackupToMnemonicSeed.java rename to examples/src/main/java/org/bitcoinj/examples/BackupToMnemonicSeed.java index ddada8e8..27b0ee8c 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/BackupToMnemonicSeed.java +++ b/examples/src/main/java/org/bitcoinj/examples/BackupToMnemonicSeed.java @@ -1,9 +1,9 @@ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.wallet.DeterministicSeed; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.wallet.DeterministicSeed; import com.google.common.base.Joiner; /** diff --git a/examples/src/main/java/com/google/bitcoin/examples/DoubleSpend.java b/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java similarity index 84% rename from examples/src/main/java/com/google/bitcoin/examples/DoubleSpend.java rename to examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java index dbeb2c37..e306d112 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/DoubleSpend.java +++ b/examples/src/main/java/org/bitcoinj/examples/DoubleSpend.java @@ -1,14 +1,14 @@ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import java.io.File; -import static com.google.bitcoin.core.Coin.*; +import static org.bitcoinj.core.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/com/google/bitcoin/examples/DumpWallet.java b/examples/src/main/java/org/bitcoinj/examples/DumpWallet.java similarity index 93% rename from examples/src/main/java/com/google/bitcoin/examples/DumpWallet.java rename to examples/src/main/java/org/bitcoinj/examples/DumpWallet.java index 0fa1b20b..4c3614ad 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/DumpWallet.java +++ b/examples/src/main/java/org/bitcoinj/examples/DumpWallet.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.Wallet; +import org.bitcoinj.core.Wallet; import java.io.File; diff --git a/examples/src/main/java/com/google/bitcoin/examples/ExamplePaymentChannelClient.java b/examples/src/main/java/org/bitcoinj/examples/ExamplePaymentChannelClient.java similarity index 94% rename from examples/src/main/java/com/google/bitcoin/examples/ExamplePaymentChannelClient.java rename to examples/src/main/java/org/bitcoinj/examples/ExamplePaymentChannelClient.java index 6739c944..273a68fe 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/ExamplePaymentChannelClient.java +++ b/examples/src/main/java/org/bitcoinj/examples/ExamplePaymentChannelClient.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.protocols.channels.PaymentChannelClientConnection; -import com.google.bitcoin.protocols.channels.StoredPaymentChannelClientStates; -import com.google.bitcoin.protocols.channels.ValueOutOfRangeException; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.protocols.channels.PaymentChannelClientConnection; +import org.bitcoinj.protocols.channels.StoredPaymentChannelClientStates; +import org.bitcoinj.protocols.channels.ValueOutOfRangeException; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; @@ -39,7 +39,7 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; -import static com.google.bitcoin.core.Coin.CENT; +import static org.bitcoinj.core.Coin.CENT; /** * Simple client that connects to the given host, opens a channel, and pays one cent. diff --git a/examples/src/main/java/com/google/bitcoin/examples/ExamplePaymentChannelServer.java b/examples/src/main/java/org/bitcoinj/examples/ExamplePaymentChannelServer.java similarity index 91% rename from examples/src/main/java/com/google/bitcoin/examples/ExamplePaymentChannelServer.java rename to examples/src/main/java/org/bitcoinj/examples/ExamplePaymentChannelServer.java index 2b9e004e..d86b6790 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/ExamplePaymentChannelServer.java +++ b/examples/src/main/java/org/bitcoinj/examples/ExamplePaymentChannelServer.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.VerificationException; -import com.google.bitcoin.core.WalletExtension; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.protocols.channels.*; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.VerificationException; +import org.bitcoinj.core.WalletExtension; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.protocols.channels.*; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListenableFuture; diff --git a/examples/src/main/java/com/google/bitcoin/examples/FetchBlock.java b/examples/src/main/java/org/bitcoinj/examples/FetchBlock.java similarity index 87% rename from examples/src/main/java/com/google/bitcoin/examples/FetchBlock.java rename to examples/src/main/java/org/bitcoinj/examples/FetchBlock.java index ecc71999..6552b92c 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/FetchBlock.java +++ b/examples/src/main/java/org/bitcoinj/examples/FetchBlock.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.*; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.utils.BriefLogFormatter; import java.net.InetAddress; import java.util.concurrent.Future; diff --git a/examples/src/main/java/com/google/bitcoin/examples/FetchTransactions.java b/examples/src/main/java/org/bitcoinj/examples/FetchTransactions.java similarity index 89% rename from examples/src/main/java/com/google/bitcoin/examples/FetchTransactions.java rename to examples/src/main/java/org/bitcoinj/examples/FetchTransactions.java index 65cf08e4..26064cf0 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/FetchTransactions.java +++ b/examples/src/main/java/org/bitcoinj/examples/FetchTransactions.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.*; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.util.concurrent.ListenableFuture; import java.net.InetAddress; diff --git a/examples/src/main/java/com/google/bitcoin/examples/ForwardingService.java b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java similarity index 94% rename from examples/src/main/java/com/google/bitcoin/examples/ForwardingService.java rename to examples/src/main/java/org/bitcoinj/examples/ForwardingService.java index d033f21b..4011c32c 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/ForwardingService.java +++ b/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.KeyCrypterException; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.KeyCrypterException; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.MoreExecutors; diff --git a/examples/src/main/java/com/google/bitcoin/examples/Kit.java b/examples/src/main/java/org/bitcoinj/examples/Kit.java similarity index 88% rename from examples/src/main/java/com/google/bitcoin/examples/Kit.java rename to examples/src/main/java/org/bitcoinj/examples/Kit.java index 464763a0..8482f684 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/Kit.java +++ b/examples/src/main/java/org/bitcoinj/examples/Kit.java @@ -1,19 +1,13 @@ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; + +import org.bitcoinj.core.*; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.script.Script; import java.io.File; import java.util.List; -import com.google.bitcoin.core.AbstractWalletEventListener; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.script.Script; - /** * The following example shows how to use the by bitcoinj provided WalletAppKit. * The WalletAppKit class wraps the boilerplate (Peers, BlockChain, BlockStorage, Wallet) needed to set up a new SPV bitcoinj app. @@ -36,7 +30,7 @@ public class Kit { NetworkParameters params = TestNet3Params.get(); // Now we initialize a new WalletAppKit. The kit handles all the boilerplate for us and is the easiest way to get everything up and running. - // Have a look at the WalletAppKit documentation and its source to understand what's happening behind the scenes: https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/com/google/bitcoin/kits/WalletAppKit.java + // Have a look at the WalletAppKit documentation and its source to understand what's happening behind the scenes: https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java WalletAppKit kit = new WalletAppKit(params, new File("."), "walletappkit-example"); // In case you want to connect with your local bitcoind tell the kit to connect to localhost. diff --git a/examples/src/main/java/com/google/bitcoin/examples/PeerMonitor.java b/examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java similarity index 96% rename from examples/src/main/java/com/google/bitcoin/examples/PeerMonitor.java rename to examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java index cb6fe884..82cd5229 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/PeerMonitor.java +++ b/examples/src/main/java/org/bitcoinj/examples/PeerMonitor.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.AbstractPeerEventListener; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Peer; -import com.google.bitcoin.core.PeerGroup; -import com.google.bitcoin.net.discovery.DnsDiscovery; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.AbstractPeerEventListener; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Peer; +import org.bitcoinj.core.PeerGroup; +import org.bitcoinj.net.discovery.DnsDiscovery; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.collect.Lists; import javax.swing.*; diff --git a/examples/src/main/java/com/google/bitcoin/examples/PrintPeers.java b/examples/src/main/java/org/bitcoinj/examples/PrintPeers.java similarity index 89% rename from examples/src/main/java/com/google/bitcoin/examples/PrintPeers.java rename to examples/src/main/java/org/bitcoinj/examples/PrintPeers.java index 678a4a71..23e6f1e3 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/PrintPeers.java +++ b/examples/src/main/java/org/bitcoinj/examples/PrintPeers.java @@ -14,18 +14,18 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.AbstractPeerEventListener; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Peer; -import com.google.bitcoin.core.PeerAddress; -import com.google.bitcoin.core.VersionMessage; -import com.google.bitcoin.net.discovery.DnsDiscovery; -import com.google.bitcoin.net.discovery.PeerDiscoveryException; -import com.google.bitcoin.net.NioClientManager; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.AbstractPeerEventListener; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Peer; +import org.bitcoinj.core.PeerAddress; +import org.bitcoinj.core.VersionMessage; +import org.bitcoinj.net.discovery.DnsDiscovery; +import org.bitcoinj.net.discovery.PeerDiscoveryException; +import org.bitcoinj.net.NioClientManager; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.utils.BriefLogFormatter; import com.google.common.collect.Lists; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; diff --git a/examples/src/main/java/com/google/bitcoin/examples/PrivateKeys.java b/examples/src/main/java/org/bitcoinj/examples/PrivateKeys.java similarity index 95% rename from examples/src/main/java/com/google/bitcoin/examples/PrivateKeys.java rename to examples/src/main/java/org/bitcoinj/examples/PrivateKeys.java index 4fee31c2..b4d65725 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/PrivateKeys.java +++ b/examples/src/main/java/org/bitcoinj/examples/PrivateKeys.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.store.MemoryBlockStore; +import org.bitcoinj.core.*; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.store.MemoryBlockStore; import java.math.BigInteger; import java.net.InetAddress; diff --git a/examples/src/main/java/com/google/bitcoin/examples/RefreshWallet.java b/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java similarity index 90% rename from examples/src/main/java/com/google/bitcoin/examples/RefreshWallet.java rename to examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java index 806a4817..888042b6 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/RefreshWallet.java +++ b/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; +import org.bitcoinj.core.*; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; import java.io.File; import java.net.InetAddress; diff --git a/examples/src/main/java/com/google/bitcoin/examples/RestoreFromSeed.java b/examples/src/main/java/org/bitcoinj/examples/RestoreFromSeed.java similarity index 92% rename from examples/src/main/java/com/google/bitcoin/examples/RestoreFromSeed.java rename to examples/src/main/java/org/bitcoinj/examples/RestoreFromSeed.java index 01ef8652..00f44b52 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/RestoreFromSeed.java +++ b/examples/src/main/java/org/bitcoinj/examples/RestoreFromSeed.java @@ -1,10 +1,10 @@ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import com.google.bitcoin.core.*; -import com.google.bitcoin.net.discovery.DnsDiscovery; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.store.SPVBlockStore; -import com.google.bitcoin.wallet.DeterministicSeed; +import org.bitcoinj.core.*; +import org.bitcoinj.net.discovery.DnsDiscovery; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.store.SPVBlockStore; +import org.bitcoinj.wallet.DeterministicSeed; import java.io.File; diff --git a/examples/src/main/java/com/google/bitcoin/examples/SendRequest.java b/examples/src/main/java/org/bitcoinj/examples/SendRequest.java similarity index 90% rename from examples/src/main/java/com/google/bitcoin/examples/SendRequest.java rename to examples/src/main/java/org/bitcoinj/examples/SendRequest.java index a2fdd7a5..7e7a9c87 100644 --- a/examples/src/main/java/com/google/bitcoin/examples/SendRequest.java +++ b/examples/src/main/java/org/bitcoinj/examples/SendRequest.java @@ -1,18 +1,14 @@ -package com.google.bitcoin.examples; +package org.bitcoinj.examples; -import java.io.File; - -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.core.Wallet.BalanceType; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.TestNet3Params; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import org.bitcoinj.core.*; +import org.bitcoinj.core.Wallet.BalanceType; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.TestNet3Params; + +import java.io.File; /** * The following example shows you how to create a SendRequest to send coins from a wallet to a given address. diff --git a/examples/src/main/python/forwarding.py b/examples/src/main/python/forwarding.py index 2d0bfb7b..09bc2c65 100644 --- a/examples/src/main/python/forwarding.py +++ b/examples/src/main/python/forwarding.py @@ -16,11 +16,11 @@ my_address_text = "mzEjmna15T7DXj4HC9MBEG2UJzgFfEYtFo" # if it has a confirmed balance in it, then you can set it to 0. confirm_wait = 1 -from com.google.bitcoin.core import * +from org.bitcoinj.core import * -import com.google.bitcoin.crypto.KeyCrypterException -import com.google.bitcoin.params.MainNetParams -from com.google.bitcoin.kits import WalletAppKit +import org.bitcoinj.crypto.KeyCrypterException +import org.bitcoinj.params.MainNetParams +from org.bitcoinj.kits import WalletAppKit from com.google.common.util.concurrent import FutureCallback from com.google.common.util.concurrent import Futures diff --git a/pom.xml b/pom.xml index f7be5706..d16faa4a 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google + org.bitcoinj bitcoinj-parent 0.12-SNAPSHOT pom diff --git a/tools/pom.xml b/tools/pom.xml index b3876ca1..aa01f695 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -19,7 +19,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - com.google + org.bitcoinj bitcoinj-parent 0.12-SNAPSHOT @@ -54,7 +54,7 @@ - com.google.bitcoin.tools.WalletTool + org.bitcoinj.tools.WalletTool target/wallet-tool.jar @@ -74,8 +74,8 @@ - com.google - bitcoinj + org.bitcoinj + bitcoinj-core ${project.parent.version} diff --git a/tools/src/main/java/com/google/bitcoin/tools/BlockImporter.java b/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java similarity index 86% rename from tools/src/main/java/com/google/bitcoin/tools/BlockImporter.java rename to tools/src/main/java/org/bitcoinj/tools/BlockImporter.java index d02bc5ed..afea82b8 100644 --- a/tools/src/main/java/com/google/bitcoin/tools/BlockImporter.java +++ b/tools/src/main/java/org/bitcoinj/tools/BlockImporter.java @@ -1,15 +1,15 @@ -package com.google.bitcoin.tools; +package org.bitcoinj.tools; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.store.*; -import com.google.bitcoin.utils.BlockFileLoader; +import org.bitcoinj.core.*; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.store.*; +import org.bitcoinj.utils.BlockFileLoader; import com.google.common.base.Preconditions; import java.io.File; -/** Very thin wrapper around {@link com.google.bitcoin.utils.BlockFileLoader} */ +/** Very thin wrapper around {@link org.bitcoinj.utils.BlockFileLoader} */ public class BlockImporter { public static void main(String[] args) throws BlockStoreException, VerificationException, PrunedException { System.out.println("USAGE: BlockImporter (prod|test) (H2|Disk|MemFull|Mem|SPV) [blockStore]"); diff --git a/tools/src/main/java/com/google/bitcoin/tools/BuildCheckpoints.java b/tools/src/main/java/org/bitcoinj/tools/BuildCheckpoints.java similarity index 95% rename from tools/src/main/java/com/google/bitcoin/tools/BuildCheckpoints.java rename to tools/src/main/java/org/bitcoinj/tools/BuildCheckpoints.java index 90924222..b95e5774 100644 --- a/tools/src/main/java/com/google/bitcoin/tools/BuildCheckpoints.java +++ b/tools/src/main/java/org/bitcoinj/tools/BuildCheckpoints.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package com.google.bitcoin.tools; +package org.bitcoinj.tools; -import com.google.bitcoin.core.*; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.store.BlockStore; -import com.google.bitcoin.store.MemoryBlockStore; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.*; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.store.BlockStore; +import org.bitcoinj.store.MemoryBlockStore; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; import com.google.common.base.Charsets; import java.io.DataOutputStream; diff --git a/tools/src/main/java/com/google/bitcoin/tools/PaymentProtocolTool.java b/tools/src/main/java/org/bitcoinj/tools/PaymentProtocolTool.java similarity index 92% rename from tools/src/main/java/com/google/bitcoin/tools/PaymentProtocolTool.java rename to tools/src/main/java/org/bitcoinj/tools/PaymentProtocolTool.java index cdd95b42..0bbb9a6c 100644 --- a/tools/src/main/java/com/google/bitcoin/tools/PaymentProtocolTool.java +++ b/tools/src/main/java/org/bitcoinj/tools/PaymentProtocolTool.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.bitcoin.tools; +package org.bitcoinj.tools; -import com.google.bitcoin.crypto.TrustStoreLoader; -import com.google.bitcoin.protocols.payments.PaymentProtocol; -import com.google.bitcoin.protocols.payments.PaymentProtocolException; -import com.google.bitcoin.protocols.payments.PaymentSession; -import com.google.bitcoin.uri.BitcoinURI; -import com.google.bitcoin.uri.BitcoinURIParseException; +import org.bitcoinj.crypto.TrustStoreLoader; +import org.bitcoinj.protocols.payments.PaymentProtocol; +import org.bitcoinj.protocols.payments.PaymentProtocolException; +import org.bitcoinj.protocols.payments.PaymentSession; +import org.bitcoinj.uri.BitcoinURI; +import org.bitcoinj.uri.BitcoinURIParseException; import org.bitcoin.protocols.payments.Protos; import java.io.FileInputStream; diff --git a/tools/src/main/java/com/google/bitcoin/tools/TestFeeLevel.java b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java similarity index 91% rename from tools/src/main/java/com/google/bitcoin/tools/TestFeeLevel.java rename to tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java index 790e30f5..10d6e6fa 100644 --- a/tools/src/main/java/com/google/bitcoin/tools/TestFeeLevel.java +++ b/tools/src/main/java/org/bitcoinj/tools/TestFeeLevel.java @@ -1,9 +1,9 @@ -package com.google.bitcoin.tools; +package org.bitcoinj.tools; -import com.google.bitcoin.core.*; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.*; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.utils.BriefLogFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tools/src/main/java/com/google/bitcoin/tools/WalletTool.java b/tools/src/main/java/org/bitcoinj/tools/WalletTool.java similarity index 97% rename from tools/src/main/java/com/google/bitcoin/tools/WalletTool.java rename to tools/src/main/java/org/bitcoinj/tools/WalletTool.java index f0a082cc..c255c7c4 100644 --- a/tools/src/main/java/com/google/bitcoin/tools/WalletTool.java +++ b/tools/src/main/java/org/bitcoinj/tools/WalletTool.java @@ -15,27 +15,27 @@ * limitations under the License. */ -package com.google.bitcoin.tools; +package org.bitcoinj.tools; -import com.google.bitcoin.core.*; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.crypto.KeyCrypterException; -import com.google.bitcoin.crypto.MnemonicCode; -import com.google.bitcoin.crypto.MnemonicException; -import com.google.bitcoin.net.discovery.DnsDiscovery; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.protocols.payments.PaymentProtocol; -import com.google.bitcoin.protocols.payments.PaymentProtocolException; -import com.google.bitcoin.protocols.payments.PaymentSession; -import com.google.bitcoin.store.*; -import com.google.bitcoin.uri.BitcoinURI; -import com.google.bitcoin.uri.BitcoinURIParseException; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.wallet.DeterministicSeed; -import com.google.bitcoin.wallet.DeterministicUpgradeRequiredException; -import com.google.bitcoin.wallet.DeterministicUpgradeRequiresPassword; +import org.bitcoinj.core.*; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.crypto.KeyCrypterException; +import org.bitcoinj.crypto.MnemonicCode; +import org.bitcoinj.crypto.MnemonicException; +import org.bitcoinj.net.discovery.DnsDiscovery; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.protocols.payments.PaymentProtocol; +import org.bitcoinj.protocols.payments.PaymentProtocolException; +import org.bitcoinj.protocols.payments.PaymentSession; +import org.bitcoinj.store.*; +import org.bitcoinj.uri.BitcoinURI; +import org.bitcoinj.uri.BitcoinURIParseException; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.wallet.DeterministicSeed; +import org.bitcoinj.wallet.DeterministicUpgradeRequiredException; +import org.bitcoinj.wallet.DeterministicUpgradeRequiresPassword; import com.google.common.base.Charsets; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; @@ -69,7 +69,7 @@ import java.util.concurrent.TimeoutException; import java.util.logging.Level; import java.util.logging.LogManager; -import static com.google.bitcoin.core.Coin.parseCoin; +import static org.bitcoinj.core.Coin.parseCoin; import static com.google.common.base.Preconditions.checkNotNull; /** diff --git a/tools/src/main/java/com/google/bitcoin/tools/WatchMempool.java b/tools/src/main/java/org/bitcoinj/tools/WatchMempool.java similarity index 87% rename from tools/src/main/java/com/google/bitcoin/tools/WatchMempool.java rename to tools/src/main/java/org/bitcoinj/tools/WatchMempool.java index bbbc1e1d..0e14f65b 100644 --- a/tools/src/main/java/com/google/bitcoin/tools/WatchMempool.java +++ b/tools/src/main/java/org/bitcoinj/tools/WatchMempool.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package com.google.bitcoin.tools; +package org.bitcoinj.tools; -import com.google.bitcoin.core.*; -import com.google.bitcoin.net.discovery.DnsDiscovery; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.utils.BriefLogFormatter; +import org.bitcoinj.core.*; +import org.bitcoinj.net.discovery.DnsDiscovery; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.utils.BriefLogFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tools/src/main/resources/com/google/bitcoin/tools/wallet-tool-help.txt b/tools/src/main/resources/org/bitcoinj/tools/wallet-tool-help.txt similarity index 100% rename from tools/src/main/resources/com/google/bitcoin/tools/wallet-tool-help.txt rename to tools/src/main/resources/org/bitcoinj/tools/wallet-tool-help.txt diff --git a/wallettemplate/pom.xml b/wallettemplate/pom.xml index b0c89709..21263b40 100644 --- a/wallettemplate/pom.xml +++ b/wallettemplate/pom.xml @@ -54,8 +54,8 @@ - com.google - bitcoinj + org.bitcoinj + bitcoinj-core 0.12-SNAPSHOT diff --git a/wallettemplate/src/main/java/wallettemplate/Main.java b/wallettemplate/src/main/java/wallettemplate/Main.java index c8961cc3..73a978bf 100644 --- a/wallettemplate/src/main/java/wallettemplate/Main.java +++ b/wallettemplate/src/main/java/wallettemplate/Main.java @@ -1,13 +1,13 @@ package wallettemplate; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.params.TestNet3Params; -import com.google.bitcoin.utils.BriefLogFormatter; -import com.google.bitcoin.utils.Threading; -import com.google.bitcoin.wallet.DeterministicSeed; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.params.TestNet3Params; +import org.bitcoinj.utils.BriefLogFormatter; +import org.bitcoinj.utils.Threading; +import org.bitcoinj.wallet.DeterministicSeed; import javafx.application.Application; import javafx.application.Platform; import javafx.fxml.FXMLLoader; diff --git a/wallettemplate/src/main/java/wallettemplate/MainController.java b/wallettemplate/src/main/java/wallettemplate/MainController.java index d2549c67..50a908ee 100644 --- a/wallettemplate/src/main/java/wallettemplate/MainController.java +++ b/wallettemplate/src/main/java/wallettemplate/MainController.java @@ -1,8 +1,8 @@ package wallettemplate; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.DownloadListener; -import com.google.bitcoin.utils.MonetaryFormat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.DownloadListener; +import org.bitcoinj.utils.MonetaryFormat; import com.subgraph.orchid.TorClient; import com.subgraph.orchid.TorInitializationListener; import javafx.animation.FadeTransition; diff --git a/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java b/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java index daea552c..613f2d7c 100644 --- a/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java +++ b/wallettemplate/src/main/java/wallettemplate/SendMoneyController.java @@ -1,6 +1,6 @@ package wallettemplate; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import javafx.event.ActionEvent; diff --git a/wallettemplate/src/main/java/wallettemplate/WalletPasswordController.java b/wallettemplate/src/main/java/wallettemplate/WalletPasswordController.java index 987cec36..359f3ba2 100644 --- a/wallettemplate/src/main/java/wallettemplate/WalletPasswordController.java +++ b/wallettemplate/src/main/java/wallettemplate/WalletPasswordController.java @@ -1,6 +1,6 @@ package wallettemplate; -import com.google.bitcoin.crypto.KeyCrypterScrypt; +import org.bitcoinj.crypto.KeyCrypterScrypt; import com.google.common.primitives.Longs; import com.google.protobuf.ByteString; import javafx.beans.property.ReadOnlyObjectProperty; diff --git a/wallettemplate/src/main/java/wallettemplate/WalletSetPasswordController.java b/wallettemplate/src/main/java/wallettemplate/WalletSetPasswordController.java index 61410a30..e47562c4 100644 --- a/wallettemplate/src/main/java/wallettemplate/WalletSetPasswordController.java +++ b/wallettemplate/src/main/java/wallettemplate/WalletSetPasswordController.java @@ -1,6 +1,6 @@ package wallettemplate; -import com.google.bitcoin.crypto.KeyCrypterScrypt; +import org.bitcoinj.crypto.KeyCrypterScrypt; import javafx.event.ActionEvent; import javafx.scene.control.Button; import javafx.scene.control.Label; diff --git a/wallettemplate/src/main/java/wallettemplate/WalletSettingsController.java b/wallettemplate/src/main/java/wallettemplate/WalletSettingsController.java index 49d5100a..3fe66472 100644 --- a/wallettemplate/src/main/java/wallettemplate/WalletSettingsController.java +++ b/wallettemplate/src/main/java/wallettemplate/WalletSettingsController.java @@ -1,7 +1,7 @@ package wallettemplate; -import com.google.bitcoin.crypto.MnemonicCode; -import com.google.bitcoin.wallet.DeterministicSeed; +import org.bitcoinj.crypto.MnemonicCode; +import org.bitcoinj.wallet.DeterministicSeed; import com.google.common.base.Joiner; import com.google.common.base.Splitter; import com.google.common.util.concurrent.Service; diff --git a/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java b/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java index 486ec199..d111d6ed 100644 --- a/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java +++ b/wallettemplate/src/main/java/wallettemplate/controls/BitcoinAddressValidator.java @@ -1,8 +1,8 @@ package wallettemplate.controls; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.NetworkParameters; import javafx.scene.Node; import javafx.scene.control.TextField; import wallettemplate.utils.TextFieldValidator; diff --git a/wallettemplate/src/main/java/wallettemplate/controls/ClickableBitcoinAddress.java b/wallettemplate/src/main/java/wallettemplate/controls/ClickableBitcoinAddress.java index ccd28f2d..c0e5b702 100644 --- a/wallettemplate/src/main/java/wallettemplate/controls/ClickableBitcoinAddress.java +++ b/wallettemplate/src/main/java/wallettemplate/controls/ClickableBitcoinAddress.java @@ -1,7 +1,7 @@ package wallettemplate.controls; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.uri.BitcoinURI; +import org.bitcoinj.core.Address; +import org.bitcoinj.uri.BitcoinURI; import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; import javafx.beans.binding.StringExpression; diff --git a/wallettemplate/src/main/java/wallettemplate/utils/BitcoinUIModel.java b/wallettemplate/src/main/java/wallettemplate/utils/BitcoinUIModel.java index 648be6f8..2145fe27 100644 --- a/wallettemplate/src/main/java/wallettemplate/utils/BitcoinUIModel.java +++ b/wallettemplate/src/main/java/wallettemplate/utils/BitcoinUIModel.java @@ -1,6 +1,6 @@ package wallettemplate.utils; -import com.google.bitcoin.core.*; +import org.bitcoinj.core.*; import javafx.application.Platform; import javafx.beans.property.ReadOnlyDoubleProperty; import javafx.beans.property.ReadOnlyObjectProperty; diff --git a/wallettemplate/src/main/java/wallettemplate/utils/KeyDerivationTasks.java b/wallettemplate/src/main/java/wallettemplate/utils/KeyDerivationTasks.java index 19e4ee99..f6b4d08c 100644 --- a/wallettemplate/src/main/java/wallettemplate/utils/KeyDerivationTasks.java +++ b/wallettemplate/src/main/java/wallettemplate/utils/KeyDerivationTasks.java @@ -1,6 +1,6 @@ package wallettemplate.utils; -import com.google.bitcoin.crypto.KeyCrypterScrypt; +import org.bitcoinj.crypto.KeyCrypterScrypt; import com.google.common.util.concurrent.Uninterruptibles; import javafx.beans.property.ReadOnlyDoubleProperty; import javafx.concurrent.Task;