| Package | Description | 
|---|---|
| org.bitcoinj.core | The core package contains classes for network messages like  BlockandTransaction, peer connectivity viaPeerGroup,
 block chain management and theWalletclass. | 
| org.bitcoinj.crypto | The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys),
 BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general
 cryptography tasks. | 
| 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.protocols.channels | Micropayment channels allow for rapid tiny payments to be made to a third party once a channel has been set up, using
 some of the advanced features of the Bitcoin protocol. | 
| org.bitcoinj.protocols.payments | The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses
 and authentication. | 
| org.bitcoinj.testing | Various utilities for writing unit tests: also useful for testing your own code and apps that build on top of
 bitcoinj. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | ProtocolException | 
| class  | ScriptException | 
| static class  | VerificationException.CoinbaseScriptSizeOutOfRange | 
| static class  | VerificationException.DuplicatedOutPoint | 
| static class  | VerificationException.EmptyInputsOrOutputs | 
| static class  | VerificationException.ExcessiveValue | 
| static class  | VerificationException.LargerThanMaxBlockSize | 
| static class  | VerificationException.NegativeValueOutput | 
| static class  | VerificationException.UnexpectedCoinbaseInput | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | AbstractBlockChain. add(Block block)Processes a received block and tries to add it to the chain. | 
| boolean | BlockChain. add(FilteredBlock block) | 
| boolean | AbstractBlockChain. add(FilteredBlock block)Processes a received block and tries to add it to the chain. | 
| protected StoredBlock | FullPrunedBlockChain. addToBlockStore(StoredBlock storedPrev,
               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 header,
               TransactionOutputChanges txOutChanges) | 
| 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. | 
| 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 boolean | Block. checkProofOfWork(boolean throwException)Returns true if the hash of the block is OK (lower than difficulty target). | 
| void | Wallet. commitTx(Transaction tx)Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs
 the onCoinsSent/onCoinsReceived event listener. | 
| protected TransactionOutputChanges | FullPrunedBlockChain. 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(StoredBlock newBlock) | 
| protected abstract TransactionOutputChanges | AbstractBlockChain. connectTransactions(StoredBlock newBlock)Load newBlock from BlockStore and connect its transactions, returning changes to the set of unspent transactions. | 
| BigInteger | Block. getDifficultyTargetAsInteger()Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash. | 
| List<Sha256Hash> | FilteredBlock. getTransactionHashes()Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block | 
| Sha256Hash | PartialMerkleTree. getTxnHashAndMerkleRoot(List<Sha256Hash> matchedHashesOut)Extracts tx hashes that are in this merkle tree
 and returns the merkle root of this tree. | 
| BigInteger | Block. getWork()Returns the work represented by this block. | 
| boolean | Wallet. maybeCommitTx(Transaction tx)Calls  Wallet.commitTx(org.bitcoinj.core.Transaction)if tx is not already in the pending pool | 
| void | Wallet. notifyNewBestBlock(StoredBlock block)Called by the  BlockChainwhen a new block on the best chain is seen, AFTER relevant wallet
 transactions are extracted and sent to us UNLESS the new block caused a re-org, in which case this will
 not be called (theWallet.reorganize(StoredBlock, java.util.List, java.util.List)method will
 call this one in that case). | 
| void | BlockChainListener. notifyNewBestBlock(StoredBlock block)Called when a new block on the best chain is seen, after relevant transactions are extracted and sent to
 us via either  #receiveFromBlock(Transaction, StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int)or#notifyTransactionIsInBlock(Sha256Hash, StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int). | 
| void | AbstractBlockChainListener. notifyNewBestBlock(StoredBlock block) | 
| boolean | Wallet. notifyTransactionIsInBlock(Sha256Hash txHash,
                          StoredBlock block,
                          AbstractBlockChain.NewBlockType blockType,
                          int relativityOffset)Called by the  BlockChainwhen we receive a new filtered block that contains a transactions previously
 received by a call toWallet.receivePending(org.bitcoinj.core.Transaction, java.util.List<org.bitcoinj.core.Transaction>, boolean). | 
| boolean | BlockChainListener. notifyTransactionIsInBlock(Sha256Hash txHash,
                          StoredBlock block,
                          AbstractBlockChain.NewBlockType blockType,
                          int relativityOffset)Called by the  BlockChainwhen we receive a newFilteredBlockthat contains the given
 transaction hash in its merkle tree. | 
| boolean | AbstractBlockChainListener. notifyTransactionIsInBlock(Sha256Hash txHash,
                          StoredBlock block,
                          AbstractBlockChain.NewBlockType blockType,
                          int relativityOffset) | 
| boolean | FilteredBlock. provideTransaction(Transaction tx)Provide this FilteredBlock with a transaction which is in its Merkle tree. | 
| void | Wallet. receiveFromBlock(Transaction tx,
                StoredBlock block,
                AbstractBlockChain.NewBlockType blockType,
                int relativityOffset)Called by the  BlockChainwhen we receive a new block that sends coins to one of our addresses or
 spends coins from one of our addresses (note that a single transaction can do both). | 
