btgexp-api
An API wrapper for BTGexp.com
Structure
src/
tests/
vendor/
Install
Via Composer
$ composer require pxgamer/btgexp-apiUsage
Basic methods
Initialise the Basic class.
$basic = new pxgamer\BTGExp\Basic();Retrieve the current difficulty as a double.
$basic->getDifficulty();Retrieve the current connection count as an integer.
$basic->getConnectionCount();Retrieve the current block count as an integer.
$basic->getBlockCount();Retrieve the block hash for a specified index.
$basic->getBlockHashByIndex(int $index);Retrieve a Block instance by hash.
$basic->getBlockByHash(string $hash);Retrieve a transaction as a string or a Transaction instance.
// As a Transaction instance (default).
$basic->getTransactionById(string $hash, true);
// As an encrypted string.
$basic->getTransactionById(string $hash, false);Retrieve the current network hash rate (hash/s) as a double.
$basic->getNetworkHashRate();Extended methods
Initialise the Extended class.
$extended = new pxgamer\BTGExp\Extended();Retrieve the current money supply as a double.
$extended->getMoneySupply();Retrieve the current network details as a Network instance.
$extended->getNetwork();Retrieve information for an address as an Address instance.
$extended->getAddress(string $address);Retrieve the balance for an address as a double.
$extended->getBalance(string $address);Retrieve the latest transactions as an array.
$extended->getLastTransactions();
$extended->getLastTransactions(int $count);
$extended->getLastTransactions(int $count, int $min);Retrieve the last 7 blocks as an array.
$extended->getLastBlocks();Retrieve a Block instance specified by it's height.
$extended->getBlockByHeight(int $height);Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer testContributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
