2017 © Pedro Peláez
 

library btgexp-api

An API wrapper for BTGexp.com

image

pxgamer/btgexp-api

An API wrapper for BTGexp.com

  • Wednesday, December 6, 2017
  • by PXgamer
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

btgexp-api

Latest Version on Packagist ![Software License][ico-license] Build Status Style CI ![Code Coverage][ico-code-quality] Total Downloads, (*1)

An API wrapper for BTGexp.com, (*2)

Structure

src/
tests/
vendor/

Install

Via Composer, (*3)

``` bash $ composer require pxgamer/btgexp-api, (*4)


## Usage ### Basic methods Initialise the `Basic` class. ```php $basic = new pxgamer\BTGExp\Basic();

Retrieve the current difficulty as a double., (*5)

$basic->getDifficulty();

Retrieve the current connection count as an integer., (*6)

$basic->getConnectionCount();

Retrieve the current block count as an integer., (*7)

$basic->getBlockCount();

Retrieve the block hash for a specified index., (*8)

$basic->getBlockHashByIndex(int $index);

Retrieve a Block instance by hash., (*9)

$basic->getBlockByHash(string $hash);

Retrieve a transaction as a string or a Transaction instance., (*10)

// 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., (*11)

$basic->getNetworkHashRate();

Extended methods

Initialise the Extended class., (*12)

$extended = new pxgamer\BTGExp\Extended();

Retrieve the current money supply as a double., (*13)

$extended->getMoneySupply();

Retrieve the current network details as a Network instance., (*14)

$extended->getNetwork();

Retrieve information for an address as an Address instance., (*15)

$extended->getAddress(string $address);

Retrieve the balance for an address as a double., (*16)

$extended->getBalance(string $address);

Retrieve the latest transactions as an array., (*17)

$extended->getLastTransactions();
$extended->getLastTransactions(int $count);
$extended->getLastTransactions(int $count, int $min);

Retrieve the last 7 blocks as an array., (*18)

$extended->getLastBlocks();

Retrieve a Block instance specified by it's height., (*19)

$extended->getBlockByHeight(int $height);

Change log

Please see CHANGELOG for more information on what has changed recently., (*20)

Testing

bash $ composer test, (*21)

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*22)

Security

If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker., (*23)

Credits

License

The MIT License (MIT). Please see License File for more information., (*24)

The Versions

06/12 2017

dev-develop

dev-develop

An API wrapper for BTGexp.com

  Sources   Download

MIT

The Requires

 

The Development Requires

06/12 2017

dev-master

9999999-dev

An API wrapper for BTGexp.com

  Sources   Download

MIT

The Requires

 

The Development Requires

06/12 2017

v1.0.1

1.0.1.0

An API wrapper for BTGexp.com

  Sources   Download

MIT

The Requires

 

The Development Requires

29/11 2017

v1.0.0

1.0.0.0

An API wrapper for BTGexp.com

  Sources   Download

MIT

The Requires

 

The Development Requires