Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6d95b32
Math engine and Private Key
Nov 13, 2014
fcafcf2
Added point math
Nov 13, 2014
b293345
GMP and BC Math integrated into client library
Nov 14, 2014
3bd5b80
Merge branch 'master' of https://github.com/aleitner/php-bitpay-client
Nov 14, 2014
2592338
Some variables in while loops had bad naming
Nov 14, 2014
9a34016
removed var_dump in sinkeytest
Nov 14, 2014
9c79b54
Code should match PHP Code standards PSR-2
Nov 14, 2014
6fc2670
Moved to suggested
Nov 14, 2014
9ab306a
Integrated Rich's Arbitrary Precision Integer Math Library
Nov 14, 2014
8d5ff4d
Integrated Rich's Arbitrary Precision Integer Math Library tests
Nov 14, 2014
ebc2716
Update composer.json
Nov 15, 2014
7afea35
Removed bitauth, updated tests
Nov 17, 2014
16521f0
Updating tests
Nov 17, 2014
bad37aa
Fix double quotes
Nov 17, 2014
fcd6d08
Update Test for BcEngine
Nov 17, 2014
0b6ba15
Update Math class and tests
Nov 18, 2014
d2d87c5
updated tests
Nov 18, 2014
36d1b51
updated tests
Nov 18, 2014
383ae3b
updated Testing
Nov 18, 2014
87edc4e
updated Testing
Nov 18, 2014
863a3e3
Cleaned up testing code
Nov 18, 2014
19c953d
Updated php compile code
Nov 19, 2014
45ecc22
added ./setup for testing Math.php if statement
Nov 19, 2014
c92ff29
Fix merge conflict
Nov 19, 2014
e680fe3
updated MathTest.php
Nov 19, 2014
4157ab0
updated MathTest.php
Nov 19, 2014
f41c0ec
Updated travis.yml
Nov 20, 2014
6a9fd6e
Shortened if statement
Nov 20, 2014
e1696f9
Reverted back to original
Nov 20, 2014
fa5b3ba
Added get hex to private key
Nov 20, 2014
8c23f87
Private key got lots of var dumps in it now yo
Nov 20, 2014
d3ffcfa
var dumps
Nov 20, 2014
6e4d63f
oops
Nov 20, 2014
2d65f23
Math.php is a Singleton object
Nov 20, 2014
9e0955f
Merge remote-tracking branch 'upstream/master'
Nov 21, 2014
0ddaddb
Dead code removed from PrivatKey.php
Nov 21, 2014
8dd6691
Namespace bugs fixed
Nov 21, 2014
bb198c1
removed unnecessary break statements
Nov 21, 2014
3f51506
removed --verbose from travis.yml, updated testing documentation to t…
Nov 21, 2014
a49d5e9
Updated tests and Error.php
Nov 21, 2014
551807e
Deleted unused examples/math.php
Nov 21, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
},
"require": {
"php": ">=5.4",
"ext-gmp": "*",
"ext-curl": "*",
"ext-json": "*",
"ext-openssl": "*",
Expand All @@ -47,6 +46,10 @@
"squizlabs/php_codesniffer": "~1.5.5",
"satooshi/php-coveralls": "~0.6.1"
},
"suggest": {
"ext-gmp": "Quickest PHP math library for doing Elliptic Curve calculations.",
"ext-bcmath": "PHP math library for doing Elliptic Curve calculations."
},
"config": {
"bin-dir": "bin"
},
Expand Down
14 changes: 14 additions & 0 deletions docs/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,17 @@ please try to use phpmd. You can see the rules in ``build/rulesets/phpmd.xml``.
.. code-block:: bash

php bin/phpmd src/ text build/rulesets/phpmd.xml

PHPbrew
=======

In order to test that a math library is isused when the others aren't installed
phpbrew can be used to install bcmath and gmp or uninstall either of them.

.. code-block:: bash

./tests/Bitpay/testMaths

.. note::

phpbrew is required for testMaths to run properly.
2 changes: 1 addition & 1 deletion src/Bitpay/AccessToken.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/AccessTokenInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Application.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/ApplicationInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Bill.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/BillInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
235 changes: 0 additions & 235 deletions src/Bitpay/Bitauth.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Bitpay/Bitpay.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Buyer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/BuyerInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Client/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Client/Adapter/CurlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function sendRequest(RequestInterface $request)
CURLOPT_TIMEOUT => 10,
CURLOPT_SSL_VERIFYPEER => 1,
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_CAINFO => __DIR__ . '/ca-bundle.crt',
CURLOPT_CAINFO => __DIR__.'/ca-bundle.crt',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FORBID_REUSE => 1,
CURLOPT_FRESH_CONNECT => 1,
Expand Down
4 changes: 2 additions & 2 deletions src/Bitpay/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function setAdapter(AdapterInterface $adapter)
}

/**
* @param TokenInterface $token
* @param TokenInterface $token
* @return ClientInterface
*/
public function setToken(TokenInterface $token)
Expand Down Expand Up @@ -305,7 +305,7 @@ public function getInvoice($invoiceId)
}

/**
* @param RequestInterface $request
* @param RequestInterface $request
* @return ResponseInterface
*/
public function sendRequest(RequestInterface $request)
Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Client/ClientInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Bitpay/Client/Request.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/

Expand Down
Loading