1. Go to this page and download the library: Download acedais/kaasu-rpc-php 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/ */
acedais / kaasu-rpc-php example snippets
use Kaasu\Kaasud;
$config = [
'rpcHost' => 'http://127.0.0.1',
'rpcPort' => 10112,
];
$kaasud = new Kaasud($config);
echo $kaasud->getBlockCount();
> {"id":2,"jsonrpc":"2.0","result":{"count":784547,"status":"OK"}}
$response = $kaasuservice->getBalance($walletAddress);
// The result field from the RPC response
$response->result();
// RPC response as JSON string
$response->toJson();
// RPC response as an array
$response->toArray();
// Or other response details
$response->getStatusCode();
$response->getProtocolVersion();
$response->getHeaders();
$response->hasHeader($header);
$response->getHeader($header);
$response->getHeaderLine($header);
$response->getBody();
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.