PHP code example of mtigdemir / ava-php

1. Go to this page and download the library: Download mtigdemir/ava-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/ */

    

mtigdemir / ava-php example snippets


// Default Connection (127.0.0.1:9650)
$client = new \AVA\AVAClient();

$username = "php-ava";
$password = "ava-password";

$client->keyStore->createUser($username, $password);
$client->keyStore->deleteUser($username, $password);

$client->xchain->createAddress($username, $password);
$client->xchain->listAddresses($username, $password);
$client->xchain->send($username, $password, $receiverAddress); // Default Asset AVA
$client->xchain->getBalance($address); // Default Asset AVA

$client->pchain->createAccount($username, $password);

$client->admin->nodeID();
$client->admin->networkName();
bash
$ composer