Serialized Form


Package com.google.bitcoin.core

Class com.google.bitcoin.core.AddressFormatException extends Exception implements Serializable

Class com.google.bitcoin.core.AddressMessage extends Message implements Serializable

serialVersionUID: 8058283864924679460L

Serialized Fields

addresses

List<E> addresses

Class com.google.bitcoin.core.Block extends Message implements Serializable

serialVersionUID: 2738848929966035281L

Serialized Fields

version

long version

prevBlockHash

byte[] prevBlockHash

merkleRoot

byte[] merkleRoot

time

long time

difficultyTarget

long difficultyTarget

nonce

long nonce

transactions

List<E> transactions
If null, it means this object holds only the headers.

Class com.google.bitcoin.core.BlockStoreException extends Exception implements Serializable

Class com.google.bitcoin.core.ECKey extends Object implements Serializable

serialVersionUID: -728224901792295832L

Serialized Fields

priv

BigInteger priv

pub

byte[] pub

Class com.google.bitcoin.core.GetBlocksMessage extends Message implements Serializable

serialVersionUID: 3479412877853645644L

Serialized Fields

locator

List<E> locator

stopHash

byte[] stopHash

Class com.google.bitcoin.core.GetDataMessage extends ListMessage implements Serializable

serialVersionUID: 2754681589501709887L

Class com.google.bitcoin.core.InventoryMessage extends ListMessage implements Serializable

serialVersionUID: -7050246551646107066L

Class com.google.bitcoin.core.ListMessage extends Message implements Serializable

Serialized Fields

items

List<E> items

Class com.google.bitcoin.core.Message extends Object implements Serializable

serialVersionUID: -3561053461717079135L

Serialized Fields

params

NetworkParameters params

Class com.google.bitcoin.core.NetworkParameters extends Object implements Serializable

serialVersionUID: 3L

Serialized Fields

genesisBlock

Block genesisBlock
Genesis block for this chain.

The first block in every chain is a well known constant shared between all BitCoin implemenetations. For a block to be valid, it must be eventually possible to work backwards to the genesis block by following the prevBlockHash pointers in the block headers.

The genesis blocks for both test and prod networks contain the timestamp of when they were created, and a message in the coinbase transaction. It says, "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks".


proofOfWorkLimit

BigInteger proofOfWorkLimit
What the easiest allowable proof of work should be.


port

int port
Default TCP port on which to connect to nodes.


packetMagic

long packetMagic
The header bytes that identify the start of a packet on this network.


addressHeader

int addressHeader
First byte of a base58 encoded address. See Address


dumpedPrivateKeyHeader

int dumpedPrivateKeyHeader
First byte of a base58 encoded dumped private key. See DumpedPrivateKey.


interval

int interval
How many blocks pass between difficulty adjustment periods. BitCoin standardises this to be 2015.


targetTimespan

int targetTimespan
How much time in seconds is supposed to pass between "interval" blocks. If the actual elapsed time is significantly different from this value, the network difficulty formula will produce a different value. Both test and production BitCoin networks use 2 weeks (1209600 seconds).

Class com.google.bitcoin.core.PeerAddress extends Message implements Serializable

serialVersionUID: 7501293709324197411L

Serialized Fields

addr

InetAddress addr

port

int port

services

BigInteger services

time

long time

Class com.google.bitcoin.core.PeerDiscoveryException extends Exception implements Serializable

serialVersionUID: -2863411151549391392L

Class com.google.bitcoin.core.Ping extends Message implements Serializable

Class com.google.bitcoin.core.ProtocolException extends Exception implements Serializable

Class com.google.bitcoin.core.ScriptException extends Exception implements Serializable

Class com.google.bitcoin.core.Sha256Hash extends Object implements Serializable

Serialized Fields

hash

byte[] hash

Class com.google.bitcoin.core.StoredBlock extends Object implements Serializable

serialVersionUID: -6097565241243701771L

Serialized Fields

header

Block header

chainWork

BigInteger chainWork

height

int height

Class com.google.bitcoin.core.Transaction extends Message implements Serializable

serialVersionUID: -8567546957352643140L

Serialized Fields

version

long version

inputs

ArrayList<E> inputs

outputs

ArrayList<E> outputs

lockTime

long lockTime

appearsIn

Set<E> appearsIn

Class com.google.bitcoin.core.TransactionInput extends Message implements Serializable

