PHP code example of dreammo / ant-open-alliance-chain
1. Go to this page and download the library: Download dreammo/ant-open-alliance-chain 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/ */
dreammo / ant-open-alliance-chain example snippets
est = \Dreammo\AntOpenAllianceChain\Request::getInstance('accessId', 'accessKeyContent');
// 开启握手获取通信token
$isOk = $request->shakeHand();
if (!$isOk) {
die("握手失败");
}
// 查看token值
var_dump($request->getShakeHandToken());
$client = new \Dreammo\AntOpenAllianceChain\Client($request);
// 查看最新区块信息
var_dump($client->queryLastBlock());