A B C D E F G H I J K L M N O P R S T U V W

A

add(Block) - Method in class com.google.bitcoin.core.BlockChain
Processes a received block and tries to add it to the chain.
addEventListener(WalletEventListener) - Method in class com.google.bitcoin.core.Wallet
Adds an event listener object.
addInput(TransactionOutput) - Method in class com.google.bitcoin.core.Transaction
Adds an input to this transaction that imports value from the given output.
addKey(ECKey) - Method in class com.google.bitcoin.core.Wallet
Adds the given ECKey to the wallet.
addOutput(TransactionOutput) - Method in class com.google.bitcoin.core.Transaction
Adds the given output to this transaction.
Address - Class in com.google.bitcoin.core
A BitCoin address is fundamentally derived from an elliptic curve public key and a set of network parameters.
Address(NetworkParameters, byte[]) - Constructor for class com.google.bitcoin.core.Address
Construct an address from parameters and the hash160 form.
Address(NetworkParameters, String) - Constructor for class com.google.bitcoin.core.Address
Construct an address from parameters and the standard "human readable" form.
AddressFormatException - Exception in com.google.bitcoin.core
 
AddressFormatException() - Constructor for exception com.google.bitcoin.core.AddressFormatException
 
AddressFormatException(String) - Constructor for exception com.google.bitcoin.core.AddressFormatException
 
addressHeader - Variable in class com.google.bitcoin.core.NetworkParameters
First byte of a base58 encoded address.
AddressMessage - Class in com.google.bitcoin.core
 
addTransaction(Transaction) - Method in class com.google.bitcoin.core.Block
Adds a transaction to this block.
ALLOWED_TIME_DRIFT - Static variable in class com.google.bitcoin.core.Block
 

B

Base58 - Class in com.google.bitcoin.core
A custom form of base58 is used to encode BitCoin addresses.
Base58() - Constructor for class com.google.bitcoin.core.Base58
 
bitcoinSerialize() - Method in class com.google.bitcoin.core.GetBlocksMessage
 
bitcoinSerialize() - Method in class com.google.bitcoin.core.GetDataMessage
 
bitcoinSerialize() - Method in class com.google.bitcoin.core.Message
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.InventoryMessage
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.PeerAddress
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.Transaction
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.TransactionInput
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.TransactionOutPoint
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.TransactionOutput
 
bitcoinSerializeToStream(OutputStream) - Method in class com.google.bitcoin.core.VersionMessage
 
bitcoinValueToFriendlyString(BigInteger) - Static method in class com.google.bitcoin.core.Utils
Returns the given value in nanocoins as a 0.12 type string.
Block - Class in com.google.bitcoin.core
A block is the foundation of the BitCoin system.
Block(NetworkParameters, byte[]) - Constructor for class com.google.bitcoin.core.Block
Constructs a block object from the BitCoin wire format.
BlockChain - Class in com.google.bitcoin.core
A BlockChain holds a series of Block objects, links them together, and knows how to verify that the chain follows the rules of the NetworkParameters for this chain.
BlockChain(NetworkParameters, Wallet) - Constructor for class com.google.bitcoin.core.BlockChain
 
bytes - Variable in class com.google.bitcoin.core.Message
 
bytesToHexString(byte[]) - Static method in class com.google.bitcoin.core.Utils
Returns the given byte array hex encoded.

C

CENT - Static variable in class com.google.bitcoin.core.Utils
How many nanocoins there are in 0.01 BitCoins.
clientVersion - Variable in class com.google.bitcoin.core.VersionMessage
 
COIN - Static variable in class com.google.bitcoin.core.Utils
How many nanocoins there are in a BitCoin.
com.google.bitcoin.core - package com.google.bitcoin.core
 
com.google.bitcoin.examples - package com.google.bitcoin.examples
 
cursor - Variable in class com.google.bitcoin.core.Message
 

D

decode(String) - Static method in class com.google.bitcoin.core.Base58
 
decodeToBigInteger(String) - Static method in class com.google.bitcoin.core.Base58
 