| void | BlockChainListener. receiveFromBlock(Transaction tx,
                StoredBlock block,
                AbstractBlockChain.NewBlockType blockType,
                int relativityOffset)Called by the  BlockChainwhen we receive a new block that contains a relevant transaction. | 
| void | AbstractBlockChainListener. receiveFromBlock(Transaction tx,
                StoredBlock block,
                AbstractBlockChain.NewBlockType blockType,
                int relativityOffset) | 
| void | Wallet. receivePending(Transaction tx,
              List<Transaction> dependencies)Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
 and want to record it. | 
| void | Wallet. receivePending(Transaction tx,
              List<Transaction> dependencies,
              boolean overrideIsRelevant)Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
 and want to record it. | 
| void | Wallet. reorganize(StoredBlock splitPoint,
          List<StoredBlock> oldBlocks,
          List<StoredBlock> newBlocks)Don't call this directly. | 
| void | BlockChainListener. reorganize(StoredBlock splitPoint,
          List<StoredBlock> oldBlocks,
          List<StoredBlock> newBlocks)Called by the  BlockChainwhen the best chain (representing total work done) has changed. | 
| void | AbstractBlockChainListener. reorganize(StoredBlock splitPoint,
          List<StoredBlock> oldBlocks,
          List<StoredBlock> newBlocks) | 
| void | TransactionInput. verify()For a connected transaction, runs the script against the connected pubkey and verifies they are correct. | 
| void | Transaction. verify()Checks the transaction contents for sanity, in ways that can be done in a standalone manner. | 
| void | Block. verify()Verifies both the header and that the transactions hash to the merkle root. | 
| void | TransactionInput. verify(TransactionOutput output)Verifies that this input can spend the given output. | 
| void | Block. verifyHeader()Checks the block data to ensure it follows the rules laid out in the network parameters. | 
| void | Block. verifyTransactions()Checks the block contents | 
| Modifier and Type | Method and Description | 
|---|---|
| static TransactionSignature | TransactionSignature. decodeFromBitcoin(byte[] bytes,
                 boolean requireCanonical)Returns a decoded signature. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | NativeBlockChainListener. notifyNewBestBlock(StoredBlock block) | 
| boolean | NativeBlockChainListener. notifyTransactionIsInBlock(Sha256Hash txHash,
                          StoredBlock block,
                          AbstractBlockChain.NewBlockType blockType,
                          int relativityOffset) | 
| void | NativeBlockChainListener. receiveFromBlock(Transaction tx,
                StoredBlock block,
                AbstractBlockChain.NewBlockType blockType,
                int relativityOffset) | 
| void | NativeBlockChainListener. reorganize(StoredBlock splitPoint,
          List<StoredBlock> oldBlocks,
          List<StoredBlock> newBlocks) | 
| 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 | 
|---|---|
| PaymentChannelServerState | StoredServerChannel. getOrCreateState(Wallet wallet,
                TransactionBroadcaster broadcaster)Gets the canonical  PaymentChannelServerStateobject for this channel, either by returning an existing one
 or by creating a new one. | 
| boolean | PaymentChannelServerState. incrementPayment(Coin refundSize,
                byte[] signatureBytes)Called when the client provides us with a new signature and wishes to increment total payment by size. | 
| com.google.common.util.concurrent.ListenableFuture<PaymentChannelServerState> | PaymentChannelServerState. provideMultiSigContract(Transaction multisigContract)Called when the client provides the multi-sig contract. | 
| void | PaymentChannelClientState. provideRefundSignature(byte[] theirSignature,
                      org.spongycastle.crypto.params.KeyParameter userKey)When the servers signature for the refund transaction is received, call this to verify it and sign the
 complete refund ourselves. | 
| byte[] | PaymentChannelServerState. provideRefundTransaction(Transaction refundTx,
                        byte[] clientMultiSigPubKey)Called when the client provides the refund transaction. | 
| Constructor and Description | 
|---|
| PaymentChannelClientState(Wallet wallet,
                         ECKey myKey,
                         ECKey serverMultisigKey,
                         Coin value,
                         long expiryTimeInSeconds)Creates a state object for a payment channel client. | 
| Modifier and Type | Method and Description | 
|---|---|
| com.google.common.util.concurrent.ListenableFuture<PaymentProtocol.Ack> | PaymentSession. sendPayment(List<Transaction> txns,
           Address refundAddr,
           String memo)Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Transaction | TestWithWallet. sendMoneyToWallet(Coin value,
                 AbstractBlockChain.NewBlockType type) | 
| protected Transaction | TestWithWallet. sendMoneyToWallet(Transaction tx,
                 AbstractBlockChain.NewBlockType type) | 
| protected Transaction | TestWithWallet. sendMoneyToWallet(Wallet wallet,
                 Coin value,
                 Address toAddress,
                 AbstractBlockChain.NewBlockType type) | 
| protected Transaction | TestWithWallet. sendMoneyToWallet(Wallet wallet,
                 Coin value,
                 ECKey toPubKey,
                 AbstractBlockChain.NewBlockType type) | 
| protected Transaction | TestWithWallet. sendMoneyToWallet(Wallet wallet,
                 Transaction tx,
                 AbstractBlockChain.NewBlockType type) | 
Copyright © 2015. All rights reserved.