我试图在我的网站中集成wave令牌,它在joomla上运行,我对php有点了解。我使用你的api成功整合了我的令牌代码。
我的问题?我使用php,我想知道是否有人可以帮助我,或者是否有关于它的详尽文档
非常感谢所有帮助者。
想看看我目前的整合情况吗? :https://www.itharagaian.net/main/index.php/bastion-token/getting-bastion-tokens
我终于找到了怎么做。
余额=
$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>";
?>