| Package | Description | 
|---|---|
| org.bitcoinj.core | The core package contains classes for network messages like  BlockandTransaction, peer connectivity viaPeerGroup,
 and block chain management. | 
| org.bitcoinj.core.listeners | |
| org.bitcoinj.jni | |
| org.bitcoinj.params | Network parameters encapsulate some of the differences between different Bitcoin networks such as the main
 network, the testnet, regtest mode, unit testing params and so on. | 
| org.bitcoinj.utils | Formatting monetary amounts, representing exchange rates, a program for loading Bitcoin Core saved block files,
 a class to control how bitcoinj uses threads and misc other utility classes that don't fit anywhere else. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Block | NetworkParameters. genesisBlock | 
| Modifier and Type | Method and Description | 
|---|---|
| Block | Block. cloneAsHeader()Returns a copy of the block, but without any transactions. | 
| Block | Block. createNextBlock(Address to) | 
| Block | Block. createNextBlock(Address to,
               Coin value) | 
| Block | Block. createNextBlock(Address to,
               long version,
               long time,
               int blockHeight)Returns a solved block that builds on top of this one. | 
| Block | Block. createNextBlock(Address to,
               TransactionOutPoint prevOut) | 
| Block | Block. createNextBlockWithCoinbase(long version,
                           byte[] pubKey,
                           Coin coinbaseValue,
                           int height) | 
| Block | FilteredBlock. getBlockHeader()Gets a copy of the block header | 
| Block | NetworkParameters. getGenesisBlock()Genesis block for this chain. | 
| Block | StoredBlock. getHeader()The block header this object wraps. | 
| Block | AbstractBlockChain. getOrphanRoot(Sha256Hash from)An orphan block is one that does not connect to the chain anywhere (ie we can't find its parent, therefore
 it's an orphan). | 
| Block | MessageSerializer. makeBlock(byte[] payloadBytes)Make a block from the payload, using an offset of zero and the payload
 length as block length. | 
| Block | MessageSerializer. makeBlock(byte[] payloadBytes,
         int length)Make a block from the payload, using an offset of zero and the provided
 length as block length. | 
| abstract Block | MessageSerializer. makeBlock(byte[] payloadBytes,
         int offset,
         int length)Make a block from the payload, using an offset of zero and the provided
 length as block length. | 
| Block | BitcoinSerializer. makeBlock(byte[] payloadBytes,
         int offset,
         int length)Make a block from the payload. | 
| Modifier and Type | Method and Description | 
|---|---|
| com.google.common.util.concurrent.ListenableFuture<Block> | Peer. getBlock(Sha256Hash blockHash)Asks the connected peer for the block of the given hash, and returns a future representing the answer. | 
| List<Block> | HeadersMessage. getBlockHeaders() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | AbstractBlockChain. add(Block block)Processes a received block and tries to add it to the chain. | 
| void | InventoryMessage. addBlock(Block block) | 
| protected StoredBlock | BlockChain. addToBlockStore(StoredBlock storedPrev,
               Block blockHeader) | 
| protected abstract StoredBlock | AbstractBlockChain. addToBlockStore(StoredBlock storedPrev,
               Block block)Adds/updates the given  Blockwith the block store. | 
| protected StoredBlock | FullPrunedBlockChain. addToBlockStore(StoredBlock storedPrev,
               Block block) | 
| protected StoredBlock | BlockChain. addToBlockStore(StoredBlock storedPrev,
               Block blockHeader,
               TransactionOutputChanges txOutChanges) | 
| protected abstract StoredBlock | AbstractBlockChain. addToBlockStore(StoredBlock storedPrev,
               Block header,
               TransactionOutputChanges txOutputChanges)Adds/updates the given  StoredBlockwith the block store. | 
| protected StoredBlock | FullPrunedBlockChain. addToBlockStore(StoredBlock storedPrev,
               Block header,
               TransactionOutputChanges txOutChanges) | 
| FilteredBlock | BloomFilter. applyAndUpdate(Block block)Creates a new FilteredBlock from the given Block, using this filter to select transactions. | 
| StoredBlock | StoredBlock. build(Block block)Creates a new StoredBlock, calculating the additional fields by adding to the values in this block. | 
| abstract void | NetworkParameters. checkDifficultyTransitions(StoredBlock storedPrev,
                          Block next,
                          BlockStore blockStore)Throws an exception if the block's difficulty is not correct. | 
| protected TransactionOutputChanges | BlockChain. connectTransactions(int height,
                   Block block) | 
| protected abstract TransactionOutputChanges | AbstractBlockChain. connectTransactions(int height,
                   Block block)Connect each transaction in block.transactions, verifying them as we go and removing spent outputs
 If an error is encountered in a transaction, no changes should be made to the underlying BlockStore. | 
| protected TransactionOutputChanges | FullPrunedBlockChain. connectTransactions(int height,
                   Block block) | 
| protected void | Block. copyBitcoinHeaderTo(Block block)Copy the block without transactions into the provided empty block. | 
| EnumSet<Block.VerifyFlag> | NetworkParameters. getBlockVerificationFlags(Block block,
                         VersionTally tally,
                         Integer height)The flags indicating which block validation tests should be applied to
 the given block. | 
| EnumSet<Script.VerifyFlag> | NetworkParameters. getTransactionVerificationFlags(Block block,
                               Transaction transaction,
                               VersionTally tally,
                               Integer height)The flags indicating which script validation tests should be applied to
 the given transaction. | 
| protected void | Peer. processBlock(Block m) | 
| Constructor and Description | 
|---|
| FilteredBlock(NetworkParameters params,
             Block header,
             PartialMerkleTree pmt) | 
| HeadersMessage(NetworkParameters params,
              Block... headers) | 
| StoredBlock(Block header,
           BigInteger chainWork,
           int height) | 
| Constructor and Description | 
|---|
| HeadersMessage(NetworkParameters params,
              List<Block> headers) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | AbstractPeerEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft)Deprecated.  | 
| void | DownloadProgressTracker. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft) | 
| void | AbstractPeerDataEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft)Deprecated.  | 
| void | BlocksDownloadedEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft)Called on a Peer thread when a block is received. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | NativePeerEventListener. onBlocksDownloaded(Peer peer,
                  Block block,
                  FilteredBlock filteredBlock,
                  int blocksLeft) | 
| Modifier and Type | Method and Description | 
|---|---|
| Block | RegTestParams. getGenesisBlock() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | TestNet3Params. checkDifficultyTransitions(StoredBlock storedPrev,
                          Block nextBlock,
                          BlockStore blockStore) | 
| void | AbstractBitcoinNetParams. checkDifficultyTransitions(StoredBlock storedPrev,
                          Block nextBlock,
                          BlockStore blockStore) | 
| Modifier and Type | Method and Description | 
|---|---|
| Block | BlockFileLoader. next() | 
| Modifier and Type | Method and Description | 
|---|---|
| Iterator<Block> | BlockFileLoader. iterator() | 
Copyright © 2018. All rights reserved.