All Data Structures Files Functions Variables Typedefs
File List
Here is a list of all documented files with brief descriptions:
src/CBConstants.h [code]
src/CBDependencies.h [code]File for weak linked functions for dependency injection. All these functions are unimplemented. The functions include the crytography functions which are key for the functioning of bitcoin. Sockets must be non-blocking and use an asynchronous onErrorReceived-type system. The use of the sockets is designed to be compatible with libevent. The random number functions should be cryptographically secure. See the dependecies folder for implementations
src/CBNetworkFunctions.h [code]
src/CBValidationFunctions.h [code]Here are functions for doing parts of bitcoin validation. cbitcoin is designed to make a broad variety of bitcoin development easier and is not designed to implement a client node. Therefore, cbitcoin does not provide provide functions for validating block chains as there are different methods for doing so. So wether you want to use SPV, block-chain pruning, full validation or whatever, you can use these functions to help. Also see CBScript.h and CBMerkleNode.h for validation. CBNetworkCommunicator.h has message size checks and message deserialisation functions check messages for syntax and sizes
src/structures/CBBase58/CBBase58.h [code]Functions for encoding and decoding in base 58. Avoids 0olI whch may look alike. This is for readability concerns
src/structures/CBBigInt/CBBigInt.h [code]Functions for using bytes as if they were an integer
src/structures/CBMerkleNode/CBMerkleNode.h [code]A structure for a node in a merkle tree
src/structures/CBObject/CBObject.h [code]The base structure for other structures using OOP-style and reference counting features
src/structures/CBObject/CBByteArray/CBByteArray.h [code]Provides an interface to a memory block as bytes. Many CBByteArrays can refer to the same memory block with different offsets and lengths. Inherits CBObject
src/structures/CBObject/CBByteArray/CBScript/CBScript.h [code]Functions for bitcoin scripts which can be processed to determine if a transaction input is valid. A good resource is https://en.bitcoin.it/wiki/Script A CBScript object is an alias to a CBByteArray object
src/structures/CBObject/CBByteArray/CBVersionChecksumBytes/CBVersionChecksumBytes.h [code]Represents a key, begining with a version byte and ending with a checksum. Inherits CBByteArray
src/structures/CBObject/CBByteArray/CBVersionChecksumBytes/CBAddress/CBAddress.h [code]Based upon an ECDSA public key and a network version code. Used for receiving bitcoins. Inherits CBVersionChecksumBytes
src/structures/CBObject/CBMessage/CBMessage.h [code]Serialisable data structure. Provides the basic framework for serialising and deserialising bitcoin messages. Messages shouldn't be serialised including message headers. Message headers should be added before sending messages and removed when deserialising. Inherits CBObject
src/structures/CBObject/CBMessage/CBAddressBroadcast/CBAddressBroadcast.h [code]Message for broadcasting CBNetworkAddresses over the network. This is used to share socket information for peers that are accepting incomming connections. When making an object, get the addresses you want to add and then set the "addrNum" and "addresses" fields. When managing the addresses you want to share, it's best to keep one object and change the addresses when necessary by reorganising the pointers with the "addresses" field. Inherits CBMessage
src/structures/CBObject/CBMessage/CBAddressManager/CBAddressManager.h [code]Stores addresses both unconnected and connected. It also proves serialisation and deserialisation so that addresses can be stored in binary format. Credit largely goes to the addrman.cpp code in the original client, although the code here has differences. Inherits CBMessage. The binary format contains a 32 bit integer for the cbitcoin version, followed by CB_BUCKET_NUM buckets. Each of these buckets is written as a 16 bit integer for the number of addresses and then the serialised CBNetworkAddresses one after the other. After the buckets is the 64 bit integer secret
src/structures/CBObject/CBMessage/CBAlert/CBAlert.h [code]A message containing an alert signed by one of the bitcoin developers. Inherits CBMessage
src/structures/CBObject/CBMessage/CBBlock/CBBlock.h [code]Structure that holds a bitcoin block. Blocks contain transaction information and use a proof of work system to show that they are legitimate. Inherits CBMessage
src/structures/CBObject/CBMessage/CBBlockHeaders/CBBlockHeaders.h [code]A message used to send and receive block headers. Inherits CBMessage
src/structures/CBObject/CBMessage/CBChainDescriptor/CBChainDescriptor.h [code]Stores up to 500 block hashes for a block chain to describe a block chain for a peer so that a peer can send relevent block data. Inherits CBMessage
src/structures/CBObject/CBMessage/CBGetBlocks/CBGetBlocks.h [code]A message to ask for an inventory of blocks or the block headers (getheaders message) up to the "stopAtHash", the last known block or 500 blocks, whichever comes first. The message comes with a block chain descriptor so the recipient can discover how the blockchain is different so they can send the necessary blocks (starting from a point of agreement). Inherits CBMessage
src/structures/CBObject/CBMessage/CBInventoryBroadcast/CBInventoryBroadcast.h [code]Used to advertise an inventory or ask for an inventory. An inventory is a list of objects which can be blocks or transsactions. Inherits CBMessage
src/structures/CBObject/CBMessage/CBInventoryItem/CBInventoryItem.h [code]This is an inventory item that contains an object hash and the object type. It can refer to a block, a transaction or an error. Inherits CBMessage
src/structures/CBObject/CBMessage/CBNetworkAddress/CBNetworkAddress.h [code]Contains IP, time, port and services information for a peer as well as data and code for managing individual peers. Used to advertise peers. "bytesTransferred/timeUsed" can be used to rank peers for the most efficient ones which can be useful when selecting prefered peers for download. Inherits CBObject
src/structures/CBObject/CBMessage/CBNetworkAddress/CBPeer/CBPeer.h [code]Contains data for managing peer connections. Inherits CBNetworkAddress
src/structures/CBObject/CBMessage/CBPingPong/CBPingPong.h [code]This message contains the ID used in ping and pong messages for protocol versions over 60000. A CBNetworkCommunicator will accept this message for compatible protocol numbers and use an empty message for pings otherwise. Inherits CBMessage
src/structures/CBObject/CBMessage/CBTransaction/CBTransaction.h [code]A CBTransaction represents a movement of bitcoins and newly mined bitcoins. Inherits CBMessage
src/structures/CBObject/CBMessage/CBTransactionInput/CBTransactionInput.h [code]Represents an input into a bitcoin transaction. Inherits CBMessage
src/structures/CBObject/CBMessage/CBTransactionOutput/CBTransactionOutput.h [code]Describes how the bitcoins can be spent from the output. Inherits CBObject
src/structures/CBObject/CBMessage/CBVersion/CBVersion.h [code]Contains infromation relating to the version of a peer, the timestamp, features, IPs, user agent and last block recieveed. Inherits CBMessage
src/structures/CBObject/CBNetworkCommunicator/CBNetworkCommunicator.h [code]Used for communicating to other peers. The network communicator can send and receive bitcoin messages and uses function pointers for message handlers. The timeouts are in milliseconds. It is important to understant that a CBNetworkCommunicator does not guarentee thread safety for everything. Thread safety is only given to the "peers" list. This means it is completely okay to add and remove peers from multiple threads. Two threads may try to access the list at once such as if the CBNetworkCommunicator receives a socket timeout event and tries to remove an peer at the same time as a thread made by a program using cbitcoin tries to add a new peer. When using a CBNetworkCommunicator, threading and networking dependencies need to be satisfied,
src/structures/CBVarInt/CBVarInt.h [code]Simple structure for variable size integers information. This is an annoying structure used in the bitcoin protocol. One has to wonder why it was ever used