From 0a6f901b23524af1ee178174a35d06de3d0e29fd Mon Sep 17 00:00:00 2001
From: Mike Hearn 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.
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 ListAlternatively, 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 ListenableFutureAn 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.Listrepeated .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 extends com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
+ java.util.List extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
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.ArrayListrepeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
- public java.util.Listrepeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
- public java.util.List extends com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
+ public java.util.List extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
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.Builderrepeated .paymentchannels.StoredClientPaymentChannel channels = 1;
*/
- public java.util.Listrepeated .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 extends com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannel> values) {
+ java.lang.Iterable extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel> 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 extends com.google.bitcoin.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
+ public java.util.List extends org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannelOrBuilder>
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
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}.
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.Listrepeated .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 extends com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>
+ java.util.List extends org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>
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.ArrayListrepeated .paymentchannels.StoredServerPaymentChannel channels = 1;
*/
- public java.util.Listrepeated .paymentchannels.StoredServerPaymentChannel channels = 1;
*/
- public java.util.List extends com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>
+ public java.util.List extends org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>
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.Builderrepeated .paymentchannels.StoredServerPaymentChannel channels = 1;
*/
- public java.util.Listrepeated .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 extends com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannel> values) {
+ java.lang.Iterable extends org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannel> 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 extends com.google.bitcoin.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>
+ public java.util.List extends org.bitcoinj.protocols.channels.ServerState.StoredServerPaymentChannelOrBuilder>
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.ListTools 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 LinkedHashMapA 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 BlockingQueueException 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; *
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 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)}.
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.
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