Skip to content

bitbaendiger/BitWire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitWire

Basic implementation of the Bitcoin P2P Wire Protocol. If you use it, expect to blow up the Bitcoin Network.

Dependencies

BitWire relies on a asynchronous PHP-Framework called qcEvents. Make sure to have it in place if you try to use BitWire. The BitWire_Peer-Class acts as a consumer on top of qcEvents's Sockets (or any other kind of sources, but only sockets make sense at the moment):

  $eventBase = new \quarxConnect\Events\Base ();
  $eventSocket = new \quarxConnect\Events\Socket ($eventBase);
  $wirePeer = new \BitBaendiger\BitWire\Peer ();

  $eventSocket->connect ('...', 8333, $eventSocket::TYPE_TCP);
  $eventSocket->pipeStream ($wirePeer);

  $eventBase->loop ();

Debuging

Incoming messages may be checked by setting \BitBaendiger\BitWire\Message::$debugMessages to true.

(DEPRECATED) There is a constant called BITWIRE_DEBUG. When set to true BitWire will start to output debugging-information related to its work.

Most notably: Whenever Messages/Payloads are received BitWire will try to re-encode these and compare the output with its original input to make sure that BitWire is able to create a bitwise identical representation.

Disclaimer

This software is completly on its own. We are not affiliated or related to any bitcoin mining pool or bitcoin exchange. The purpose of this software is to gather statistical data out of the bitcoin network and to use it for personal purposes.

We are NOT affiliated or related in any way to bitwire.co or bitwire.biz. These are completely independant projects and do not have any relation with us.

About

Wire-protocol of bitcoin core in PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages