2017 © Pedro Peláez
 

library block_io-php

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

image

mmxca/block_io-php

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  • Tuesday, July 12, 2016
  • by mmxca
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 83 Forks
  • 0 Open issues
  • 16 Versions
  • 23 % Grown

The README.md

Block.io PHP

Current Release: 1.1.3, (*1)

01/29/15: Added support for getting Wallet Import Format private keys from custom keys.
01/19/15: Added support for sweeping legacy keys.
01/09/15: Added sweep functionality.
11/03/14: Fix DER signature encoding. Now stable.
18/10/14: Enforcing Determinism in Signatures (RFC6979), also using BIP62 to hinder transaction malleability.
15/10/14: Enforce use of TLSv1, step away from the vulnerable SSLv3.
10/10/14: Added 3 of 4 MultiSig example.
09/28/14: Updated for v2 handling., (*2)

PHP wrapper for Block.io for use with Dogecoin, Bitcoin, and Litecoin. API key validation on instantiation, simple abstraction layer on top of existing API interfaces, and automatic JSON decoding on response., (*3)

Requirements

This library requires the 'mcrypt', 'gmp', and cURL extensions for PHP. To enable these extensions, see:, (*4)

mCrypt Installation Guide, (*5)

GMP Installation Guide, (*6)

cURL Installation Guide, (*7)

Warning

If you're using Windows, beware that SSL will not function properly, and this library will throw errors., (*8)

To fix the SSL issue on Windows, please do the following:, (*9)

Download http://curl.haxx.se/ca/cacert.pem to a directory of your choice
Make PHP use this file to validate Block.io's SSL certificate by adding this line to your php.ini:
curl.cainfo=c:\path\to\cacert.pem, (*10)

Usage

First, sign up for an account at Block.io and take note of your API key under Account > Dashboard., (*11)

Download and include the block_io.php class:, (*12)

 require_once 'path/to/block_io.php';

Or preferably install via Composer, (*13)

 "block_io-php/block_io-php": "1.1.3"

Instantiate the class and set your API key. If the API key is valid the set function will return true otherwise false., (*14)

 $apiKey = "YOUR API KEY FOR DOGECOIN, BITCOIN, OR LITECOIN";
 $pin = "YOUR SECRET PIN";
 $version = 2; // the API version to use

 $block_io = new BlockIo($apiKey, $pin, $version);

 echo "Confirmed Balance: " . $block_io->get_balance()->data->available_balance . "\n";

The wrapper abstracts all methods listed at https://block.io/api/php using the same interface names. For example, to get your current account balance:, (*15)

     $balance = $block_io->get_balance(array('label' => 'default'));
     echo $balance->data->available_balance . "\n";

To make requests that require parameters (eg. an address label or address to withdraw to), pass through each parameter in an associative array. For example, the request below will withdraw 50 DOGE to the wallet you specify in place of WALLET-ADDRESS-HERE:, (*16)

     $withdraw = $block_io->withdraw(array('amount' => '50.0', 'to_address' => 'WALLET-ADDRESS-HERE'));

Note: This library throws Exceptions when calls fail. Implement try/catch blocks, and retrieve the Exception message to see details., (*17)

Please see Block.io PHP Docs for details on available calls., (*18)

The Versions

12/07 2016

dev-master

9999999-dev https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

30/01 2015

1.1.3

1.1.3.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

20/01 2015

1.1.2

1.1.2.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

10/01 2015

1.1.1

1.1.1.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

03/11 2014

dev-1.1-dev

dev-1.1-dev https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

03/11 2014

1.1.0

1.1.0.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

18/10 2014

1.0.9

1.0.9.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

18/10 2014

1.0.8

1.0.8.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

15/10 2014

1.0.7

1.0.7.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

09/10 2014

1.0.4

1.0.4.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

09/10 2014

1.0.3

1.0.3.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

06/10 2014

dev-1.0-maint

dev-1.0-maint https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

05/10 2014

1.0.1

1.0.1.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

17/08 2014

0.2.1

0.2.1.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.2.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

14/08 2014

0.2

0.2.0.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.2.0
  • ext-curl *

 

bitcoin litecoin dogecoin block.io block_io

01/07 2014

0.1

0.1.0.0 https://block.io

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.2.0

 

bitcoin litecoin dogecoin block.io block_io