PHP code example of tokenly / substation-client
1. Go to this page and download the library: Download tokenly/substation-client 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/ */
tokenly / substation-client example snippets
// init the client
$substation_client = app(\Tokenly\SubstationClient\SubstationClient::class);
// create a wallet
$response = $substation_client->createServerManagedWallet('bitcoin', 'My App Wallet');
$wallet_uuid = $response['uuid'];
echo "Wallet ID is " . $wallet_uuid . "\n";
// allocate an address
$response = $substation_client->allocateAddress($wallet_uuid);
$address_uuid = $response['uuid'];
$address_hash = $response['address']; // An address hash like 1AAAA1111xxxxxxxxxxxxxxxxxxy43CZ9j