disconnect() - Method in class com.google.bitcoin.core.Peer
Terminates the network connection and stops the background thread.
doubleDigest(byte[]) - Static method in class com.google.bitcoin.core.Utils
See Utils.doubleDigest(byte[],int,int).
doubleDigest(byte[], int, int) - Static method in class com.google.bitcoin.core.Utils
Calculates the SHA-256 hash of the given byte range, and then hashes the resulting hash again.
doubleDigestTwoBuffers(byte[], int, int, byte[], int, int) - Static method in class com.google.bitcoin.core.Utils
Calculates SHA256(SHA256(byte range 1 + byte range 2)).

E

ECKey - Class in com.google.bitcoin.core
Represents an elliptic curve keypair that we own and can use for signing transactions.
ECKey() - Constructor for class com.google.bitcoin.core.ECKey
Generates an entirely new keypair.
ECKey(BigInteger) - Constructor for class com.google.bitcoin.core.ECKey
Creates an ECKey given only the private key.
EMPTY_ARRAY - Static variable in class com.google.bitcoin.core.TransactionInput
 
encode(byte[]) - Static method in class com.google.bitcoin.core.Base58
 
encode() - Method in class com.google.bitcoin.core.VarInt
 
encodeBE() - Method in class com.google.bitcoin.core.VarInt
 
equals(Object) - Method in class com.google.bitcoin.core.Address
 
equals(Object) - Method in class com.google.bitcoin.core.Block
 
equals(Object) - Method in class com.google.bitcoin.core.Transaction
 

F

findKeyFromPubHash(byte[]) - Method in class com.google.bitcoin.core.Wallet
Locates a keypair from the keychain given the hash of the public key.
fromASN1(byte[]) - Static method in class com.google.bitcoin.core.ECKey
Construct an ECKey from an ASN.1 encoded private key.

G

genesisBlock - Variable in class com.google.bitcoin.core.NetworkParameters
Genesis block for this chain
getBalance() - Method in class com.google.bitcoin.core.Wallet
Returns the balance of this wallet in nanocoins by summing up all unspent outputs that were sent to us.
getBlock(byte[]) - Method in class com.google.bitcoin.core.Peer
Asks the connected peer for the block of the given hash, and returns a Future representing the answer.
GetBlocksMessage - Class in com.google.bitcoin.core
 
GetBlocksMessage(NetworkParameters, List<byte[]>, byte[]) - Constructor for class com.google.bitcoin.core.GetBlocksMessage
 
GetDataMessage - Class in com.google.bitcoin.core
 
GetDataMessage(NetworkParameters, byte[]) - Constructor for class com.google.bitcoin.core.GetDataMessage
 
getFromAddress() - Method in class com.google.bitcoin.core.Script
Convenience wrapper around getPubKey.
getFromAddress() - Method in class com.google.bitcoin.core.TransactionInput
Convenience method that returns the from address of this input by parsing the scriptSig.
getHash() - Method in class com.google.bitcoin.core.Block
Returns the hash of the block (which for a valid, solved block should be below the target).
getHash() - Method in class com.google.bitcoin.core.Transaction
Returns the transaction hash as you see them in the block explorer.
getHash160() - Method in class com.google.bitcoin.core.Address
The (big endian) 20 byte hash that is the core of a BitCoin address.
getHashAsString() - Method in class com.google.bitcoin.core.Block
Returns the hash of the block (which for a valid, solved block should be below the target) in the form seen on the block explorer.
getHashAsString() - Method in class com.google.bitcoin.core.Transaction
 
getInputs() - Method in class com.google.bitcoin.core.Transaction
Returns a read-only list of the inputs of this transaction.
getMerkleRoot() - Method in class com.google.bitcoin.core.Block
Returns the merkle root in big endian form, calculating it from transactions if necessary.
getPubKey() - Method in class com.google.bitcoin.core.ECKey
Gets the raw public key value.
getPubKey() - Method in class com.google.bitcoin.core.Script
If a program has two data buffers (constants) and nothing else, the second one is returned.
getPubKeyHash() - Method in class com.google.bitcoin.core.ECKey
Gets the hash160 form of the public key (as seen in addresses).
getPubKeyHash() - Method in class com.google.bitcoin.core.Script
If a program matches the standard template DUP HASH160 EQUALVERIFY CHECKSIG then this function retrieves the third element, otherwise it throws a ScriptException.
getScriptBytes() - Method in class com.google.bitcoin.core.TransactionOutput
 
