1

How do I read my testnode waves wallet balance from my PHP program ?

which URL should be used for reading from testnet nodes

Able to read the balance in live mode.

For live waves balance checking, I use the following cURL code:

$opts = [
CURLOPT_URL => 
'https://nodes.wavesplatform.com/assets/balance/<<wallet address>>',
CURLOPT_RETURNTRANSFER => true,
];


$response = curl_exec($curl);
curl_close($curl);
$balance= json_decode($response, true);

echo "This account has ".$balance[balance]/100000000;
4

1 回答 1

1

您使用 nodes.wavesplatform.com,它是 MAINNET 的节点池。测试网的 URL 是 testnodes.wavesnodes.com

于 2019-05-31T08:15:26.860 回答