我终于找到了方法。
余额 =
$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>";
?>