getScriptPubKey() - Method in class com.google.bitcoin.core.TransactionOutput
 
getScriptSig() - Method in class com.google.bitcoin.core.TransactionInput
Returns the input script.
getSizeInBytes() - Method in class com.google.bitcoin.core.VarInt
 
getToAddress() - Method in class com.google.bitcoin.core.Script
Gets the destination address from this script, if it's in the required form (see getPubKey).
getTopBlock() - Method in class com.google.bitcoin.core.BlockChain
Returns the highest known block or null if the chain is empty (top block is genesis).
getUnconnectedBlock() - Method in class com.google.bitcoin.core.BlockChain
Returns the most recent unconnected block or null if there are none.
getValue() - Method in class com.google.bitcoin.core.TransactionOutput
Returns the value of this output in nanocoins.
getValueSentToMe(Wallet) - Method in class com.google.bitcoin.core.Transaction
Returns the sum of the outputs that are sending coins to a key in our wallet.

H

hash - Variable in class com.google.bitcoin.core.InventoryItem
 
hashCode() - Method in class com.google.bitcoin.core.Address
 
hashCode() - Method in class com.google.bitcoin.core.Block
 
hashCode() - Method in class com.google.bitcoin.core.Transaction
 

I

InventoryItem - Class in com.google.bitcoin.core
 
InventoryItem(InventoryItem.Type, byte[]) - Constructor for class com.google.bitcoin.core.InventoryItem
 
InventoryItem.Type - Enum in com.google.bitcoin.core
 
InventoryMessage - Class in com.google.bitcoin.core
 
InventoryMessage(NetworkParameters, byte[]) - Constructor for class com.google.bitcoin.core.InventoryMessage
 
InventoryMessage(NetworkParameters) - Constructor for class com.google.bitcoin.core.InventoryMessage
 
isCoinBase() - Method in class com.google.bitcoin.core.Transaction
A coinbase transaction is one that creates a new coin.
isCoinBase() - Method in class com.google.bitcoin.core.TransactionInput
Coinbase transactions have special inputs with hashes of zero.
isLessThanUnsigned(long, long) - Static method in class com.google.bitcoin.core.Utils
Work around lack of unsigned types in Java.
isMine(Wallet) - Method in class com.google.bitcoin.core.TransactionOutput
Returns true if this output is to an address we have the keys for in the wallet.
isSentToIP() - Method in class com.google.bitcoin.core.Script
Returns true if this transaction is of a format that means it was a direct IP to IP transaction.
isTransactionPresent(Transaction) - Method in class com.google.bitcoin.core.Wallet
Returns true if the given transaction is present in the wallet, comparing by hash value (not by object reference).
items - Variable in class com.google.bitcoin.core.InventoryMessage
 

J

join(Script, Script) - Static method in class com.google.bitcoin.core.Script
Concatenates two scripts to form a new one.

K

keychain - Variable in class com.google.bitcoin.core.Wallet
 

L

loadFromFile(File) - Static method in class com.google.bitcoin.core.Wallet
Returns a wallet deserialized from the given file.
localServices - Variable in class com.google.bitcoin.core.VersionMessage
 

M

main(String[]) - Static method in class com.google.bitcoin.examples.PingService
 
main(String[]) - Static method in class com.google.bitcoin.examples.PrivateKeys
 
MAX_SIZE - Static variable in class com.google.bitcoin.core.Message
 
Message - Class in com.google.bitcoin.core
A Message is a data structure that can be serialized/deserialized using both the BitCoin proprietary serialization format and built-in Java object serialization.
Message() - Constructor for class com.google.bitcoin.core.Message
This exists for the Java serialization framework to use only.

N

