https://github.com/bitpay/bitpay-php-keyutils
BitPay Key Utilities for PHP
https://github.com/bitpay/bitpay-php-keyutils
Last synced: 4 months ago
JSON representation
BitPay Key Utilities for PHP
- Host: GitHub
- URL: https://github.com/bitpay/bitpay-php-keyutils
- Owner: bitpay
- License: mit
- Created: 2019-08-19T16:22:45.000Z (almost 7 years ago)
- Default Branch: 2.1.x
- Last Pushed: 2025-03-23T23:25:12.000Z (about 1 year ago)
- Last Synced: 2025-04-02T11:02:23.666Z (about 1 year ago)
- Language: PHP
- Size: 143 KB
- Stars: 8
- Watchers: 4
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bitpay/bitpay-php-keyutils
=================
[](https://raw.githubusercontent.com/bitpay/bitpay-php-keyutils/master/LICENSE.md)
[](https://packagist.org/packages/bitpay/key-utils)
[](https://packagist.org/packages/bitpay/key-utils)
[](https://packagist.org/packages/bitpay/key-utils)
This dependency file provides utilities for use with the BitPay API. It enables creating keys, retrieving public keys, retrieving private keys, creating the SIN that is used in retrieving tokens from BitPay, and signing payloads for the `X-Signature` header in a BitPay API request.
# Installation
## Composer
### Install Composer
```bash
curl -sS https://getcomposer.org/installer | php
```
### Install via composer by hand
Add to your composer.json file by hand.
```javascript
{
...
"require": {
...
"bitpay/key-utils": "~2.0"
}
...
}
```
Once you have added this, just run:
```bash
php composer.phar update bitpay/key-utils
```
### Install using composer
```bash
php composer.phar require bitpay/key-utils:~2.0
```
# Usage
## Autoloader
To use the library's autoloader (which doesn't include composer dependencies)
instead of composer's autoloader, use the following code:
```php