PHP code example of matronator / c32check
1. Go to this page and download the library: Download matronator/c32check library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
matronator / c32check example snippets
use Matronator\C32Check\Address;
$version = 22;
$hexString = '0x1e2a7c8a7e0d61c7a7d679c4e0c8f2e7';
$address = new Address($version, $hexString);
echo $address->toBase58Address(); // 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
echo $address->toC32Address(); // ST1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2Z