PHP code example of mr-money / wenchang-avata

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

    

mr-money / wenchang-avata example snippets


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

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

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