NetworkConnection - Class in com.google.bitcoin.core
A NetworkConnection handles talking to a remote BitCoin peer at a low level.
NetworkConnection(InetAddress, NetworkParameters) - Constructor for class com.google.bitcoin.core.NetworkConnection
Connect to the given IP address using the port specified as part of the network parameters.
NetworkParameters - Class in com.google.bitcoin.core
NetworkParameters contains the data needed for working with an instantiation of a BitCoin chain.
NetworkParameters() - Constructor for class com.google.bitcoin.core.NetworkParameters
 

O

offset - Variable in class com.google.bitcoin.core.Message
 
onCoinsReceived(Wallet, Transaction, BigInteger, BigInteger) - Method in interface com.google.bitcoin.core.WalletEventListener
This is called on a Peer thread when a block is received that sends some coins to you.
OP_CHECKSIG - Static variable in class com.google.bitcoin.core.Script
 
OP_DUP - Static variable in class com.google.bitcoin.core.Script
 
OP_EQUALVERIFY - Static variable in class com.google.bitcoin.core.Script
 
OP_HASH160 - Static variable in class com.google.bitcoin.core.Script
 
OP_PUSHDATA1 - Static variable in class com.google.bitcoin.core.Script
 
OP_PUSHDATA2 - Static variable in class com.google.bitcoin.core.Script
 
OP_PUSHDATA4 - Static variable in class com.google.bitcoin.core.Script
 

P

packetMagic - Variable in class com.google.bitcoin.core.NetworkParameters
The header bytes that identify the start of a packet on this network.
params - Variable in class com.google.bitcoin.core.Message
 
parse() - Method in class com.google.bitcoin.core.GetBlocksMessage
 
parse() - Method in class com.google.bitcoin.core.GetDataMessage
 
parse() - Method in class com.google.bitcoin.core.InventoryMessage
 
parse() - Method in class com.google.bitcoin.core.PeerAddress
 
parse() - Method in class com.google.bitcoin.core.UnknownMessage
 
parse() - Method in class com.google.bitcoin.core.VersionMessage
 
Peer - Class in com.google.bitcoin.core
A Peer handles the high level communication with a BitCoin node.
Peer(NetworkParameters, NetworkConnection, BlockChain) - Constructor for class com.google.bitcoin.core.Peer
Construct a peer that handles the given network connection and reads/writes from the given block chain.
PeerAddress - Class in com.google.bitcoin.core
A PeerAddress holds an IP address and port number representing the network location of a peer in the BitCoin P2P network.
PeerAddress(NetworkParameters, byte[], int) - Constructor for class com.google.bitcoin.core.PeerAddress
 
PeerAddress(InetAddress, int) - Constructor for class com.google.bitcoin.core.PeerAddress
 
ping() - Method in class com.google.bitcoin.core.NetworkConnection
Sends a "ping" message to the remote node.
PingService - Class in com.google.bitcoin.examples
PingService demonstrates basic usage of the library.
PingService() - Constructor for class com.google.bitcoin.examples.PingService
 
port - Variable in class com.google.bitcoin.core.NetworkParameters
Default TCP port on which to connect to nodes.
PrivateKeys - Class in com.google.bitcoin.examples
This example shows how to solve the challenge Hal posted here: http://www.bitcoin.org/smf/index.php?topic=3638.0 in which a private key with some coins associated with it is published.
PrivateKeys() - Constructor for class com.google.bitcoin.examples.PrivateKeys
 
prodNet() - Static method in class com.google.bitcoin.core.NetworkParameters
The primary BitCoin chain created by Satoshi.
proofOfWorkLimit - Variable in class com.google.bitcoin.core.NetworkParameters
What the easiest allowable proof of work should be.
PROTOCOL_VERSION - Static variable in class com.google.bitcoin.core.VersionMessage
 
ProtocolException - Exception in com.google.bitcoin.core
 
ProtocolException(String) - Constructor for exception com.google.bitcoin.core.ProtocolException
 
ProtocolException(Exception) - Constructor for exception com.google.bitcoin.core.ProtocolException
 
ProtocolException(String, Exception) - Constructor for exception com.google.bitcoin.core.ProtocolException
 

R

readMessage() - Method in class com.google.bitcoin.core.NetworkConnection
Reads a network message from the wire, blocking until the message is fully received.
readUint32(byte[], int) - Static method in class com.google.bitcoin.core.Utils
 
