coinbits package¶
Subpackages¶
Submodules¶
coinbits.client module¶
- class coinbits.client.BitcoinClient(peerip, port=8333)[source]¶
Bases: object
The base class for a Bitcoin network client. This class will handle the initial handshake and responding to pings.
- coin = 'bitcoin'¶
- connected()[source]¶
Called once we’ve exchanged version information and can make calls on the network.
- handle_ping(message_header, message)[source]¶
This method will handle the Ping message and then will answer every Ping message with a Pong message using the nonce received.
Parameters: - message_header – The header of the Ping message
- message – The Ping message
- handle_version(message_header, message)[source]¶
This method will handle the Version message and will send a VerAck message when it receives the Version message.
Parameters: - message_header – The Version message header
- message – The Version message
coinbits.encoding module¶
Module contents¶
Coinbits is a Python library for bitcoin peer to peer communication.