chainfailure/prospect

There is no license information available for the latest version (dev-master) of this package.

dev-master 2018-03-21 16:15 UTC

This package is not auto-updated.

Last update: 2024-10-04 09:50:24 UTC


README

This project is still in early development, shit will break, shit will change.

A PHP library for interaction with various cryptocurrencies.

Who is this for?

Everyone seeking to query specific information from a cryptocurrency's blockchain.

What can it do?

Fine, show me some code

How to fetch a Viacoin transaction:

use Prospect\Currency;

$viacoin = Currency::get('via');
$transaction = $viacoin->getTransaction(
    '9c57869fd7e131c0d9ddfe3ba7f62669bc6b01851323709aa96b9d7a9719dc05'
);
echo 'In: '.$transaction->getValueIn()."\n";
echo 'Out: '.$transaction->getValueOut()."\n";
echo 'Fee: '.$transaction->getFee()."\n";

How to fetch a Litecoin address's transactions and balance:

use Prospect\Currency;

$litecoin = Currency::get('ltc');
$address = $litecoin->getAddress(
    'LbAw4wCLj9VAKxV4aeyRTygFdUxT1LiudY'
);
echo 'Balance: '.$address->getBalance()."\n";
echo 'Received: '.$address->getTotalReceived()."\n";
echo 'Sent: '.$address->getTotalSent()."\n";
echo 'Unconfirmed: '.$address->getUnconfirmedBalance()."\n";

Now get off my lawn.