Code Monkey home page Code Monkey logo

prospect's Introduction

Prospect

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?

Currency Code Fetch transactions Fetch addresses
Viacoin via
Bitcoin btc
Litecoin ltc
Dash dash

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.

prospect's People

Contributors

chainfailure avatar

Stargazers

 avatar

Watchers

 avatar  avatar

prospect's Issues

implement custom Money currencies

currently I'm using the standard xbt currency that comes with moneyphp/money. i need to implement a Currencies object that holds all the supported currencies as well as a formatter for said currencies.

revise documentation

i should really document the internals, improve the README.md as well as add more examples implementations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.