2017 © Pedro Peláez
 

library bitcoin-php

Library for lists of transactions Bitcoin

image

vaneves/bitcoin-php

Library for lists of transactions Bitcoin

  • Friday, March 2, 2018
  • by vaneves
  • Repository
  • 1 Watchers
  • 2 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

🔗 Query to Bitcoin via PHP

Installing

Via Composer, (*1)

composer require vaneves/bitcoin-php

Usage

Create Address

Creates a new address., (*2)

use Vaneves\Bitcoin\Network;
use Vaneves\Bitcoin\Bitcoin;
use Vaneves\Bitcoin\BitcoinException;

try {
    $network = new Network('http://username:password@127.0.0.1:18332');
    $bitcoin = new Bitcoin($network);
    $address = $bitcoin->account('vaneves')->newAddress();

    echo $address; 

} catch (BitcoinException $e) {
    echo $e->getMessage();
} catch (\Exception $e) {
    echo $e->getMessage();
}

List Transactions

List all transactions received and sent., (*3)

use Vaneves\Bitcoin\Network;
use Vaneves\Bitcoin\Bitcoin;
use Vaneves\Bitcoin\BitcoinException;

try {
    $network = new Network('http://username:password@127.0.0.1:18332');
    $bitcoin = new Bitcoin($network);

    $offset = 0;
    $limit = 100;
    $transactions = $bitcoin->transaction()->paginate($offset, $limit);
    print_r($transactions);
} catch (BitcoinException $e) {
    echo $e->getMessage();
} catch (\Exception $e) {
    echo $e->getMessage();
}

License

The MIT License (MIT), (*4)

Bitcoin address: 1H6ssXbPbLeDVQNf9PqaarTEeG9sjurEgm, (*5)

, (*6)

The Versions

02/03 2018

dev-master

9999999-dev

Library for lists of transactions Bitcoin

  Sources   Download

The Requires

  • php >=5.3.0

 

by Van Neves

bitcoin

28/02 2018

0.0.1

0.0.1.0

Library for lists of transactions Bitcoin

  Sources   Download

The Requires

  • php >=5.3.0

 

by Van Neves

bitcoin