我正在尝试将Wave令牌集成到我的网站中,它在joomla上运行,并且我对php有所了解。 我已使用您的api成功集成了令牌的代码。
我的问题?我使用php,我想知道是否有人可以帮助我,或者是否存在有关它的详尽文档
非常感谢所有助手。
想看看我目前的整合情况吗? :https://www.itharagaian.net/main/index.php/bastion-token/getting-bastion-tokens
答案 0 :(得分:1)
我终于找到了解决方法。
余额=
$curl = curl_init();
$opts = [
CURLOPT_URL => 'https://nodes.wavesplatform.com/assets/balance/3PC1NwcrvR9EwDCZ4na2q1RrUY21M5RMg7W/9dmvLmq8iK4aXTHk21Fdi3Tjf2XJUHUoBokvS7zsG7Sn',
CURLOPT_RETURNTRANSFER => true,
];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
$balance= json_decode($response, true);
echo "This account has ";
echo $balance[balance]/100000000;
echo "Bastion Tokens";
?>
还有钱包清单
<?php
$curl = curl_init();
$opts = [
CURLOPT_URL => 'https://nodes.wavesplatform.com/assets/9dmvLmq8iK4aXTHk21Fdi3Tjf2XJUHUoBokvS7zsG7Sn/distribution',
CURLOPT_RETURNTRANSFER => true,
];
curl_setopt_array($curl, $opts);
$response = curl_exec($curl);
curl_close($curl);
$balance= json_decode($response, true);
echo "<br>";
echo "<table><tr><th>NBR</th>< th>WALLET</th><th>VALUE</th></tr>";
foreach ($balance as $address => $amount) {
$i=$i+1;
echo "<tr><td>";
echo $i;
echo "</td><td>";
echo $address;
$wallet[$i] = $address;
echo " </td><td>";
echo round($amount/100000000);
$value[$i]= round($amount/100000000);
echo " Bastion</td>";
echo "</tr>";
}
echo "</table>";
?>