matronator / c32check
PHP library for encoding and decoding C32Check addresses
Fund package maintenance!
matronator
Patreon
Ko Fi
www.paypal.me/matronator
www.blockchain.com/btc/address/35VRpVQaqFWjUCnVRpGineShz76QyYgSVg
Requires
- brick/math: ^0.12.1
- tuupola/base58: ^2.1
Requires (Dev)
- phpunit/phpunit: ^11.1
README
C32Check is a simple tool to check and convert C32 addresses.
Requirements
- PHP 8.0 or higher
- Composer
Installation
composer require matronator/c32check
Usage
use Matronator\C32Check\Address; $version = 22; $hexString = '0x1e2a7c8a7e0d61c7a7d679c4e0c8f2e7'; $address = new Address($version, $hexString); echo $address->toBase58Address(); // 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2 echo $address->toC32Address(); // ST1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2Z
Testing
composer test
License
This project is licensed under the MIT License - see the LICENSE file for details.