serialVersionUID: 2L

Serialized Fields

sequence

long sequence

outpoint

TransactionOutPoint outpoint

scriptBytes

byte[] scriptBytes

parentTransaction

Transaction parentTransaction

Class com.google.bitcoin.core.TransactionOutPoint extends Message implements Serializable

serialVersionUID: -6320880638344662579L

Serialized Fields

hash

byte[] hash
Hash of the transaction to which we refer.


index

long index
Which output of that transaction we are talking about.


fromTx

Transaction fromTx

Class com.google.bitcoin.core.TransactionOutput extends Message implements Serializable

serialVersionUID: -590332479859256824L

Serialized Fields

value

BigInteger value

scriptBytes

byte[] scriptBytes

availableForSpending

boolean availableForSpending

spentBy

TransactionInput spentBy

parentTransaction

Transaction parentTransaction

Class com.google.bitcoin.core.UnknownMessage extends Message implements Serializable

serialVersionUID: 3614705938207918775L

Serialized Fields

name

String name

Class com.google.bitcoin.core.VerificationException extends Exception implements Serializable

Class com.google.bitcoin.core.VersionAck extends Message implements Serializable

Class com.google.bitcoin.core.VersionMessage extends Message implements Serializable

serialVersionUID: 7313594258967483180L

Serialized Fields

clientVersion

int clientVersion
The version number of the protocol spoken.


localServices

long localServices
Flags defining what is supported. Right now VersionMessage.NODE_NETWORK is the only flag defined.


time

long time
What the other side believes the current time to be, in seconds.


myAddr

PeerAddress myAddr
What the other side believes the address of this program is. Not used.


theirAddr

PeerAddress theirAddr
What the other side believes their own address is. Not used.


subVer

String subVer
An additional string that today the official client sets to the empty string. We treat it as something like an HTTP User-Agent header.


bestHeight

long bestHeight
How many blocks are in the chain, according to the other side.

Class com.google.bitcoin.core.Wallet extends Object implements Serializable

serialVersionUID: 2L

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException
Serialized Fields

pending

Map<K,V> pending
Map of txhash->Transactions that have not made it into the best chain yet. They are eligible to move there but are waiting for a miner to send a block on the best chain including them. These transactions inputs count as spent for the purposes of calculating our balance but their outputs are not available for spending yet. This means after a spend, our balance can actually go down temporarily before going up again!


unspent

Map<K,V> unspent
Map of txhash->Transactions where the Transaction has unspent outputs. These are transactions we can use to pay other people and so count towards our balance. Transactions only appear in this map if they are part of the best chain. Transactions we have broacast that are not confirmed yet appear in pending even though they may have unspent "change" outputs.

Note: for now we will not allow spends of transactions that did not make it into the block chain. The code that handles this in BitCoin C++ is complicated. Satoshis code will not allow you to spend unconfirmed coins, however, it does seem to support dependency resolution entirely within the context of the memory pool so theoretically you could spend zero-conf coins and all of them would be included together. To simplify we'll make people wait but it would be a good improvement to resolve this in future.


spent

Map<K,V> spent
Map of txhash->Transactions where the Transactions outputs are all fully spent. They are kept separately so the time to create a spend does not grow infinitely as wallets become more used. Some of these transactions may not have appeared in a block yet if they were created by us to spend coins and that spend is still being worked on by miners.

Transactions only appear in this map if they are part of the best chain.


inactive

Map<K,V> inactive
An inactive transaction is one that is seen only in a block that is not a part of the best chain. We keep it around in case a re-org promotes a different chain to be the best. In this case some (not necessarily all) inactive transactions will be moved out to unspent and spent, and some might be moved in.

Note that in the case where a transaction appears in both the best chain and a side chain as well, it is not placed in this map. It's an error for a transaction to be in both the inactive pool and unspent/spent.


dead

Map<K,V> dead
A dead transaction is one that's been overridden by a double spend. Such a transaction is pending except it will never confirm and so should be presented to the user in some unique way - flashing red for example. This should nearly never happen in normal usage. Dead transactions can be "resurrected" by re-orgs just like any other. Dead transactions are not in the pending pool.


keychain

ArrayList<E> keychain
A list of public/private EC keys owned by this user.


params

NetworkParameters params



Copyright © 2011. All Rights Reserved.