PHP code example of huangang / wenchang-avata

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

    

huangang / wenchang-avata example snippets


//构建对象
$initData = [
    'apiKey' => 'apiKey',
    'apiSecret' => 'apiSecret',
    'domain' => 'https://stage.apis.avata.bianjie.ai', //测试地址
];
$avataLogic = new Huangang\AvataLogic\AvataLogic($initData);

//创建链账户demo
$name = 'account_name';
$operationId = 'operationId'.rand(1000,9999);

$createRes = $avataLogic->CreateChainAccount($name,$operationId);