readUint32BE(byte[], int) - Static method in class com.google.bitcoin.core.Utils
 
reverseBytes(byte[]) - Static method in class com.google.bitcoin.core.Utils
Returns a copy of the given byte array in reverse order.
run(Transaction) - Method in class com.google.bitcoin.core.Script
Runs the script with the given Transaction as the "context".

S

saveToFile(File) - Method in class com.google.bitcoin.core.Wallet
Uses Java serialization to save the wallet to the given file.
Script - Class in com.google.bitcoin.core
BitCoin transactions don't specify what they do directly.
Script(NetworkParameters, byte[], int, int) - Constructor for class com.google.bitcoin.core.Script
Construct a Script using the given network parameters and a range of the programBytes array.
ScriptException - Exception in com.google.bitcoin.core
 
ScriptException(String) - Constructor for exception com.google.bitcoin.core.ScriptException
 
ScriptException(String, Exception) - Constructor for exception com.google.bitcoin.core.ScriptException
 
sendCoins(Peer, Address, BigInteger) - Method in class com.google.bitcoin.core.Wallet
Sends coins to the given address, via the given Peer.
setTracing(boolean) - Method in class com.google.bitcoin.core.Script
If true, running a program will log its instructions.
sha256hash160(byte[]) - Static method in class com.google.bitcoin.core.Utils
Calculates RIPEMD160(SHA256(input)).
shutdown() - Method in class com.google.bitcoin.core.NetworkConnection
Shuts down the network socket.
sign(byte[]) - Method in class com.google.bitcoin.core.ECKey
Calcuates an ECDSA signature in DER format for the given input hash.
signInputs(Transaction.SigHash, Wallet) - Method in class com.google.bitcoin.core.Transaction
Once a transaction has some inputs and outputs added, the signatures in the inputs can be calculated.
start() - Method in class com.google.bitcoin.core.Peer
Starts the background thread that processes messages.
startBlockChainDownload() - Method in class com.google.bitcoin.core.Peer
Starts an asynchronous download of the block chain.

T

testNet() - Static method in class com.google.bitcoin.core.NetworkParameters
The test chain created by Gavin.
time - Variable in class com.google.bitcoin.core.VersionMessage
 
toAddress(NetworkParameters) - Method in class com.google.bitcoin.core.ECKey
 
toNanoCoins(int, int) - Static method in class com.google.bitcoin.core.Utils
Convert an amount expressed in the way humans are used to into nanocoins.
toString() - Method in class com.google.bitcoin.core.Address
 
toString() - Method in class com.google.bitcoin.core.AddressMessage
 
toString() - Method in class com.google.bitcoin.core.Block
Returns a multi-line string containing a description of the contents of the block.
toString() - Method in class com.google.bitcoin.core.ECKey
 
toString() - Method in class com.google.bitcoin.core.GetBlocksMessage
 
toString() - Method in class com.google.bitcoin.core.InventoryItem
 
toString() - Method in class com.google.bitcoin.core.PeerAddress
 
toString() - Method in class com.google.bitcoin.core.Script
Returns the program opcodes as a string, for example "[1234] DUP HAHS160"
toString() - Method in class com.google.bitcoin.core.Transaction
 
toString() - Method in class com.google.bitcoin.core.TransactionInput
Returns a human readable debug string.
toString() - Method in class com.google.bitcoin.core.TransactionOutput
Returns a human readable debug string.
toString() - Method in class com.google.bitcoin.core.UnknownMessage
 
