getBalances

getBalances is a method on the ANT class that retrieves all token balances within the ANT process.

getBalances does not require authentication.

Parameters

The getBalances method does not accept any parameters.

Examples

getBalances

const { ANT } = require('@ar.io/sdk');

async function main() {
  const ant = ANT.init({ processId: "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM" });
  const balances = await ant.getBalances();

  console.log(balances);
}

main();

Output

{
  "ccp3blG__gKUvG3hsGC2u06aDmqv4CuhuDJGOIg0jw4": 1,
  "QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ": 1
}