2017 © Pedro Peláez
 

library counterparty-follower

A Counterparty send transaction follower.

image

utipd/counterparty-follower

A Counterparty send transaction follower.

  • Thursday, September 4, 2014
  • by dweller
  • Repository
  • 1 Watchers
  • 0 Stars
  • 75 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

The CounterpartyFollower component for UTipdMe., (*1)

A Counterparty send transaction follower. This is a standalone component of UTipdMe., (*2)

Build Status, (*3)


use Utipd\CounterpartyFollower\Follower; use Utipd\CounterpartyFollower\FollowerSetup; use Utipd\XCPDClient\Client; // create a Counterparty RPC client $xcpd_client = new Client($connection_string, $rpc_user, $rpc_password); // init a mysql database connection $pdo = new \PDO($db_connection_string, $db_user, $db_password); // create the MySQL tables if ($first_time) { $setup = new FollowerSetup($pdo, $db_name='xcpd_blocks'); $stup->InitializeDatabase(); } // build the follower and start at a recent block $follower = new Follower($xcpd_client, $pdo); $follower->setGenesisBlock(313500); // setup the handlers $follower->handleNewSend(function($send_details, $block_id) { echo "\$send_details:\n".json_encode($send_details, 192)."\n"; }); // listen forever while (true) { $follower->processAnyNewBlocks(); sleep(10); }

About Orphans

Orphaned blocks will happen. To handle those, you can use https://github.com/UTipdMe/native-follower, (*4)

Tips Accepted

BTC or Counterparty Tokens are gratefully accepted at 1LCwHQzrFY9q4h2eX2ApWzUHSqTc5UzHZW, (*5)

The Versions

04/09 2014

dev-master

9999999-dev

A Counterparty send transaction follower.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin transaction counterparty