Transaction - Class in com.google.bitcoin.core
A transaction represents the movement of coins from some addresses to some other addresses.
Transaction(NetworkParameters, byte[]) - Constructor for class com.google.bitcoin.core.Transaction
Creates a transaction from the given serialized bytes, eg, from a block or a tx network message.
Transaction(NetworkParameters, byte[], int) - Constructor for class com.google.bitcoin.core.Transaction
Creates a transaction by reading payload starting from offset bytes in.
Transaction.SigHash - Enum in com.google.bitcoin.core
These constants are a part of a scriptSig signature on the inputs.
TransactionInput - Class in com.google.bitcoin.core
A transfer of coins from one address to another creates a transaction in which the outputs can be claimed by the recipient in the input of another transaction.
TransactionInput(NetworkParameters, byte[], int) - Constructor for class com.google.bitcoin.core.TransactionInput
Deserializes an input message.
TransactionOutPoint - Class in com.google.bitcoin.core
This message is effectively a reference or pointer to a transaction output.
TransactionOutPoint(NetworkParameters, byte[], int) - Constructor for class com.google.bitcoin.core.TransactionOutPoint
Deserializes the message.
TransactionOutput - Class in com.google.bitcoin.core
A TransactionOutput message contains a scriptPubKey that controls who is able to spend its value.
TransactionOutput(NetworkParameters, Transaction, byte[], int) - Constructor for class com.google.bitcoin.core.TransactionOutput
Deserializes a transaction output message.
type - Variable in class com.google.bitcoin.core.InventoryItem
 

U

uint32ToByteArrayBE(long, byte[], int) - Static method in class com.google.bitcoin.core.Utils
 
uint32ToByteArrayLE(long, byte[], int) - Static method in class com.google.bitcoin.core.Utils
 
uint32ToByteStreamLE(long, OutputStream) - Static method in class com.google.bitcoin.core.Utils
 
uint64ToByteStreamLE(BigInteger, OutputStream) - Static method in class com.google.bitcoin.core.Utils
 
UnknownMessage - Class in com.google.bitcoin.core
 
UnknownMessage(NetworkParameters, String, byte[]) - Constructor for class com.google.bitcoin.core.UnknownMessage
 
unspent - Variable in class com.google.bitcoin.core.Wallet
 
Utils - Class in com.google.bitcoin.core
A collection of various utility methods that are helpful for working with the BitCoin protocol.
Utils() - Constructor for class com.google.bitcoin.core.Utils
 

V

value - Variable in class com.google.bitcoin.core.VarInt
 
valueOf(String) - Static method in enum com.google.bitcoin.core.InventoryItem.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.google.bitcoin.core.Transaction.SigHash
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.google.bitcoin.core.InventoryItem.Type
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.google.bitcoin.core.Transaction.SigHash
Returns an array containing the constants of this enum type, in the order they are declared.
VarInt - Class in com.google.bitcoin.core
 
VarInt(long) - Constructor for class com.google.bitcoin.core.VarInt
 
VarInt(byte[], int) - Constructor for class com.google.bitcoin.core.VarInt
 
VerificationException - Exception in com.google.bitcoin.core
 
VerificationException(String) - Constructor for exception com.google.bitcoin.core.VerificationException
 
verify() - Method in class com.google.bitcoin.core.Block
Checks the block data to ensure it follows the rules laid out in the network parameters.
verify(byte[], byte[], byte[]) - Static method in class com.google.bitcoin.core.ECKey
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
verify(byte[], byte[]) - Method in class com.google.bitcoin.core.ECKey
Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
verifyInput(int, Transaction) - Method in class com.google.bitcoin.core.Transaction
Given a named input and the transaction output it connects to, runs the script formed from the concatenation of the input and output scripts, returning true if the link is valid.
VersionMessage - Class in com.google.bitcoin.core
 
VersionMessage(NetworkParameters, byte[]) - Constructor for class com.google.bitcoin.core.VersionMessage
 
VersionMessage(NetworkParameters) - Constructor for class com.google.bitcoin.core.VersionMessage
 

W

Wallet - Class in com.google.bitcoin.core
A Wallet stores keys and a record of transactions that have not yet been spent.
Wallet(NetworkParameters) - Constructor for class com.google.bitcoin.core.Wallet
Creates a new, empty wallet with no keys and no transactions.
WalletEventListener - Interface in com.google.bitcoin.core
Implementing WalletEventListener allows you to learn when a wallets balance has changed.
writeMessage(String, Message) - Method in class com.google.bitcoin.core.NetworkConnection
Writes the given message out over the network using the protocol tag.

A B C D E F G H I J K L M N O P R S T U V W