PHP code example of lxlxw / bytom-php-sdk

1. Go to this page and download the library: Download lxlxw/bytom-php-sdk 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/ */

    

lxlxw / bytom-php-sdk example snippets







use Bytom\BytomClient;

# First, instantiate the SDK Client

# Local node, default url is `127.0.0.1:9888`
$client = new BytomClient();
# Remote node
$client = new BytomClient('url', 'auth-token');

# Now, request bytom api.
$alias = 'test_name';
$pwd = '123456';
$res = $client->createKey($alias, $pwd);
$data = $res->getJSONDecodedBody();
bash
curl -sS https://getcomposer.org/installer | php
json
{
    "xlxw/bytom-php-sdk" : "dev-master"
    }
}
bash
git clone https://github.com/lxlxw/bytom-php-sdk.git
autoload.php