getBalance
getBalance
is a method on the ANT
class that retrieves the token balance for a specific wallet address within the ANT process.
getBalance
does not require authentication.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
address | string - WalletAddress | The wallet address to retrieve the balance for | false |
Examples
getBalance
const { ANT } = require('@ar.io/sdk');
async function main() {
const ant = ANT.init({ processId: "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM" });
const balance = await ant.getBalance({
address: "ccp3blG__gKUvG3hsGC2u06aDmqv4CuhuDJGOIg0jw4"
});
console.log(balance);
}
main();
Output
1